Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
seckcoder/vector
Data/Vector/Generic.hs
bsd-3-clause
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
foldM'_ m z = discard . Bundle.foldM' m z . stream
50
false
false
2
7
10
32
12
20
null
null
dikmax/haskell-blog
src/XmlHtmlWriter.hs
bsd-2-clause
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
concatBlocks' nodes block@(RawBlock _ _) = do items <- writeBlock block return (nodes ++ items)
99
false
false
0
9
18
45
21
24
null
null
nshepperd/funn
AI/Funn/CL/MonadCL.hs
mit
global_kernelcache :: IORef (Map String CL.Kernel) global_kernelcache = unsafePerformIO $ newIORef Map.empty
108
global_kernelcache :: IORef (Map String CL.Kernel) global_kernelcache = unsafePerformIO $ newIORef Map.empty
108
global_kernelcache = unsafePerformIO $ newIORef Map.empty
57
false
true
0
8
11
33
16
17
null
null
keithodulaigh/Hets
HasCASL/Morphism.hs
gpl-2.0
mapAlt :: IdMap -> TypeMap -> IdMap -> FunMap -> IdMap -> [TypeArg] -> Type -> AltDefn -> AltDefn mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeScheme args (getFunType dt p ts) nullRange (j, TypeScheme _ ty _) = mapFunSym jm tm im fm (i, sc) in Construct (Just j) newTs (getPartiality newTs ty) newSels Nothing -> Construct mi newTs p newSels
533
mapAlt :: IdMap -> TypeMap -> IdMap -> FunMap -> IdMap -> [TypeArg] -> Type -> AltDefn -> AltDefn mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeScheme args (getFunType dt p ts) nullRange (j, TypeScheme _ ty _) = mapFunSym jm tm im fm (i, sc) in Construct (Just j) newTs (getPartiality newTs ty) newSels Nothing -> Construct mi newTs p newSels
533
mapAlt jm tm im fm nIm args dt (Construct mi ts p sels) = let newTs = map (mapTypeE jm tm nIm) ts newSels = map (map (mapSel jm tm im fm nIm args dt)) sels in case mi of Just i -> let sc = TypeScheme args (getFunType dt p ts) nullRange (j, TypeScheme _ ty _) = mapFunSym jm tm im fm (i, sc) in Construct (Just j) newTs (getPartiality newTs ty) newSels Nothing -> Construct mi newTs p newSels
433
false
true
0
16
144
252
123
129
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Comm.hs
bsd-3-clause
runDie :: ArduinoConnection -> String -> [String] -> IO a runDie c m ms = do let f = bailOut c f m ms
109
runDie :: ArduinoConnection -> String -> [String] -> IO a runDie c m ms = do let f = bailOut c f m ms
109
runDie c m ms = do let f = bailOut c f m ms
51
false
true
0
11
31
61
27
34
null
null
elieux/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
arg_varsW :: [(CmmActual, ForeignHint)] -> ([LlvmVar], LlvmStatements, [LlvmCmmDecl]) -> WriterT LlvmAccum LlvmM [LlvmVar] arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
298
arg_varsW :: [(CmmActual, ForeignHint)] -> ([LlvmVar], LlvmStatements, [LlvmCmmDecl]) -> WriterT LlvmAccum LlvmM [LlvmVar] arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
298
arg_varsW xs ys = do (vars, stmts, decls) <- lift $ arg_vars xs ys tell $ LlvmAccum stmts decls return vars -- | Conversion of call arguments.
155
false
true
0
10
72
107
55
52
null
null
tomahawkins/improve
Language/ImProve/Code/Simulink.hs
bsd-3-clause
block :: Block -> Net Name block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
152
block :: Block -> Net Name block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
152
block a = do name <- newName modify $ \ net -> net { blocks = (name, a) : blocks net } return name -- New named block.
125
false
true
0
13
40
73
35
38
null
null
yuttie/fibers
Yarn.hs
bsd-3-clause
close :: Yarn -> IO () close = IO.hClose . unYarn
49
close :: Yarn -> IO () close = IO.hClose . unYarn
49
close = IO.hClose . unYarn
26
false
true
1
8
10
33
14
19
null
null
waterlink/hgo
GenericLexer.hs
mit
imaginaryToken l = imaginary l >>= return . show
48
imaginaryToken l = imaginary l >>= return . show
48
imaginaryToken l = imaginary l >>= return . show
48
false
false
0
7
8
20
9
11
null
null
binesiyu/ifl
ifpt-master/TemplateTest.hs
mit
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
t1 = pr "pair x y f = f x y ; fst p = p K; snd p = p K1 ; f x y = letrec a = pair x b ; b = pair y a in fst (snd (snd (snd a))); main = f 3 4"
142
false
false
1
5
49
12
4
8
null
null
gridaphobe/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHashKey proxyHashId
101
false
false
0
7
30
21
10
11
null
null
mariefarrell/Hets
HasCASL/DataAna.hs
gpl-2.0
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
genSelVarsAux n (ts : sels) = genTuple n 1 ts : genSelVarsAux (n + 1) sels
78
false
false
0
8
19
42
20
22
null
null
databrary/databrary
test/Model/Id/TypesTest.hs
agpl-3.0
rawPersonId :: IdType PersonRaw rawPersonId = 1
47
rawPersonId :: IdType PersonRaw rawPersonId = 1
47
rawPersonId = 1
15
false
true
0
6
6
20
8
12
null
null
cirquit/Personal-Repository
Haskell/Playground/AdventOfCode/advent-coding/src/Day05.hs
mit
oneLetterBetween _ = False
26
oneLetterBetween _ = False
26
oneLetterBetween _ = False
26
false
false
0
4
3
10
4
6
null
null
kapilash/ccs2cs
src/Language/CCS/Data.hs
apache-2.0
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
hwsalt i (StructSize s) = hashWithSalt (hashWithSalt i s) "@$Sizeof"
68
false
false
0
7
9
31
14
17
null
null
rzil/honours
DeepLearning/Tracking/Tracking.hs
mit
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
imagesDirectory = "/Users/ruben/Documents/thirdparty/darknet/airplane-formation/"
81
false
false
1
5
2
10
3
7
null
null
siddhanathan/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
mkPromotedListTy :: Type -> Type mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
88
mkPromotedListTy :: Type -> Type mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
88
mkPromotedListTy ty = mkTyConApp promotedListTyCon [ty]
55
false
true
0
6
10
26
13
13
null
null
shlevy/ghc
compiler/cmm/CmmSink.hs
bsd-3-clause
-- GlobalRegs that are loads from BaseReg are not trivial isTrivial _ (CmmLit _) = True
87
isTrivial _ (CmmLit _) = True
29
isTrivial _ (CmmLit _) = True
29
true
false
0
7
15
18
9
9
null
null
PipocaQuemada/ermine
src/Ermine/Syntax/Term.hs
bsd-2-clause
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
bindTerm f g (Remember i b) = Remember i (bindTerm f g b)
57
false
false
0
7
12
36
17
19
null
null
MP2E/XMonadContrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
shrinkTreeFrom :: Direction2D -> Zipper Split -> Maybe (Zipper Split) shrinkTreeFrom _ z@(_, []) = Just z
105
shrinkTreeFrom :: Direction2D -> Zipper Split -> Maybe (Zipper Split) shrinkTreeFrom _ z@(_, []) = Just z
105
shrinkTreeFrom _ z@(_, []) = Just z
35
false
true
0
9
16
50
25
25
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x2F8A4' = "\x226D4"
35
decomposeChar '\x2F8A4' = "\x226D4"
35
decomposeChar '\x2F8A4' = "\x226D4"
35
false
false
0
4
3
10
4
6
null
null
TomMD/cryptol
src/Cryptol/TypeCheck/AST.hs
bsd-3-clause
splitWhile :: (a -> Maybe (b,a)) -> a -> ([b],a) splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
230
splitWhile :: (a -> Maybe (b,a)) -> a -> ([b],a) splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
230
splitWhile f e = case f e of Nothing -> ([], e) Just (x,e1) -> let (xs,e2) = splitWhile f e1 in (x:xs,e2)
181
false
true
0
12
108
123
64
59
null
null
ChrisCoffey/rwh
src/RW/Chap5/Prettify.hs
bsd-3-clause
oneChar :: Char -> Doc oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
249
oneChar :: Char -> Doc oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
249
oneChar c = case lookup c simpleEscapes of Just r -> text r Nothing | mustEscape c -> hexEscape c | otherwise -> char c where mustEscape x = x < ' ' || x == '\x7f' || x > '\xff'
226
false
true
0
11
94
106
46
60
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/HTML/Helpers.hs
bsd-2-clause
-- | Div tag wrapper divTag :: [String] -> Doc -> Doc divTag = wrap "div"
73
divTag :: [String] -> Doc -> Doc divTag = wrap "div"
52
divTag = wrap "div"
19
true
true
0
8
15
32
15
17
null
null
kaoskorobase/mescaline
tools/sts/Main.hs
gpl-3.0
mkPlotData :: DB.DescriptorMap -> DB.UnitMap -> [SoundFile] -> PlotData mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter (Just . maybe (Map.singleton ui (u, mkFeatureMap fs)) (Map.insert ui (u, mkFeatureMap fs))) (DB.unitSourceFile u)) Map.empty us ids = Set.fromList (map fileId (filter marked sfs)) featStats = mkFeatureStats ds (Map.fold Map.union Map.empty (Map.filterWithKey (\k _ -> Set.member k ids) um)) fileStats = fmap (mkFeatureStats ds) um
803
mkPlotData :: DB.DescriptorMap -> DB.UnitMap -> [SoundFile] -> PlotData mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter (Just . maybe (Map.singleton ui (u, mkFeatureMap fs)) (Map.insert ui (u, mkFeatureMap fs))) (DB.unitSourceFile u)) Map.empty us ids = Set.fromList (map fileId (filter marked sfs)) featStats = mkFeatureStats ds (Map.fold Map.union Map.empty (Map.filterWithKey (\k _ -> Set.member k ids) um)) fileStats = fmap (mkFeatureStats ds) um
803
mkPlotData ds us sfs = PlotData sfs ids um Set.empty fileStats featStats where mkFeatureMap = Map.fromList . map (\f -> (DB.featureDescriptor f, f)) um = Map.foldrWithKey (\ui (u, fs) -> Map.alter (Just . maybe (Map.singleton ui (u, mkFeatureMap fs)) (Map.insert ui (u, mkFeatureMap fs))) (DB.unitSourceFile u)) Map.empty us ids = Set.fromList (map fileId (filter marked sfs)) featStats = mkFeatureStats ds (Map.fold Map.union Map.empty (Map.filterWithKey (\k _ -> Set.member k ids) um)) fileStats = fmap (mkFeatureStats ds) um
731
false
true
4
15
289
297
145
152
null
null
wilbowma/accelerate
Data/Array/Accelerate/Pretty/Traverse.hs
bsd-3-clause
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
labelForPrimFun (PrimFDiv _) = "PrimFDiv"
51
false
false
0
6
14
16
7
9
null
null
AndyShiue/ende
frontend/src/Parsing.hs
lgpl-3.0
opToElement :: Operator -> Expr.Operator Parser (TaggedTerm Position) opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
140
opToElement :: Operator -> Expr.Operator Parser (TaggedTerm Position) opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
140
opToElement op = Expr.InfixL $ opToFunc op <$ (symbol $ opToString op)
70
false
true
2
9
19
60
27
33
null
null
postgres-haskell/postgres-wire
src/Database/PostgreSQL/Protocol/Codecs/PgTypes.hs
mit
jsonb :: Oids jsonb = mkOids 3802 3807
38
jsonb :: Oids jsonb = mkOids 3802 3807
38
jsonb = mkOids 3802 3807
24
false
true
0
6
7
24
9
15
null
null
yusent/cfdis
src/CFDI/Types/Currency.hs
mit
decimalPlaces CUR_UYU = 2
25
decimalPlaces CUR_UYU = 2
25
decimalPlaces CUR_UYU = 2
25
false
false
0
5
3
9
4
5
null
null
fpco/hlint
src/Settings.hs
bsd-3-clause
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
readFuncs (Var _ (Qual _ (ModuleName _ mod) name)) = [(mod, fromNamed name)]
76
false
false
0
11
12
47
24
23
null
null
legoscia/hsxmpp
Werewolf.hs
bsd-3-clause
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case x of Villager -> "The villagers have won!" Werewolf -> "The werewolves have won!" sendGroupchatMessage room (t++t') inRoom lang nick room participantList Nothing -> do t <- liftIO $ translate lang "The villagers are outraged over this crime, and want to execute somebody. They gather in the town square to vote about whom to kill. Type 'kill NICK' in public to vote." sendGroupchatMessage room t executionVote lang nick room participantList werewolves villagers []
936
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case x of Villager -> "The villagers have won!" Werewolf -> "The werewolves have won!" sendGroupchatMessage room (t++t') inRoom lang nick room participantList Nothing -> do t <- liftIO $ translate lang "The villagers are outraged over this crime, and want to execute somebody. They gather in the town square to vote about whom to kill. Type 'kill NICK' in public to vote." sendGroupchatMessage room t executionVote lang nick room participantList werewolves villagers []
936
startDay lang nick room participantList werewolves villagers = do case checkVictory werewolves villagers of Just x -> do t <- liftIO $ translate lang "As the sun rises over the little village, the people realize that there is only one side left. " t' <- liftIO $ translate lang $ case x of Villager -> "The villagers have won!" Werewolf -> "The werewolves have won!" sendGroupchatMessage room (t++t') inRoom lang nick room participantList Nothing -> do t <- liftIO $ translate lang "The villagers are outraged over this crime, and want to execute somebody. They gather in the town square to vote about whom to kill. Type 'kill NICK' in public to vote." sendGroupchatMessage room t executionVote lang nick room participantList werewolves villagers []
936
false
false
0
16
310
167
75
92
null
null
peti/postmaster
src/Postmaster/Esmtpd.hs
agpl-3.0
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["nested MAIL command"]
339
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["nested MAIL command"]
339
esmtpdFSM (MailFrom addr) = use session >>= \case Initial -> respond 5 0 3 ["please send HELO or EHLO first"] HaveEhlo {..} -> session .= (HaveMailFrom {_envelope = addr, ..}) >> respond 2 5 0 ["OK"] HaveMailFrom {..} -> respond 5 0 3 ["nested MAIL command"] HaveRcptTo {..} -> respond 5 0 3 ["nested MAIL command"]
339
false
false
0
13
79
136
69
67
null
null
JoseD92/EasyGL
test/test.hs
bsd-3-clause
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
vecSum (Vertex3 x1 y1 z1) (Vertex3 x2 y2 z2) = Vertex3 (x1+x2) (y1+y2) (z1+z2)
78
false
false
0
7
13
59
30
29
null
null
nikki-and-the-robots/nikki
src/Sorts/Robots/Jetpack.hs
lgpl-3.0
-- | loads a pixmap with the special size and padding of jetpack pixmaps loadJetpackPixmap :: FilePath -> IO Pixmap loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
213
loadJetpackPixmap :: FilePath -> IO Pixmap loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
140
loadJetpackPixmap file = do loadPixmap (Position 9 1) (Size (fromUber 27) (fromUber 21)) file
97
true
true
0
12
37
64
30
34
null
null
fmapfmapfmap/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetApplication.hs
mpl-2.0
-- | The name of an existing AWS CodeDeploy application associated with the -- applicable IAM user or AWS account. gaApplicationName :: Lens' GetApplication Text gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
242
gaApplicationName :: Lens' GetApplication Text gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
127
gaApplicationName = lens _gaApplicationName (\ s a -> s{_gaApplicationName = a})
80
true
true
0
9
35
48
24
24
null
null
tekul/cryptonite
Crypto/Cipher/CAST5/Primitive.hs
bsd-3-clause
sbox_s8 :: Word8 -> Word32 sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86\xd1\x74\x2a\x42\x93\x1c\x76\xe3\x81\x11\xb1\x2d\xef\x3a\x37\xdd\xdd\xfc\ \\xde\x9a\xde\xb1\x0a\x0c\xc3\x2c\xbe\x19\x70\x29\x84\xa0\x09\x40\xbb\x24\x3a\x0f\xb4\xd1\x37\xcf\xb4\x4e\x79\xf0\x04\x9e\xed\xfd\ \\x0b\x15\xa1\x5d\x48\x0d\x31\x68\x8b\xbb\xde\x5a\x66\x9d\xed\x42\xc7\xec\xe8\x31\x3f\x8f\x95\xe7\x72\xdf\x19\x1b\x75\x80\x33\x0d\ \\x94\x07\x42\x51\x5c\x7d\xcd\xfa\xab\xbe\x6d\x63\xaa\x40\x21\x64\xb3\x01\xd4\x0a\x02\xe7\xd1\xca\x53\x57\x1d\xae\x7a\x31\x82\xa2\ \\x12\xa8\xdd\xec\xfd\xaa\x33\x5d\x17\x6f\x43\xe8\x71\xfb\x46\xd4\x38\x12\x90\x22\xce\x94\x9a\xd4\xb8\x47\x69\xad\x96\x5b\xd8\x62\ \\x82\xf3\xd0\x55\x66\xfb\x97\x67\x15\xb8\x0b\x4e\x1d\x5b\x47\xa0\x4c\xfd\xe0\x6f\xc2\x8e\xc4\xb8\x57\xe8\x72\x6e\x64\x7a\x78\xfc\ \\x99\x86\x5d\x44\x60\x8b\xd5\x93\x6c\x20\x0e\x03\x39\xdc\x5f\xf6\x5d\x0b\x00\xa3\xae\x63\xaf\xf2\x7e\x8b\xd6\x32\x70\x10\x8c\x0c\ \\xbb\xd3\x50\x49\x29\x98\xdf\x04\x98\x0c\xf4\x2a\x9b\x6d\xf4\x91\x9e\x7e\xdd\x53\x06\x91\x85\x48\x58\xcb\x7e\x07\x3b\x74\xef\x2e\ \\x52\x2f\xff\xb1\xd2\x47\x08\xcc\x1c\x7e\x27\xcd\xa4\xeb\x21\x5b\x3c\xf1\xd2\xe2\x19\xb4\x7a\x38\x42\x4f\x76\x18\x35\x85\x60\x39\ \\x9d\x17\xde\xe7\x27\xeb\x35\xe6\xc9\xaf\xf6\x7b\x36\xba\xf5\xb8\x09\xc4\x67\xcd\xc1\x89\x10\xb1\xe1\x1d\xbf\x7b\x06\xcd\x1a\xf8\ \\x71\x70\xc6\x08\x2d\x5e\x33\x54\xd4\xde\x49\x5a\x64\xc6\xd0\x06\xbc\xc0\xc6\x2c\x3d\xd0\x0d\xb3\x70\x8f\x8f\x34\x77\xd5\x1b\x42\ \\x26\x4f\x62\x0f\x24\xb8\xd2\xbf\x15\xc1\xb7\x9e\x46\xa5\x25\x64\xf8\xd7\xe5\x4e\x3e\x37\x81\x60\x78\x95\xcd\xa5\x85\x9c\x15\xa5\ \\xe6\x45\x97\x88\xc3\x7b\xc7\x5f\xdb\x07\xba\x0c\x06\x76\xa3\xab\x7f\x22\x9b\x1e\x31\x84\x2e\x7b\x24\x25\x9f\xd7\xf8\xbe\xf4\x72\ \\x83\x5f\xfc\xb8\x6d\xf4\xc1\xf2\x96\xf5\xb1\x95\xfd\x0a\xf0\xfc\xb0\xfe\x13\x4c\xe2\x50\x6d\x3d\x4f\x9b\x12\xea\xf2\x15\xf2\x25\ \\xa2\x23\x73\x6f\x9f\xb4\xc4\x28\x25\xd0\x49\x79\x34\xc7\x13\xf8\xc4\x61\x81\x87\xea\x7a\x6e\x98\x7c\xd1\x6e\xfc\x14\x36\x87\x6c\ \\xf1\x54\x41\x07\xbe\xde\xee\x14\x56\xe9\xaf\x27\xa0\x4a\xa4\x41\x3c\xf7\xc8\x99\x92\xec\xba\xe6\xdd\x67\x01\x6d\x15\x16\x82\xeb\ \\xa8\x42\xee\xdf\xfd\xba\x60\xb4\xf1\x90\x7b\x75\x20\xe3\x03\x0f\x24\xd8\xc2\x9e\xe1\x39\x67\x3b\xef\xa6\x3f\xb8\x71\x87\x30\x54\ \\xb6\xf2\xcf\x3b\x9f\x32\x64\x42\xcb\x15\xa4\xcc\xb0\x1a\x45\x04\xf1\xe4\x7d\x8d\x84\x4a\x1b\xe5\xba\xe7\xdf\xdc\x42\xcb\xda\x70\ \\xcd\x7d\xae\x0a\x57\xe8\x5b\x7a\xd5\x3f\x5a\xf6\x20\xcf\x4d\x8c\xce\xa4\xd4\x28\x79\xd1\x30\xa4\x34\x86\xeb\xfb\x33\xd3\xcd\xdc\ \\x77\x85\x3b\x53\x37\xef\xfc\xb5\xc5\x06\x87\x78\xe5\x80\xb3\xe6\x4e\x68\xb8\xf4\xc5\xc8\xb3\x7e\x0d\x80\x9e\xa2\x39\x8f\xeb\x7c\ \\x13\x2a\x4f\x94\x43\xb7\x95\x0e\x2f\xee\x7d\x1c\x22\x36\x13\xbd\xdd\x06\xca\xa2\x37\xdf\x93\x2b\xc4\x24\x82\x89\xac\xf3\xeb\xc3\ \\x57\x15\xf6\xb7\xef\x34\x78\xdd\xf2\x67\x61\x6f\xc1\x48\xcb\xe4\x90\x52\x81\x5e\x5e\x41\x0f\xab\xb4\x8a\x24\x65\x2e\xda\x7f\xa4\ \\xe8\x7b\x40\xe4\xe9\x8e\xa0\x84\x58\x89\xe9\xe1\xef\xd3\x90\xfc\xdd\x07\xd3\x5b\xdb\x48\x56\x94\x38\xd7\xe5\xb2\x57\x72\x01\x01\ \\x73\x0e\xde\xbc\x5b\x64\x31\x13\x94\x91\x7e\x4f\x50\x3c\x2f\xba\x64\x6f\x12\x82\x75\x23\xd2\x4a\xe0\x77\x96\x95\xf9\xc1\x7a\x8f\ \\x7a\x5b\x21\x21\xd1\x87\xb8\x96\x29\x26\x3a\x4d\xba\x51\x0c\xdf\x81\xf4\x7c\x9f\xad\x11\x63\xed\xea\x7b\x59\x65\x1a\x00\x72\x6e\ \\x11\x40\x30\x92\x00\xda\x6d\x77\x4a\x0c\xdd\x61\xad\x1f\x46\x03\x60\x5b\xdf\xb0\x9e\xed\xc3\x64\x22\xeb\xe6\xa8\xce\xe7\xd2\x8a\ \\xa0\xe7\x36\xa0\x55\x64\xa6\xb9\x10\x85\x32\x09\xc7\xeb\x8f\x37\x2d\xe7\x05\xca\x89\x51\x57\x0f\xdf\x09\x82\x2b\xbd\x69\x1a\x6c\ \\xaa\x12\xe4\xf2\x87\x45\x1c\x0f\xe0\xf6\xa2\x7a\x3a\xda\x48\x19\x4c\xf1\x76\x4f\x0d\x77\x1c\x2b\x67\xcd\xb1\x56\x35\x0d\x83\x84\ \\x59\x38\xfa\x0f\x42\x39\x9e\xf3\x36\x99\x7b\x07\x0e\x84\x09\x3d\x4a\xa9\x3e\x61\x83\x60\xd8\x7b\x1f\xa9\x8b\x0c\x11\x49\x38\x2c\ \\xe9\x76\x25\xa5\x06\x14\xd1\xb7\x0e\x25\x24\x4b\x0c\x76\x83\x47\x58\x9e\x8d\x82\x0d\x20\x59\xd1\xa4\x66\xbb\x1e\xf8\xda\x0a\x82\ \\x04\xf1\x91\x30\xba\x6e\x4e\xc0\x99\x26\x51\x64\x1e\xe7\x23\x0d\x50\xb2\xad\x80\xea\xee\x68\x01\x8d\xb2\xa2\x83\xea\x8b\xf5\x9e"#
4,684
sbox_s8 :: Word8 -> Word32 sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86\xd1\x74\x2a\x42\x93\x1c\x76\xe3\x81\x11\xb1\x2d\xef\x3a\x37\xdd\xdd\xfc\ \\xde\x9a\xde\xb1\x0a\x0c\xc3\x2c\xbe\x19\x70\x29\x84\xa0\x09\x40\xbb\x24\x3a\x0f\xb4\xd1\x37\xcf\xb4\x4e\x79\xf0\x04\x9e\xed\xfd\ \\x0b\x15\xa1\x5d\x48\x0d\x31\x68\x8b\xbb\xde\x5a\x66\x9d\xed\x42\xc7\xec\xe8\x31\x3f\x8f\x95\xe7\x72\xdf\x19\x1b\x75\x80\x33\x0d\ \\x94\x07\x42\x51\x5c\x7d\xcd\xfa\xab\xbe\x6d\x63\xaa\x40\x21\x64\xb3\x01\xd4\x0a\x02\xe7\xd1\xca\x53\x57\x1d\xae\x7a\x31\x82\xa2\ \\x12\xa8\xdd\xec\xfd\xaa\x33\x5d\x17\x6f\x43\xe8\x71\xfb\x46\xd4\x38\x12\x90\x22\xce\x94\x9a\xd4\xb8\x47\x69\xad\x96\x5b\xd8\x62\ \\x82\xf3\xd0\x55\x66\xfb\x97\x67\x15\xb8\x0b\x4e\x1d\x5b\x47\xa0\x4c\xfd\xe0\x6f\xc2\x8e\xc4\xb8\x57\xe8\x72\x6e\x64\x7a\x78\xfc\ \\x99\x86\x5d\x44\x60\x8b\xd5\x93\x6c\x20\x0e\x03\x39\xdc\x5f\xf6\x5d\x0b\x00\xa3\xae\x63\xaf\xf2\x7e\x8b\xd6\x32\x70\x10\x8c\x0c\ \\xbb\xd3\x50\x49\x29\x98\xdf\x04\x98\x0c\xf4\x2a\x9b\x6d\xf4\x91\x9e\x7e\xdd\x53\x06\x91\x85\x48\x58\xcb\x7e\x07\x3b\x74\xef\x2e\ \\x52\x2f\xff\xb1\xd2\x47\x08\xcc\x1c\x7e\x27\xcd\xa4\xeb\x21\x5b\x3c\xf1\xd2\xe2\x19\xb4\x7a\x38\x42\x4f\x76\x18\x35\x85\x60\x39\ \\x9d\x17\xde\xe7\x27\xeb\x35\xe6\xc9\xaf\xf6\x7b\x36\xba\xf5\xb8\x09\xc4\x67\xcd\xc1\x89\x10\xb1\xe1\x1d\xbf\x7b\x06\xcd\x1a\xf8\ \\x71\x70\xc6\x08\x2d\x5e\x33\x54\xd4\xde\x49\x5a\x64\xc6\xd0\x06\xbc\xc0\xc6\x2c\x3d\xd0\x0d\xb3\x70\x8f\x8f\x34\x77\xd5\x1b\x42\ \\x26\x4f\x62\x0f\x24\xb8\xd2\xbf\x15\xc1\xb7\x9e\x46\xa5\x25\x64\xf8\xd7\xe5\x4e\x3e\x37\x81\x60\x78\x95\xcd\xa5\x85\x9c\x15\xa5\ \\xe6\x45\x97\x88\xc3\x7b\xc7\x5f\xdb\x07\xba\x0c\x06\x76\xa3\xab\x7f\x22\x9b\x1e\x31\x84\x2e\x7b\x24\x25\x9f\xd7\xf8\xbe\xf4\x72\ \\x83\x5f\xfc\xb8\x6d\xf4\xc1\xf2\x96\xf5\xb1\x95\xfd\x0a\xf0\xfc\xb0\xfe\x13\x4c\xe2\x50\x6d\x3d\x4f\x9b\x12\xea\xf2\x15\xf2\x25\ \\xa2\x23\x73\x6f\x9f\xb4\xc4\x28\x25\xd0\x49\x79\x34\xc7\x13\xf8\xc4\x61\x81\x87\xea\x7a\x6e\x98\x7c\xd1\x6e\xfc\x14\x36\x87\x6c\ \\xf1\x54\x41\x07\xbe\xde\xee\x14\x56\xe9\xaf\x27\xa0\x4a\xa4\x41\x3c\xf7\xc8\x99\x92\xec\xba\xe6\xdd\x67\x01\x6d\x15\x16\x82\xeb\ \\xa8\x42\xee\xdf\xfd\xba\x60\xb4\xf1\x90\x7b\x75\x20\xe3\x03\x0f\x24\xd8\xc2\x9e\xe1\x39\x67\x3b\xef\xa6\x3f\xb8\x71\x87\x30\x54\ \\xb6\xf2\xcf\x3b\x9f\x32\x64\x42\xcb\x15\xa4\xcc\xb0\x1a\x45\x04\xf1\xe4\x7d\x8d\x84\x4a\x1b\xe5\xba\xe7\xdf\xdc\x42\xcb\xda\x70\ \\xcd\x7d\xae\x0a\x57\xe8\x5b\x7a\xd5\x3f\x5a\xf6\x20\xcf\x4d\x8c\xce\xa4\xd4\x28\x79\xd1\x30\xa4\x34\x86\xeb\xfb\x33\xd3\xcd\xdc\ \\x77\x85\x3b\x53\x37\xef\xfc\xb5\xc5\x06\x87\x78\xe5\x80\xb3\xe6\x4e\x68\xb8\xf4\xc5\xc8\xb3\x7e\x0d\x80\x9e\xa2\x39\x8f\xeb\x7c\ \\x13\x2a\x4f\x94\x43\xb7\x95\x0e\x2f\xee\x7d\x1c\x22\x36\x13\xbd\xdd\x06\xca\xa2\x37\xdf\x93\x2b\xc4\x24\x82\x89\xac\xf3\xeb\xc3\ \\x57\x15\xf6\xb7\xef\x34\x78\xdd\xf2\x67\x61\x6f\xc1\x48\xcb\xe4\x90\x52\x81\x5e\x5e\x41\x0f\xab\xb4\x8a\x24\x65\x2e\xda\x7f\xa4\ \\xe8\x7b\x40\xe4\xe9\x8e\xa0\x84\x58\x89\xe9\xe1\xef\xd3\x90\xfc\xdd\x07\xd3\x5b\xdb\x48\x56\x94\x38\xd7\xe5\xb2\x57\x72\x01\x01\ \\x73\x0e\xde\xbc\x5b\x64\x31\x13\x94\x91\x7e\x4f\x50\x3c\x2f\xba\x64\x6f\x12\x82\x75\x23\xd2\x4a\xe0\x77\x96\x95\xf9\xc1\x7a\x8f\ \\x7a\x5b\x21\x21\xd1\x87\xb8\x96\x29\x26\x3a\x4d\xba\x51\x0c\xdf\x81\xf4\x7c\x9f\xad\x11\x63\xed\xea\x7b\x59\x65\x1a\x00\x72\x6e\ \\x11\x40\x30\x92\x00\xda\x6d\x77\x4a\x0c\xdd\x61\xad\x1f\x46\x03\x60\x5b\xdf\xb0\x9e\xed\xc3\x64\x22\xeb\xe6\xa8\xce\xe7\xd2\x8a\ \\xa0\xe7\x36\xa0\x55\x64\xa6\xb9\x10\x85\x32\x09\xc7\xeb\x8f\x37\x2d\xe7\x05\xca\x89\x51\x57\x0f\xdf\x09\x82\x2b\xbd\x69\x1a\x6c\ \\xaa\x12\xe4\xf2\x87\x45\x1c\x0f\xe0\xf6\xa2\x7a\x3a\xda\x48\x19\x4c\xf1\x76\x4f\x0d\x77\x1c\x2b\x67\xcd\xb1\x56\x35\x0d\x83\x84\ \\x59\x38\xfa\x0f\x42\x39\x9e\xf3\x36\x99\x7b\x07\x0e\x84\x09\x3d\x4a\xa9\x3e\x61\x83\x60\xd8\x7b\x1f\xa9\x8b\x0c\x11\x49\x38\x2c\ \\xe9\x76\x25\xa5\x06\x14\xd1\xb7\x0e\x25\x24\x4b\x0c\x76\x83\x47\x58\x9e\x8d\x82\x0d\x20\x59\xd1\xa4\x66\xbb\x1e\xf8\xda\x0a\x82\ \\x04\xf1\x91\x30\xba\x6e\x4e\xc0\x99\x26\x51\x64\x1e\xe7\x23\x0d\x50\xb2\xad\x80\xea\xee\x68\x01\x8d\xb2\xa2\x83\xea\x8b\xf5\x9e"#
4,684
sbox_s8 i = arrayRead32 t (fromIntegral i) where t = array32FromAddrBE 256 "\xe2\x16\x30\x0d\xbb\xdd\xff\xfc\xa7\xeb\xda\xbd\x35\x64\x80\x95\x77\x89\xf8\xb7\xe6\xc1\x12\x1b\x0e\x24\x16\x00\x05\x2c\xe8\xb5\ \\x11\xa9\xcf\xb0\xe5\x95\x2f\x11\xec\xe7\x99\x0a\x93\x86\xd1\x74\x2a\x42\x93\x1c\x76\xe3\x81\x11\xb1\x2d\xef\x3a\x37\xdd\xdd\xfc\ \\xde\x9a\xde\xb1\x0a\x0c\xc3\x2c\xbe\x19\x70\x29\x84\xa0\x09\x40\xbb\x24\x3a\x0f\xb4\xd1\x37\xcf\xb4\x4e\x79\xf0\x04\x9e\xed\xfd\ \\x0b\x15\xa1\x5d\x48\x0d\x31\x68\x8b\xbb\xde\x5a\x66\x9d\xed\x42\xc7\xec\xe8\x31\x3f\x8f\x95\xe7\x72\xdf\x19\x1b\x75\x80\x33\x0d\ \\x94\x07\x42\x51\x5c\x7d\xcd\xfa\xab\xbe\x6d\x63\xaa\x40\x21\x64\xb3\x01\xd4\x0a\x02\xe7\xd1\xca\x53\x57\x1d\xae\x7a\x31\x82\xa2\ \\x12\xa8\xdd\xec\xfd\xaa\x33\x5d\x17\x6f\x43\xe8\x71\xfb\x46\xd4\x38\x12\x90\x22\xce\x94\x9a\xd4\xb8\x47\x69\xad\x96\x5b\xd8\x62\ \\x82\xf3\xd0\x55\x66\xfb\x97\x67\x15\xb8\x0b\x4e\x1d\x5b\x47\xa0\x4c\xfd\xe0\x6f\xc2\x8e\xc4\xb8\x57\xe8\x72\x6e\x64\x7a\x78\xfc\ \\x99\x86\x5d\x44\x60\x8b\xd5\x93\x6c\x20\x0e\x03\x39\xdc\x5f\xf6\x5d\x0b\x00\xa3\xae\x63\xaf\xf2\x7e\x8b\xd6\x32\x70\x10\x8c\x0c\ \\xbb\xd3\x50\x49\x29\x98\xdf\x04\x98\x0c\xf4\x2a\x9b\x6d\xf4\x91\x9e\x7e\xdd\x53\x06\x91\x85\x48\x58\xcb\x7e\x07\x3b\x74\xef\x2e\ \\x52\x2f\xff\xb1\xd2\x47\x08\xcc\x1c\x7e\x27\xcd\xa4\xeb\x21\x5b\x3c\xf1\xd2\xe2\x19\xb4\x7a\x38\x42\x4f\x76\x18\x35\x85\x60\x39\ \\x9d\x17\xde\xe7\x27\xeb\x35\xe6\xc9\xaf\xf6\x7b\x36\xba\xf5\xb8\x09\xc4\x67\xcd\xc1\x89\x10\xb1\xe1\x1d\xbf\x7b\x06\xcd\x1a\xf8\ \\x71\x70\xc6\x08\x2d\x5e\x33\x54\xd4\xde\x49\x5a\x64\xc6\xd0\x06\xbc\xc0\xc6\x2c\x3d\xd0\x0d\xb3\x70\x8f\x8f\x34\x77\xd5\x1b\x42\ \\x26\x4f\x62\x0f\x24\xb8\xd2\xbf\x15\xc1\xb7\x9e\x46\xa5\x25\x64\xf8\xd7\xe5\x4e\x3e\x37\x81\x60\x78\x95\xcd\xa5\x85\x9c\x15\xa5\ \\xe6\x45\x97\x88\xc3\x7b\xc7\x5f\xdb\x07\xba\x0c\x06\x76\xa3\xab\x7f\x22\x9b\x1e\x31\x84\x2e\x7b\x24\x25\x9f\xd7\xf8\xbe\xf4\x72\ \\x83\x5f\xfc\xb8\x6d\xf4\xc1\xf2\x96\xf5\xb1\x95\xfd\x0a\xf0\xfc\xb0\xfe\x13\x4c\xe2\x50\x6d\x3d\x4f\x9b\x12\xea\xf2\x15\xf2\x25\ \\xa2\x23\x73\x6f\x9f\xb4\xc4\x28\x25\xd0\x49\x79\x34\xc7\x13\xf8\xc4\x61\x81\x87\xea\x7a\x6e\x98\x7c\xd1\x6e\xfc\x14\x36\x87\x6c\ \\xf1\x54\x41\x07\xbe\xde\xee\x14\x56\xe9\xaf\x27\xa0\x4a\xa4\x41\x3c\xf7\xc8\x99\x92\xec\xba\xe6\xdd\x67\x01\x6d\x15\x16\x82\xeb\ \\xa8\x42\xee\xdf\xfd\xba\x60\xb4\xf1\x90\x7b\x75\x20\xe3\x03\x0f\x24\xd8\xc2\x9e\xe1\x39\x67\x3b\xef\xa6\x3f\xb8\x71\x87\x30\x54\ \\xb6\xf2\xcf\x3b\x9f\x32\x64\x42\xcb\x15\xa4\xcc\xb0\x1a\x45\x04\xf1\xe4\x7d\x8d\x84\x4a\x1b\xe5\xba\xe7\xdf\xdc\x42\xcb\xda\x70\ \\xcd\x7d\xae\x0a\x57\xe8\x5b\x7a\xd5\x3f\x5a\xf6\x20\xcf\x4d\x8c\xce\xa4\xd4\x28\x79\xd1\x30\xa4\x34\x86\xeb\xfb\x33\xd3\xcd\xdc\ \\x77\x85\x3b\x53\x37\xef\xfc\xb5\xc5\x06\x87\x78\xe5\x80\xb3\xe6\x4e\x68\xb8\xf4\xc5\xc8\xb3\x7e\x0d\x80\x9e\xa2\x39\x8f\xeb\x7c\ \\x13\x2a\x4f\x94\x43\xb7\x95\x0e\x2f\xee\x7d\x1c\x22\x36\x13\xbd\xdd\x06\xca\xa2\x37\xdf\x93\x2b\xc4\x24\x82\x89\xac\xf3\xeb\xc3\ \\x57\x15\xf6\xb7\xef\x34\x78\xdd\xf2\x67\x61\x6f\xc1\x48\xcb\xe4\x90\x52\x81\x5e\x5e\x41\x0f\xab\xb4\x8a\x24\x65\x2e\xda\x7f\xa4\ \\xe8\x7b\x40\xe4\xe9\x8e\xa0\x84\x58\x89\xe9\xe1\xef\xd3\x90\xfc\xdd\x07\xd3\x5b\xdb\x48\x56\x94\x38\xd7\xe5\xb2\x57\x72\x01\x01\ \\x73\x0e\xde\xbc\x5b\x64\x31\x13\x94\x91\x7e\x4f\x50\x3c\x2f\xba\x64\x6f\x12\x82\x75\x23\xd2\x4a\xe0\x77\x96\x95\xf9\xc1\x7a\x8f\ \\x7a\x5b\x21\x21\xd1\x87\xb8\x96\x29\x26\x3a\x4d\xba\x51\x0c\xdf\x81\xf4\x7c\x9f\xad\x11\x63\xed\xea\x7b\x59\x65\x1a\x00\x72\x6e\ \\x11\x40\x30\x92\x00\xda\x6d\x77\x4a\x0c\xdd\x61\xad\x1f\x46\x03\x60\x5b\xdf\xb0\x9e\xed\xc3\x64\x22\xeb\xe6\xa8\xce\xe7\xd2\x8a\ \\xa0\xe7\x36\xa0\x55\x64\xa6\xb9\x10\x85\x32\x09\xc7\xeb\x8f\x37\x2d\xe7\x05\xca\x89\x51\x57\x0f\xdf\x09\x82\x2b\xbd\x69\x1a\x6c\ \\xaa\x12\xe4\xf2\x87\x45\x1c\x0f\xe0\xf6\xa2\x7a\x3a\xda\x48\x19\x4c\xf1\x76\x4f\x0d\x77\x1c\x2b\x67\xcd\xb1\x56\x35\x0d\x83\x84\ \\x59\x38\xfa\x0f\x42\x39\x9e\xf3\x36\x99\x7b\x07\x0e\x84\x09\x3d\x4a\xa9\x3e\x61\x83\x60\xd8\x7b\x1f\xa9\x8b\x0c\x11\x49\x38\x2c\ \\xe9\x76\x25\xa5\x06\x14\xd1\xb7\x0e\x25\x24\x4b\x0c\x76\x83\x47\x58\x9e\x8d\x82\x0d\x20\x59\xd1\xa4\x66\xbb\x1e\xf8\xda\x0a\x82\ \\x04\xf1\x91\x30\xba\x6e\x4e\xc0\x99\x26\x51\x64\x1e\xe7\x23\x0d\x50\xb2\xad\x80\xea\xee\x68\x01\x8d\xb2\xa2\x83\xea\x8b\xf5\x9e"#
4,657
false
true
1
7
438
48
21
27
null
null
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USegd/Split.hs
bsd-3-clause
-- NOINLINE because it won't fuse with anything. ------------------------------------------------------------------------------- -- | Split a segment descriptor across the gang, element wise. -- We try to put the same number of elements on each thread, which means -- that segments are sometimes split across threads. -- -- Each thread gets a slice of segment descriptor, the segid of the first -- slice, and the offset of the first slice in its segment. -- -- Example: -- In this picture each X represents 5 elements, and we have 5 segements in total. -- -- @ segs: ----------------------- --- ------- --------------- ------------------- -- elems: |X X X X X X X X X|X X X X X X X X X|X X X X X X X X X|X X X X X X X X X| -- | thread1 | thread2 | thread3 | thread4 | -- segid: 0 0 3 4 -- offset: 0 45 0 5 -- -- pprp $ splitSegdOnElemsD theGang4 -- $ lengthsToUSegd $ fromList [60, 10, 20, 40, 50 :: Int] -- -- segd: DUSegd lengths: DVector lengths: [1,3,2,1] -- chunks: [[45],[15,10,20],[40,5],[45]] -- indices: DVector lengths: [1,3,2,1] -- chunks: [[0], [0,15,25], [0,40],[0]] -- elements: DInt [45,45,45,45] -- -- segids: DInt [0,0,3,4] (segment id of first slice on thread) -- offsets: DInt [0,45,0,5] (offset of that slice in its segment) -- @ -- splitSegdOnElemsD :: Gang -> USegd -> Dist ((USegd,Int),Int) splitSegdOnElemsD g !segd = {-# SCC "splitSegdOnElemsD" #-} traceEvent ("dph-prim-par: USegd.splitSegdOnElemsD") $ imapD (What "USegd.splitSegdOnElemsD/splitLenIdx") g mk (splitLenIdxD g (USegd.takeElements segd)) where -- Number of threads in gang. !nThreads = gangSize g -- Determine what elements go on a thread mk :: Int -- Thread index. -> (Int, Int) -- Number of elements on this thread, -- and starting offset into the flat array. -> ((USegd, Int), Int) -- Segd for this thread, segid of first slice, -- and offset of first slice. mk i (nElems, ixStart) = case getChunk segd ixStart nElems (i == nThreads - 1) of (# lens, l, o #) -> ((USegd.fromLengths lens, l), o)
2,531
splitSegdOnElemsD :: Gang -> USegd -> Dist ((USegd,Int),Int) splitSegdOnElemsD g !segd = {-# SCC "splitSegdOnElemsD" #-} traceEvent ("dph-prim-par: USegd.splitSegdOnElemsD") $ imapD (What "USegd.splitSegdOnElemsD/splitLenIdx") g mk (splitLenIdxD g (USegd.takeElements segd)) where -- Number of threads in gang. !nThreads = gangSize g -- Determine what elements go on a thread mk :: Int -- Thread index. -> (Int, Int) -- Number of elements on this thread, -- and starting offset into the flat array. -> ((USegd, Int), Int) -- Segd for this thread, segid of first slice, -- and offset of first slice. mk i (nElems, ixStart) = case getChunk segd ixStart nElems (i == nThreads - 1) of (# lens, l, o #) -> ((USegd.fromLengths lens, l), o)
950
splitSegdOnElemsD g !segd = {-# SCC "splitSegdOnElemsD" #-} traceEvent ("dph-prim-par: USegd.splitSegdOnElemsD") $ imapD (What "USegd.splitSegdOnElemsD/splitLenIdx") g mk (splitLenIdxD g (USegd.takeElements segd)) where -- Number of threads in gang. !nThreads = gangSize g -- Determine what elements go on a thread mk :: Int -- Thread index. -> (Int, Int) -- Number of elements on this thread, -- and starting offset into the flat array. -> ((USegd, Int), Int) -- Segd for this thread, segid of first slice, -- and offset of first slice. mk i (nElems, ixStart) = case getChunk segd ixStart nElems (i == nThreads - 1) of (# lens, l, o #) -> ((USegd.fromLengths lens, l), o)
889
true
true
3
11
885
236
143
93
null
null
haskell-distributed/distributed-process-execution
src/Control/Distributed/Process/Execution/Exchange/Internal.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Starting/Running an Exchange -- -------------------------------------------------------------------------------- -- | Starts an /exchange process/ with the given 'ExchangeType'. startExchange :: forall s. ExchangeType s -> Process Exchange startExchange = doStart Nothing
402
startExchange :: forall s. ExchangeType s -> Process Exchange startExchange = doStart Nothing
93
startExchange = doStart Nothing
31
true
true
0
8
76
38
19
19
null
null
573/leksah
src/IDE/Statusbar.hs
gpl-2.0
getSBErrors :: PaneMonad alpha => alpha Statusbar getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
159
getSBErrors :: PaneMonad alpha => alpha Statusbar getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
159
getSBErrors = widgetGet ["Leksah Main Window", "topBox","statusBox","statusBarErrors"] castToStatusbar
109
false
true
0
6
21
38
20
18
null
null
AndreasPK/stack
src/Stack/Types/StackT.hs
bsd-3-clause
-- | This will print out the given message with a newline and disable -- any further stickiness of the line until a new call to 'logSticky' -- happens. -- -- It might be better at some point to have a 'runSticky' function -- that encompasses the logSticky->logStickyDone pairing. logStickyDone :: Q Exp logStickyDone = logOther "sticky-done"
345
logStickyDone :: Q Exp logStickyDone = logOther "sticky-done"
65
logStickyDone = logOther "sticky-done"
42
true
true
0
5
60
23
14
9
null
null
brendanhay/gogol
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/Update.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). udsuUploadType :: Lens' UsersDataSourcesUpdate (Maybe Text) udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
210
udsuUploadType :: Lens' UsersDataSourcesUpdate (Maybe Text) udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
139
udsuUploadType = lens _udsuUploadType (\ s a -> s{_udsuUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
matthieubulte/sequent
src/Sequent/Inference.hs
bsd-3-clause
{- Gamma, A[y/x] |- Delta -------------------------------- forall left Gamma, forall x. A |- Delta -} iForAllAntecedent :: InferenceRule iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
252
iForAllAntecedent :: InferenceRule iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
142
iForAllAntecedent (P.ForAllAntecedent y rest) (T.ForAll f:gamma, delta) = check rest (f y:gamma, delta)
107
true
true
0
9
42
60
31
29
null
null
plumlife/cabal
Cabal/Distribution/Package.hs
bsd-3-clause
packageVersion :: Package pkg => pkg -> Version packageVersion = pkgVersion . packageId
88
packageVersion :: Package pkg => pkg -> Version packageVersion = pkgVersion . packageId
88
packageVersion = pkgVersion . packageId
40
false
true
0
6
13
26
13
13
null
null
MihaiVisu/HaskellStuff
tutorial3 week5/tutorial3.hs
mit
elongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
belongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
belongsToStr n (x:xs) | n /= x = belongsToStr n xs | otherwise = True
91
false
false
1
8
37
42
19
23
null
null
pfq/PFQ
user/pfqd/src/Main.hs
gpl-2.0
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
where bindEgress q gid dev queue = do infoM "daemon" (" egress bind on dev " ++ dev ++ ", port " ++ show queue ++ ", class " ++ show cl) Q.joinGroup q gid cl (mkPolicy pol) Q.egressBind q dev queue Q.setWeight q w
264
false
false
0
13
95
96
43
53
null
null
rzil/honours
LeavittPathAlgebras/LPA.hs
mit
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFormAtomGhostPath b) (sort nf)))
350
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFormAtomGhostPath b) (sort nf)))
350
collectNormalFormAtoms nf = filter ((/= 0) . normalFormAtomCoefficient) (map (\xs -> (head xs) {normalFormAtomCoefficient = sum (map normalFormAtomCoefficient xs)}) (groupBy (\a b -> normalFormAtomVertex a == normalFormAtomVertex b && normalFormAtomPath a == normalFormAtomPath b && normalFormAtomGhostPath a == normalFormAtomGhostPath b) (sort nf)))
350
false
false
0
17
41
128
64
64
null
null
arekfu/project_euler
p0086/p0086.hs
mit
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
countSplits (aPlusB, c, _) = if lo <= hi then hi - lo + 1 else 0 where lo = max (aPlusB - c) 1 aPlusBOver2 = aPlusB `div` 2 hi = aPlusBOver2
164
false
false
2
8
56
77
41
36
null
null
cullina/Extractor
src/LempelZiv.hs
bsd-3-clause
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
bitsNeeded' n m logM = logM : if n < m then bitsNeeded' (n+1) m logM else bitsNeeded' (n+1) (2*m) (logM+1)
133
false
false
3
8
47
77
37
40
null
null
Gwin73/Schemini
src/one-file-version/Schemini.hs
mit
eval (List [Atom "def", Atom var, expr]) = eval expr
52
eval (List [Atom "def", Atom var, expr]) = eval expr
52
eval (List [Atom "def", Atom var, expr]) = eval expr
52
false
false
0
9
9
33
16
17
null
null
snoyberg/data-object-json
runtests.hs
bsd-2-clause
caseInputOutput :: Assertion caseInputOutput = do so <- decode $ S8.pack input output @=? so
100
caseInputOutput :: Assertion caseInputOutput = do so <- decode $ S8.pack input output @=? so
100
caseInputOutput = do so <- decode $ S8.pack input output @=? so
71
false
true
0
10
22
34
16
18
null
null
melted/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
opName :: PrimFn -> String opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) <- x = "LChInt" ++ (suffixFor to) | (LExternal si) <- x, si == sUN "prim__stdin" = "LStdIn" | (LExternal si) <- x, si == sUN "prim__stdout" = "LStdOut" | (LExternal si) <- x, si == sUN "prim__stderr" = "LStdErr" | (LExternal si) <- x, si == sUN "prim__eqManagedPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__eqPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__vm" = "LVMPtr" | (LExternal si) <- x, si == sUN "prim__null" = "LNull" | (LExternal si) <- x, si == sUN "prim__registerPtr" = "LRegisterPtr" | (LExternal si) <- x, si == sUN "prim__readFile" = "LReadFile" | (LExternal si) <- x, si == sUN "prim__writeFile" = "LWriteFile" | otherwise = takeWhile ((/=) ' ') $ show x where suffixFor (ITFixed nt) = show nt suffixFor (ITNative) = show IT32 suffixFor (ITBig) = show ITBig suffixFor (ITChar) = show ITChar
1,623
opName :: PrimFn -> String opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) <- x = "LChInt" ++ (suffixFor to) | (LExternal si) <- x, si == sUN "prim__stdin" = "LStdIn" | (LExternal si) <- x, si == sUN "prim__stdout" = "LStdOut" | (LExternal si) <- x, si == sUN "prim__stderr" = "LStdErr" | (LExternal si) <- x, si == sUN "prim__eqManagedPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__eqPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__vm" = "LVMPtr" | (LExternal si) <- x, si == sUN "prim__null" = "LNull" | (LExternal si) <- x, si == sUN "prim__registerPtr" = "LRegisterPtr" | (LExternal si) <- x, si == sUN "prim__readFile" = "LReadFile" | (LExternal si) <- x, si == sUN "prim__writeFile" = "LWriteFile" | otherwise = takeWhile ((/=) ' ') $ show x where suffixFor (ITFixed nt) = show nt suffixFor (ITNative) = show IT32 suffixFor (ITBig) = show ITBig suffixFor (ITChar) = show ITChar
1,623
opName x | (LSExt _ to) <- x = "LSExt" ++ (suffixFor to) | (LZExt _ to) <- x = "LZExt" ++ (suffixFor to) | (LTrunc _ to) <- x = "LTrunc" ++ (suffixFor to) | (LFloatInt to) <- x = "LFloatInt" ++ (suffixFor to) | (LStrInt to) <- x = "LStrInt" ++ (suffixFor to) | (LChInt to) <- x = "LChInt" ++ (suffixFor to) | (LExternal si) <- x, si == sUN "prim__stdin" = "LStdIn" | (LExternal si) <- x, si == sUN "prim__stdout" = "LStdOut" | (LExternal si) <- x, si == sUN "prim__stderr" = "LStdErr" | (LExternal si) <- x, si == sUN "prim__eqManagedPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__eqPtr" = "LEqManagedPtr" | (LExternal si) <- x, si == sUN "prim__vm" = "LVMPtr" | (LExternal si) <- x, si == sUN "prim__null" = "LNull" | (LExternal si) <- x, si == sUN "prim__registerPtr" = "LRegisterPtr" | (LExternal si) <- x, si == sUN "prim__readFile" = "LReadFile" | (LExternal si) <- x, si == sUN "prim__writeFile" = "LWriteFile" | otherwise = takeWhile ((/=) ' ') $ show x where suffixFor (ITFixed nt) = show nt suffixFor (ITNative) = show IT32 suffixFor (ITBig) = show ITBig suffixFor (ITChar) = show ITChar
1,596
false
true
0
10
695
625
294
331
null
null
d12frosted/hakyll
src/Hakyll/Core/Compiler.hs
bsd-3-clause
reloadMetadata :: Item String -> Compiler (Item String) reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
284
reloadMetadata :: Item String -> Compiler (Item String) reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
284
reloadMetadata item = do read <- compilerAsk let identifier = itemIdentifier item provider = compilerProvider read unsafeCompiler $ resourceReloadMetadata provider identifier (itemBody item) return item
228
false
true
0
10
58
83
37
46
null
null
sternenseemann/large-hashable
test/Data/LargeHashable/Tests/Class.hs
bsd-3-clause
prop_hashMapUniqueness :: HM.HashMap Int Bool -> HM.HashMap Int Bool -> Bool prop_hashMapUniqueness = generic_uniquenessProp
124
prop_hashMapUniqueness :: HM.HashMap Int Bool -> HM.HashMap Int Bool -> Bool prop_hashMapUniqueness = generic_uniquenessProp
124
prop_hashMapUniqueness = generic_uniquenessProp
47
false
true
0
8
13
33
16
17
null
null
tel/hs-nanomsg
src/Network/Nanomsg/C/Priorities.hs
apache-2.0
prio7 = Priority 7
24
prio7 = Priority 7
24
prio7 = Priority 7
24
false
false
0
5
9
9
4
5
null
null
fmthoma/ghc
libraries/template-haskell/Language/Haskell/TH/Quote.hs
bsd-3-clause
dataToExpQ :: Data a => (forall b . Data b => b -> Maybe (Q Exp)) -> a -> Q Exp dataToExpQ = dataToQa conE litE (foldl appE)
165
dataToExpQ :: Data a => (forall b . Data b => b -> Maybe (Q Exp)) -> a -> Q Exp dataToExpQ = dataToQa conE litE (foldl appE)
165
dataToExpQ = dataToQa conE litE (foldl appE)
44
false
true
0
14
68
76
35
41
null
null
romanb/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/UpdateDeploymentGroup.hs
mpl-2.0
-- | The replacement set of Amazon EC2 tags to filter on, if you want to change -- them. udgEc2TagFilters :: Lens' UpdateDeploymentGroup [EC2TagFilter] udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
239
udgEc2TagFilters :: Lens' UpdateDeploymentGroup [EC2TagFilter] udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
150
udgEc2TagFilters = lens _udgEc2TagFilters (\s a -> s { _udgEc2TagFilters = a }) . _List
87
true
true
1
10
38
53
27
26
null
null
xkollar/handy-haskell
other/pt-2012-02/aaa.hs
gpl-3.0
main :: IO () main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
100
main :: IO () main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
100
main = do System.IO.hSetBuffering System.IO.stdout System.IO.NoBuffering main2
86
false
true
0
8
18
36
18
18
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
carith (FCon i) | i == sUN "C_IntChar" = "char" | i == sUN "C_IntNative" = "int"
84
false
false
0
9
20
47
20
27
null
null
nikita-volkov/graph-db
library/GraphDB/Util/FileSystem.hs
mit
-- | -- Execute an IO action while using a file as an interprocess lock, -- thus ensuring that only a single action executes across all processes -- of the running system. -- -- If a file exists already it checks whether it is locked on by any running process, -- including the current one, -- and acquires it if it's not. -- -- Releases the lock in case of any failure in executed action or when the action is executed. withLock :: FilePath -> IO a -> IO a withLock file io = bracket (acquireLock file) releaseLock (const io)
532
withLock :: FilePath -> IO a -> IO a withLock file io = bracket (acquireLock file) releaseLock (const io)
105
withLock file io = bracket (acquireLock file) releaseLock (const io)
68
true
true
0
7
105
59
33
26
null
null
edsko/hackage-server
Distribution/Server/Features/Security/State.hs
bsd-3-clause
initialSecurityState :: SecurityState initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitial, securityTimestampTime = epoch1970 } where emptyTar = Tar.write [] emptyTarGz = GZip.compress emptyTar tarGzFileInfo = fileInfo (mkTarballCompressed epoch1970 emptyTarGz) tarFileInfo = fileInfo (mkTarballUncompressed epoch1970 emptyTar) epoch1970 = posixSecondsToUTCTime 0 {------------------------------------------------------------------------------- Transactions -------------------------------------------------------------------------------}
823
initialSecurityState :: SecurityState initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitial, securityTimestampTime = epoch1970 } where emptyTar = Tar.write [] emptyTarGz = GZip.compress emptyTar tarGzFileInfo = fileInfo (mkTarballCompressed epoch1970 emptyTarGz) tarFileInfo = fileInfo (mkTarballUncompressed epoch1970 emptyTar) epoch1970 = posixSecondsToUTCTime 0 {------------------------------------------------------------------------------- Transactions -------------------------------------------------------------------------------}
823
initialSecurityState = SecurityState { securityStateFiles = Nothing, securityTarGzFileInfo = tarGzFileInfo, securityTarFileInfo = tarFileInfo, securitySnapshotVersion = Sec.versionInitial, securityTimestampVersion = Sec.versionInitial, securityTimestampTime = epoch1970 } where emptyTar = Tar.write [] emptyTarGz = GZip.compress emptyTar tarGzFileInfo = fileInfo (mkTarballCompressed epoch1970 emptyTarGz) tarFileInfo = fileInfo (mkTarballUncompressed epoch1970 emptyTar) epoch1970 = posixSecondsToUTCTime 0 {------------------------------------------------------------------------------- Transactions -------------------------------------------------------------------------------}
785
false
true
4
7
156
119
66
53
null
null
nushio3/ghc
compiler/utils/Outputable.hs
bsd-3-clause
alwaysQualifyModules :: QueryQualifyModule alwaysQualifyModules _ = True
72
alwaysQualifyModules :: QueryQualifyModule alwaysQualifyModules _ = True
72
alwaysQualifyModules _ = True
29
false
true
0
5
6
14
7
7
null
null
tibbe/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
mkEMPTY_MVAR_infoLabel = CmmLabel rtsPackageId (fsLit "stg_EMPTY_MVAR") CmmInfo
95
false
false
0
7
22
19
9
10
null
null
spechub/Hets
SoftFOL/MathServParsing.hs
gpl-2.0
-- ** functions for handling with soap soapenvS :: String soapenvS = "soapenv"
79
soapenvS :: String soapenvS = "soapenv"
39
soapenvS = "soapenv"
20
true
true
0
4
13
12
7
5
null
null
pgj/bead
src/Bead/Persistence/NoSQLDirFile.hs
bsd-3-clause
dataDir = "data"
16
dataDir = "data"
16
dataDir = "data"
16
false
false
1
5
2
10
3
7
null
null
sdiehl/ghc
testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
bsd-3-clause
findNameBinds :: String -> [CoreBind] -> First Name findNameBinds target = mconcat . map (findNameBind target)
110
findNameBinds :: String -> [CoreBind] -> First Name findNameBinds target = mconcat . map (findNameBind target)
110
findNameBinds target = mconcat . map (findNameBind target)
58
false
true
0
8
15
41
20
21
null
null
k0001/gtk2hs
tools/c2hs/base/general/UNames.hs
gpl-3.0
saveRootNameSupply :: IO Name saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
170
saveRootNameSupply :: IO Name saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
170
saveRootNameSupply = case rootSupply of NameSupply ref -> do val <- readIORef ref writeIORef ref 0 return (Name val)
140
false
true
0
12
46
57
25
32
null
null
jspahrsummers/RxHaskell
Disposable.hs
mit
dispose :: Disposable -> IO () dispose EmptyDisposable = return ()
66
dispose :: Disposable -> IO () dispose EmptyDisposable = return ()
66
dispose EmptyDisposable = return ()
35
false
true
0
7
10
28
13
15
null
null
bgamari/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
block :: LP Blocks block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
226
block :: LP Blocks block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
226
block = (mempty <$ comment) <|> (mempty <$ ((spaceChar <|> newline) *> spaces)) <|> environment <|> macro <|> blockCommand <|> paragraph <|> grouped block <|> (mempty <$ char '&')
207
false
true
21
10
60
110
58
52
null
null
gumgl/project-euler
33/33.hs
mit
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
candidates (a:as) = (map (\i -> (a,i)) as) ++ (candidates as)
61
false
false
0
10
10
49
26
23
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/Rts.hs
bsd-3-clause
funType = obj stgFun
30
funType = obj stgFun
30
funType = obj stgFun
30
false
false
0
5
13
9
4
5
null
null
siddhanathan/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
isVecExpr (CmmMachOp (MO_VF_Quot {}) _) = True
49
false
false
0
9
9
24
12
12
null
null
spatial-reasoning/zeno
src/Helpful/General.hs
bsd-2-clause
-- a purely functional implementation of if-then-else ite :: Bool -> a -> a -> a ite True x _ = x
98
ite :: Bool -> a -> a -> a ite True x _ = x
44
ite True x _ = x
17
true
true
0
9
22
37
17
20
null
null
MasseR/xmonadcontrib
XMonad/Actions/PhysicalScreens.hs
bsd-3-clause
onNextNeighbour :: (WorkspaceId -> WindowSet -> WindowSet) -> X () onNextNeighbour = neighbourWindows 1
103
onNextNeighbour :: (WorkspaceId -> WindowSet -> WindowSet) -> X () onNextNeighbour = neighbourWindows 1
103
onNextNeighbour = neighbourWindows 1
36
false
true
0
9
13
39
18
21
null
null
abuiles/turbinado-blog
tmp/dependencies/utf8-string-0.3.3/System/IO/UTF8.hs
bsd-3-clause
-- | Write a UTF8 string to a Handle. hPutStr :: Handle -> String -> IO () hPutStr h s = IO.hPutStr h (encodeString s)
118
hPutStr :: Handle -> String -> IO () hPutStr h s = IO.hPutStr h (encodeString s)
80
hPutStr h s = IO.hPutStr h (encodeString s)
43
true
true
0
8
24
43
21
22
null
null
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/PicturesSVG.hs
cc0-1.0
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" ++ "</filter>\n"
338
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" ++ "</filter>\n"
338
preamble = "<svg width=\"100%\" height=\"100%\" version=\"1.1\"\n" ++ "xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" ++ "<filter id=\"negative\">\n" ++ "<feColorMatrix type=\"matrix\"\n"++ "values=\"-1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 1 1 1 0 0\" />\n" ++ "</filter>\n"
338
false
false
5
6
69
32
13
19
null
null
brendanhay/gogol
gogol-admin-datatransfer/gen/Network/Google/Resource/DataTransfer/Applications/List.hs
mpl-2.0
-- | V1 error format. alXgafv :: Lens' ApplicationsList (Maybe Xgafv) alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
120
alXgafv :: Lens' ApplicationsList (Maybe Xgafv) alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
98
alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
50
true
true
0
9
21
46
25
21
null
null
ml9951/ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
argInfoAppArgs (TyArg { as_arg_ty = ty } : as) = Type ty : argInfoAppArgs as
76
false
false
0
10
14
35
17
18
null
null
brendanhay/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs
mpl-2.0
-- | [Output Only] The error type identifier for this error. rueeiCode :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text) rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
181
rueeiCode :: Lens' ResourceUpdateErrorErrorsItem (Maybe Text) rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
120
rueeiCode = lens _rueeiCode (\ s a -> s{_rueeiCode = a})
58
true
true
0
9
29
48
25
23
null
null
vipo/TicTacToe
test/Spec.hs
bsd-3-clause
bencode :: TestTree bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays readBencode renderBencode , testCase "some list" $ readBencode "li42e4:1234e" @?= Right (ListOfVals [IntVal 42, StringVal "1234"]) , testCase "some map" $ readBencode "d4:1234i42ee" @?= Right (DictVal [("1234", IntVal 42)]) , testCase "some error" $ isLeft (readBencode "d4:1234i42e") @?= True ]
653
bencode :: TestTree bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays readBencode renderBencode , testCase "some list" $ readBencode "li42e4:1234e" @?= Right (ListOfVals [IntVal 42, StringVal "1234"]) , testCase "some map" $ readBencode "d4:1234i42ee" @?= Right (DictVal [("1234", IntVal 42)]) , testCase "some error" $ isLeft (readBencode "d4:1234i42e") @?= True ]
653
bencode = testGroup "Bencode" [ QC.testProperty "array of maps" $ testArrayOfMaps readBencode renderBencode , QC.testProperty "map of maps" $ testMapOfMaps readBencode renderBencode , QC.testProperty "arrays of arrays" $ testArrayOfArrays readBencode renderBencode , testCase "some list" $ readBencode "li42e4:1234e" @?= Right (ListOfVals [IntVal 42, StringVal "1234"]) , testCase "some map" $ readBencode "d4:1234i42ee" @?= Right (DictVal [("1234", IntVal 42)]) , testCase "some error" $ isLeft (readBencode "d4:1234i42e") @?= True ]
633
false
true
0
13
170
166
80
86
null
null
jhartikainen/hs-language-php
Evaluator.hs
bsd-3-clause
isInFunctionContext :: PHPEval Bool isInFunctionContext = liftM globalRef ask >>= return . isJust
97
isInFunctionContext :: PHPEval Bool isInFunctionContext = liftM globalRef ask >>= return . isJust
97
isInFunctionContext = liftM globalRef ask >>= return . isJust
61
false
true
0
7
12
27
13
14
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 462346 = 1918
33
getValueFromProduct 462346 = 1918
33
getValueFromProduct 462346 = 1918
33
false
false
0
5
3
9
4
5
null
null
termite2/tsl
Frontend/NS.hs
bsd-3-clause
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
objLookup (ObjTxInput t i) n = objLookup (ObjType $ Type ScopeTop (tspec i)) n
79
false
false
0
10
14
42
20
22
null
null
mzini/qlogic
Qlogic/Test/ArcSat.hs
gpl-3.0
correctEncoding _ = False
33
correctEncoding _ = False
33
correctEncoding _ = False
33
false
false
0
5
11
9
4
5
null
null
derekmcloughlin/BridgeBuddyServer
library/BridgeBuddy/OpeningBids.hs
apache-2.0
biddableHands :: TableHands -> [Hand] biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == 11 && bid hand == Pass -- Randomly generate a list of biddable hands
389
biddableHands :: TableHands -> [Hand] biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == 11 && bid hand == Pass -- Randomly generate a list of biddable hands
389
biddableHands table_hands = filter (\h -> isBiddable h || isNearlyBiddable h ) hands where hands = [h table_hands | h <- [north, east, south, west] ] bid h = fst (openingBid h) isBiddable hand = bid hand /= Pass isNearlyBiddable hand = hcp hand == 11 && bid hand == Pass -- Randomly generate a list of biddable hands
351
false
true
3
13
98
136
69
67
null
null
nevrenato/Hets_Fork
CASL/Morphism.hs
gpl-2.0
checkSymbList :: [SYMB_OR_MAP] -> [Diagnosis] checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
318
checkSymbList :: [SYMB_OR_MAP] -> [Diagnosis] checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
318
checkSymbList l = case l of Symb (Symb_id a) : Symb (Qual_id b t _) : r -> mkDiag Warning ("profile '" ++ showDoc t "' does not apply to '" ++ showId a "' but only to") b : checkSymbList r _ : r -> checkSymbList r [] -> []
272
false
true
0
13
105
122
59
63
null
null
pdmurray/haskell-book-ex
src/ch9/Exercises9.11.hs
bsd-3-clause
zip' x [] = []
14
zip' x [] = []
14
zip' x [] = []
14
false
false
1
6
4
20
7
13
null
null
bgamari/unordered-containers
Data/HashMap/Array.hs
bsd-3-clause
unsafeThaw :: Array a -> ST s (MArray s a) unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
188
unsafeThaw :: Array a -> ST s (MArray s a) unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
188
unsafeThaw ary = ST $ \s -> case unsafeThawArray# (unArray ary) s of (# s', mary #) -> (# s', marray mary (length ary) #)
145
false
true
2
12
58
90
43
47
null
null
siddhanathan/yi
yi-core/src/Yi/History.hs
gpl-2.0
dynKeyA :: (Default v, Ord k) => k -> Lens' (M.Map k v) v dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
126
dynKeyA :: (Default v, Ord k) => k -> Lens' (M.Map k v) v dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
126
dynKeyA key = lens (M.findWithDefault def key) (flip (M.insert key))
68
false
true
0
11
23
82
39
43
null
null
anttisalonen/freekick
haskell/libfreekick/Freekick/Libsoccer/Database.hs
agpl-3.0
parseID :: Node -> Integer parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
85
parseID :: Node -> Integer parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
85
parseID n = read (fromMaybe "-1" (lookup "id" (eAttrs n)))
58
false
true
0
11
14
49
22
27
null
null
graninas/The-Amoeba-World
src/Amoeba/View/View.hs
gpl-3.0
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
modifyView _ (StopViewPointMoving scrPt) view@(Runtime a vPlane mbShift) = let point' = toUserViewPoint scrPt in maybe view (\(p1, p2) -> (Runtime a (vPlane +! p2 -! p1) Nothing)) mbShift
195
false
false
2
12
36
95
45
50
null
null
ghorn/ois-input-manager
src/Key.hs
bsd-3-clause
decodeKey 81 = KC_NUMPAD3
25
decodeKey 81 = KC_NUMPAD3
25
decodeKey 81 = KC_NUMPAD3
25
false
false
1
5
3
13
4
9
null
null
DavidAlphaFox/ghc
libraries/pretty/src/Text/PrettyPrint/HughesPJ.hs
bsd-3-clause
display :: Mode -> Int -> Int -> (TextDetails -> a -> a) -> a -> Doc -> a display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1) p lay _ Empty = end lay k (NilAbove p) = nlText `txt` lay k p lay k (TextBeside s sl p) = case m of ZigZagMode | k >= gap_width -> nlText `txt` ( Str (replicate shift '/') `txt` ( nlText `txt` lay1 (k - shift) s sl p )) | k < 0 -> nlText `txt` ( Str (replicate shift '\\') `txt` ( nlText `txt` lay1 (k + shift) s sl p )) _ -> lay1 k s sl p lay _ (Above {}) = error "display lay Above" lay _ (Beside {}) = error "display lay Beside" lay _ NoDoc = error "display lay NoDoc" lay _ (Union {}) = error "display lay Union" lay1 !k s !sl p = let !r = k + sl in Str (indent k) `txt` (s `txt` lay2 r p) lay2 k _ | k `seq` False = undefined lay2 k (NilAbove p) = nlText `txt` lay k p lay2 k (TextBeside s sl p) = s `txt` lay2 (k + sl) p lay2 k (Nest _ p) = lay2 k p lay2 _ Empty = end lay2 _ (Above {}) = error "display lay2 Above" lay2 _ (Beside {}) = error "display lay2 Beside" lay2 _ NoDoc = error "display lay2 NoDoc" lay2 _ (Union {}) = error "display lay2 Union" in lay 0 doc }}
1,923
display :: Mode -> Int -> Int -> (TextDetails -> a -> a) -> a -> Doc -> a display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1) p lay _ Empty = end lay k (NilAbove p) = nlText `txt` lay k p lay k (TextBeside s sl p) = case m of ZigZagMode | k >= gap_width -> nlText `txt` ( Str (replicate shift '/') `txt` ( nlText `txt` lay1 (k - shift) s sl p )) | k < 0 -> nlText `txt` ( Str (replicate shift '\\') `txt` ( nlText `txt` lay1 (k + shift) s sl p )) _ -> lay1 k s sl p lay _ (Above {}) = error "display lay Above" lay _ (Beside {}) = error "display lay Beside" lay _ NoDoc = error "display lay NoDoc" lay _ (Union {}) = error "display lay Union" lay1 !k s !sl p = let !r = k + sl in Str (indent k) `txt` (s `txt` lay2 r p) lay2 k _ | k `seq` False = undefined lay2 k (NilAbove p) = nlText `txt` lay k p lay2 k (TextBeside s sl p) = s `txt` lay2 (k + sl) p lay2 k (Nest _ p) = lay2 k p lay2 _ Empty = end lay2 _ (Above {}) = error "display lay2 Above" lay2 _ (Beside {}) = error "display lay2 Beside" lay2 _ NoDoc = error "display lay2 NoDoc" lay2 _ (Union {}) = error "display lay2 Union" in lay 0 doc }}
1,923
display m !page_width !ribbon_width txt end doc = case page_width - ribbon_width of { gap_width -> case gap_width `quot` 2 of { shift -> let lay k _ | k `seq` False = undefined lay k (Nest k1 p) = lay (k + k1) p lay _ Empty = end lay k (NilAbove p) = nlText `txt` lay k p lay k (TextBeside s sl p) = case m of ZigZagMode | k >= gap_width -> nlText `txt` ( Str (replicate shift '/') `txt` ( nlText `txt` lay1 (k - shift) s sl p )) | k < 0 -> nlText `txt` ( Str (replicate shift '\\') `txt` ( nlText `txt` lay1 (k + shift) s sl p )) _ -> lay1 k s sl p lay _ (Above {}) = error "display lay Above" lay _ (Beside {}) = error "display lay Beside" lay _ NoDoc = error "display lay NoDoc" lay _ (Union {}) = error "display lay Union" lay1 !k s !sl p = let !r = k + sl in Str (indent k) `txt` (s `txt` lay2 r p) lay2 k _ | k `seq` False = undefined lay2 k (NilAbove p) = nlText `txt` lay k p lay2 k (TextBeside s sl p) = s `txt` lay2 (k + sl) p lay2 k (Nest _ p) = lay2 k p lay2 _ Empty = end lay2 _ (Above {}) = error "display lay2 Above" lay2 _ (Beside {}) = error "display lay2 Beside" lay2 _ NoDoc = error "display lay2 NoDoc" lay2 _ (Union {}) = error "display lay2 Union" in lay 0 doc }}
1,849
false
true
0
26
952
693
352
341
null
null
maciej-wichrowski/HsCharts
demo/Main.hs
bsd-3-clause
main :: IO () main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart , q 0 1 barChart , q 1 1 areaChart , q 2 1 Main.boxPlot , q 3 1 polarChart ]
553
main :: IO () main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart , q 0 1 barChart , q 1 1 areaChart , q 2 1 Main.boxPlot , q 3 1 polarChart ]
553
main = do let disp = InWindow "HsCharts Demo" (windowW, windowH) (50, 50) display disp white $ pictures [ q 0 0 pointChart , q 1 0 lineChart , q 2 0 bubbleChart , q 3 0 logScaleChart , q 0 1 barChart , q 1 1 areaChart , q 2 1 Main.boxPlot , q 3 1 polarChart ]
539
false
true
0
11
342
141
70
71
null
null
ShigekiKarita/haskellSDL2Examples
src/lesson12.hs
gpl-2.0
runApplication :: SDL.Renderer -> [Asset] -> IO () runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
302
runApplication :: SDL.Renderer -> [Asset] -> IO () runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
302
runApplication renderer assets = repeatUntilGameover applyAndDraw initialApplication where applyIntents = updateSource collectEvents drawApplication = draw renderer assets applyAndDraw = runstuff (applyIntents, drawApplication)
251
false
true
2
8
53
74
37
37
null
null
begriffs/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
executeJS :: (WebDriver wd, FromJSON a) => [JSArg] -> Text -> wd a executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that the Javascript is passed a callback function as its final argument. The script should call this function to signal that it has finished executing, passing to it a value that will be returned as the result of asyncJS. A result of Nothing indicates that the Javascript function timed out (see 'setScriptTimeout') -}
631
executeJS :: (WebDriver wd, FromJSON a) => [JSArg] -> Text -> wd a executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that the Javascript is passed a callback function as its final argument. The script should call this function to signal that it has finished executing, passing to it a value that will be returned as the result of asyncJS. A result of Nothing indicates that the Javascript function timed out (see 'setScriptTimeout') -}
631
executeJS a s = fromJSON' =<< getResult where getResult = doSessCommand methodPost "/execute" . pair ("args", "script") $ (a,s) {- |Executes a snippet of Javascript code asynchronously. This function works similarly to 'executeJS', except that the Javascript is passed a callback function as its final argument. The script should call this function to signal that it has finished executing, passing to it a value that will be returned as the result of asyncJS. A result of Nothing indicates that the Javascript function timed out (see 'setScriptTimeout') -}
564
false
true
0
8
106
86
45
41
null
null
leshchevds/ganeti
src/Ganeti/WConfd/Core.hs
bsd-2-clause
-- | Tell whether a given owner has pending requests. hasPendingRequest :: ClientId -> WConfdMonad Bool hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
176
hasPendingRequest :: ClientId -> WConfdMonad Bool hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
122
hasPendingRequest cid = liftM (LW.hasPendingRequest cid) readLockWaiting
72
true
true
0
8
22
35
17
18
null
null
melted/llvm-pretty
src/Text/LLVM.hs
bsd-3-clause
int :: Int -> Value int = toValue
34
int :: Int -> Value int = toValue
34
int = toValue
14
false
true
0
5
8
15
8
7
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Update.hs
mpl-2.0
-- | OAuth access token. cfuAccessToken :: Lens' CreativeFieldsUpdate (Maybe Text) cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
162
cfuAccessToken :: Lens' CreativeFieldsUpdate (Maybe Text) cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
137
cfuAccessToken = lens _cfuAccessToken (\ s a -> s{_cfuAccessToken = a})
79
true
true
0
9
29
48
25
23
null
null
ideas-edu/ideas
src/Ideas/Encoding/NewEncoderJSON.hs
apache-2.0
exerciseInfo :: Exercise a -> JSONBuilder exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
223
exerciseInfo :: Exercise a -> JSONBuilder exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
223
exerciseInfo ex = tagJSON "exercise" $ Object [ ("exerciseid", toJSON (showId ex)) , ("description", toJSON (description ex)) , ("status", toJSON (show (status ex))) ]
181
false
true
0
11
43
91
47
44
null
null
pparkkin/eta
compiler/ETA/Utils/GraphOps.hs
bsd-3-clause
-- | Add a coalescence edge to the graph, creating nodes if requried. -- It is considered adventageous to assign the same color to nodes in a coalesence. addCoalesce :: Uniquable k => (k, cls) -> (k, cls) -> Graph k cls color -> Graph k cls color addCoalesce (u1, c1) (u2, c2) = let addCoalesce u c u' = adjustWithDefaultUFM (\node -> node { nodeCoalesce = addOneToUniqSet (nodeCoalesce node) u' }) (newNode u c) { nodeCoalesce = unitUniqSet u' } u in graphMapModify ( addCoalesce u1 c1 u2 . addCoalesce u2 c2 u1)
654
addCoalesce :: Uniquable k => (k, cls) -> (k, cls) -> Graph k cls color -> Graph k cls color addCoalesce (u1, c1) (u2, c2) = let addCoalesce u c u' = adjustWithDefaultUFM (\node -> node { nodeCoalesce = addOneToUniqSet (nodeCoalesce node) u' }) (newNode u c) { nodeCoalesce = unitUniqSet u' } u in graphMapModify ( addCoalesce u1 c1 u2 . addCoalesce u2 c2 u1)
494
addCoalesce (u1, c1) (u2, c2) = let addCoalesce u c u' = adjustWithDefaultUFM (\node -> node { nodeCoalesce = addOneToUniqSet (nodeCoalesce node) u' }) (newNode u c) { nodeCoalesce = unitUniqSet u' } u in graphMapModify ( addCoalesce u1 c1 u2 . addCoalesce u2 c2 u1)
377
true
true
0
16
234
170
88
82
null
null