code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE RankNTypes, DataKinds, TypeFamilies #-}
module FunArgs where
f :: forall a. Ord a
=> Int -- ^ First argument
-> a -- ^ Second argument
-> Bool -- ^ Third argument
-> (a -> a) -- ^ Fourth argument
-> () -- ^ Result
f = undefined
g :: a -- ^ First argume... | DavidAlphaFox/ghc | utils/haddock/html-test/src/FunArgs.hs | bsd-3-clause | 775 | 0 | 12 | 262 | 215 | 130 | 85 | 29 | 1 |
-- Mark I lazy wheel-sieve.
-- Colin Runciman (colin@cs.york.ac.uk); March 1996.
-- See article "Lazy wheel sieves and spirals of primes" (to appear, JFP).
import System.Environment
data Wheel = Wheel Int [Int]
primes :: [Int]
primes = sieve wheels primes squares
sieve (Wheel s ns:ws) ps qs =
[n' | o <- s:[s*2,... | beni55/ghcjs | test/nofib/imaginary/wheel-sieve1/Main.hs | mit | 904 | 0 | 14 | 234 | 451 | 240 | 211 | 25 | 2 |
{-# LANGUAGE TypeOperators #-}
module B where
infixr 9 :-
type a :- b = (a,b)
| urbanslug/ghc | testsuite/tests/driver/recomp006/B1.hs | bsd-3-clause | 82 | 0 | 5 | 20 | 24 | 17 | 7 | 4 | 0 |
{-# LANGUAGE DeriveDataTypeable
, FlexibleContexts
, MultiParamTypeClasses
, ScopedTypeVariables
, OverloadedStrings #-}
module LambdaChair.Policy ( LambdaChairPolicy
, withLambdaChairPolicy
-- * Rexport hails interface with... | deian/lambdachair | LambdaChair/Policy.hs | mit | 8,646 | 0 | 24 | 3,094 | 2,358 | 1,172 | 1,186 | 200 | 3 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -fno-warn-implicit-prelude #-}
module Paths_isbn_verifier (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exceptio... | c19/Exercism-Haskell | isbn-verifier/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_isbn_verifier.hs | mit | 2,446 | 0 | 10 | 239 | 410 | 238 | 172 | 33 | 1 |
{-# LANGUAGE UnicodeSyntax, OverloadedStrings #-}
module Web.TinySrv.Monad (
Route
, okay
, okay'
, notFound
, notFound'
, badRequest
, badRequest'
, header
, contentType
, method
, pathList
, pathString
, partialPath
, fullPath
, path
, popPath
, em... | Slowki/TinySrv | src/Web/TinySrv/Monad.hs | mit | 8,196 | 0 | 24 | 2,003 | 2,105 | 1,134 | 971 | 170 | 5 |
{-|
Module : Foreign.Storable.Generic.Plugin.Internal.Error
Copyright : (c) Mateusz Kłoczko, 2016
License : MIT
Maintainer : mateusz.p.kloczko@gmail.com
Stability : experimental
Portability : GHC-only
Contains the Error datatype and related pretty print functions.
-}
{-# LANGUAGE CPP #-}
module Foreig... | mkloczko/derive-storable-plugin | src/Foreign/Storable/Generic/Plugin/Internal/Error.hs | mit | 6,438 | 2 | 15 | 1,638 | 1,572 | 802 | 770 | 119 | 5 |
module Immediate.Simplify where
import Immediate.Syntax
class Simplify a where
simplify :: a -> a
instance Simplify (Expression a) where
simplify = simplifyForceDefer
instance Simplify Module where
simplify (Module name deps tdefs vdefs) = Module name deps tdefs $ simplify `fmap` vdefs
instance Simplify Vdef... | edofic/core.js | src/Immediate/Simplify.hs | mit | 1,437 | 0 | 9 | 220 | 505 | 249 | 256 | 26 | 3 |
module Handler.TutorialRaw where
import Import
getTutorialRawR :: UserId -> BlobSHA -> Handler Text
getTutorialRawR uid blob = do
eres <- getFrozenTutorialBlob uid blob
case eres of
Left _ -> notFound
Right pt -> return $ unTutorialContent $ publishedTutorialContent pt
| fpco/schoolofhaskell.com | src/Handler/TutorialRaw.hs | mit | 296 | 0 | 11 | 65 | 83 | 40 | 43 | 8 | 2 |
import Data.List(foldl')
fEvenSum :: [Integer] -> Integer
fEvenSum l = foldl mySum 0 (filter even l)
where mySum acc x = acc + x
myFoldl f z [] = z
myFoldl f z (x:xs) = myFoldl f (f z x) xs
fEvenSum' :: [Integer] -> Integer
fEvenSum' l = myFoldl mySum 0 (filter even l)
where mySum acc ... | gscalzo/HaskellTheHardWay | HellWay/fEvenSum.hs | mit | 590 | 2 | 8 | 149 | 286 | 149 | 137 | 15 | 1 |
-------------------------------------------------------------
--
-- 数学関連の関数群
--
-- Module : MyModule.NumberTheory
-- Coding : Little Schemer
--
-------------------------------------------------------------
module MyModule.NumberTheory where
import Data.List (sort)
import Data.Ratio
import Data.Maybe
import MyM... | little-schemer/MyModule | NumberTheory.hs | mit | 8,638 | 0 | 16 | 1,910 | 2,536 | 1,409 | 1,127 | 101 | 2 |
-- The Purr platform has the following libraries
-- | Core functionality of Purr
module Purr.Core where
-- | Attachs documentation to an object
_ doc: String -> Function -> Function
-- | Retrieves documentation from an object
a doc -> Maybe String
-- | Alias to `true`
otherwise -> Boolean
-- | Retrieves the internal ... | igalic/purr | docs/platform.hs | mit | 11,663 | 356 | 38 | 2,938 | 2,241 | 1,524 | 717 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Antemodulum.List.NonEmpty (
groupBy1Transitive,
snocList,
module Export
) where
--------------------------------------------------------------------------------
import Antemodulum.ClassyPrelude
import Data.List.NonEmpty as Export
-----------------------------------... | docmunch/antemodulum | src/Antemodulum/List/NonEmpty.hs | mit | 1,529 | 0 | 18 | 353 | 494 | 269 | 225 | 27 | 4 |
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE GADTs #-}
module Vyom.Term.TupleSym where
import Data.Kind (Type)
import Vyom
-- Literal values
class TupleSym r where
tuple :: r h a -> r h b -> r h (a,b)
first :: r h (a,b) -> r h a
second :: r h (a,b) -> r h b
instance TupleSym Ru... | ajnsit/vyom | src/Vyom/Term/TupleSym.hs | mit | 2,047 | 0 | 20 | 502 | 874 | 432 | 442 | 47 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
module JoScript.Pass.LexerTest (tests) where
import Protolude
import Data.Conduit
import Data.Conduit.List (sourceList)
import qualified Data.Sequence as Seq
import Text.Show.Pretty (ppShow)
import Test.HUnit
import JoScript.Data.Block
import JoScr... | AKST/jo | source/test/JoScript/Pass/LexerTest.hs | mit | 2,807 | 0 | 17 | 546 | 683 | 369 | 314 | 49 | 3 |
{-# LANGUAGE CPP #-}
module Main ( main
) where
import Hlockx
import Paths_hlockx (version)
import Data.Version (showVersion)
import Foreign.C.Types (CUInt)
import System.Environment
import System.Exit
import System.IO
import System.Console.GetOpt
data Options = Options { optSLock :: Bool
... | skinner33/hlockx | src/Main.hs | mit | 2,098 | 0 | 16 | 724 | 537 | 296 | 241 | 55 | 1 |
module Main where
import Parser
import System.IO
process :: String -> IO ()
process line = do
let res = parseToplevel line
case res of
Left err -> print err
Right ex -> mapM_ print ex
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
loop
where
loop = do
putStr "ready> "
input <- ... | e-jigsaw/kaleidoscope | Main.hs | mit | 431 | 0 | 14 | 134 | 156 | 72 | 84 | 21 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-patchfilter.html
module Stratosphere.ResourceProperties.SSMPatchBaselinePatchFilter where
... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/SSMPatchBaselinePatchFilter.hs | mit | 1,947 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, ParallelListComp #-}
{-|
Module: Text.PhonotacticLearner.PhonotacticConstraints.FileFormats
Description: Generation of candidate constraint sets.
Copyright: © 2016-2017 George Steel and Peter Jurgec
License: GPL-2+
Maintainer: george.steel@gmail.com
Functions for s... | george-steel/maxent-learner | maxent-learner-hw/src/Text/PhonotacticLearner/PhonotacticConstraints/FileFormats.hs | gpl-2.0 | 5,947 | 1 | 17 | 1,317 | 1,629 | 837 | 792 | 95 | 4 |
module H03 where
k_ésimo :: [a] -> Int -> a
k_ésimo (x:_) 1 = x
k_ésimo (_:xs) k = k_ésimo xs (k - 1)
| dmunguia/H-99 | src/H03.hs | gpl-2.0 | 119 | 3 | 7 | 37 | 75 | 40 | 35 | 4 | 1 |
module Tests.Evaluation where
import Logic.SecPAL.Language
import Logic.SecPAL.Pretty
import Logic.General.Pretty()
import Logic.SecPAL.Parser
import Logic.SecPAL.Proof
import Text.Parsec
import Logic.SecPAL.Evaluable
import Logic.SecPAL.Context
import Tests.Testable
import System.IO.Unsafe (unsafePerformIO)
ppProof ... | bogwonch/SecPAL | tests/Tests/Evaluation.hs | gpl-3.0 | 8,664 | 0 | 12 | 2,179 | 2,336 | 1,263 | 1,073 | 190 | 2 |
{-
This file is part of pia.
pia is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
pia is distributed in the hope that it will be usef... | swoertz/pia | src/Polynomial.hs | gpl-3.0 | 7,488 | 0 | 19 | 1,748 | 1,960 | 1,033 | 927 | 111 | 4 |
module FuncTorrent.PeerThreadData
(PeerThread(..),
PeerThreadAction(..),
PeerThreadStatus(..),
Piece,
TransferStats(..)
) where
import Control.Concurrent (MVar, ThreadId)
import Data.IORef (IORef)
import FuncTorrent.Peer
type Piece = Int
data PeerThreadStatus
= PeerCommError
| In... | jaseemabid/functorrent | src/FuncTorrent/PeerThreadData.hs | gpl-3.0 | 1,204 | 0 | 11 | 337 | 281 | 175 | 106 | 41 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- | Xapian database integration
module HsBooru.Xapian
( XapianM
, XapianDB
, localDB
, memoryDB
, runXM
, xapianStore
, txBegin
, txCommit
, sanitizeTag
) where
import Data.Char
import Data.Foldable
import Data.Time.Clock.POSIX
import System.F... | haasn/hsbooru | src/HsBooru/Xapian.hs | gpl-3.0 | 3,255 | 0 | 14 | 746 | 842 | 425 | 417 | -1 | -1 |
module Id where
import Data.Text
data Identity = Identity
{ name :: Text } deriving (Eq, Show)
| patrickboe/wheel | src/lib/hs/Id.hs | gpl-3.0 | 100 | 0 | 8 | 22 | 35 | 21 | 14 | 4 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-billing/gen/Network/Google/Resource/CloudBilling/BillingAccounts/Create.hs | mpl-2.0 | 6,353 | 0 | 16 | 1,217 | 728 | 434 | 294 | 104 | 1 |
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
module Netw... | twittner/wai-predicates | src/Network/Wai/Predicate/Accept.hs | mpl-2.0 | 1,547 | 0 | 16 | 350 | 448 | 246 | 202 | 35 | 3 |
-- |Common functions between exchanges.
module Exchange where
import Data.Scientific
data Kind = Bid -- ^ Buying order
| Trade -- ^ Completed trade
| Ask -- ^ Selling order
| Rate -- ^ Rate is used instead of trade when not
-- broadcasting full order book
... | koodilehto/kryptoradio | data_sources/exchange/Exchange.hs | agpl-3.0 | 804 | 0 | 8 | 304 | 118 | 77 | 41 | 14 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
module QuantLib.PricingEngines
( module QuantLib.PricingEngines
) where
import QuantLib.Event
class Event e => PricingEngine a e where
peCalculate :: e->a->e
| paulrzcz/hquantlib | src/QuantLib/PricingEngines.hs | lgpl-3.0 | 223 | 0 | 8 | 50 | 51 | 28 | 23 | 6 | 0 |
module Main where
import qualified Control.Monad.Random as R
import qualified Data.List as L
import qualified Data.Map as M
type TransitionMap = M.Map (String, String) Rational
type MarkovChain = M.Map String [(String, Rational)]
addTransition :: TransitionMap -> (String, String) -> TransitionMap
addTransition m k =... | vasily-kartashov/playground | etc/markov.hs | apache-2.0 | 1,553 | 0 | 12 | 426 | 540 | 281 | 259 | 37 | 2 |
module OutClean where
import Treedef
import Util
import System.IO
import System.Exit
import Data.Maybe
------------------------------
-- cleanit
------------------------------
cleanit parseTree = do
h <- openCleanOut
prologue h
cleanServers h parseTree
cleanSegments h parseTree
cleanConnect h
cleanStopServers ... | shlomobauer/BuildIT | src/OutClean.hs | apache-2.0 | 6,869 | 0 | 15 | 1,365 | 2,274 | 1,070 | 1,204 | 182 | 8 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.com>
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or... | shockkolate/lambdircd | src/IRCD/Clients.hs | apache-2.0 | 1,966 | 0 | 12 | 453 | 473 | 246 | 227 | 34 | 2 |
module Day3_2 (main) where
import Data.List
main :: IO ()
main = do
input <- getLine
let (santa1Dirs, santa2Dirs) = splitDirections input
housesSanta1 = step santa1Dirs [(0,0)]
housesSanta2 = step santa2Dirs [(0,0)]
combinedHouses = length $ nub $ housesSanta1 ++ housesSanta2
putSt... | ksallberg/adventofcode | 2015/src/Day3_2.hs | bsd-2-clause | 1,033 | 0 | 13 | 272 | 478 | 261 | 217 | 27 | 3 |
module Helpers.Model
( findOrCreate
, joinTables
, joinTables3
) where
import Prelude
import Yesod
import Data.Maybe (catMaybes)
import qualified Data.Map as M
findOrCreate :: ( YesodPersist m
, PersistUnique (YesodPersistBackend m (HandlerT m IO))
, PersistEntity v
... | pbrisbin/renters-reality | Helpers/Model.hs | bsd-2-clause | 1,745 | 0 | 14 | 616 | 635 | 335 | 300 | -1 | -1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.LO.Corpus
( corpus ) where
import Data.String
impo... | facebookincubator/duckling | Duckling/Numeral/LO/Corpus.hs | bsd-3-clause | 2,221 | 0 | 9 | 823 | 454 | 251 | 203 | 55 | 1 |
import qualified Data.MemoCombinators as Memo
import Text.Printf (printf)
-- the probability that p2 wins when p1 scores a, and p2 scores b (p1 first).
win :: Int -> Int -> Double
win a b = Memo.memo2 Memo.integral Memo.integral win' a b
where
win' a b | a >= 100 = 0.0
| b >= 100 = 1.0
... | foreverbell/project-euler-solutions | src/232.hs | bsd-3-clause | 795 | 0 | 24 | 317 | 352 | 180 | 172 | 15 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Web.Auth0.Types where
import Control.Lens.TH
import Control.Monad (mzero)
import Control.Monad.Except... | collegevine/auth0 | src/Web/Auth0/Types.hs | bsd-3-clause | 9,462 | 0 | 20 | 2,712 | 2,703 | 1,446 | 1,257 | 252 | 1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
[lq| type OList a = [a]<{\fld v -> (v >= fld)}> |]
[lq| assert sort3 :: (Ord a) => [a] -> OList a |]
sort3 :: (Ord a) => [a] -> [a]
sort3 = qsort
qsort:: (Ord a) => [a] -> [a]
[lq| qsort:: (Ord a) => xs:[a] -> OList a / [(len xs), 0]|]
qsort [] = []
qsort... | spinda/liquidhaskell | tests/gsoc15/unknown/pos/RecQSort.hs | bsd-3-clause | 919 | 0 | 10 | 264 | 368 | 201 | 167 | 22 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_HADDOCK show-extensions #-}
{-|
Module : $Header$
Copyright : (c) 2016 Deakin Software & Technology Innovation Lab
License : BSD3
Maintainer : Rhys Adams <rhys.adams... | rimmington/eclogues | eclogues-impl/app/api/Eclogues/State.hs | bsd-3-clause | 14,520 | 0 | 17 | 3,335 | 4,520 | 2,288 | 2,232 | -1 | -1 |
module PulseAudio where
import qualified Control.Concurrent as C
import Control.Monad
import qualified Data.ByteString as BS
import Data.Time
import Pipes
import qualified Pipes.Prelude as P
import Sound.Pulse.Simple
import WavePacket
newtype PAByteString = PA... | z0isch/Speakerete | src/PulseAudio.hs | bsd-3-clause | 1,101 | 0 | 13 | 391 | 297 | 155 | 142 | 25 | 1 |
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
import qualified NormalizationTests as Norm
import qualified SegmentationTests as Segm
main = defaultMain tests
tests :: TestTree
tests = testGroup "tests" [
testGroup "norm" [
testCase "g1" (Norm.g1_check @?= Tru... | llelf/prose | tests/Tests.hs | bsd-3-clause | 654 | 0 | 14 | 243 | 137 | 77 | 60 | 15 | 1 |
{-# LANGUAGE CPP #-}
----------------------------------------------------------------------------
--
-- Stg to C--: primitive operations
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmPrim (
cgOpApp,
cgPrimOp, -- intern... | GaloisInc/halvm-ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | 97,688 | 0 | 19 | 26,089 | 25,127 | 12,567 | 12,560 | -1 | -1 |
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of sour... | UBMLtonGroup/timberc | src/Interfaces.hs | bsd-3-clause | 14,852 | 0 | 24 | 5,842 | 3,789 | 1,983 | 1,806 | 168 | 4 |
{-# LANGUAGE PatternGuards #-}
module System.Console.CmdArgs.Implicit.Reader(Reader(..), reader) where
import Data.Generics.Any
import qualified Data.Generics.Any.Prelude as A
import System.Console.CmdArgs.Explicit
import Data.Char
import Data.Int
import Data.Word
import Data.List
import Data.Maybe
data Reader = Re... | ndmitchell/cmdargs | System/Console/CmdArgs/Implicit/Reader.hs | bsd-3-clause | 4,114 | 0 | 20 | 1,121 | 1,868 | 934 | 934 | 75 | 4 |
module Pad where
import Graphics.UI.GLUT hiding (Red, Green, Blue, rotate)
import Data.Bits ((.|.), (.&.), complement)
--------------------------------
-- Pad
padU,padL,padR,padD,padA,padB,padAll :: Int
padU = 1
padL = 2
padR = 4
padD = 8
padA = 16
padB = 32
padAll = padU .|. padL .|. padR .|. padD .|. padA .|. pad... | mokehehe/htetris | Pad.hs | bsd-3-clause | 1,871 | 88 | 12 | 401 | 728 | 411 | 317 | 60 | 11 |
{-# LANGUAGE FlexibleContexts #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above... | emwap/feldspar-language | src/Feldspar/Algorithm/FFT.hs | bsd-3-clause | 3,858 | 0 | 17 | 936 | 925 | 486 | 439 | 41 | 1 |
{-# OPTIONS -#include "autoPrim.h" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Win32.Com.Automation
-- Copyright : (c) Daan Leijen <leijen@fwi.uva.nl>, Sigbjorn Finne <sof@dcs.gla.ac.uk> 1998-99, Sigbjorn Fi... | HJvT/com | System/Win32/Com/Automation.hs | bsd-3-clause | 63,021 | 0 | 19 | 17,423 | 17,811 | 9,192 | 8,619 | 1,410 | 3 |
module MRP (
module MRP.Commands,
module MRP.CommandsC,
module MRP.QuasiQuoter
) where
import MRP.Commands
import MRP.CommandsC
import MRP.QuasiQuoter | jfischoff/minimal-resource-protocol | src/MRP.hs | bsd-3-clause | 187 | 0 | 5 | 53 | 39 | 25 | 14 | 7 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2001-2017
--
-- Finding the compiler's base directory.
--
-----------------------------------------------------------------------------
-}
modu... | ezyang/ghc | compiler/main/SysTools/BaseDir.hs | bsd-3-clause | 8,129 | 38 | 23 | 2,392 | 1,072 | 579 | 493 | 25 | 2 |
module VispUsage
( getUsage
) where
import VispUsage.Fetcher
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| ajmccluskey/visp-usage | src/VispUsage.hs | bsd-3-clause | 120 | 0 | 6 | 26 | 32 | 18 | 14 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module ETA.CodeGen.Main where
import ETA.BasicTypes.Module
import ETA.Main.HscTypes
import ETA.Types.Type
import ETA.Types.TyCon
import ETA.StgSyn.StgSyn
import ETA.Main.DynFlags
import ETA.Utils.FastString
import ETA.BasicTypes.VarEnv
import ETA.BasicTypes.Id
import ETA.BasicTypes.N... | alexander-at-github/eta | compiler/ETA/CodeGen/Main.hs | bsd-3-clause | 10,156 | 0 | 22 | 3,391 | 2,943 | 1,486 | 1,457 | -1 | -1 |
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
module Data.ExprGADT.Dumb.Infer where
-- import Control.Exception
-- import Control.Arrow
-- import Control.Monad.Except
-- import Control.Monad.RWS
-- import Data.ExprGADT.Dumb.Types
-- import... | mstksg/expr-gadt | src/Data/ExprGADT/Dumb/Infer.hs | bsd-3-clause | 10,567 | 0 | 3 | 4,313 | 235 | 233 | 2 | 5 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
module
Types.PlanSpec
where
import qualified Control.Arrow.Machine as P
... | as-capabl/machinecell | test/Types/PlanSpec.hs | bsd-3-clause | 2,070 | 0 | 21 | 633 | 697 | 389 | 308 | 60 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Run
-- Copyright : Duncan Coutts 2009
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This modu... | mydaum/cabal | Cabal/Distribution/Simple/Program/Run.hs | bsd-3-clause | 9,600 | 0 | 16 | 2,567 | 1,996 | 1,104 | 892 | 188 | 7 |
{-# LANGUAGE TypeFamilies #-}
-- | Type classes for Toss abstraction.
module Pos.Chain.Ssc.Toss.Class
( MonadTossRead (..)
, MonadTossEnv (..)
, MonadToss (..)
) where
import Universum hiding (id)
import Control.Monad.Except (ExceptT)
import Control.Monad.Tr... | input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Ssc/Toss/Class.hs | mit | 6,575 | 0 | 12 | 1,453 | 1,574 | 831 | 743 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module AI.Visualizations
( networkHistogram
, weightList
, biasList
) where
import AI.Layer
import AI.Network
import AI.Network.FeedForwardNetwork
import AI.Neuron
import Numeric.LinearAlgebra
import Data.Foldable ... | jbarrow/LambdaNet | AI/Visualizations.hs | mit | 848 | 0 | 12 | 212 | 203 | 111 | 92 | -1 | -1 |
--------------------------------------------------------------------------
-- Copyright (c) 2007-2013, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Haldeneggsteig... | daleooo/barrelfish | hake/XScale.hs | mit | 6,935 | 8 | 17 | 2,674 | 1,033 | 573 | 460 | 128 | 1 |
module Chapter6Exercises where
import Data.List (sort)
data Person = Person Bool deriving Show
printPerson :: Person -> IO ()
printPerson person = putStrLn (show person)
-- printPerson (Person False)
data Mood = Blah
| Woot deriving (Show, Eq)
settleDown :: Mood -> Mood
settleDown x = if x == Woot
... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Chapter6.hs | mit | 1,952 | 0 | 8 | 564 | 621 | 344 | 277 | 58 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | This module is a complete description of the data structure used in Inner Ear
-- to record user actions/choices, in order both to inform the adaptive generation
-- of new ear-training questions for that user, and to provide data for research analysis.
module InnerEar.Types.Dat... | JamieBeverley/InnerEar | src/InnerEar/Types/Data.hs | gpl-3.0 | 5,867 | 0 | 13 | 1,012 | 1,515 | 790 | 725 | 86 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ReplaceNetworkAclAssociation.hs | mpl-2.0 | 5,002 | 0 | 9 | 987 | 559 | 339 | 220 | 68 | 1 |
{-|
Module : Examples.Rover.Model
Description : Model for the Rover example
Copyright : (c) 2017 Pascal Poizat
License : Apache-2.0 (see the file LICENSE)
Maintainer : pascal.poizat@lip6.fr
Stability : experimental
Portability : unknown
-}
module Examples.Rover.Model where
import Numeric.Natura... | pascalpoizat/veca-haskell | src/Examples/Rover/Model.hs | apache-2.0 | 8,285 | 0 | 13 | 2,032 | 3,000 | 1,665 | 1,335 | 253 | 1 |
module Tests.Language.Interpreter.Loops
( interpreterLoopTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import T... | rumblesan/improviz | test/Tests/Language/Interpreter/Loops.hs | bsd-3-clause | 1,244 | 0 | 13 | 422 | 266 | 144 | 122 | 25 | 1 |
-- |
-- Module : Test.Checks.Property.Collection
-- License : BSD-style
-- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk>
-- Stability : stable
-- Portability : portable
--
-- This module contains all the different property tests for the Foundation's
-- collection classes.
--
-- You can either run ... | vincenthz/hs-foundation | foundation/tests/Test/Checks/Property/Collection.hs | bsd-3-clause | 17,710 | 0 | 17 | 5,074 | 5,581 | 2,854 | 2,727 | 231 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE CPP #-}
#ifdef DEBUG_CONFLICT_SETS
{-# LANGUAGE ImplicitParams #-}
#endif
module Distribution.Solver.Modular.Dependency (
-- * Variables
Var(..)
, simplifyVar
, varPI
, showVar
-- * Conflict sets
, ConflictSet
, CS.showCS... | sopvop/cabal | cabal-install/Distribution/Solver/Modular/Dependency.hs | bsd-3-clause | 17,406 | 0 | 14 | 3,643 | 3,609 | 1,938 | 1,671 | 204 | 9 |
{-# LANGUAGE CPP,OverloadedStrings #-}
{-# OPTIONS_GHC -F -pgmF htfpp #-}
-- |
-- Module : Language.Haskell.BuildWrapper.ImportsTests
-- Copyright : (c) JP Moresmau 2013
-- License : BSD3
--
-- Maintainer : jpmoresmau@gmail.com
-- Stability : beta
-- Portability : portable
--
-- Test import ... | achirkin/BuildWrapper | test/Language/Haskell/BuildWrapper/ImportsTests.hs | bsd-3-clause | 13,355 | 0 | 13 | 5,432 | 2,750 | 1,358 | 1,392 | 295 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- http://orbt.io/QHBm.png
module Main where
import Text.Hastache
import Web.Scotty.Trans as S
import Web.Scotty.Hastache
main :: IO ()
main = scottyH' 3000 $ do
setTemplatesDir "templates"
get "/:word" $ do
beam <- param "word"
setH "action" $ MuVariable (beam :: Strin... | superduper/scotty-hastache | examples/hastachetest.hs | bsd-3-clause | 349 | 0 | 13 | 65 | 98 | 50 | 48 | 12 | 1 |
module Main where
import Properties
import UnitTests
import Test.Framework.Runners.Console (defaultMain)
main = defaultMain $ [UnitTests.tests, Properties.tests]
| joshcough/HaskellStarter | test/Main.hs | mit | 164 | 0 | 7 | 18 | 41 | 26 | 15 | 5 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-orphans -O0 #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE QuasiQuotes, TemplateHaskell, CPP, GADTs, TypeFamilies, OverloadedStrings, FlexibleContexts, EmptyDataDecls, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}
module EmbedTest (specs,... | pseudonom/persistent | persistent-test/src/EmbedTest.hs | mit | 14,607 | 6 | 19 | 3,854 | 4,144 | 1,990 | 2,154 | 116 | 1 |
{-# LANGUAGE TypeInType, GADTs #-}
module T13988 where
import Data.Kind
data Foo (a :: k) where
MkFoo :: (k ~ Type) => Foo (a :: k)
| ezyang/ghc | testsuite/tests/ghci/scripts/T13988.hs | bsd-3-clause | 137 | 0 | 8 | 31 | 46 | 29 | 17 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Stg to C-- code generation: bindings
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmBind (
cgTopRhsClosure,
cgBind,
em... | lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmBind.hs | bsd-3-clause | 30,736 | 8 | 26 | 9,165 | 4,572 | 2,391 | 2,181 | 372 | 3 |
{-# LANGUAGE PatternGuards #-}
module Idris.Elab.Instance(elabInstance) where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.DSL
import Idris.Error
import Idris.Delaborate
import Idris.Imports
import Idris.Coverage
import Idris.DataOpts
import Idris.Providers
import Idris.Primitives
import Idris.Inliner
imp... | TimRichter/Idris-dev | src/Idris/Elab/Instance.hs | bsd-3-clause | 14,083 | 52 | 23 | 5,077 | 5,022 | 2,545 | 2,477 | 276 | 38 |
-----------------------------------------------------------------------------
-- |
-- Module : PwPfConversion
-- Copyright : (c) Jose Proenca 2005
-- License : GPL
--
-- Maintainer : jproenca@di.uminho.pt
-- Stability : experimental
-- Portability : portable
--
-- Translations between pointwise and ... | forste/haReFork | refactorer/PwPf/PwPfConversion.hs | bsd-3-clause | 6,416 | 0 | 36 | 1,768 | 2,813 | 1,439 | 1,374 | 114 | 13 |
{-# LANGUAGE MagicHash, UnboxedTuples, MultiParamTypeClasses, TypeFamilies,
FunctionalDependencies, KindSignatures, PolyKinds, DataKinds,
UndecidableInstances #-}
module T14185 where
import GHC.Types
import GHC.Prim
class Unbox (t :: *) (r :: TYPE k) | t -> r, r -> t where
unbox :: t -> r
box :: r -> t
inst... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/T14185.hs | bsd-3-clause | 684 | 0 | 8 | 156 | 280 | 152 | 128 | 22 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
module Test10276 where
f1 = [| bar |]
f2 = [e| bar |]
class QQExp a b where
qqExp x = [||fst $ runState $$(qqExpM x)
((0,M.empty) :: (Int,M.Map L.Name [L.Operand]))||]
class QQExp2 a b where
qqExp x = [e||fst $ runState $$(qqE... | ezyang/ghc | testsuite/tests/ghc-api/annotations/Test10276.hs | bsd-3-clause | 402 | 3 | 15 | 113 | 176 | 102 | 74 | -1 | -1 |
module T7702Plugin ( plugin ) where
import GhcPlugins
-- A plugin that does nothing but tickle CoreM's writer.
plugin :: Plugin
plugin = defaultPlugin { installCoreToDos = install }
where
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todos = do
reinitializ... | urbanslug/ghc | testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs | bsd-3-clause | 1,918 | 0 | 10 | 425 | 417 | 211 | 206 | 33 | 1 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
-- !!! class/instance mumble that failed Lint at one time
--
module ShouldCompile where
class Foo a where
op :: Int -> a -> Bool
data Wibble a b c = MkWibble a b c
instance (Foo a, Foo b, Foo c) => Foo (Wibble a b c) where
op x y = error "xxx"
| urbanslug/ghc | testsuite/tests/simplCore/should_compile/simpl002.hs | bsd-3-clause | 306 | 0 | 8 | 69 | 97 | 53 | 44 | 7 | 0 |
{-# Language TemplateHaskell #-}
module Optimizer where
import Language.Haskell.TH
explode :: Name -> ExpQ -> ExpQ
explode name f =
do TyConI (DataD _ _ _ _ constructors _) <- reify name
xName <- newName "x"
lam1E (varP xName)
(caseE (varE xName)
[ match (conP constructorName []... | glguy/advent2016 | asmprog-final/Optimizer.hs | isc | 495 | 0 | 17 | 181 | 158 | 78 | 80 | 13 | 1 |
{-# LANGUAGE
TemplateHaskell
, GeneralizedNewtypeDeriving
, DeriveGeneric
#-}
module Cido.Types.User where
import Happstack.Server.Internal.Types (FromReqURI(..))
import Text.Email.Validate (EmailAddress)
import GHC.Generics
import Data.Aeson
import Text.Read (readMaybe)
import Data.Time ... | L8D/cido-api | lib/Cido/Types/User.hs | mit | 1,559 | 0 | 9 | 379 | 450 | 257 | 193 | 45 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Codec.Soten.PostProcess.ConvertToLHTest where
import Test.Hspec
import Control.Lens ((&), (^.), (.~))
import qualified Data.Vector as V
import Linear
import Codec.Soten.PostProcess.ConvertToLH
import Codec.Soten.Scene
import Codec.Soten.Scene.Anim
import Codec.Soten.Scene.Me... | triplepointfive/soten | test/Codec/Soten/PostProcess/ConvertToLHTest.hs | mit | 3,610 | 0 | 19 | 836 | 1,237 | 638 | 599 | 85 | 1 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, FlexibleInstances #-}
-- | If you are interested in the IHaskell library for the purpose of
-- augmenting the IHaskell notebook or writing your own display mechanisms
-- and widgets, this module contains all functions you need.
--
-- In order to create a display mech... | aostiles/LiveHaskell | src/IHaskell/Display.hs | mit | 5,475 | 0 | 10 | 952 | 852 | 497 | 355 | 72 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
module Data.Type.Function
( Id
, Const
, (:.:)
, Flip
, (:$:)
, (:&:)
, On
) where
type Id (x :: b) = x
type Const (x :: a) (y :: b) = x
type ((f :: b -> c) :.: (g :: a -> b)) (x :: a) = f (g x)
type Flip (f :: a -> b -> c) (... | nickspinale/data-type-util | Data/Type/Function.hs | mit | 499 | 2 | 8 | 173 | 278 | 176 | 102 | 17 | 0 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.SVGPathSegList (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.SVGPathSegList
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Gen... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/SVGPathSegList.hs | mit | 355 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-|
Module : PostgREST.QueryBuilder
Description : PostgREST SQL generating functions.
This module provides functions to consume data types that
represent database... | NotBrianZach/postgrest | src/PostgREST/QueryBuilder.hs | mit | 24,324 | 0 | 26 | 6,275 | 6,469 | 3,457 | 3,012 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.StorageErrorCallback
(newStorageErrorCallback, newStorageErrorCallbackSync,
newStorageErrorCallbackAsync, StorageErrorCallback)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float,... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/StorageErrorCallback.hs | mit | 2,472 | 0 | 13 | 515 | 532 | 316 | 216 | 45 | 1 |
{-# htermination (minimumMyBool :: (List MyBool) -> MyBool) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
foldl :: (a -> b -> a) -> a -> (List b) -> a;
foldl f z Nil = z;
foldl f z (Cons x xs) = foldl f (f z x) xs;
foldl1 :: (a -> a -> a) -> (List... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/minimum_2.hs | mit | 874 | 0 | 9 | 214 | 372 | 200 | 172 | 23 | 1 |
module FunMap (
FunMap(),
empty,
singleton,
(!),
at,
mapKeys,
mapKeys',
mapKeysR,
mapKeysR',
insert,
delete,
toList
) where
import Control.Monad ((>=>))
-- | A simple map between key and values.
--
-- It's implemented as a function.
data FunMap ... | Purlox/FunMap | Source/Data/FunMap.hs | mit | 3,615 | 0 | 11 | 963 | 1,156 | 604 | 552 | 59 | 2 |
module Unison.Codebase.TermEdit where
import Unison.Hashable (Hashable)
import qualified Unison.Hashable as H
import Unison.Reference (Reference)
import qualified Unison.Typechecker as Typechecker
import Unison.Type (Type)
import Unison.Var (Var)
data TermEdit = Replace Reference Typing | Deprecate
deriving (Eq, Or... | unisonweb/platform | parser-typechecker/src/Unison/Codebase/TermEdit.hs | mit | 1,634 | 0 | 10 | 341 | 490 | 255 | 235 | 37 | 3 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Betfair.APING.Requests.Logout
( logout
, Logout(..)
) where
import Control.Exception.Safe
import Data.Aeson
import Data.Aeson.TH
i... | joe9/betfair-api | src/Betfair/APING/Requests/Logout.hs | mit | 1,688 | 0 | 17 | 330 | 451 | 251 | 200 | 53 | 1 |
module Invertible where
| vladfi1/hs-misc | Invertible.hs | mit | 26 | 0 | 2 | 5 | 4 | 3 | 1 | 1 | 0 |
-- safeSqrt x = sqrtBool (x >= 0) x
-- sqrtBool True x = Just (sqrt x)
-- sqrtBool False _ = Nothing
safeSqrt x
| x >= 0 = Just (sqrt 0)
| otherwise = Nothing
| threetreeslight/learning-haskell | practice/guards.hs | mit | 165 | 0 | 8 | 43 | 40 | 19 | 21 | 3 | 1 |
-- ====================
-- Complete the following functions and submit your file to Canvas.
-- ====================
-- Do not change the names of the functions.
-- Do not change the number of arguments in the functions.
-- If your file cannot be loaded by the Haskell compiler, your submission may be cancelled.
-- The... | Am3ra/CS | CS4/languages/HW09.hs | mit | 4,175 | 0 | 10 | 1,132 | 1,751 | 935 | 816 | 102 | 2 |
module {{moduleName}}.Swallow.Test
(swallowSuite)
where
import Test.Tasty (testGroup, TestTree)
import Test.Tasty.HUnit
import $module.Swallow
swallowSuite :: TestTree
swallowSuite = testGroup "Swallow"
[testCase "swallow test" testSwallow]
testSwallow :: Assertion
testSwallow = "something" @=? swallow "some"... | mankyKitty/holy-haskell-project-starter | scaffold/test/ModuleName/Swallow/Test.hs | mit | 329 | 3 | 7 | 43 | 83 | 49 | 34 | -1 | -1 |
module Main where
import Data.List (replicate)
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Maybe (fromJust)
main :: IO ()
main = do
putStrLn $ "Part 1: " ++ show (part1 myRound)
putStrLn $ "Part 2: " ++ show (part2 myRound)
putStrLn "all done"
myInput :: Int
myInput = 3014603... | CarstenKoenig/AdventOfCode2016 | Day19/Main.hs | mit | 1,042 | 0 | 11 | 240 | 510 | 269 | 241 | 36 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
import Language.PureScript.Binding
import qualified Data.Text.Lazy.IO as T
data A = A Int Double String
data B = B { number :: [Int], first :: String }
data C = C1 { a :: A, name :: String, admin :... | philopon/haskell-purescript-binding | examples/example.hs | mit | 587 | 0 | 11 | 112 | 200 | 110 | 90 | 19 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Widgets.Setting where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class (liftI... | davidar/markup.rocks | src/Widgets/Setting.hs | mit | 5,345 | 7 | 22 | 1,931 | 1,222 | 638 | 584 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Server (runServer)
main :: IO ()
main = runServer
| kylesnowschwartz/shop-share | server/app/Main.hs | mit | 123 | 0 | 6 | 30 | 28 | 17 | 11 | 5 | 1 |
module Points where
import Graphics.Rendering.OpenGL
points :: Int -> [(GLfloat,GLfloat,GLfloat)]
points n = [ (sin (4*pi*k/n'), cos (4*pi*k/n'), 2 * k / n' - 1) | k <- [1..n'] ]
where n' = fromIntegral n
| smanilov/petulant-octo-tribble | Points.hs | mit | 212 | 0 | 11 | 42 | 122 | 68 | 54 | 5 | 1 |
{-# LANGUAGE Rank2Types #-}
module TeX.Parser.Conditional
( expandConditional
-- for tests:
, conditionalHead, evaluateHead, runConditionalBody
, ConditionalHead(IfTrue, IfFalse, IfNum)
, Relation(LessThan, GreaterThan, EqualTo)
)
where
import Prelude ( Integer, Show, Eq, Bool(True, False)
, return, f... | xymostech/tex-parser | src/TeX/Parser/Conditional.hs | mit | 3,947 | 0 | 16 | 786 | 1,327 | 699 | 628 | 107 | 3 |
-- file: ch4/exB1.hs
-- A function that converts a `String` to an `Int`
-- Daniel Brice
import Data.Char (digitToInt)
safeDigitToInt :: Char -> Int
safeDigitToInt '.' = error "safeDigitToInt: '.' is not an allowed input."
safeDigitToInt dig = digitToInt dig
safeAsInt :: String -> Int
safeAsInt ('-' : xs) = (- 1) * (... | friedbrice/RealWorldHaskell | ch4/exB1.hs | gpl-2.0 | 504 | 0 | 9 | 109 | 136 | 70 | 66 | 9 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Transform.Fourier.SRDIF
-- Copyright : (c) Matthew Donadio 2003
-- License : GPL
--
-- Maintainer : m.p.donadio@ieee.org
-- Stability : experimental
-- Portability : portable
--
-- Split-Radix Deci... | tolysz/dsp | Numeric/Transform/Fourier/SRDIF.hs | gpl-2.0 | 1,908 | 0 | 17 | 478 | 605 | 336 | 269 | 24 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.