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
jchitel/ProjectEuler.hs
Problems/Problem0016.hs
mit
main = print getProblem16Value
30
main = print getProblem16Value
30
main = print getProblem16Value
30
false
false
1
5
3
12
4
8
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Panic.hs
bsd-3-clause
-- | Like try, but pass through UserInterrupt and Panic exceptions. -- Used when we want soft failures when reading interface files, for example. -- TODO: I'm not entirely sure if this is catching what we really want to catch tryMost :: IO a -> IO (Either SomeException a) tryMost action = do r <- try action ...
1,285
tryMost :: IO a -> IO (Either SomeException a) tryMost action = do r <- try action case r of Left se -> case fromException se of -- Some GhcException's we rethrow, Just (Signal _) -> ...
1,055
tryMost action = do r <- try action case r of Left se -> case fromException se of -- Some GhcException's we rethrow, Just (Signal _) -> throwIO se Just...
1,008
true
true
0
18
683
196
92
104
null
null
ags/hs-moz
src/Moz/Linkscape/URLMetrics.hs
mit
toBitFlag SubdomainsLinking = 512
47
toBitFlag SubdomainsLinking = 512
47
toBitFlag SubdomainsLinking = 512
47
false
false
0
5
17
9
4
5
null
null
emilaxelsson/open-typerep
src/Data/TypeRep/Representation.hs
bsd-3-clause
-- | Partially witness a 'Typeable' constraint for a reified type pwitTypeable :: PWitness (Typeable t) t t => TypeRep t a -> Either String (Dict (Typeable t a)) pwitTypeable = pwit Proxy
191
pwitTypeable :: PWitness (Typeable t) t t => TypeRep t a -> Either String (Dict (Typeable t a)) pwitTypeable = pwit Proxy
125
pwitTypeable = pwit Proxy
25
true
true
0
11
36
60
29
31
null
null
h3nnn4n/rsa-haskell
Prime.hs
gpl-3.0
millerRabin :: Integer -> Int -> Bool millerRabin _ 0 = False
61
millerRabin :: Integer -> Int -> Bool millerRabin _ 0 = False
61
millerRabin _ 0 = False
23
false
true
0
6
11
24
12
12
null
null
adscib/monad-bayes
test/TestPopulation.hs
mit
transCheck2 :: Bool transCheck2 = enumerate (collapse (spawn 2 >> sprinkler)) ~== sprinklerExact
111
transCheck2 :: Bool transCheck2 = enumerate (collapse (spawn 2 >> sprinkler)) ~== sprinklerExact
111
transCheck2 = enumerate (collapse (spawn 2 >> sprinkler)) ~== sprinklerExact
91
false
true
0
11
27
34
17
17
null
null
GaloisInc/halvm-ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
ppr_sig (InlineSig var inl) = pragBrackets (ppr inl <+> pprPrefixOcc (unLoc var))
87
ppr_sig (InlineSig var inl) = pragBrackets (ppr inl <+> pprPrefixOcc (unLoc var))
87
ppr_sig (InlineSig var inl) = pragBrackets (ppr inl <+> pprPrefixOcc (unLoc var))
87
false
false
0
10
17
40
18
22
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1228 = 1227
11
1228 = 1227
11
1228 = 1227
11
false
false
1
5
2
10
3
7
null
null
CarstenKoenig/AdventOfCode2016
Day3/Main.hs
mit
testInput :: String testInput = " 4 21 894"
49
testInput :: String testInput = " 4 21 894"
49
testInput = " 4 21 894"
29
false
true
0
4
14
11
6
5
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo ReadArrayArrayOp_ArrayArray = mkGenPrimOp (fsLit "readArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayArrayPrimTy]))
238
primOpInfo ReadArrayArrayOp_ArrayArray = mkGenPrimOp (fsLit "readArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayArrayPrimTy]))
238
primOpInfo ReadArrayArrayOp_ArrayArray = mkGenPrimOp (fsLit "readArrayArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayArrayPrimTy]))
238
false
false
0
10
17
62
32
30
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
oobStatusUnknown :: String oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
83
oobStatusUnknown :: String oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
83
oobStatusUnknown = Types.oobStatusToRaw OobStatusUnknown
56
false
true
0
6
6
16
8
8
null
null
f1u77y/xmonad-contrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
nodeRefToLeaf _ Nothing = Nothing
33
nodeRefToLeaf _ Nothing = Nothing
33
nodeRefToLeaf _ Nothing = Nothing
33
false
false
0
5
4
11
5
6
null
null
koterpillar/labyrinth
src/Labyrinth/Map.hs
mit
allPositions :: Labyrinth -> [Position] allPositions l = posRectangle w h where w = l ^. labWidth h = l ^. labHeight
130
allPositions :: Labyrinth -> [Position] allPositions l = posRectangle w h where w = l ^. labWidth h = l ^. labHeight
130
allPositions l = posRectangle w h where w = l ^. labWidth h = l ^. labHeight
90
false
true
6
8
35
61
25
36
null
null
wskplho/stack
src/Stack/Config.hs
bsd-3-clause
resolvePackageLocation _ projRoot (PLHttpTarball url) = do let name = T.unpack $ decodeUtf8 $ B16.encode $ SHA256.hash $ encodeUtf8 url root = projRoot </> workDirRel </> $(mkRelDir "downloaded") fileRel <- parseRelFile $ name ++ ".tar.gz" dirRel <- parseRelDir name dirRelTmp <- parseRelDir $ na...
1,069
resolvePackageLocation _ projRoot (PLHttpTarball url) = do let name = T.unpack $ decodeUtf8 $ B16.encode $ SHA256.hash $ encodeUtf8 url root = projRoot </> workDirRel </> $(mkRelDir "downloaded") fileRel <- parseRelFile $ name ++ ".tar.gz" dirRel <- parseRelDir name dirRelTmp <- parseRelDir $ na...
1,069
resolvePackageLocation _ projRoot (PLHttpTarball url) = do let name = T.unpack $ decodeUtf8 $ B16.encode $ SHA256.hash $ encodeUtf8 url root = projRoot </> workDirRel </> $(mkRelDir "downloaded") fileRel <- parseRelFile $ name ++ ".tar.gz" dirRel <- parseRelDir name dirRelTmp <- parseRelDir $ na...
1,069
false
false
0
19
330
354
162
192
null
null
kmate/raw-feldspar-mcs
src/Feldspar/Multicore/Representation.hs
bsd-3-clause
runThreadCMD :: Imp.ThreadCMD (Param3 Run Data PrimType') a -> Run a runThreadCMD (Imp.ForkWithId p) = forkWithId p
115
runThreadCMD :: Imp.ThreadCMD (Param3 Run Data PrimType') a -> Run a runThreadCMD (Imp.ForkWithId p) = forkWithId p
115
runThreadCMD (Imp.ForkWithId p) = forkWithId p
46
false
true
0
8
16
49
23
26
null
null
thasenpusch/scheme
parser.hs
isc
parseCompoundDatum :: Parser CompoundDatum parseCompoundDatum = fmap CDList parseList <|> fmap CDVector parseVector <|> fmap CDAbbrev parseAbbreviation
167
parseCompoundDatum :: Parser CompoundDatum parseCompoundDatum = fmap CDList parseList <|> fmap CDVector parseVector <|> fmap CDAbbrev parseAbbreviation
167
parseCompoundDatum = fmap CDList parseList <|> fmap CDVector parseVector <|> fmap CDAbbrev parseAbbreviation
124
false
true
6
6
32
52
22
30
null
null
csabahruska/GFXDemo
BSPLoader.hs
bsd-3-clause
getLightGrid = getItems 8 $ do ambient <- getUByte3 directional <- getUByte3 dir <- getUByte2 return LightGrid
138
getLightGrid = getItems 8 $ do ambient <- getUByte3 directional <- getUByte3 dir <- getUByte2 return LightGrid
138
getLightGrid = getItems 8 $ do ambient <- getUByte3 directional <- getUByte3 dir <- getUByte2 return LightGrid
138
false
false
0
8
44
40
17
23
null
null
rahulmutt/ghcvm
compiler/Eta/Core/CoreSeq.hs
bsd-3-clause
seqExprs (e:es) = seqExpr e `seq` seqExprs es
45
seqExprs (e:es) = seqExpr e `seq` seqExprs es
45
seqExprs (e:es) = seqExpr e `seq` seqExprs es
45
false
false
0
7
7
28
14
14
null
null
ekmett/containers
Data/Map/Base.hs
bsd-3-clause
-- | /O(log n)/. Update a value at a specific key with the result of the provided function. -- When the key is not -- a member of the map, the original map is returned. -- -- > adjust ("new " ++) 5 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "new a")] -- > adjust ("new " ++) 7 (fromList [(5,"a"), (3,"b")])...
513
adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a adjust f = adjustWithKey (\_ x -> f x)
93
adjust f = adjustWithKey (\_ x -> f x)
38
true
true
0
10
130
78
40
38
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxCBAR_FLOATING :: Int wxCBAR_FLOATING = 2
42
wxCBAR_FLOATING :: Int wxCBAR_FLOATING = 2
42
wxCBAR_FLOATING = 2
19
false
true
0
4
5
11
6
5
null
null
ivanperez-keera/SpaceInvaders
src/Parser.hs
bsd-3-clause
-- Continuous parser feed back. cmdString :: SF GameInput String cmdString = arr giCmdStr
89
cmdString :: SF GameInput String cmdString = arr giCmdStr
57
cmdString = arr giCmdStr
24
true
true
0
6
13
26
11
15
null
null
jean-edouard/manager
disksync/Main.hs
gpl-2.0
-- reset inprogress task states on daemon start (a task is considered inprogress if vhd-sync is alive) -- this assumes no tasks are xferring when daemon starts, which is the expected state of things clearProgressStates :: DiskSync () clearProgressStates = mapM_ reset =<< filterM inprogress =<< imageList where inpro...
649
clearProgressStates :: DiskSync () clearProgressStates = mapM_ reset =<< filterM inprogress =<< imageList where inprogress t = return . not . stopped =<< imageGetState t stopped ImageStopped = True stopped ImageFinished = True stopped (ImageFailed _) = True stopped _ = False ...
450
clearProgressStates = mapM_ reset =<< filterM inprogress =<< imageList where inprogress t = return . not . stopped =<< imageGetState t stopped ImageStopped = True stopped ImageFinished = True stopped (ImageFailed _) = True stopped _ = False reset image = do warn $ "res...
415
true
true
0
8
151
124
60
64
null
null
j-rock/hexagon
src/Data/Hexagon/Coordinate.hs
mit
fromXZ :: Integer -> Integer -> Hexagon ori fromXZ x z = Hex x (-x-z) z
71
fromXZ :: Integer -> Integer -> Hexagon ori fromXZ x z = Hex x (-x-z) z
71
fromXZ x z = Hex x (-x-z) z
27
false
true
0
8
15
43
21
22
null
null
ra1u/lambdaya-bus
examples/MatrixMultiply/Client.hs
lgpl-3.0
main = runRemoteRp rpIp 4242 $ do m <- multiply (matA,matB) let p = liftIO . P.putStrLn . P.show p matA p matB p m -- matA * matB
149
main = runRemoteRp rpIp 4242 $ do m <- multiply (matA,matB) let p = liftIO . P.putStrLn . P.show p matA p matB p m -- matA * matB
149
main = runRemoteRp rpIp 4242 $ do m <- multiply (matA,matB) let p = liftIO . P.putStrLn . P.show p matA p matB p m -- matA * matB
149
false
false
1
14
48
76
32
44
null
null
olsner/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
evVarsOfTerm (EvCallStack cs) = evVarsOfCallStack cs
56
evVarsOfTerm (EvCallStack cs) = evVarsOfCallStack cs
56
evVarsOfTerm (EvCallStack cs) = evVarsOfCallStack cs
56
false
false
0
7
9
18
8
10
null
null
plumlife/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
packageConstraints :: SelectedPackage -> [(Dependency, Bool)] packageConstraints = either installedConstraints availableConstraints . preferSource where preferSource (InstalledOnly pkg) = Left pkg preferSource (SourceOnly pkg) = Right pkg preferSource (InstalledAndSourc...
560
packageConstraints :: SelectedPackage -> [(Dependency, Bool)] packageConstraints = either installedConstraints availableConstraints . preferSource where preferSource (InstalledOnly pkg) = Left pkg preferSource (SourceOnly pkg) = Right pkg preferSource (InstalledAndSourc...
560
packageConstraints = either installedConstraints availableConstraints . preferSource where preferSource (InstalledOnly pkg) = Left pkg preferSource (SourceOnly pkg) = Right pkg preferSource (InstalledAndSource _ pkg) = Right pkg installedConstraints (InstalledPackag...
498
false
true
0
7
141
164
84
80
null
null
ndreynolds/hsURL
src/Http/Uri.hs
mit
parseHostname :: Parser String parseHostname = many1 (letter <|> oneOf ".-")
76
parseHostname :: Parser String parseHostname = many1 (letter <|> oneOf ".-")
76
parseHostname = many1 (letter <|> oneOf ".-")
45
false
true
1
8
10
30
13
17
null
null
travitch/shellDSL
src/Shell/Internal.hs
bsd-3-clause
toBWord :: String -> BWord toBWord s = BWord [BString s]
56
toBWord :: String -> BWord toBWord s = BWord [BString s]
56
toBWord s = BWord [BString s]
29
false
true
0
7
10
32
14
18
null
null
urbit/urbit
pkg/hs/proto/lib/Untyped/Parser.hs
mit
equals :: Parser (CST, CST) -- =(3 4) equals = do string "=(" x <- cst ace y <- cst char ')' pure (x, y)
116
equals :: Parser (CST, CST) equals = do string "=(" x <- cst ace y <- cst char ')' pure (x, y)
106
equals = do string "=(" x <- cst ace y <- cst char ')' pure (x, y)
78
true
true
0
8
36
62
29
33
null
null
PierreR/streaming
benchmarks/old/Stream/Prelude/Fused.hs
bsd-3-clause
-- --------------- -- repeat -- --------------- repeat :: a -> Stream (Of a) m r repeat = buildStream . F.repeat
113
repeat :: a -> Stream (Of a) m r repeat = buildStream . F.repeat
64
repeat = buildStream . F.repeat
31
true
true
0
8
20
37
20
17
null
null
ComputationWithBoundedResources/tct-inttrs
src/Tct/IntTrs.hs
bsd-3-clause
ppTerm fun var (T.Fun (IFun f) ts) = case f of Nat i -> PP.int i op -> k op where k op = PP.encloseSep PP.lparen PP.rparen (PP.space <> PP.text (iRep op) <> PP.space) (ppTerm fun var `fmap` ts)
202
ppTerm fun var (T.Fun (IFun f) ts) = case f of Nat i -> PP.int i op -> k op where k op = PP.encloseSep PP.lparen PP.rparen (PP.space <> PP.text (iRep op) <> PP.space) (ppTerm fun var `fmap` ts)
202
ppTerm fun var (T.Fun (IFun f) ts) = case f of Nat i -> PP.int i op -> k op where k op = PP.encloseSep PP.lparen PP.rparen (PP.space <> PP.text (iRep op) <> PP.space) (ppTerm fun var `fmap` ts)
202
false
false
2
11
47
115
58
57
null
null
haskellGardener/yusic
src/Yusic.hs
mit
toKeyGuide (G:As_Bb:D:F :[]) = Just KG_GMinor7
60
toKeyGuide (G:As_Bb:D:F :[]) = Just KG_GMinor7
60
toKeyGuide (G:As_Bb:D:F :[]) = Just KG_GMinor7
60
false
false
0
11
19
33
16
17
null
null
dimitriv/ziria-sem
Haskell/ZirScheduled.hs
apache-2.0
main = do { hSetBuffering stdout LineBuffering ; test_zir test [1..25] }
84
main = do { hSetBuffering stdout LineBuffering ; test_zir test [1..25] }
84
main = do { hSetBuffering stdout LineBuffering ; test_zir test [1..25] }
84
false
false
0
8
23
30
15
15
null
null
shlevy/ghc
compiler/main/HscTypes.hs
bsd-3-clause
numToTrustInfo 4 = setSafeMode Sf_Safe
38
numToTrustInfo 4 = setSafeMode Sf_Safe
38
numToTrustInfo 4 = setSafeMode Sf_Safe
38
false
false
1
5
4
15
5
10
null
null
mit-plv/riscv-semantics
src/Spec/CSRGetSet.hs
bsd-3-clause
setCSR MScratch val = setCSRField Field.MScratch val
52
setCSR MScratch val = setCSRField Field.MScratch val
52
setCSR MScratch val = setCSRField Field.MScratch val
52
false
false
0
6
6
18
8
10
null
null
dysinger/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/DeleteArchive.hs
mpl-2.0
-- | 'DeleteArchiveResponse' constructor. deleteArchiveResponse :: DeleteArchiveResponse deleteArchiveResponse = DeleteArchiveResponse
134
deleteArchiveResponse :: DeleteArchiveResponse deleteArchiveResponse = DeleteArchiveResponse
92
deleteArchiveResponse = DeleteArchiveResponse
45
true
true
0
4
9
12
7
5
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/UI.hs
gpl-3.0
never :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a never = flip const
78
never :: (Pattern a -> Pattern a) -> Pattern a -> Pattern a never = flip const
78
never = flip const
18
false
true
0
9
16
46
20
26
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
shouldInlinePrimOp' _ ThawSmallArrayOp args = Right $ return [ fold args <> invokestatic (mkMethodRef stgArray "cloneArray" [stgArrayType, jint, jint] (ret stgArrayType)) ]
233
shouldInlinePrimOp' _ ThawSmallArrayOp args = Right $ return [ fold args <> invokestatic (mkMethodRef stgArray "cloneArray" [stgArrayType, jint, jint] (ret stgArrayType)) ]
233
shouldInlinePrimOp' _ ThawSmallArrayOp args = Right $ return [ fold args <> invokestatic (mkMethodRef stgArray "cloneArray" [stgArrayType, jint, jint] (ret stgArrayType)) ]
233
false
false
0
11
82
60
30
30
null
null
Numberartificial/workflow
snipets/.stack-work/intero/intero30430oOV.hs
mit
-- Writing values in general -- print :: Show a => a -> IO () -- The do notation: a series of sequencing examples. -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- Put a string and newline. -- putStrLn :: String -> IO () -- putStrLn str = do putStr str -- putStr "\n" -- Put four times...
462
put4times :: String -> IO () put4times str = do putStrLn str putStrLn str putStrLn str putStrLn str -- Put n times
139
put4times str = do putStrLn str putStrLn str putStrLn str putStrLn str -- Put n times
110
true
true
0
7
128
57
29
28
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Protocol.hs
bsd-3-clause
parseQueryResult (IfThenElseFloatW8 _ _ _) (IfThenElseFloatLeftReply r) = Just $ exprLeft $ lit r
97
parseQueryResult (IfThenElseFloatW8 _ _ _) (IfThenElseFloatLeftReply r) = Just $ exprLeft $ lit r
97
parseQueryResult (IfThenElseFloatW8 _ _ _) (IfThenElseFloatLeftReply r) = Just $ exprLeft $ lit r
97
false
false
0
7
13
38
18
20
null
null
Jonplussed/haskbot-core
src/Haskbot/Internal/Server.hs
mit
pipeline :: [Plugin] -> Request -> HaskbotM () pipeline plugins req = getPostParams req >>= fromParams >>= findAndRun plugins
125
pipeline :: [Plugin] -> Request -> HaskbotM () pipeline plugins req = getPostParams req >>= fromParams >>= findAndRun plugins
125
pipeline plugins req = getPostParams req >>= fromParams >>= findAndRun plugins
78
false
true
0
8
18
46
22
24
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags AndOp = Just (mo_wordAnd dflags)
60
translateOp dflags AndOp = Just (mo_wordAnd dflags)
60
translateOp dflags AndOp = Just (mo_wordAnd dflags)
60
false
false
0
7
15
20
9
11
null
null
buckie/juno
src/Juno/Consensus/Handle/Command.hs
bsd-3-clause
handleBatch :: Monad m => CommandBatch -> JT.Raft m () handleBatch CommandBatch{..} = mapM_ handleSingleCommand _cmdbBatch
122
handleBatch :: Monad m => CommandBatch -> JT.Raft m () handleBatch CommandBatch{..} = mapM_ handleSingleCommand _cmdbBatch
122
handleBatch CommandBatch{..} = mapM_ handleSingleCommand _cmdbBatch
67
false
true
0
8
15
45
21
24
null
null
brownplt/ovid
src/Ovid/ConstraintUtils.hs
bsd-2-clause
propagatePropertyValue :: (MonadIO m) => (Label,Contour) -- ^ the object set -> (Label,Contour) -- ^ source label if the property is created here -> String -- ^ the name of the property -> (Value -> CfaT Value m ()) -- ^ fun...
504
propagatePropertyValue :: (MonadIO m) => (Label,Contour) -- ^ the object set -> (Label,Contour) -- ^ source label if the property is created here -> String -- ^ the name of the property -> (Value -> CfaT Value m ()) -- ^ fun...
504
propagatePropertyValue obj cxt id f = propagateProperty obj cxt id $ \valSet -> propagate valSet f
98
false
true
0
13
188
107
57
50
null
null
SimSaladin/ggtd
src/GGTD/CLI/Render.hs
bsd-3-clause
printChildren :: [Filter] -> Sort -> Node -> Handler () printChildren fltrs srts nd = printTreeAt fltrs srts nd
111
printChildren :: [Filter] -> Sort -> Node -> Handler () printChildren fltrs srts nd = printTreeAt fltrs srts nd
111
printChildren fltrs srts nd = printTreeAt fltrs srts nd
55
false
true
0
9
18
45
22
23
null
null
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/ExMap.hs
gpl-2.0
failBindingE :: VimBinding failBindingE = VimBindingE f where f evs s | vsMode s == Ex && evs == "<CR>" = WholeMatch $ do exitEx False state <- getEditorDyn printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state return ...
350
failBindingE :: VimBinding failBindingE = VimBindingE f where f evs s | vsMode s == Ex && evs == "<CR>" = WholeMatch $ do exitEx False state <- getEditorDyn printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state return ...
350
failBindingE = VimBindingE f where f evs s | vsMode s == Ex && evs == "<CR>" = WholeMatch $ do exitEx False state <- getEditorDyn printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state return Drop f _ _ = NoMa...
323
false
true
0
13
137
98
44
54
null
null
kqr/two-wrongs-st
src/Views.hs
bsd-2-clause
atomView :: Blog -> EitherT [String] IO File atomView blog = makeView blog "atom" (Slug "atom") $ do "lastEntry" ## textSplice (dayToTimestamp (case published blog of [] -> ModifiedJulianDay 0; (x:_) -> datestamp x)) "latestPosts" ## flip mapSplices (take 20 (published blog)) $ \post -> ...
674
atomView :: Blog -> EitherT [String] IO File atomView blog = makeView blog "atom" (Slug "atom") $ do "lastEntry" ## textSplice (dayToTimestamp (case published blog of [] -> ModifiedJulianDay 0; (x:_) -> datestamp x)) "latestPosts" ## flip mapSplices (take 20 (published blog)) $ \post -> ...
674
atomView blog = makeView blog "atom" (Slug "atom") $ do "lastEntry" ## textSplice (dayToTimestamp (case published blog of [] -> ModifiedJulianDay 0; (x:_) -> datestamp x)) "latestPosts" ## flip mapSplices (take 20 (published blog)) $ \post -> runChildrenWithText $ do "ent...
629
false
true
0
25
170
252
118
134
null
null
jameshsmith/HRL
Server/Core/Monad.hs
mit
-- | Twelve sided dice d12 = (1,12)
35
d12 = (1,12)
12
d12 = (1,12)
12
true
false
1
5
7
16
8
8
null
null
MateVM/harpy
Harpy/X86Assembler.hs
gpl-2.0
haddps :: XMMLoc xmm a => XMMReg -> xmm -> CodeGen e s () haddps (XMMReg dreg) reg = x86_haddps dreg (xmmLocLowLevel reg)
124
haddps :: XMMLoc xmm a => XMMReg -> xmm -> CodeGen e s () haddps (XMMReg dreg) reg = x86_haddps dreg (xmmLocLowLevel reg)
124
haddps (XMMReg dreg) reg = x86_haddps dreg (xmmLocLowLevel reg)
66
false
true
0
9
25
59
28
31
null
null
sdiehl/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
false
false
0
5
8
9
4
5
null
null
sol/doctest
src/Interpreter.hs
mit
withInterpreter :: [String] -- ^ List of flags, passed to GHC -> (Interpreter -> IO a) -- ^ Action to run -> IO a -- ^ Result of action withInterpreter flags action = do let args = flags ++ [ "--interactive" , xTemplateHaskell #if __GLASGOW_HASKELL__ >= 802 ...
471
withInterpreter :: [String] -- ^ List of flags, passed to GHC -> (Interpreter -> IO a) -- ^ Action to run -> IO a withInterpreter flags action = do let args = flags ++ [ "--interactive" , xTemplateHaskell #if __GLASGOW_HASKELL__ >= 802 , "-fdiagnostics-color=never" ,...
431
withInterpreter flags action = do let args = flags ++ [ "--interactive" , xTemplateHaskell #if __GLASGOW_HASKELL__ >= 802 , "-fdiagnostics-color=never" , "-fno-diagnostics-show-caret" #endif ] bracket (new defaultConfig{configGhci = ghc} args) close action
296
true
true
0
12
139
101
53
48
null
null
kadena-io/pact
src/Pact/Repl/Lib.hs
bsd-3-clause
modifyLibState :: (LibState -> (LibState,a)) -> Eval LibState a modifyLibState f = view eePactDbVar >>= \m -> liftIO $ modifyMVar m (return . f)
144
modifyLibState :: (LibState -> (LibState,a)) -> Eval LibState a modifyLibState f = view eePactDbVar >>= \m -> liftIO $ modifyMVar m (return . f)
144
modifyLibState f = view eePactDbVar >>= \m -> liftIO $ modifyMVar m (return . f)
80
false
true
0
10
23
64
33
31
null
null
devyn/TPFS
System/TPFS/SuperBlock.hs
bsd-3-clause
bitsToSBStates (True : False : xs) = SBSpaceAvailable : bitsToSBStates xs
74
bitsToSBStates (True : False : xs) = SBSpaceAvailable : bitsToSBStates xs
74
bitsToSBStates (True : False : xs) = SBSpaceAvailable : bitsToSBStates xs
74
false
false
0
8
11
27
13
14
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Draw.hs
lgpl-2.1
drawPolygon dc ps = withArray xs $ \pxs -> withArray ys $ \pys -> dcDrawPolygon dc n pxs pys (pt 0 0) wxODDEVEN_RULE where n = length ps xs = map pointX ps ys = map pointY ps -- | Gets the dimensions of the string using the currently selected font.
275
drawPolygon dc ps = withArray xs $ \pxs -> withArray ys $ \pys -> dcDrawPolygon dc n pxs pys (pt 0 0) wxODDEVEN_RULE where n = length ps xs = map pointX ps ys = map pointY ps -- | Gets the dimensions of the string using the currently selected font.
275
drawPolygon dc ps = withArray xs $ \pxs -> withArray ys $ \pys -> dcDrawPolygon dc n pxs pys (pt 0 0) wxODDEVEN_RULE where n = length ps xs = map pointX ps ys = map pointY ps -- | Gets the dimensions of the string using the currently selected font.
275
false
false
8
6
77
111
43
68
null
null
nevrenato/HetsAlloy
Comorphisms/CSMOF2CASL.hs
gpl-2.0
generateExEqualVar :: [VAR] -> SORT -> VAR -> [CASLFORMULA] generateExEqualVar vars sor var = foldr ((++) . (\ el -> if el == var then [] else [Equation (Qual_var var sor nullRange) Strong (Qual_var el sor nullRange) nullRange])) [] vars
302
generateExEqualVar :: [VAR] -> SORT -> VAR -> [CASLFORMULA] generateExEqualVar vars sor var = foldr ((++) . (\ el -> if el == var then [] else [Equation (Qual_var var sor nullRange) Strong (Qual_var el sor nullRange) nullRange])) [] vars
302
generateExEqualVar vars sor var = foldr ((++) . (\ el -> if el == var then [] else [Equation (Qual_var var sor nullRange) Strong (Qual_var el sor nullRange) nullRange])) [] vars
242
false
true
0
14
104
108
58
50
null
null
spechub/Hets
OMDoc/XmlInterface.hs
gpl-2.0
el_definition = toQN "definition"
33
el_definition = toQN "definition"
33
el_definition = toQN "definition"
33
false
false
0
5
3
9
4
5
null
null
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/ListAccountAliases.hs
mpl-2.0
-- | 'ListAccountAliases' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'laaMarker' @::@ 'Maybe' 'Text' -- -- * 'laaMaxItems' @::@ 'Maybe' 'Natural' -- listAccountAliases :: ListAccountAliases listAccountAliases = ListAccountAliases { _laaMarker = Nothing , _laaMaxItems = ...
333
listAccountAliases :: ListAccountAliases listAccountAliases = ListAccountAliases { _laaMarker = Nothing , _laaMaxItems = Nothing }
144
listAccountAliases = ListAccountAliases { _laaMarker = Nothing , _laaMaxItems = Nothing }
103
true
true
0
6
56
33
23
10
null
null
JohnLato/jaek
src/Jaek/Tree.hs
lgpl-3.0
-- | Go to a reference within the current zipper goToRef :: NodeRef -> TreeZip -> Maybe TreeZip goToRef (AbsPath pth) = followPath pth . zipper . fromZipper
159
goToRef :: NodeRef -> TreeZip -> Maybe TreeZip goToRef (AbsPath pth) = followPath pth . zipper . fromZipper
110
goToRef (AbsPath pth) = followPath pth . zipper . fromZipper
63
true
true
0
7
30
43
21
22
null
null
christiaanb/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
-- | Gives the number of actual fields in the /representation/ of the -- data constructor. This may be more than appear in the source code; -- the extra ones are the existentially quantified dictionaries dataConRepArity :: DataCon -> Arity dataConRepArity (MkData { dcRepArity = arity }) = arity
295
dataConRepArity :: DataCon -> Arity dataConRepArity (MkData { dcRepArity = arity }) = arity
91
dataConRepArity (MkData { dcRepArity = arity }) = arity
55
true
true
0
8
48
38
20
18
null
null
ellis/OnTopOfThings
old-20150308/old/Add.hs
gpl-3.0
refToUuid' ("parent", ref) = do uuid_ <- refToUuid ref return $ fmap (\uuid -> ("parent", uuid)) uuid_
106
refToUuid' ("parent", ref) = do uuid_ <- refToUuid ref return $ fmap (\uuid -> ("parent", uuid)) uuid_
106
refToUuid' ("parent", ref) = do uuid_ <- refToUuid ref return $ fmap (\uuid -> ("parent", uuid)) uuid_
106
false
false
0
11
20
51
26
25
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/TessellationShader.hs
bsd-3-clause
gl_TESS_GEN_MODE :: GLenum gl_TESS_GEN_MODE = 0x8E76
52
gl_TESS_GEN_MODE :: GLenum gl_TESS_GEN_MODE = 0x8E76
52
gl_TESS_GEN_MODE = 0x8E76
25
false
true
0
4
5
11
6
5
null
null
sdiehl/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
wpLet_constr = mkHsWrapperConstr "WpLet"
44
wpLet_constr = mkHsWrapperConstr "WpLet"
44
wpLet_constr = mkHsWrapperConstr "WpLet"
44
false
false
1
5
7
12
4
8
null
null
sergv/tags-server
test-data/0012resolve_reexport_import_cycles/DSpecificExportListWithChildren.hs
bsd-3-clause
commonFunc :: Double -> Double commonFunc x = x + x * x
55
commonFunc :: Double -> Double commonFunc x = x + x * x
55
commonFunc x = x + x * x
24
false
true
0
6
12
26
13
13
null
null
rjregenold/blog
src/Main.hs
mit
stripContent :: Routes stripContent = stripRoute "content/"
59
stripContent :: Routes stripContent = stripRoute "content/"
59
stripContent = stripRoute "content/"
36
false
true
0
6
6
21
8
13
null
null
bennofs/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
bsd-3-clause
-- | This database tests that a package's setup dependencies are correctly -- linked when the package is linked. See pull request #3268. -- -- When A and B are installed as independent goals, their dependencies on C must -- be linked, due to the single instance restriction. Since C depends on D, 0.D -- and 1.D must be ...
793
dbSetupDeps :: ExampleDb dbSetupDeps = [ Right $ exAv "A" 1 [ExAny "C"] , Right $ exAv "B" 1 [ExAny "C"] , Right $ exAv "C" 1 [ExFix "D" 1] `withSetupDeps` [ExFix "D" 2] , Right $ exAv "D" 1 [] , Right $ exAv "D" 2 [] ]
233
dbSetupDeps = [ Right $ exAv "A" 1 [ExAny "C"] , Right $ exAv "B" 1 [ExAny "C"] , Right $ exAv "C" 1 [ExFix "D" 1] `withSetupDeps` [ExFix "D" 2] , Right $ exAv "D" 1 [] , Right $ exAv "D" 2 [] ]
208
true
true
0
10
165
128
70
58
null
null
cryptica/CodeEval
Challenges/114_PackageProblem/main.hs
gpl-3.0
makeThing :: String -> Thing makeThing s = let [s1,s2,s3] = splitBy ',' $ tail $ init s in (read s1, readRational s2, read $ tail s3)
142
makeThing :: String -> Thing makeThing s = let [s1,s2,s3] = splitBy ',' $ tail $ init s in (read s1, readRational s2, read $ tail s3)
142
makeThing s = let [s1,s2,s3] = splitBy ',' $ tail $ init s in (read s1, readRational s2, read $ tail s3)
113
false
true
0
11
35
75
37
38
null
null
lambdageek/insomnia
src/Gambling/FromF.hs
bsd-3-clause
gambleProjectDataIn :: R.Expr -> R.Expr gambleProjectDataIn e = R.App [R.Var (s2n "vector-ref") , e , R.Literal (IntL 0) ]
212
gambleProjectDataIn :: R.Expr -> R.Expr gambleProjectDataIn e = R.App [R.Var (s2n "vector-ref") , e , R.Literal (IntL 0) ]
212
gambleProjectDataIn e = R.App [R.Var (s2n "vector-ref") , e , R.Literal (IntL 0) ]
172
false
true
0
9
108
63
30
33
null
null
paluh/propellor-augeas
src/Propellor/Property/Augeas.hs
bsd-2-clause
withAugeasPtr :: AugeasConfig -> (Ptr A.Augeas -> IO a) -> IO (Maybe a) withAugeasPtr c f = do maybeAugeasPtr <- aug_init (augeasRoot c) (augeasLoadPath c) (augeasFlags c) case maybeAugeasPtr of Just augeasForeignPtr -> withForeignPtr augeasForeignPtr (\a -> Just <$> f a) Nothing -> return Nothing
310
withAugeasPtr :: AugeasConfig -> (Ptr A.Augeas -> IO a) -> IO (Maybe a) withAugeasPtr c f = do maybeAugeasPtr <- aug_init (augeasRoot c) (augeasLoadPath c) (augeasFlags c) case maybeAugeasPtr of Just augeasForeignPtr -> withForeignPtr augeasForeignPtr (\a -> Just <$> f a) Nothing -> return Nothing
310
withAugeasPtr c f = do maybeAugeasPtr <- aug_init (augeasRoot c) (augeasLoadPath c) (augeasFlags c) case maybeAugeasPtr of Just augeasForeignPtr -> withForeignPtr augeasForeignPtr (\a -> Just <$> f a) Nothing -> return Nothing
238
false
true
0
14
56
125
59
66
null
null
syoyo/lucille
rnd/HaskellRSLCompiler/RSL/CodeGenLLVM.hs
bsd-3-clause
emitNestedFunctionDefs (e:es) = emitNestedFunctionDef e ++ emitNestedFunctionDefs es
85
emitNestedFunctionDefs (e:es) = emitNestedFunctionDef e ++ emitNestedFunctionDefs es
85
emitNestedFunctionDefs (e:es) = emitNestedFunctionDef e ++ emitNestedFunctionDefs es
85
false
false
0
7
8
26
12
14
null
null
gdevanla/scotty-from-ground-up
app/Main.hs
bsd-3-clause
orElse :: Parser a -> Parser a -> Parser a orElse p1 p2 = P $ \input -> case runParser p1 input of Just r -> Just r Nothing -> runParser p2 input
157
orElse :: Parser a -> Parser a -> Parser a orElse p1 p2 = P $ \input -> case runParser p1 input of Just r -> Just r Nothing -> runParser p2 input
157
orElse p1 p2 = P $ \input -> case runParser p1 input of Just r -> Just r Nothing -> runParser p2 input
114
false
true
0
10
44
74
34
40
null
null
rodrigo-machado/verigraph
src/library/Data/Graphs/Morphism.hs
gpl-3.0
-- | This function adds an edge e2 (with source s2 and target t2) to the codomain of the morphism. -- It assumes that s2,t2 exist, and that e2 does not exist createNodeOnCodomain :: G.NodeId -> GraphMorphism (Maybe a) b -> GraphMorphism (Maybe a) b createNodeOnCodomain n2 gm = gm { codomainGraph = G.insertNode n2 (...
406
createNodeOnCodomain :: G.NodeId -> GraphMorphism (Maybe a) b -> GraphMorphism (Maybe a) b createNodeOnCodomain n2 gm = gm { codomainGraph = G.insertNode n2 (codomainGraph gm) , nodeRelation = R.insertOnCodomain n2 (nodeRelation gm) }
246
createNodeOnCodomain n2 gm = gm { codomainGraph = G.insertNode n2 (codomainGraph gm) , nodeRelation = R.insertOnCodomain n2 (nodeRelation gm) }
155
true
true
0
10
78
94
47
47
null
null
codemac/yi-editor
src/Yi/Dired.hs
gpl-2.0
noFileAtThisLine :: YiM () noFileAtThisLine = msgEditor "(No file at this line)"
80
noFileAtThisLine :: YiM () noFileAtThisLine = msgEditor "(No file at this line)"
80
noFileAtThisLine = msgEditor "(No file at this line)"
53
false
true
1
6
11
22
9
13
null
null
ezyang/ghc
compiler/prelude/THNames.hs
bsd-3-clause
unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 213
49
unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 213
49
unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 213
49
false
false
0
5
3
9
4
5
null
null
adk9/pbbs-haskell
benchmarks/graphs/bfs.hs
bsd-3-clause
workEachVec :: Word64 -> UV.Vector Word8 -> Par d s () workEachVec clocks vec = do np <- liftIO$ getNumCapabilities -- for_ (0,UV.length vec) $ \ ix -> -- parForTiled (np*4) (0,UV.length vec) $ \ ix -> -- parForSimple (0,UV.length vec) $ \ ix -> parForTree (0,UV.length vec) $ \ ix -> let flg = vec U...
543
workEachVec :: Word64 -> UV.Vector Word8 -> Par d s () workEachVec clocks vec = do np <- liftIO$ getNumCapabilities -- for_ (0,UV.length vec) $ \ ix -> -- parForTiled (np*4) (0,UV.length vec) $ \ ix -> -- parForSimple (0,UV.length vec) $ \ ix -> parForTree (0,UV.length vec) $ \ ix -> let flg = vec U...
543
workEachVec clocks vec = do np <- liftIO$ getNumCapabilities -- for_ (0,UV.length vec) $ \ ix -> -- parForTiled (np*4) (0,UV.length vec) $ \ ix -> -- parForSimple (0,UV.length vec) $ \ ix -> parForTree (0,UV.length vec) $ \ ix -> let flg = vec UV.! ix in when (flg == 1) $ do liftIO$ wait_c...
488
false
true
0
15
152
132
66
66
null
null
gorkinovich/Haskell
Others/Factors.hs
mit
isPrime :: (Integral a) => a -> Bool isPrime 2 = True
53
isPrime :: (Integral a) => a -> Bool isPrime 2 = True
53
isPrime 2 = True
16
false
true
0
6
11
27
14
13
null
null
gijswijnholds/proofnets-diagrams
src/Net2Diagram.hs
gpl-3.0
getLeftArrows d c | leftRotate c = d # drawArrow (arrowOptions R) (Out, N1 .> In) curvedLeftToTop # drawArrow (arrowOptions R) (N1 .> Out, In) curvedBottomToRight | otherwise = d # drawArrow' L (In, N1 .> In) curvedRightToBottom ...
391
getLeftArrows d c | leftRotate c = d # drawArrow (arrowOptions R) (Out, N1 .> In) curvedLeftToTop # drawArrow (arrowOptions R) (N1 .> Out, In) curvedBottomToRight | otherwise = d # drawArrow' L (In, N1 .> In) curvedRightToBottom ...
391
getLeftArrows d c | leftRotate c = d # drawArrow (arrowOptions R) (Out, N1 .> In) curvedLeftToTop # drawArrow (arrowOptions R) (N1 .> Out, In) curvedBottomToRight | otherwise = d # drawArrow' L (In, N1 .> In) curvedRightToBottom ...
391
false
false
0
10
147
131
65
66
null
null
tolysz/hs-tls
core/Network/TLS/Extra/Cipher.hs
bsd-3-clause
cipher_ECDHE_RSA_AES128CBC_SHA256 :: Cipher cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher { cipherID = 0xc027 , cipherName = "ECDHE-RSA-AES128CBC-SHA256" , cipherBulk = bulk_aes128 , cipherHash = SHA256 , cipherKeyExchange = CipherKeyExchange_ECDHE_RSA , cipherMin...
366
cipher_ECDHE_RSA_AES128CBC_SHA256 :: Cipher cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher { cipherID = 0xc027 , cipherName = "ECDHE-RSA-AES128CBC-SHA256" , cipherBulk = bulk_aes128 , cipherHash = SHA256 , cipherKeyExchange = CipherKeyExchange_ECDHE_RSA , cipherMin...
366
cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher { cipherID = 0xc027 , cipherName = "ECDHE-RSA-AES128CBC-SHA256" , cipherBulk = bulk_aes128 , cipherHash = SHA256 , cipherKeyExchange = CipherKeyExchange_ECDHE_RSA , cipherMinVer = Just TLS12 -- RFC 5288 Sec 4 ...
322
false
true
0
8
105
57
34
23
null
null
CloudI/CloudI
src/api/haskell/external/binary-0.8.7.0/tests/QC.hs
mit
-- make sure that a test fails mustThrowError :: B a mustThrowError a = unsafePerformIO $ C.catch (do _ <- C.evaluate a return False) (\(_e :: SomeException) -> return True)
205
mustThrowError :: B a mustThrowError a = unsafePerformIO $ C.catch (do _ <- C.evaluate a return False) (\(_e :: SomeException) -> return True)
174
mustThrowError a = unsafePerformIO $ C.catch (do _ <- C.evaluate a return False) (\(_e :: SomeException) -> return True)
152
true
true
0
12
61
68
33
35
null
null
Toxaris/Grammarkov
src/grammarkov.hs
bsd-3-clause
printUsage :: IO () printUsage = do putStrLn "USAGE:" putStrLn " grammarkov --all prints all variants." putStrLn " grammarkov --random prints a randomly chosen variant."
186
printUsage :: IO () printUsage = do putStrLn "USAGE:" putStrLn " grammarkov --all prints all variants." putStrLn " grammarkov --random prints a randomly chosen variant."
186
printUsage = do putStrLn "USAGE:" putStrLn " grammarkov --all prints all variants." putStrLn " grammarkov --random prints a randomly chosen variant."
166
false
true
0
7
41
34
14
20
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tTradSesStatus :: FIXTag tTradSesStatus = FIXTag { tName = "TradSesStatus" , tnum = 340 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
163
tTradSesStatus :: FIXTag tTradSesStatus = FIXTag { tName = "TradSesStatus" , tnum = 340 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
163
tTradSesStatus = FIXTag { tName = "TradSesStatus" , tnum = 340 , tparser = toFIXInt , arbitraryValue = FIXInt <$> arbitrary }
138
false
true
0
8
37
45
26
19
null
null
kojiromike/Idris-dev
src/Idris/Colours.hs
bsd-3-clause
-- | Compute the ANSI colours corresponding to an Idris colour mkSGR :: IdrisColour -> [SGR] mkSGR (IdrisColour c v u b i) = fg c ++ [SetUnderlining SingleUnderline | u] ++ [SetConsoleIntensity BoldIntensity | b] ++ [SetItalicized True | i] where fg Nothing = [] fg (Just c) = [SetColor Foregro...
412
mkSGR :: IdrisColour -> [SGR] mkSGR (IdrisColour c v u b i) = fg c ++ [SetUnderlining SingleUnderline | u] ++ [SetConsoleIntensity BoldIntensity | b] ++ [SetItalicized True | i] where fg Nothing = [] fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c] -- | Set the colour of a st...
349
mkSGR (IdrisColour c v u b i) = fg c ++ [SetUnderlining SingleUnderline | u] ++ [SetConsoleIntensity BoldIntensity | b] ++ [SetItalicized True | i] where fg Nothing = [] fg (Just c) = [SetColor Foreground (if v then Vivid else Dull) c] -- | Set the colour of a string using POSIX escape codes
319
true
true
1
9
97
130
67
63
null
null
f-me/xlsx-parser
src/Data/Xlsx/Parser.hs
mit
reverseRows = CL.map reverse
28
reverseRows = CL.map reverse
28
reverseRows = CL.map reverse
28
false
false
1
5
3
15
5
10
null
null
mettekou/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
nonVoidIds :: [Id] -> [NonVoid Id] nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidTy (idType id))]
104
nonVoidIds :: [Id] -> [NonVoid Id] nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidTy (idType id))]
104
nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidTy (idType id))]
69
false
true
0
11
18
60
30
30
null
null
sseefried/shady-gen
src/Shady/CompileE.hs
agpl-3.0
shader :: (HasExpr a, HasType a) => [Declaration] -> Pat a -> E a -> Shader shader decls p e = Sh decls [mainDef (p =: e)]
122
shader :: (HasExpr a, HasType a) => [Declaration] -> Pat a -> E a -> Shader shader decls p e = Sh decls [mainDef (p =: e)]
122
shader decls p e = Sh decls [mainDef (p =: e)]
46
false
true
0
9
26
77
37
40
null
null
rueshyna/gogol
gogol-safebrowsing/gen/Network/Google/Resource/SafeBrowsing/ThreatListUpdates/Fetch.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). tlufUploadProtocol :: Lens' ThreatListUpdatesFetch (Maybe Text) tlufUploadProtocol = lens _tlufUploadProtocol (\ s a -> s{_tlufUploadProtocol = a})
217
tlufUploadProtocol :: Lens' ThreatListUpdatesFetch (Maybe Text) tlufUploadProtocol = lens _tlufUploadProtocol (\ s a -> s{_tlufUploadProtocol = a})
155
tlufUploadProtocol = lens _tlufUploadProtocol (\ s a -> s{_tlufUploadProtocol = a})
91
true
true
0
9
33
48
25
23
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxID_NO :: Int wxID_NO = 5104
29
wxID_NO :: Int wxID_NO = 5104
29
wxID_NO = 5104
14
false
true
0
4
5
11
6
5
null
null
glutamate/probably-baysig
src/Target/Prelude.hs
bsd-3-clause
packL :: Double -> Double -> [Double] -> (Double->Double) packL dt t0 ys = pack dt t0 (V.fromList ys)
102
packL :: Double -> Double -> [Double] -> (Double->Double) packL dt t0 ys = pack dt t0 (V.fromList ys)
102
packL dt t0 ys = pack dt t0 (V.fromList ys)
44
false
true
0
9
19
55
28
27
null
null
ComputationWithBoundedResources/ara-inference
src/Data/Rewriting/ARA/ByInferenceRules/AnalyzerSignature/Ops.hs
mit
fetchCstValue _ _ (ACostValue b) = ACost b
53
fetchCstValue _ _ (ACostValue b) = ACost b
53
fetchCstValue _ _ (ACostValue b) = ACost b
53
false
false
0
7
18
22
10
12
null
null
nkpart/score-writer
src/Score/Parser.hs
bsd-3-clause
noteHand :: CharParsing f => f Hand noteHand = (on 'R' R <|> on 'L' L) <?> "hand"
83
noteHand :: CharParsing f => f Hand noteHand = (on 'R' R <|> on 'L' L) <?> "hand"
83
noteHand = (on 'R' R <|> on 'L' L) <?> "hand"
47
false
true
0
8
19
42
20
22
null
null
juliankopkalarsen/FpStats
GMM/src/FileParsing.hs
mit
-- Csv parser csvFile = endBy line eol
38
csvFile = endBy line eol
24
csvFile = endBy line eol
24
true
false
1
5
7
17
6
11
null
null
TransportEngineering/nice-html
src/Text/Html/Nice/FreeMonad.hs
mit
stream :: Foldable f => Markup (a -> n) r' -> Markup (f a -> FastMarkup n) r stream m = embed $ \fa -> case F.toList fa of [] -> FEmpty list -> FStream (ListS list fm) where !fm = compile m
219
stream :: Foldable f => Markup (a -> n) r' -> Markup (f a -> FastMarkup n) r stream m = embed $ \fa -> case F.toList fa of [] -> FEmpty list -> FStream (ListS list fm) where !fm = compile m
219
stream m = embed $ \fa -> case F.toList fa of [] -> FEmpty list -> FStream (ListS list fm) where !fm = compile m
128
false
true
0
12
72
110
52
58
null
null
knalbant/wrangell
DataOperations.hs
bsd-3-clause
dropColumnIndex :: Env -> Table -> Integer -> IOThrowsError WVal dropColumnIndex env table index = do checkIndex table index dropColumn env table index
155
dropColumnIndex :: Env -> Table -> Integer -> IOThrowsError WVal dropColumnIndex env table index = do checkIndex table index dropColumn env table index
155
dropColumnIndex env table index = do checkIndex table index dropColumn env table index
90
false
true
0
9
26
56
24
32
null
null
testexplode/testexplode
doc/examples/Te_LA.hs
lgpl-3.0
-- check V checkVcodeCp = emptyCp { shortDesc = "VLA (V of Speed rest)\n above and down again", codeFkt = \cfg locals -> [qc| testZBv({allowedSpeed cfg});|] }
200
checkVcodeCp = emptyCp { shortDesc = "VLA (V of Speed rest)\n above and down again", codeFkt = \cfg locals -> [qc| testZBv({allowedSpeed cfg});|] }
188
checkVcodeCp = emptyCp { shortDesc = "VLA (V of Speed rest)\n above and down again", codeFkt = \cfg locals -> [qc| testZBv({allowedSpeed cfg});|] }
188
true
false
1
8
68
39
22
17
null
null
charlesrosenbauer/Bzo-Compiler
src/BzoTypes.hs
gpl-3.0
atomId :: THeadAtom -> T.Text atomId (TVrAtom _ t _) = t
56
atomId :: THeadAtom -> T.Text atomId (TVrAtom _ t _) = t
56
atomId (TVrAtom _ t _) = t
26
false
true
0
7
11
30
15
15
null
null
rodrigogribeiro/mptc
test/Data/TestCase1TcLiteral.hs
bsd-3-clause
test1 = (Char 'c', ([], tChar))
31
test1 = (Char 'c', ([], tChar))
31
test1 = (Char 'c', ([], tChar))
31
false
false
1
7
5
26
13
13
null
null
kimsnj/writeAscheme
src/Evaluator.hs
mit
unpackNum (String s) = case reads s :: [(Integer, String)] of (x:_) -> return $ fst x _ -> throwError (TypeMismatch "number" (String s))
148
unpackNum (String s) = case reads s :: [(Integer, String)] of (x:_) -> return $ fst x _ -> throwError (TypeMismatch "number" (String s))
148
unpackNum (String s) = case reads s :: [(Integer, String)] of (x:_) -> return $ fst x _ -> throwError (TypeMismatch "number" (String s))
148
false
false
2
9
35
78
39
39
null
null
brendanhay/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
irpvpnrVerificationProof :: Lens' IdentitytoolkitRelyingPartyVerifyPhoneNumberResponse (Maybe Text) irpvpnrVerificationProof = lens _irpvpnrVerificationProof (\ s a -> s{_irpvpnrVerificationProof = a})
209
irpvpnrVerificationProof :: Lens' IdentitytoolkitRelyingPartyVerifyPhoneNumberResponse (Maybe Text) irpvpnrVerificationProof = lens _irpvpnrVerificationProof (\ s a -> s{_irpvpnrVerificationProof = a})
209
irpvpnrVerificationProof = lens _irpvpnrVerificationProof (\ s a -> s{_irpvpnrVerificationProof = a})
109
false
true
0
9
24
47
24
23
null
null
houshuang/frame
src/Data/Frame/HFrame.hs
mit
iblock :: [Int] -> Block iblock = IBlock . VU.fromList
54
iblock :: [Int] -> Block iblock = IBlock . VU.fromList
54
iblock = IBlock . VU.fromList
29
false
true
0
6
9
24
13
11
null
null
abhin4v/combinatorrent
src/Protocol/Wire.hs
bsd-2-clause
msgSize HaveNone = 1
31
msgSize HaveNone = 1
31
msgSize HaveNone = 1
31
false
false
0
5
14
9
4
5
null
null
RaminHAL9001/inf-interval
tests/Interval.hs
gpl-3.0
xorEqISets :: EqISets -> EqISets -> EqISets xorEqISets = binOpEqISets (\a b -> xor a b) (Iv.exclusive)
102
xorEqISets :: EqISets -> EqISets -> EqISets xorEqISets = binOpEqISets (\a b -> xor a b) (Iv.exclusive)
102
xorEqISets = binOpEqISets (\a b -> xor a b) (Iv.exclusive)
58
false
true
0
8
16
50
24
26
null
null