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
{-# OPTIONS_GHC -fglasgow-exts #-} {-# LANGUAGE BangPatterns #-} module HEP.ModelScan.MSSMScan.Read where import Data.List import HEP.ModelScan.MSSMScan.Model import HEP.Physics.MSSM.OutputPhys import HEP.ModelScan.MSSMScan.Pattern -- import HROOT import qualified Data.ListLike as LL import qualified Data.Iterate...
wavewave/MSSMScan
src/HEP/ModelScan/MSSMScan/Read.hs
bsd-2-clause
4,374
0
14
1,413
1,365
745
620
86
4
{-# LANGUAGE OverloadedStrings #-} module Handler.Admin where import Import import Yesod.Auth {- profileForm :: Html -> MForm App App (FormResult User, Widget) profileForm :: renderDivs $ User <$> areq textField "Name" Nothing <*> areq textField "Email address" Nothing <*> areq textField "Access Level" ...
madebyjeffrey/socrsite
Handler/Admin.hs
bsd-2-clause
483
0
12
93
53
28
25
-1
-1
module Main where import Control.Monad.Reader import Control.Monad (when) import Data.Configurator import Data.Traversable (traverse) import Data.Either import qualified Data.Foldable as DF import Data.Maybe import qualified Data.Map as M import qualified Data.Aeson as A import Options.Applicative import Safe (headMay...
carlohamalainen/imagetrove-uploader
MainBruker.hs
bsd-2-clause
411
0
5
48
103
67
36
15
1
module Test.Day5 where import Day5 as D5 import Test.Tasty import Test.Tasty.HUnit day5 :: TestTree day5 = testGroup "Doesn't He Have Intern-Elves For This?" [part1, part2] part1 :: TestTree part1 = testGroup "Part 1" [p1Tests, p1Puzzle] p1Tests :: TestTree p1Tests = testGroup "Test Cases" $ [ testCase "Exam...
taylor1791/adventofcode
2015/test/Test/Day5.hs
bsd-2-clause
1,357
0
12
253
423
213
210
34
1
-- -- Copyright (c) 2009 - 2010 Brendan Hickey - http://bhickey.net -- New BSD License (see http://www.opensource.org/licenses/bsd-license.php) -- module Data.Heap.Skew (SkewHeap, head, tail, merge, singleton, empty, null, fromList, toList, insert) where import Prelude hiding (head, tail, null) data (Ord a) => Ske...
bhickey/TreeStructures
Data/Heap/Skew.hs
bsd-3-clause
2,079
0
10
501
922
476
446
48
3
module Examples.Example5 where import System.FilePath import System.Directory import System.Posix import Control.Monad import Graphics.UI.VE import ErrVal import Examples.Utils(testE) type UserCode = Int type RoleCode = Int data EnvStruct = EnvStruct { user :: UserCode, role :: RoleCode } userCodeVE, role...
timbod7/veditor
demo/Examples/Example5.hs
bsd-3-clause
1,113
0
11
250
357
188
169
31
2
module HasOffers.API.Affiliate.Offer where import Data.Text import GHC.Generics import Data.Aeson import Control.Applicative import Network.HTTP.Client import qualified Data.ByteString.Char8 as BS import HasOffers.API.Common -------------------------------------------------------------------------------- acc...
kelecorix/api-hasoffers
src/HasOffers/API/Affiliate/Offer.hs
bsd-3-clause
3,614
0
8
1,132
885
427
458
103
1
module Exercises where addOneIfOdd :: (Integral a) => a -> a addOneIfOdd n = case odd n of True -> f n False -> n where f = (\x -> x + 1) addFive :: Integer -> Integer -> Integer addFive = (\x y -> (if x > y then y else x) + 5) :: Integer -> Integer -> Integer mflip :: (t1 -> t2 -> a) -> t2 -> t1 -> a mflip f ...
dsaenztagarro/haskellbook
src/chapter7/Exercises.hs
bsd-3-clause
1,546
0
10
465
779
419
360
57
3
module Main where import Test.Framework import Tests.Compiler import Tests.Property main :: IO () main = defaultMain [ compilerTests , propertyTests ]
deadfoxygrandpa/Elm
tests/hs/CompilerTest.hs
bsd-3-clause
193
0
6
63
43
25
18
7
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1998 \section[Literal]{@Literal@: Machine literals (unboxed, of course)} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} module Literal ( -- * Main data type Literal(..) -- Exported to ParseIface ...
mettekou/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
19,887
0
16
5,992
4,250
2,208
2,042
288
2
{- (c) The University of Glasgow 2006-2008 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP, NondecreasingIndentation #-} {-# LANGUAGE MultiWayIf #-} -- | Module for constructing @ModIface@ values (interface files), -- writing them to disk and comparing two versions to see if -- recompila...
sdiehl/ghc
compiler/GHC/Iface/Utils.hs
bsd-3-clause
89,366
9
39
27,303
14,549
7,624
6,925
-1
-1
module Music where import Data.Binary (encode) import qualified Data.ByteString.Lazy as BS (ByteString, concat, putStr) import Data.Function import Data.Int (Int16) import Data.List (unfoldr) import System.Environment import System.Random import Synth import Playback -- |Plays a fading note with given wavefor...
sheyll/haskell-kurs-audio-demo
src/Music.hs
bsd-3-clause
6,222
0
15
1,715
2,579
1,329
1,250
201
7
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StandaloneDeriving #-} module Data.Conduit.Kafka where import Control.Lens import Data.Default (Default, def) import Data.ByteString as BS (ByteString) import Control.Concurrent (threadDelay) import Control.Monad (forever) import Control.Monad.I...
Atidot/kafka-conduit
src/Data/Conduit/Kafka.hs
bsd-3-clause
4,632
0
21
1,910
1,122
617
505
104
3
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, DeriveFunctor, ViewPatterns #-} {-# LANGUAGE RecordWildCards, OverloadedStrings, PatternGuards, ScopedTypeVariables #-} -- | Types used to generate the input. module Input.Item( Sig(..), Ctx(..), Ty(..), prettySig, Item(..), itemName, Target(..),...
ndmitchell/hoogle
src/Input/Item.hs
bsd-3-clause
8,920
0
19
2,491
3,589
1,858
1,731
185
23
module Module5.Task13 where main' :: IO () main' = do putStr $ "What is your name?\nName: " name <- getLine if null name then main' else putStrLn $ "Hi, " ++ name ++ "!"
dstarcev/stepic-haskell
src/Module5/Task13.hs
bsd-3-clause
185
0
10
49
61
31
30
8
2
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.N...
rfranek/duckling
tests/Duckling/Numeral/ID/Tests.hs
bsd-3-clause
600
0
9
96
80
51
29
11
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Aws.DynamoDB.Commands.UpdateTable ( UpdateTable(..) , UpdateTableResponse(..) , updateTable ) where import ...
ywata/dynamodb
Aws/DynamoDB/Commands/UpdateTable.hs
bsd-3-clause
3,019
0
10
825
616
336
280
72
1
{-# LANGUAGE ViewPatterns, FlexibleContexts, FlexibleInstances, TypeSynonymInstances #-} module Insomnia.ToF.Module where import Control.Applicative ((<$>)) import Control.Lens import Control.Monad.Reader import Control.Monad.Except (MonadError(..)) import Data.Monoid (Monoid(..), (<>), Endo(..)) import qualif...
lambdageek/insomnia
src/Insomnia/ToF/Module.hs
bsd-3-clause
23,272
0
24
6,523
6,523
3,300
3,223
438
10
import qualified Data.ByteString.Lazy as L import Random (randomRs, RandomGen, Random, mkStdGen, newStdGen) import Data.Maybe import Data.Word import Data.Binary (encode) import Data.Time.Clock (getCurrentTime, diffUTCTime) import System.IO import System.Console.CmdArgs import Contract.Types import Contract.Symbol...
thlorenz/Pricetory
src/DataGeneration/RandomDataGenerator.hs
bsd-3-clause
2,327
0
17
715
734
384
350
48
1
{-# LANGUAGE FlexibleContexts , FlexibleInstances , ScopedTypeVariables , TypeOperators #-} -- | Test if a data type is an enumeration (only zero-argument -- constructors) generically using "GHC.Generics". module Generics.Generic.IsEnum ( isEnum , GIsEnum (..) ) where import Data.Proxy import GHC.Ge...
silkapp/generic-aeson
src/Generics/Generic/IsEnum.hs
bsd-3-clause
1,479
0
11
315
473
247
226
34
1
module Main where {----------------------------------------------------------------------------- reactive-banana-wx Example: Very simple arithmetic ------------------------------------------------------------------------------} import Data.Maybe import Graphics.UI.WX hiding (Event) import Reactive.Banana imp...
codygman/test-reactive-banana-wx
app/Main.hs
bsd-3-clause
1,411
0
20
368
367
180
187
27
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Options.Applicative import Vindinium import Bot import Data.String (fromString) import Data.Text (pack, unpack) data Cmd = Training Settings (Maybe Int) (Maybe Board) | Arena Settings deriving (Show, Eq) cmdSettings :: Cmd -> Sett...
Herzult/vindinium-starter-haskell
src/Main.hs
mit
1,390
0
15
382
473
242
231
39
2
module Tests.Readers.Docx (tests) where import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Definition import Tests.Helpers import Test.Framework import Test.HUnit (assertBool) import Test.Framework.Providers.HUnit import qualified Data.ByteString.Lazy as B import Text.Pandoc.Readers.Docx i...
rgaiacs/pandoc
tests/Tests/Readers/Docx.hs
gpl-2.0
8,934
0
16
2,854
1,413
732
681
219
3
module RightSection where test :: [Int] test = filter (False ==) [1..10]
roberth/uu-helium
test/typeerrors/Examples/RightSection.hs
gpl-3.0
74
0
6
13
31
19
12
3
1
{-# LANGUAGE NoImplicitPrelude, DeriveDataTypeable, DeriveGeneric, OverloadedStrings, TemplateHaskell #-} module Lamdu.Infer ( makeScheme , TypeVars(..) , Dependencies(..), depsGlobalTypes, depsNominals, depSchemes , infer, inferFromNom, inferApply , Scope, emptyScope, Scope.scopeToTypeMap, Scope.in...
Peaker/Algorithm-W-Step-By-Step
src/Lamdu/Infer.hs
gpl-3.0
13,418
0
19
3,644
4,293
2,201
2,092
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} module Test.Prelude.Function (tests) where import Data.Function import Stg.Marshal import Stg.Parser.QuasiQuoter import qualified Stg.Prelude as Stg import Test.Machine.Eva...
quchen/stg
test/Testsuite/Test/Prelude/Function.hs
bsd-3-clause
2,875
0
20
1,126
605
364
241
73
2
{-# LANGUAGE DeriveDataTypeable #-} module Control.Parallel.HdpH.Internal.Type.Msg where import Control.Parallel.HdpH.Internal.Type.Par -- (Task) import Control.Parallel.HdpH.Internal.Type.GRef (TaskRef) import Control.Parallel.HdpH.Internal.Location (NodeId) import Control.DeepSeq (NFData, rnf) -- import Data.Seriali...
robstewart57/hdph-rs
src/Control/Parallel/HdpH/Internal/Type/Msg.hs
bsd-3-clause
7,419
0
14
3,081
1,696
869
827
150
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Language.Hakaru.Evaluation.ConstantPropagation import Language.Hakaru.Syntax.TypeCheck import Language.Hakaru.Syntax.AST.Transforms (expandTransformations) import Language.Hakaru.Syntax.ANF (norma...
zachsully/hakaru
commands/HKC.hs
bsd-3-clause
6,829
0
22
2,555
1,611
832
779
152
9
{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} -- | -- Module: $HEADER$ -- Description: Abstract API for DHT implementations. -- Copyright: (c) 2015, Jan Šipr, Matej Kollár, Peter Trško -- License: BSD3 -- -- Stability: experimental -- Portability: NoImplicitPre...
FPBrno/dht-api
src/Data/DHT.hs
bsd-3-clause
451
0
5
86
33
26
7
5
0
{-# LANGUAGE NoMonomorphismRestriction #-} module TAC.Emit where import qualified TAC.Data as T import qualified JVM.Type as J program :: T.Program -> [ J.Statement ] program stmts = ( do s <- stmts ; statement s ) ++ [ J.Halt ] statement :: T.Statement -> [ J.Statement ] statement s = case s of T.Constant i c...
Erdwolf/autotool-bonn
src/TAC/Emit.hs
gpl-2.0
667
0
12
184
308
159
149
19
3
------------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- TBD. ------------------------------------------------------------------------------- module Main where impor...
ku-fpg/kansas-amber
firmware/Timing/Host/Test.hs
bsd-3-clause
632
0
9
141
81
47
34
9
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...
headprogrammingczar/cabal
cabal-install/Distribution/Solver/Modular/Dependency.hs
bsd-3-clause
16,846
0
14
3,510
3,425
1,840
1,585
195
8
-- | -- Module : Control.Applicative.Lift -- Copyright : (c) Ross Paterson 2010 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : ross@soi.city.ac.uk -- Stability : experimental -- Portability : portable -- -- Adding a new kind of pure computation to an applicative functor. module Co...
technogeeky/d-A
src/Control/Applicative/Lift.hs
gpl-3.0
2,183
0
9
490
671
347
324
35
1
-- In this example, add type constructor 'Tree' to the export list. module C3() where data Tree a = Leaf a | Branch (Tree a) (Tree a) sumTree:: (Num a) => Tree a -> a sumTree (Leaf x ) = x sumTree (Branch left right) = sumTree left + sumTree right myFringe:: Tree a -> [a] myFringe (Leaf x ) = [x] m...
kmate/HaRe
old/testing/addToExport/C3.hs
bsd-3-clause
545
0
8
156
220
114
106
14
1
{- This program converts Haskell source to HTML. Apart from the Haskell source files, it requires the cross reference information produced by running tstModules xrefs <files> on the complete program. -} import HsLexerPass1 import System(getArgs) import Unlit(readHaskellFile) import MUtils import RefsTypes imp...
forste/haReFork
tools/hs2html/hs2html.hs
bsd-3-clause
1,615
8
16
353
579
302
277
35
7
module Zoo where type Foo = Int {-@ bob :: Foo String @-} bob = 10 :: Int
mightymoose/liquidhaskell
tests/crash/BadSyn3.hs
bsd-3-clause
77
0
4
21
19
13
6
3
1
module Vec0 () where import Language.Haskell.Liquid.Prelude -- import Data.List import Data.Vector hiding (map, concat, zipWith, filter, foldr, foldl, (++)) propVec = (vs ! 3) == 3 where xs = [1,2,3,4] :: [Int] vs = fromList xs
ssaavedra/liquidhaskell
tests/pos/vector00.hs
bsd-3-clause
256
0
7
64
95
61
34
6
1
{-# LANGUAGE CPP #-} module RegAlloc.Graph.TrivColorable ( trivColorable, ) where #include "HsVersions.h" import RegClass import Reg import GraphBase import UniqFM import Platform import Panic -- trivColorable --------------------------------------------------------------- -- trivColorable function for ...
acowley/ghc
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
bsd-3-clause
11,932
0
15
4,602
1,024
510
514
112
45
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="de-DE"> <title>Selenium add-on</title> <maps> <homeID>top</homeID> <mapref location="m...
msrader/zap-extensions
src/org/zaproxy/zap/extension/selenium/resources/help_de_DE/helpset_de_DE.hs
apache-2.0
961
79
67
157
413
209
204
-1
-1
{-# LANGUAGE MagicHash #-} module T13413 where import GHC.Exts fillBlock2 :: (Int# -> Int# -> IO ()) -> Int# -> Int# -> IO () fillBlock2 write x0 y0 = fillBlock y0 x0 where {-# INLINE fillBlock #-} fillBlock y ix | 1# <- y >=# y0 = return () | otherwise = do w...
ezyang/ghc
testsuite/tests/simplCore/should_compile/T13413.hs
bsd-3-clause
371
0
12
138
129
63
66
14
1
{-# LANGUAGE PolyKinds, TypeFamilies #-} module T7073 where class Foo a where type Bar a type Bar a = Int
urbanslug/ghc
testsuite/tests/polykinds/T7073.hs
bsd-3-clause
123
0
6
37
27
16
11
5
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} module T7947 where import Data.Data import Data.Typeable import T7947a import qualified T7947b as B deriving instance Typeable A deriving instance Typeable B.B deriving instance Data A deriving instance Data B.B
urbanslug/ghc
testsuite/tests/deriving/should_compile/T7947.hs
bsd-3-clause
289
0
6
43
61
36
25
11
0
{-# LANGUAGE FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses #-} module T9612 where import Data.Monoid import Control.Monad.Trans.Writer.Lazy( Writer, WriterT ) import Data.Functor.Identity( Identity ) class (Monoid w, Monad m) => MonadWriter w m | m -> w where writer :: (a,w) -> m a tell ::...
siddhanathan/ghc
testsuite/tests/typecheck/should_fail/T9612.hs
bsd-3-clause
636
0
10
163
269
150
119
15
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-overlapping-patterns -Wno-incomplete-patterns -Wno-incomplete-uni-patterns -Wno-incomplete-record-updates #-} -- | Some simplification rules for t'BasicOp'. module Futhark...
diku-dk/futhark
src/Futhark/Optimise/Simplify/Rules/BasicOp.hs
isc
17,076
0
19
4,156
6,165
2,994
3,171
346
9
module Main where import Geometry import Drawing main = drawPicture myPicture myPicture points = drawTriangle (a,b,c) & drawLabels [a,b,c] ["A","B","C"] & messages [ "angle(ABC)=" ++ shownum (angle a b c) , "angle(BCA)=" ++ shownum (angle b c a)...
alphalambda/k12math
contrib/MHills/GeometryLessons/code/student/lesson4a.hs
mit
461
0
11
195
154
83
71
10
1
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Data.NGH.Formats.Tests.Fasta ( tests ) where import Test.Framework.TH import Test.HUnit import Test.Framework.Providers.HUnit import Data.NGH.Formats.Fasta (writeSeq) import qualified Data.ByteString.Lazy.Char8 as L8 tests = $(testGroupGenerator) case_...
luispedro/NGH
Data/NGH/Formats/Tests/Fasta.hs
mit
427
0
9
66
100
63
37
11
1
{-# LANGUAGE ViewPatterns #-} module JSImages where import qualified CodeWorld as CW import Graphics.Gloss hiding ((.*.),(.+.),(.-.)) import Graphics.Gloss.Data.Display --lava = makeImage 100 100 "lava" --nitro1 = makeImage 81 62 "nitro1" --nitro2 = makeImage 81 62 "nitro2" --nitro3 = makeImage 81 62 "nitro3...
hpacheco/HAAP
examples/plab/oracle/JSImages.hs
mit
7,257
0
14
2,601
1,698
918
780
141
1
{-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeSy...
fhaust/aer-utils
src/OlshausenOnStreams.hs
mit
14,555
0
21
3,871
4,676
2,434
2,242
230
2
{-# htermination keysFM_GE :: (Ord a, Ord k) => FiniteMap (a,k) b -> (a,k) -> [(a,k)] #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_keysFM_GE_12.hs
mit
107
0
3
19
5
3
2
1
0
{-# LANGUAGE ViewPatterns #-} module Unison.Codebase.Reflog where import Data.Text (Text) import qualified Data.Text as Text import Unison.Codebase.Branch (Hash) import qualified Unison.Codebase.Causal as Causal import qualified Unison.Hash as Hash data Entry = Entry { from :: Hash , to :: Hash , reaso...
unisonweb/platform
parser-typechecker/src/Unison/Codebase/Reflog.hs
mit
790
0
12
182
255
143
112
23
2
{-# LANGUAGE OverloadedStrings #-} module FS ( collect , fuzzySort , socketPath ) where import Control.Applicative ((<$>), (<*>)) import Control.Concurrent.STM (STM, TMVar, atomically, putTMVar, takeTMVar) import Contr...
Bogdanp/ff
src/FS.hs
mit
2,688
0
14
910
886
492
394
52
1
module Paths_HaskellPie ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a...
cirquit/HaskellPie
HaskellPie/dist/build/autogen/Paths_HaskellPie.hs
mit
1,367
0
10
182
368
211
157
28
1
module Hangman.RandomWord ( pickRandomWord ) where import System.Random (randomRIO) import Data.Char (isUpper) type WordList = [String] type WordFilter = (String -> Bool) pickRandomWord :: IO String pickRandomWord = allWords >>= randomWord allWords :: IO WordList allWords = readFile "data/dict.txt" ...
joshuaclayton/hangman
src/Hangman/RandomWord.hs
mit
841
0
9
168
285
156
129
28
1
{-# LANGUAGE LambdaCase #-} module EventSource where import EventSourceHelper import Data.Functor (($>)) import qualified Data.Set as Set -- Types: --- A query is a fold over a list of events. --- --- data QueryT f e a where --- instance Functor f => Functor (QueryT f a) --- instance Functor f => Profunctor...
srijs/haskell-eventsource
EventSource.hs
mit
3,391
0
12
696
832
434
398
74
3
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} #if MIN_VERSION_base(4,8,1) #define HAS_SOURCE_LOCATIONS {-# LANGUAGE ImplicitParams #-} #endif module Test.Hspec.Core.SpecSpec (main, spec) where import Prelude () import Helper #ifdef HAS_SOURCE_LOCATIONS import GHC.SrcLoc import ...
beni55/hspec
hspec-core/test/Test/Hspec/Core/SpecSpec.hs
mit
2,896
0
25
762
907
451
456
58
1
module Language.LambdaSpec where import Test.Hspec import Language.Lambda import Language.Lambda.HspecUtils spec :: Spec spec = do describe "evalString" $ do it "evaluates simple strings" $ do eval "x" `shouldBe` Right (Var "x") eval "\\x. x" `shouldBe` Right (Abs "x" (Var "x")) eval "f y" `s...
sgillespie/lambda-calculus
test/Language/LambdaSpec.hs
mit
870
0
18
214
309
152
157
22
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Network.BitFunctor2.Platform.Blockchain.Consensus ( checkConsensus , generateConsensus ...
BitFunctor/bitfunctor
src/Network/BitFunctor2/Platform/Blockchain/Consensus.hs
mit
6,033
0
18
1,483
1,251
663
588
94
1
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module Discussion.Lexer (lex) where -------------------------------------------------------------------------------- import Prelude hiding (lex) import Text.Parsec import Text.Parsec.String -- import Text.Parsec.Text import Text.Parsec.Pos import Control.Applica...
todays-mitsui/discussion
src/Discussion/Lexer.hs
mit
2,996
0
11
499
606
336
270
51
2
{-# LANGUAGE QuasiQuotes #-} {- | Module : Language.Egison.Math.Expr Licence : MIT This module implements the normalization of polynomials. Normalization rules for particular mathematical functions (such as sqrt and sin/cos) are defined in Rewrite.hs. -} module Language.Egison.Math.Normalize ( mathNormali...
egison/egison
hs-src/Language/Egison/Math/Normalize.hs
mit
4,487
0
19
1,314
1,713
917
796
84
5
import qualified Data.List as DL numUniques :: (Eq a) =>[a] ->Int numUniques = length . DL.nub
Bolt64/my_code
haskell/modules.hs
mit
96
0
7
17
41
24
17
3
1
module AppLogger where log :: FilePath -> String -> IO () log filePath str = appendFile filePath $ str ++ "\n"
toddmohney/tweeter-bot
src/AppLogger.hs
mit
115
0
8
25
43
22
21
3
1
-------------------------------------------------------------------------------- -- | -- Module : XMonad.Config.Components -- Copyright : (c) whythat <yuri.zhykin@gmail.com> -- License : BSD -- -- Maintainer : whythat <yuri.zhykin@gmail.com> -- Stability : unstable -- Portability : unportable ...
yurizhykin/.xmonad
lib/Components.hs
mit
3,521
0
14
693
552
314
238
32
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Email where import Network.Mail.SMTP import Data.Text import Data.List import Data.Yaml import GHC.Generics import Data.Map import Control.Monad.Error data User = User { jmbag :: String, lastname :: String, firstname:: String, ...
cromulen/puh-project
src/Email.hs
mit
5,278
0
12
1,360
1,210
656
554
85
2
{-# LANGUAGE DeriveDataTypeable #-} module Algebraic.Nested.Type where import Autolib.ToDoc hiding ( empty ) import Autolib.Reader import qualified Autolib.Set as S import Autolib.Size import Autolib.Depth import Autolib.Choose import Data.Typeable example :: Type Integer example = read "{ 2, {}, {3, {4}}}"...
marcellussiegburg/autotool
collection/src/Algebraic/Nested/Type.hs
gpl-2.0
1,870
0
13
519
769
386
383
49
2
module DistanceTables where import qualified Data.Vector as V import Control.Parallel.Strategies import Data.List (nub, transpose) import Data.Ix (range) import Piece import Board import R getFirstDupe :: Eq a => [a] -> a getFirstDupe (x:y:z) | x == y = x | otherwise = getFirstDupe $ y:z generateDistenc...
joshuaunderwood7/HaskeLinGeom
DistanceTables.hs
gpl-3.0
9,293
0
19
2,187
3,255
1,604
1,651
158
3
{-# LANGUAGE NoImplicitPrelude #-} module Lamdu.Infer.Internal.Subst ( HasVar(..), CompositeHasVar , Subst(..), intersect , CanSubst(..) , fromRenames ) where import Prelude.Compat hiding (null, lookup) import Data.Map (Map) import qualified Data.Map as Map import qualified Dat...
da-x/Algorithm-W-Step-By-Step
Lamdu/Infer/Internal/Subst.hs
gpl-3.0
5,083
0
14
1,382
1,813
940
873
121
1
{-# LANGUAGE FlexibleInstances #-} {-| Module : Data.Valet.Utils.Renderers Description : Some pre-built renderers for Valet. Copyright : (c) Leonard Monnier, 2015 License : GPL-3 Maintainer : leonard.monnier@gmail.com Stability : experimental Portability : portable -} module Data.Valet.Utils.Renderers ...
momomimachli/Valet
src/Data/Valet/Utils/Renderers.hs
gpl-3.0
1,221
0
8
301
265
155
110
19
0
module Types where import Options --- this type is just used for parsing command line options --- they are processed into an `App`, which gets passed around --- to lower-level functions. data KjOptions = KjOptions { optListOnly :: Bool , optDetailOnly :: Bool , o...
steventlamb/kj
src/Types.hs
gpl-3.0
1,440
0
14
504
222
129
93
30
0
{-# LANGUAGE OverloadedStrings #-} module Types where import Data.Tree import Data.Aeson --todo: move this to DirTree or someplace else type DirTree = Tree FilePath type Name = String data Version = Version String | UnknownVersion instance Show Version where show (UnknownVersion) = "UnknownVersion" show (Versi...
MarkArts/wubstuts
src/Types.hs
gpl-3.0
1,213
0
10
231
370
202
168
30
0
module StackTypes where -- -- * Part 1: A Rank-Based Type System for the Stack Language -- -- ** The abstract syntax -- type Prog = [Cmd] data Cmd = Push Int | Pop Int | Add | Mul | Dup | Inc | Swap deriving(Eq,Show) type Stack = [Int] type Rank = Int ...
caperren/Archives
OSU Coursework/CS 381 - Programming Language Fundamentals/Homework 4/StackRank.perrenc.hs
gpl-3.0
2,017
0
11
527
726
396
330
47
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-kms/gen/Network/AWS/KMS/GetKeyPolicy.hs
mpl-2.0
3,991
0
9
893
514
312
202
62
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/SetState.hs
mpl-2.0
4,675
0
18
1,132
552
330
222
88
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-binaryauthorization/gen/Network/Google/Resource/BinaryAuthorization/Systempolicy/GetPolicy.hs
mpl-2.0
4,734
0
15
1,044
695
406
289
100
1
-- This program displays information about the platform import ViperVM.Platform.Configuration import ViperVM.Platform.Memory import ViperVM.Platform.Platform import ViperVM.Runtime.Logger import ViperVM.Backends.Common.Buffer import Data.Traversable (traverse) import Data.Foldable (forM_) import Data.Maybe (catMaybes...
hsyl20/HViperVM
apps/PlatformTest.hs
lgpl-3.0
1,135
0
17
222
299
153
146
29
2
-- This file is part of "Loopless Functional Algorithms". -- Copyright (c) 2005 Jamie Snape, Oxford University Computing Laboratory. -- -- 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 -- -- ...
snape/LooplessFunctionalAlgorithms
LooplessMixallBinary.hs
apache-2.0
2,295
0
14
874
716
401
315
24
4
import System.IO import System.Exit import Test.HUnit import Json main :: IO () main = do counts <- runTestTT (test [jsonTests]) if (errors counts + failures counts == 0) then exitSuccess else exitFailure
FlaPer87/haskell-marconiclient
tests/TestSuite.hs
apache-2.0
232
0
11
59
81
42
39
10
2
module Network.TShot where import Network.TShot.Types import Network.TShot.Parser import Network.TShot.Database import Network.TShot.Remote
crab2313/tshot
Network/TShot.hs
artistic-2.0
141
0
4
12
30
20
10
5
0
import Data.List (maximumBy) import Data.Function (on) splitByComma :: String -> (Int, Int) splitByComma s = (read a, read (tail b)) where (a, b) = span (\x -> x /= ',') s readInput :: IO [(Int, Int)] readInput = readFile "input/p099_base_exp.txt" >>= (return . map splitByComma . words) solve :: [(Int, Int)] -> ...
foreverbell/project-euler-solutions
src/99.hs
bsd-3-clause
503
0
11
98
252
139
113
11
1
module Chat.Bot.TicTacToe where import Chat.Bot.Answer.TicTacToe import Chat.Bot.Misc.TicTacToe import Chat.Data import Data.List -- | -- LEVEL: Hard -- -- USAGE: /ttt [POSITION] -- -- EXAMPLE: -- > /ttt NW -- O........ -- > /ttt E -- O....X... -- -- This bot is used to pla...
charleso/haskell-in-haste
src/Chat/Bot/TicTacToe.hs
bsd-3-clause
2,532
0
8
570
254
166
88
18
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-| Module : Numeric.AERN.IVP.Solver.Events.SplitNearEvents Description : hybrid system simulation Copyright : (c) Michal Konecny License : BSD3 ...
michalkonecny/aern
aern-ivp/src/Numeric/AERN/IVP/Solver/Events/SplitNearEvents.hs
bsd-3-clause
24,808
0
41
9,274
3,774
2,022
1,752
374
15
{-| Module: Data.Astro.Moon.MoonDetails Description: Planet Details Copyright: Alexander Ignatyev, 2016 Moon Details. -} module Data.Astro.Moon.MoonDetails ( MoonDetails(..) , MoonDistanceUnits(..) , j2010MoonDetails , mduToKm ) where import Data.Astro.Types (DecimalDegrees) import Data.Astro.Time.Epoch (j2...
Alexander-Ignatyev/astro
src/Data/Astro/Moon/MoonDetails.hs
bsd-3-clause
1,441
0
8
289
224
143
81
24
1
module Logo.Builtins.IO (ioBuiltins) where import qualified Data.Map as M import Control.Applicative ((<$>)) import Control.Monad.Trans (lift, liftIO) import System.Random (randomIO) import Logo.Types turtleIO :: IO a -> LogoEvaluator a turtleIO = lift . liftIO pr, random :: [LogoToken] -> LogoEvaluator LogoToken...
deepakjois/hs-logo
src/Logo/Builtins/IO.hs
bsd-3-clause
748
0
11
137
262
144
118
19
1
#!/usr/bin/env runhaskell {-# LANGUAGE OverloadedStrings #-} import Aws.SSSP.App main = web
airbnb/sssp
sssp.hs
bsd-3-clause
96
0
4
15
14
9
5
3
1
import Test.Hspec import qualified Yesod.Content.PDFSpec main :: IO () main = hspec spec spec :: Spec spec = do describe "Yesod.Content.PDF" Yesod.Content.PDFSpec.spec
alexkyllo/yesod-content-pdf
test/Spec.hs
bsd-3-clause
172
0
8
26
53
29
24
7
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} module Language.PiSigma.Lexer ( Parser , angles , braces , brackets , charLiteral , colon , comma , commaSep , commaSep1 , decimal ...
zlizta/PiSigma
src/Language/PiSigma/Lexer.hs
bsd-3-clause
7,988
0
15
3,518
1,692
931
761
224
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables, GADTs #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | A simpler, non-transformer version of this package's -- "Control.Monad.Operational"\'s 'Program' type, using 'Free' -- directly. module Control.Monad.Operat...
sacundim/free-operational
Control/Monad/Operational/Simple.hs
bsd-3-clause
1,739
0
11
382
419
235
184
36
2
-- | -- Module : Kospi.Data -- Copyright : Jared Tobin 2012 -- License : BSD3 -- -- Maintainer : jared@jtobin.ca -- Stability : experimental -- Portability : unknown {-# OPTIONS_GHC -Wall #-} module Kospi.Data ( -- * Data types Quote(..) , PQ(..) ) where import Data.ByteString ...
jtobin/prompt-pcap
Kospi/Data.hs
bsd-3-clause
2,681
0
32
1,033
622
339
283
47
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} module Web.Stripe.Client ( StripeConfig(..) , SecretKey(..) , StripeVersion(..) , StripeResponseCode(..) , StripeFailure(.....
michaelschade/hs-stripe
src/Web/Stripe/Client.hs
bsd-3-clause
14,781
0
19
3,645
2,565
1,443
1,122
-1
-1
-- | -- Module : Network.SMTP.Auth -- License : BSD-style -- -- Maintainer : Nicolas DI PRIMA <nicolas@di-prima.fr> -- Stability : experimental -- Portability : unknown -- module Network.SMTP.Auth ( clientAuth , serverAuthPlain ) where import Network.SMTP.Types import qualified Data.Byt...
NicolasDP/maild
Network/SMTP/Auth.hs
bsd-3-clause
1,231
0
15
376
295
163
132
28
2
import Data.Text (Text) import Data.Aeson import Data.Aeson.Named data TBanana = TBanana { tshape :: Field "banana-shape" Text , tsize :: Field "banana size" (Maybe Int) , tname :: Field "banana's name" Text } deriving Show deriveToJSONFields ''TBanana b = Banana "foo" (Just 2) "bar"
mxswd/named-aeson
examples/Banana.hs
bsd-3-clause
299
0
11
58
99
53
46
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1997-1998 \section[BasicTypes]{Miscellanous types} This module defines a miscellaneously collection of very simple types that \begin{itemize} \item have no other obvious home \item don't depend on any other complicated types \item ...
snoyberg/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
45,043
0
14
13,564
5,878
3,272
2,606
563
5
module Module5.Task19 where import Control.Monad.Writer (Writer, execWriter, writer) -- system code shopping1 :: Shopping shopping1 = do purchase "Jeans" 19200 purchase "Water" 180 purchase "Lettuce" 328 -- solution code type Shopping = Writer ([(String, Integer)]) () purchase :: String -> Integer -> S...
dstarcev/stepic-haskell
src/Module5/Task19.hs
bsd-3-clause
508
0
8
94
182
101
81
14
1
{-# LANGUAGE RecursiveDo #-} module Widgets ( centreText , renderButton , button , toggleButton ) where import Reflex import Reflex.Gloss.Scene import Graphics.Gloss smallText :: String -> Picture smallText str = scale 0.1 0.1 $ text str centreText :: String -> Picture centreText str = translate ...
Saulzar/reflex-gloss-scene
examples/Widgets.hs
bsd-3-clause
1,713
0
15
409
633
316
317
39
3
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE QuasiQuotes #-} module Area where import Ivory.Language import Ivory.Compile.C.CmdlineFrontend [ivory| struct val { field :: Stored Uint32 } |] val :: MemArea ('Struct ...
GaloisInc/ivory
ivory-examples/examples/Area.hs
bsd-3-clause
949
0
13
182
338
174
164
29
1
-- | A class for tree types and representations of selections on tree types, as well as functions for converting between text and tree selections. module Language.GroteTrap.Trees ( -- * Paths and navigation Path, root, Nav, up, into, down, left, right, sibling, -- * Tree types Tree(..), depth, selectDepth...
MedeaMelana/GroteTrap
Language/GroteTrap/Trees.hs
bsd-3-clause
7,725
0
19
1,982
2,022
1,085
937
110
4
-- | -- Module: $Header$ -- Description: Utilities for parsing command line options. -- Copyright: (c) 2018-2020 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: GHC specific language extensions. -- -- Utilities for parsing command line option...
trskop/command-wrapper
command-wrapper-core/src/CommandWrapper/Core/Options/Optparse.hs
bsd-3-clause
6,355
0
20
1,146
1,360
791
569
-1
-1
{-# language CPP #-} -- | = Name -- -- VK_KHR_external_semaphore_win32 - device extension -- -- == VK_KHR_external_semaphore_win32 -- -- [__Name String__] -- @VK_KHR_external_semaphore_win32@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 79 -- -- [__Revision__] --...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_external_semaphore_win32.hs
bsd-3-clause
46,052
0
22
7,922
5,420
3,217
2,203
-1
-1
{-| module : Data.Maybe.Utils description : Utility functions for "Data.Maybe" copyright : (c) michael klein, 2016 license : bsd3 maintainer : lambdamichael(at)gmail.com -} module Data.Maybe.Utils where -- | @justIfTrue b x == if b then Just x else Nothing@ justIfTrue :: Bool -> a -> Maybe a justIfTrue T...
michaeljklein/git-details
src/Data/Maybe/Utils.hs
bsd-3-clause
461
0
7
95
73
39
34
6
1
module Data.Geo.GPX.Lens.BoundsL where import Data.Geo.GPX.Type.Bounds import Data.Lens.Common class BoundsL a where boundsL :: Lens a (Maybe Bounds)
tonymorris/geo-gpx
src/Data/Geo/GPX/Lens/BoundsL.hs
bsd-3-clause
155
0
9
22
48
29
19
5
0
{- | Space-efficient tabulation combinators. Matrices are always filled in a triangular shape because a subword with indices i and j fulfils i<=j. The triangular shape makes it possible to use a space-efficient packed array for one-dimensional nonterminals. For two-dimensional nonterminals, the same logic is applied...
adp-multi/adp-multi
src/ADP/Multi/TabulationTriangle.hs
bsd-3-clause
2,012
0
15
537
723
401
322
30
2