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
tolysz/hs-tls
core/Network/TLS/Extra/Cipher.hs
bsd-3-clause
tripledes_iv :: BulkIV -> IV DES_EDE3 tripledes_iv iv = maybe (error "tripledes cipher iv internal error") id $ makeIV iv
121
tripledes_iv :: BulkIV -> IV DES_EDE3 tripledes_iv iv = maybe (error "tripledes cipher iv internal error") id $ makeIV iv
121
tripledes_iv iv = maybe (error "tripledes cipher iv internal error") id $ makeIV iv
83
false
true
0
8
19
39
18
21
null
null
isomorphism/csound-expression
src/Csound/Air/Live.hs
bsd-3-clause
-- | The flanger widget. The arguments are -- -- > uiFlanger isOn mix feedback rate depth delay uiFlanger :: Bool -> Double -> Double -> Double -> Double -> Double -> Source FxFun uiFlanger isOn mix fback rate depth delay = sourceColor2 C.indigo $ fxBox "Flanger" fxFlanger2 isOn [("mix", mix), ("fback", fback), ("r...
365
uiFlanger :: Bool -> Double -> Double -> Double -> Double -> Double -> Source FxFun uiFlanger isOn mix fback rate depth delay = sourceColor2 C.indigo $ fxBox "Flanger" fxFlanger2 isOn [("mix", mix), ("fback", fback), ("rate",rate), ("depth",depth), ("delay",delay)]
269
uiFlanger isOn mix fback rate depth delay = sourceColor2 C.indigo $ fxBox "Flanger" fxFlanger2 isOn [("mix", mix), ("fback", fback), ("rate",rate), ("depth",depth), ("delay",delay)]
185
true
true
0
11
59
117
66
51
null
null
dcreager/cabal
Distribution/Simple/Program.hs
bsd-3-clause
-- | Like 'userSpecifyPath' but for a list of progs and their paths. -- userSpecifyPaths :: [(String, FilePath)] -> ProgramConfiguration -> ProgramConfiguration userSpecifyPaths paths conf = foldl' (\conf' (prog, path) -> userSpecifyPath prog path conf') conf paths
301
userSpecifyPaths :: [(String, FilePath)] -> ProgramConfiguration -> ProgramConfiguration userSpecifyPaths paths conf = foldl' (\conf' (prog, path) -> userSpecifyPath prog path conf') conf paths
229
userSpecifyPaths paths conf = foldl' (\conf' (prog, path) -> userSpecifyPath prog path conf') conf paths
106
true
true
0
8
72
71
37
34
null
null
lordi/flowskell
src/Flowskell/Lib/GL.hs
gpl-2.0
doPop [] = glPopMatrix >> return (Bool True)
44
doPop [] = glPopMatrix >> return (Bool True)
44
doPop [] = glPopMatrix >> return (Bool True)
44
false
false
3
6
7
28
11
17
null
null
Siprj/mmum
src/Img.hs
bsd-3-clause
toDpcm :: YCbCr a -> YCbCr a toDpcm YCbCr{..} = YCbCr { y = y * m , cB = cB * m , cR = cR * m } where m = generateDpcmCoderMatrix (nrows y)
161
toDpcm :: YCbCr a -> YCbCr a toDpcm YCbCr{..} = YCbCr { y = y * m , cB = cB * m , cR = cR * m } where m = generateDpcmCoderMatrix (nrows y)
161
toDpcm YCbCr{..} = YCbCr { y = y * m , cB = cB * m , cR = cR * m } where m = generateDpcmCoderMatrix (nrows y)
132
false
true
10
8
57
87
42
45
null
null
johanneshilden/liquid-epsilon
Util/HTML.hs
bsd-3-clause
parent :: String -> String -> String -> String -> Html -> Html parent = Parent
78
parent :: String -> String -> String -> String -> Html -> Html parent = Parent
78
parent = Parent
15
false
true
0
9
15
31
16
15
null
null
jameshales/voltorb-flip
src/PartialBoard.hs
bsd-3-clause
-- Tests whether the PartialBoard has flipped all of the non-trivial Tiles in -- the given Board. isCompleteWith :: PartialBoard -> Board -> Bool isCompleteWith pb b = all (\p -> maybeTileAt pb p == Just (tileAt b p)) $ findRequiredTiles b
240
isCompleteWith :: PartialBoard -> Board -> Bool isCompleteWith pb b = all (\p -> maybeTileAt pb p == Just (tileAt b p)) $ findRequiredTiles b
142
isCompleteWith pb b = all (\p -> maybeTileAt pb p == Just (tileAt b p)) $ findRequiredTiles b
94
true
true
0
12
42
64
32
32
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 48807 = 5896
32
getValueFromProduct 48807 = 5896
32
getValueFromProduct 48807 = 5896
32
false
false
0
5
3
9
4
5
null
null
tonyday567/maths-extended
src/Data/Histogram/Util.hs
mit
pdfBinLaplace _ _ = mempty
26
pdfBinLaplace _ _ = mempty
26
pdfBinLaplace _ _ = mempty
26
false
false
0
5
4
11
5
6
null
null
beni55/LambdaHack
Game/LambdaHack/Server/LoopServer.hs
bsd-3-clause
applyPeriodicLevel :: (MonadAtomic m, MonadServer m) => LevelId -> m () applyPeriodicLevel lid = do discoEffect <- getsServer sdiscoEffect let applyPeriodicItem c aid iid = case EM.lookup iid discoEffect of Just ItemAspectEffect{jeffects, jaspects} -> when (IK.Periodic `elem` jaspects)...
1,368
applyPeriodicLevel :: (MonadAtomic m, MonadServer m) => LevelId -> m () applyPeriodicLevel lid = do discoEffect <- getsServer sdiscoEffect let applyPeriodicItem c aid iid = case EM.lookup iid discoEffect of Just ItemAspectEffect{jeffects, jaspects} -> when (IK.Periodic `elem` jaspects)...
1,368
applyPeriodicLevel lid = do discoEffect <- getsServer sdiscoEffect let applyPeriodicItem c aid iid = case EM.lookup iid discoEffect of Just ItemAspectEffect{jeffects, jaspects} -> when (IK.Periodic `elem` jaspects) $ do -- Check if the item is still in the bag (previous i...
1,296
false
true
0
21
423
344
168
176
null
null
mbakke/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
ispecsMin :: String ispecsMin = "min"
37
ispecsMin :: String ispecsMin = "min"
37
ispecsMin = "min"
17
false
true
0
4
5
11
6
5
null
null
allanderek/ipclib
Ipc/DrawGraph.hs
gpl-2.0
getPlottingFunction :: Graph -> [ Gnuplot.Attribute ] -> IO () getPlottingFunction graph attributes = case graphData graph of LineGraph glines -> Gnuplot.plotPathsStyle attributes $ map makeGnuLine glines SGraph sgraph ->plotSurfaces (sgraphSurfaces sgraph) (...
1,002
getPlottingFunction :: Graph -> [ Gnuplot.Attribute ] -> IO () getPlottingFunction graph attributes = case graphData graph of LineGraph glines -> Gnuplot.plotPathsStyle attributes $ map makeGnuLine glines SGraph sgraph ->plotSurfaces (sgraphSurfaces sgraph) (...
1,002
getPlottingFunction graph attributes = case graphData graph of LineGraph glines -> Gnuplot.plotPathsStyle attributes $ map makeGnuLine glines SGraph sgraph ->plotSurfaces (sgraphSurfaces sgraph) (sgraphView sgraph) where plotSurfaces :: [ Surface ] -> May...
939
false
true
3
9
370
247
129
118
null
null
DanBurton/polylens
examples/kmett.hs
bsd-3-clause
plus, times :: Num a => Setter a a a plus = setting (+)
55
plus, times :: Num a => Setter a a a plus = setting (+)
55
plus = setting (+)
18
false
true
2
7
13
42
18
24
null
null
barrucadu/irc-ctcp
Network/IRC/CTCP.hs
mit
-- |Check if a bytestring looks like a CTCP, and if so, wrap it up in -- the 'CTCPByteString' type. -- -- This uses 'isCTCP', and so is lenient with escapes. asCTCP :: ByteString -> Maybe CTCPByteString asCTCP bs = if isCTCP bs then Just $ CBS bs else Nothing
265
asCTCP :: ByteString -> Maybe CTCPByteString asCTCP bs = if isCTCP bs then Just $ CBS bs else Nothing
107
asCTCP bs = if isCTCP bs then Just $ CBS bs else Nothing
62
true
true
0
7
55
48
24
24
null
null
glguy/hpaste
src/Utils/URL.hs
bsd-3-clause
decStrBytes p (c : cs) = let b = if p && c == '+' then 32 -- space else fromIntegral (fromEnum c) in (b :) `fmap` decStrBytes p cs
242
decStrBytes p (c : cs) = let b = if p && c == '+' then 32 -- space else fromIntegral (fromEnum c) in (b :) `fmap` decStrBytes p cs
242
decStrBytes p (c : cs) = let b = if p && c == '+' then 32 -- space else fromIntegral (fromEnum c) in (b :) `fmap` decStrBytes p cs
242
false
false
0
12
141
70
37
33
null
null
wellposed/hblas
tests/HBLAS/BLAS/Level2Spec.hs
bsd-3-clause
matmatTest1SGEMV :: IO () matmatTest1SGEMV = do left <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (\_ -> (1.0::Float)) right <- Matrix.generateMutableDenseVector 2 (\_ -> (1.0 :: Float)) res <- Matrix.generateMutableDenseVector 2 (\_ -> (0.0 :: Float)) BLAS.sgemv Matrix.NoTranspose 1.0 ...
437
matmatTest1SGEMV :: IO () matmatTest1SGEMV = do left <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (\_ -> (1.0::Float)) right <- Matrix.generateMutableDenseVector 2 (\_ -> (1.0 :: Float)) res <- Matrix.generateMutableDenseVector 2 (\_ -> (0.0 :: Float)) BLAS.sgemv Matrix.NoTranspose 1.0 ...
437
matmatTest1SGEMV = do left <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (\_ -> (1.0::Float)) right <- Matrix.generateMutableDenseVector 2 (\_ -> (1.0 :: Float)) res <- Matrix.generateMutableDenseVector 2 (\_ -> (0.0 :: Float)) BLAS.sgemv Matrix.NoTranspose 1.0 1.0 left right res res...
411
false
true
0
11
77
164
86
78
null
null
PrattFall/Snek
src/Snek.hs
bsd-3-clause
createMap :: MapSize -> Snake -> Food -> GameMap createMap (MapSize xb yb) (Snake _ sb) fd = GameMap (MapSize xb yb) row where row = [createMapRow xb y sb fd | y <- [0..(yb-1)]]
185
createMap :: MapSize -> Snake -> Food -> GameMap createMap (MapSize xb yb) (Snake _ sb) fd = GameMap (MapSize xb yb) row where row = [createMapRow xb y sb fd | y <- [0..(yb-1)]]
185
createMap (MapSize xb yb) (Snake _ sb) fd = GameMap (MapSize xb yb) row where row = [createMapRow xb y sb fd | y <- [0..(yb-1)]]
136
false
true
1
11
42
109
51
58
null
null
jmitchell/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
processNameHints :: Archive -> Idris () processNameHints ar = do ns <- getEntry [] "ibc_namehints" ar mapM_ (\ (n, ty) -> addNameHint n ty) ns
150
processNameHints :: Archive -> Idris () processNameHints ar = do ns <- getEntry [] "ibc_namehints" ar mapM_ (\ (n, ty) -> addNameHint n ty) ns
150
processNameHints ar = do ns <- getEntry [] "ibc_namehints" ar mapM_ (\ (n, ty) -> addNameHint n ty) ns
110
false
true
0
10
32
66
32
34
null
null
rtorr/elm-package
src/Diff.hs
bsd-3-clause
computeDiff :: N.Name -> V.Version -> [Docs.Documentation] -> Maybe V.Version -> Manager.Manager () computeDiff name oldVersion newDocs maybeNewVersion = do Cmd.out msg changes <- Compare.computeChanges newDocs name oldVersion Cmd.out (Display.packageChanges changes) where ...
589
computeDiff :: N.Name -> V.Version -> [Docs.Documentation] -> Maybe V.Version -> Manager.Manager () computeDiff name oldVersion newDocs maybeNewVersion = do Cmd.out msg changes <- Compare.computeChanges newDocs name oldVersion Cmd.out (Display.packageChanges changes) where ...
589
computeDiff name oldVersion newDocs maybeNewVersion = do Cmd.out msg changes <- Compare.computeChanges newDocs name oldVersion Cmd.out (Display.packageChanges changes) where msg = "Comparing " ++ N.toString name ++ " " ++ V.toString oldVersion ++ " to " ++ newStuff ++ "..." ...
469
false
true
1
12
184
174
80
94
null
null
kubkon/gnuplot
src/Graphics/Gnuplot/Frame/OptionSet.hs
bsd-3-clause
key :: Graph.C graph => Bool -> T graph -> T graph key = OptionSet.boolean Option.keyShow
89
key :: Graph.C graph => Bool -> T graph -> T graph key = OptionSet.boolean Option.keyShow
89
key = OptionSet.boolean Option.keyShow
38
false
true
0
9
15
46
20
26
null
null
choener/BiobaseFasta
tests/properties.hs
gpl-3.0
-- -- * golden tests -- -- eachFasta (HeaderSize h) (OverlapSize o) (CurrentSize c p) = SP.yield (h,o,c) -- -- readFastaFile ∷ FilePath → IO [(BS.ByteString,BS.ByteString,BS.ByteString)] -- readFastaFile f = do -- let s = 1000000 -- xs :> r ← runResourceT -- $ SP.toList -- $ streamingFasta (He...
1,295
smallInlineFasta = P.unlines [ ">Aaaa" , "123" , ">Bbbb" , "4567" , ">Cccc" , "890" ]
99
smallInlineFasta = P.unlines [ ">Aaaa" , "123" , ">Bbbb" , "4567" , ">Cccc" , "890" ]
99
true
false
1
5
357
67
52
15
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Frontend/ANSI.hs
bsd-3-clause
colorTranslate Color.Cyan = (ANSI.Dull, ANSI.Cyan)
55
colorTranslate Color.Cyan = (ANSI.Dull, ANSI.Cyan)
55
colorTranslate Color.Cyan = (ANSI.Dull, ANSI.Cyan)
55
false
false
0
6
9
21
11
10
null
null
cmears/mines-solver
TimeAccounting.hs
mit
-- The ClockTick type is not the "clock" unit that is used by -- clock(3). It's the "clock tick" used by times(2). On my system -- there seem to be 100 clock ticks per second. clockTicksPerSec = 100
200
clockTicksPerSec = 100
22
clockTicksPerSec = 100
22
true
false
1
5
39
13
6
7
null
null
amirci/aoc2016-hs
src/Day4.hs
bsd-3-clause
isReal (_, words, check) = check == check' where check' = map fst $ take 5 $ sortBy mostCommon $ freq $ concat words mostCommon (a, l) (a', l') | l > l' = LT | l < l' = GT | l == l' = compare a a'
275
isReal (_, words, check) = check == check' where check' = map fst $ take 5 $ sortBy mostCommon $ freq $ concat words mostCommon (a, l) (a', l') | l > l' = LT | l < l' = GT | l == l' = compare a a'
275
isReal (_, words, check) = check == check' where check' = map fst $ take 5 $ sortBy mostCommon $ freq $ concat words mostCommon (a, l) (a', l') | l > l' = LT | l < l' = GT | l == l' = compare a a'
275
false
false
2
9
127
121
59
62
null
null
sethfowler/bzbeaver
src/Application.hs
bsd-3-clause
-- The only difference between 'addUser' and 'updateUser' is that -- 'addUser' doesn't update 'uiLastSeen'. addUser :: UserLogin -> UserInfo -> Update AppState () addUser login info = modify $ over asUsers (M.insertWith merge login info) where merge _ old = old
264
addUser :: UserLogin -> UserInfo -> Update AppState () addUser login info = modify $ over asUsers (M.insertWith merge login info) where merge _ old = old
156
addUser login info = modify $ over asUsers (M.insertWith merge login info) where merge _ old = old
101
true
true
0
9
44
71
34
37
null
null
Zoetermeer/latro
src/Latro/Interp.hs
mit
lookupVarId :: UniqId -> Eval Value lookupVarId id = getVarEnv >>= lookupId id
78
lookupVarId :: UniqId -> Eval Value lookupVarId id = getVarEnv >>= lookupId id
78
lookupVarId id = getVarEnv >>= lookupId id
42
false
true
0
6
12
28
13
15
null
null
alosich/language-java
Language/Java/Parser.hs
bsd-3-clause
classBodyStatements :: P [Decl] classBodyStatements = catMaybes <$> list classBodyStatement
91
classBodyStatements :: P [Decl] classBodyStatements = catMaybes <$> list classBodyStatement
91
classBodyStatements = catMaybes <$> list classBodyStatement
59
false
true
0
6
9
24
12
12
null
null
vigoos/Farrago-OS
aura-master/aura-master/src/aura.hs
gpl-2.0
displayOutputLanguages :: Aura () displayOutputLanguages = do notify displayOutputLanguages_1 liftIO $ mapM_ print allLanguages
131
displayOutputLanguages :: Aura () displayOutputLanguages = do notify displayOutputLanguages_1 liftIO $ mapM_ print allLanguages
131
displayOutputLanguages = do notify displayOutputLanguages_1 liftIO $ mapM_ print allLanguages
97
false
true
0
8
17
34
15
19
null
null
poxu/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
"li" `closes` "li" = True
25
"li" `closes` "li" = True
25
"li" `closes` "li" = True
25
false
false
0
5
4
14
7
7
null
null
modeswitch/barrelfish
tools/flounder/BackendCommon.hs
mit
msg_argstructdecl :: String -> [TypeDef] -> MessageArgument -> [C.Param] msg_argstructdecl ifn typedefs (Arg tr (Name n)) = [ C.Param (type_c_type_msgstruct ifn typedefs tr) n ]
182
msg_argstructdecl :: String -> [TypeDef] -> MessageArgument -> [C.Param] msg_argstructdecl ifn typedefs (Arg tr (Name n)) = [ C.Param (type_c_type_msgstruct ifn typedefs tr) n ]
182
msg_argstructdecl ifn typedefs (Arg tr (Name n)) = [ C.Param (type_c_type_msgstruct ifn typedefs tr) n ]
109
false
true
0
9
29
72
37
35
null
null
karianna/jdk8_tl
jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs
gpl-2.0
sizeof UINT16 = 2
17
sizeof UINT16 = 2
17
sizeof UINT16 = 2
17
false
false
0
4
3
10
4
6
null
null
eklavya/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
isUsableUniverse :: Term -> Bool isUsableUniverse (UType NullType) = False
74
isUsableUniverse :: Term -> Bool isUsableUniverse (UType NullType) = False
74
isUsableUniverse (UType NullType) = False
41
false
true
0
6
9
28
13
15
null
null
chlablak/platinum-parsing
cli/Cmd/Ebnf.hs
bsd-3-clause
dispatch :: Args -> Log.Logger dispatch (Args _ (EbnfCmd args)) = do Log.pushTag "ebnf" input <- Log.io $ readFile $ ebnfFile args case PP.parseAst input :: (PP.To Ebnf.Syntax) of Left err -> do Log.err $ "error in file '" ++ ebnfFile args ++ "':" Log.err $ show err Log.abort Right ast -...
2,140
dispatch :: Args -> Log.Logger dispatch (Args _ (EbnfCmd args)) = do Log.pushTag "ebnf" input <- Log.io $ readFile $ ebnfFile args case PP.parseAst input :: (PP.To Ebnf.Syntax) of Left err -> do Log.err $ "error in file '" ++ ebnfFile args ++ "':" Log.err $ show err Log.abort Right ast -...
2,140
dispatch (Args _ (EbnfCmd args)) = do Log.pushTag "ebnf" input <- Log.io $ readFile $ ebnfFile args case PP.parseAst input :: (PP.To Ebnf.Syntax) of Left err -> do Log.err $ "error in file '" ++ ebnfFile args ++ "':" Log.err $ show err Log.abort Right ast -> do -- Flag `--minify` ...
2,109
false
true
0
34
915
698
309
389
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/GetCredentialReport.hs
mpl-2.0
-- | Creates a value of 'GetCredentialReportResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'grsContent' -- -- * 'grsGeneratedTime' -- -- * 'grsReportFormat' -- -- * 'grsResponseStatus' getCredentialReportResponse :: Int ...
604
getCredentialReportResponse :: Int -- ^ 'grsResponseStatus' -> GetCredentialReportResponse getCredentialReportResponse pResponseStatus_ = GetCredentialReportResponse' { _grsContent = Nothing , _grsGeneratedTime = Nothing , _grsReportFormat = Nothing , _grsResponseStatus = pResponseStatus_ ...
323
getCredentialReportResponse pResponseStatus_ = GetCredentialReportResponse' { _grsContent = Nothing , _grsGeneratedTime = Nothing , _grsReportFormat = Nothing , _grsResponseStatus = pResponseStatus_ }
224
true
true
0
7
106
65
40
25
null
null
CindyLinz/Haskell.js
trans/src/Desugar/Tuple.hs
mit
deTupleOverlap (Overlap l) = Overlap (id l)
43
deTupleOverlap (Overlap l) = Overlap (id l)
43
deTupleOverlap (Overlap l) = Overlap (id l)
43
false
false
0
7
6
25
11
14
null
null
ulricha/dsh-example-queries
Queries/TPCH/NonStandard/Flat.hs
bsd-3-clause
sq6 :: Q [(Text, [Text])] sq6 = [ tup2 (r_nameQ r) (sortWith id [ n_nameQ n | n <- nations, n_regionkeyQ n == r_regionkeyQ r ]) | r <- regions ]
169
sq6 :: Q [(Text, [Text])] sq6 = [ tup2 (r_nameQ r) (sortWith id [ n_nameQ n | n <- nations, n_regionkeyQ n == r_regionkeyQ r ]) | r <- regions ]
169
sq6 = [ tup2 (r_nameQ r) (sortWith id [ n_nameQ n | n <- nations, n_regionkeyQ n == r_regionkeyQ r ]) | r <- regions ]
143
false
true
2
13
55
91
43
48
null
null
black0range/Smutt
src/Smutt/HTTP/Version.hs
mit
parse :: (Str.StringData s) => s -> Maybe (s,s) parse "" = Nothing
67
parse :: (Str.StringData s) => s -> Maybe (s,s) parse "" = Nothing
67
parse "" = Nothing
19
false
true
0
9
13
43
21
22
null
null
carlohamalainen/imagetrove-uploader
src/Network/MyTardis/API.hs
bsd-2-clause
-- | Generic function for creating a resource. getResource :: forall a. FromJSON a => URI -> ReaderT MyTardisConfig IO (Result a) getResource uri = do writeLog $ "getResource: " ++ uri MyTardisConfig host _ _ _ opts _ _ _ _ _ _ <- ask r <- liftIO $ getWithE opts (host ++ uri) case r of Left e ...
765
getResource :: forall a. FromJSON a => URI -> ReaderT MyTardisConfig IO (Result a) getResource uri = do writeLog $ "getResource: " ++ uri MyTardisConfig host _ _ _ opts _ _ _ _ _ _ <- ask r <- liftIO $ getWithE opts (host ++ uri) case r of Left e -> return $ Error e Right r' -> case (j...
718
getResource uri = do writeLog $ "getResource: " ++ uri MyTardisConfig host _ _ _ opts _ _ _ _ _ _ <- ask r <- liftIO $ getWithE opts (host ++ uri) case r of Left e -> return $ Error e Right r' -> case (join $ decode <$> r' ^? responseBody :: Maybe Value) of Just...
635
true
true
0
18
238
211
98
113
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateSnapshot.hs
mpl-2.0
-- | The progress of the snapshot, as a percentage. csr1Progress :: Lens' CreateSnapshotResponse Text csr1Progress = lens _csr1Progress (\s a -> s { _csr1Progress = a })
169
csr1Progress :: Lens' CreateSnapshotResponse Text csr1Progress = lens _csr1Progress (\s a -> s { _csr1Progress = a })
117
csr1Progress = lens _csr1Progress (\s a -> s { _csr1Progress = a })
67
true
true
0
9
27
40
22
18
null
null
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_fail/T3102.hs
bsd-3-clause
result :: Int result = f t
26
result :: Int result = f t
26
result = f t
12
false
true
0
6
6
21
8
13
null
null
Javran/h2048
src/Game/H2048/Core.hs
mit
{-| Safely convert a power of two into 'Cell'. -} intToCell :: Int -> Maybe Cell intToCell v = [ unsafeIntToCell v | v > 0, popCount v == 1 ]
144
intToCell :: Int -> Maybe Cell intToCell v = [ unsafeIntToCell v | v > 0, popCount v == 1 ]
91
intToCell v = [ unsafeIntToCell v | v > 0, popCount v == 1 ]
60
true
true
0
8
33
47
23
24
null
null
urbanslug/ghc
utils/hpc/HpcMarkup.hs
bsd-3-clause
--addMarkup tabStop cs loc os ((t1,t2,tik@(TopLevelDecl {})):ticks) | loc == t1 = -- openTick tik ++ closeTick ++ addMarkup tabStop cs loc os ticks addMarkup tabStop cs loc os ((t1,t2,tik0):ticks) | loc == t1 = case os of ((_,tik'):_) | not (allowNesting tik0 tik') -> addMarkup tabStop cs loc os ticks --...
622
addMarkup tabStop cs loc os ((t1,t2,tik0):ticks) | loc == t1 = case os of ((_,tik'):_) | not (allowNesting tik0 tik') -> addMarkup tabStop cs loc os ticks -- already marked or bool within marked bool _ -> openTick tik0 ++ addMarkup tabStop cs loc (addTo (t2,tik0) os) ticks where addTo (t,tik) [] ...
471
addMarkup tabStop cs loc os ((t1,t2,tik0):ticks) | loc == t1 = case os of ((_,tik'):_) | not (allowNesting tik0 tik') -> addMarkup tabStop cs loc os ticks -- already marked or bool within marked bool _ -> openTick tik0 ++ addMarkup tabStop cs loc (addTo (t2,tik0) os) ticks where addTo (t,tik) [] ...
471
true
false
0
14
158
253
135
118
null
null
balangs/eTeak
aschem/Render.hs
bsd-3-clause
closePathStroke :: Render () closePathStroke = closePath >> stroke
70
closePathStroke :: Render () closePathStroke = closePath >> stroke
66
closePathStroke = closePath >> stroke
37
false
true
1
6
12
24
10
14
null
null
stothardj/hsudoku
Test.hs
gpl-3.0
-- Board 2. Inner boxes are 3x3 board2 = initBoard [ [8, 6, 0, 3, 5, 4, 2, 1, 0], [0, 1, 0, 2, 8, 0, 5, 6, 3], [0, 0, 2, 1, 6, 0, 4, 0, 9], [0, 0, 7, 0, 0, 0, 1, 9, 0], [9, 3, 0, 0, 0, 1, 0, 2, 4], [0, 0, 0, 4, 0, 6, 0, 0, 5], [5, 2, 3, 0, 1, 8, 9, 0, 6], [0, 0, 8, 0, 3, 0, 0, 0, 1], [0, 0, 6, 9, 4, 5...
334
board2 = initBoard [ [8, 6, 0, 3, 5, 4, 2, 1, 0], [0, 1, 0, 2, 8, 0, 5, 6, 3], [0, 0, 2, 1, 6, 0, 4, 0, 9], [0, 0, 7, 0, 0, 0, 1, 9, 0], [9, 3, 0, 0, 0, 1, 0, 2, 4], [0, 0, 0, 4, 0, 6, 0, 0, 5], [5, 2, 3, 0, 1, 8, 9, 0, 6], [0, 0, 8, 0, 3, 0, 0, 0, 1], [0, 0, 6, 9, 4, 5, 0, 3, 0] ]
302
board2 = initBoard [ [8, 6, 0, 3, 5, 4, 2, 1, 0], [0, 1, 0, 2, 8, 0, 5, 6, 3], [0, 0, 2, 1, 6, 0, 4, 0, 9], [0, 0, 7, 0, 0, 0, 1, 9, 0], [9, 3, 0, 0, 0, 1, 0, 2, 4], [0, 0, 0, 4, 0, 6, 0, 0, 5], [5, 2, 3, 0, 1, 8, 9, 0, 6], [0, 0, 8, 0, 3, 0, 0, 0, 1], [0, 0, 6, 9, 4, 5, 0, 3, 0] ]
302
true
false
0
7
112
280
185
95
null
null
helino/wham
src/Wham/AnalyzeRunner.hs
bsd-3-clause
astep :: ConfigurationQueue -> ControlPointMap -> Either String ([AbstractConfiguration], ConfigurationQueue) astep queue cps = case istep queue of Right (queue', set) -> Right (Set.toList set, increase queue' set) Left err -> Left err where increase q set = foldl (\acc c -> update acc c ...
343
astep :: ConfigurationQueue -> ControlPointMap -> Either String ([AbstractConfiguration], ConfigurationQueue) astep queue cps = case istep queue of Right (queue', set) -> Right (Set.toList set, increase queue' set) Left err -> Left err where increase q set = foldl (\acc c -> update acc c ...
343
astep queue cps = case istep queue of Right (queue', set) -> Right (Set.toList set, increase queue' set) Left err -> Left err where increase q set = foldl (\acc c -> update acc c cps) q $ Set.toList set
224
false
true
0
11
80
134
66
68
null
null
gallais/potpourri
haskell/cyclic/CyclicListFlat.hs
gpl-3.0
minimise :: Eq a => CList a -> CList a minimise = factor . rewind
65
minimise :: Eq a => CList a -> CList a minimise = factor . rewind
65
minimise = factor . rewind
26
false
true
1
8
14
39
16
23
null
null
fmapfmapfmap/amazonka
amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types/Product.hs
mpl-2.0
-- | True if the search domain is created. It can take several minutes to -- initialize a domain when CreateDomain is called. Newly created search -- domains are returned from DescribeDomains with a false value for Created -- until domain creation is complete. dsCreated :: Lens' DomainStatus (Maybe Bool) dsCreated = le...
362
dsCreated :: Lens' DomainStatus (Maybe Bool) dsCreated = lens _dsCreated (\ s a -> s{_dsCreated = a})
101
dsCreated = lens _dsCreated (\ s a -> s{_dsCreated = a})
56
true
true
0
9
60
49
28
21
null
null
itsuart/fdc_archivist
src/SuccessfulRequestLogger.hs
mit
unspecifiedUAId :: Int unspecifiedUAId = 1
42
unspecifiedUAId :: Int unspecifiedUAId = 1
42
unspecifiedUAId = 1
19
false
true
0
6
5
18
7
11
null
null
winterland1989/mysql-haskell
test/BinaryRowNew.hs
bsd-3-clause
tests :: MySQLConn -> Assertion tests c = do selStmt <- prepareStmt c "SELECT * FROM test_new" (f, is) <- queryStmt c selStmt [] assertEqual "decode Field types" (columnType <$> f) [ mySQLTypeLong , mySQLTypeDateTime , mySQLTypeTimestamp , mySQLTypeTime ] Just v...
3,371
tests :: MySQLConn -> Assertion tests c = do selStmt <- prepareStmt c "SELECT * FROM test_new" (f, is) <- queryStmt c selStmt [] assertEqual "decode Field types" (columnType <$> f) [ mySQLTypeLong , mySQLTypeDateTime , mySQLTypeTimestamp , mySQLTypeTime ] Just v...
3,371
tests c = do selStmt <- prepareStmt c "SELECT * FROM test_new" (f, is) <- queryStmt c selStmt [] assertEqual "decode Field types" (columnType <$> f) [ mySQLTypeLong , mySQLTypeDateTime , mySQLTypeTimestamp , mySQLTypeTime ] Just v <- Stream.read is assertEqu...
3,339
false
true
0
14
1,141
943
449
494
null
null
dysinger/amazonka
amazonka-rds/gen/Network/AWS/RDS/ModifyDBInstance.hs
mpl-2.0
-- | The weekly time range (in UTC) during which system maintenance can occur, -- which may result in an outage. Changing this parameter does not result in an -- outage, except in the following situation, and the change is asynchronously -- applied as soon as possible. If there are pending actions that cause a -- reboo...
1,017
mdbiPreferredMaintenanceWindow :: Lens' ModifyDBInstance (Maybe Text) mdbiPreferredMaintenanceWindow = lens _mdbiPreferredMaintenanceWindow (\s a -> s { _mdbiPreferredMaintenanceWindow = a })
203
mdbiPreferredMaintenanceWindow = lens _mdbiPreferredMaintenanceWindow (\s a -> s { _mdbiPreferredMaintenanceWindow = a })
133
true
true
0
8
180
63
41
22
null
null
nishiuramakoto/logiku
prolog/Prolog/Unifier.hs
gpl-3.0
unify' _ t (Var v) = return [(v,t)]
36
unify' _ t (Var v) = return [(v,t)]
36
unify' _ t (Var v) = return [(v,t)]
36
false
false
0
7
8
31
16
15
null
null
bogwonch/SecPAL
src/Logic/SecPAL/Z3Datalog.hs
gpl-3.0
vpToArgs SP.CanSay{ SP.what=f } = factToArgs f
46
vpToArgs SP.CanSay{ SP.what=f } = factToArgs f
46
vpToArgs SP.CanSay{ SP.what=f } = factToArgs f
46
false
false
0
8
6
25
12
13
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Storable.hs
bsd-3-clause
imapMaybe = G.imapMaybe
23
imapMaybe = G.imapMaybe
23
imapMaybe = G.imapMaybe
23
false
false
0
5
2
8
4
4
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
socatPath :: String socatPath = AutoConf.socatPath
50
socatPath :: String socatPath = AutoConf.socatPath
50
socatPath = AutoConf.socatPath
30
false
true
0
6
5
20
8
12
null
null
gambogi/csh-eval
src/CSH/Eval/Frontend/Data.hs
mit
-- | The basic layout for every CSH Eval page evalLayout :: Widget -> Handler Html evalLayout widget = do pc <- widgetToPageContent $ do widget addStylesheetRemote "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" addScriptRemote "https://ajax.googleapis.com/ajax/libs/j...
813
evalLayout :: Widget -> Handler Html evalLayout widget = do pc <- widgetToPageContent $ do widget addStylesheetRemote "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" addScriptRe...
767
evalLayout widget = do pc <- widgetToPageContent $ do widget addStylesheetRemote "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" addScriptRemote "https://maxcdn.bootstrapcdn.com...
730
true
true
0
14
146
121
50
71
null
null
surajx/learn-haskell
crash.hs
mit
largest' l (Node x t1 t2) = max l (largest' (largest' x t1) t2)
63
largest' l (Node x t1 t2) = max l (largest' (largest' x t1) t2)
63
largest' l (Node x t1 t2) = max l (largest' (largest' x t1) t2)
63
false
false
0
9
13
44
20
24
null
null
yairchu/defend
src/NetEngine.hs
gpl-3.0
processPacket state _ (Moves moves) | neWaitingForPeers state = netEngineNextIter updState | otherwise = updState where updState = state { neQueue = mappend (neQueue state) . fromList . filter ((>= neGameIteration state) . fst . fst) . toList $ moves }
310
processPacket state _ (Moves moves) | neWaitingForPeers state = netEngineNextIter updState | otherwise = updState where updState = state { neQueue = mappend (neQueue state) . fromList . filter ((>= neGameIteration state) . fst . fst) . toList $ moves }
310
processPacket state _ (Moves moves) | neWaitingForPeers state = netEngineNextIter updState | otherwise = updState where updState = state { neQueue = mappend (neQueue state) . fromList . filter ((>= neGameIteration state) . fst . fst) . toList $ moves }
310
false
false
1
15
98
103
50
53
null
null
e1528532/libelektra
src/plugins/regexdispatcher/Elektra/RegexDispatcher.hs
bsd-3-clause
hs_elektraHaskellError = elektraPluginErrorWith elektraRegexdispatcherError
75
hs_elektraHaskellError = elektraPluginErrorWith elektraRegexdispatcherError
75
hs_elektraHaskellError = elektraPluginErrorWith elektraRegexdispatcherError
75
false
false
0
5
3
9
4
5
null
null
nikita-volkov/ez-couch
src/EZCouch/ReadAction.hs
mit
readEntity :: (MonadAction m, Entity a, ToJSON k) => View a k -- ^ View -> KeysSelection k -- ^ Keys selection mode -> Int -- ^ Skip -> Bool -- ^ Descending -> m (Maybe (Persisted a)) readEntity view mode skip desc = listToMaybe <$> readEntities view mode skip (Just 1) desc
287
readEntity :: (MonadAction m, Entity a, ToJSON k) => View a k -- ^ View -> KeysSelection k -- ^ Keys selection mode -> Int -- ^ Skip -> Bool -- ^ Descending -> m (Maybe (Persisted a)) readEntity view mode skip desc = listToMaybe <$> readEntities view mode skip (Just 1) desc
287
readEntity view mode skip desc = listToMaybe <$> readEntities view mode skip (Just 1) desc
93
false
true
0
15
65
106
53
53
null
null
gspindles/mj-score-eval
src/Game/Mahjong/Static/Examples.hs
mit
nineGatesEx :: Maybe Hand nineGatesEx = mkSpecial1 [ b1, b1, b1 , b2, b3, b4 , b5 , b6, b7, b8 , b9, b9, b9 ] b5 [f3] Nothing
143
nineGatesEx :: Maybe Hand nineGatesEx = mkSpecial1 [ b1, b1, b1 , b2, b3, b4 , b5 , b6, b7, b8 , b9, b9, b9 ] b5 [f3] Nothing
143
nineGatesEx = mkSpecial1 [ b1, b1, b1 , b2, b3, b4 , b5 , b6, b7, b8 , b9, b9, b9 ] b5 [f3] Nothing
117
false
true
0
5
46
68
39
29
null
null
GaloisInc/halvm-ghc
compiler/main/DynFlags.hs
bsd-3-clause
split_marker :: Char split_marker = ':'
39
split_marker :: Char split_marker = ':'
39
split_marker = ':'
18
false
true
0
4
5
11
6
5
null
null
jeannekamikaze/Spear
Spear/Math/Spatial3.hs
mit
-- | Move the spatial forwards. moveFwd :: Spatial3 s => Float -> s -> s moveFwd a s = let o = getObj3 s in setObj3 s $ o { p = p o + scale a (f o) }
151
moveFwd :: Spatial3 s => Float -> s -> s moveFwd a s = let o = getObj3 s in setObj3 s $ o { p = p o + scale a (f o) }
117
moveFwd a s = let o = getObj3 s in setObj3 s $ o { p = p o + scale a (f o) }
76
true
true
0
14
42
84
39
45
null
null
ryanreich/bigint
test/Performance.hs
bsd-3-clause
twoNumbers :: Integer -> IO (Integer, Integer) twoNumbers n = return (x,x) where x = 2^(64 * 2^n) - 1
103
twoNumbers :: Integer -> IO (Integer, Integer) twoNumbers n = return (x,x) where x = 2^(64 * 2^n) - 1
103
twoNumbers n = return (x,x) where x = 2^(64 * 2^n) - 1
56
false
true
3
8
21
73
34
39
null
null
kawamuray/ganeti
src/Ganeti/JQScheduler.hs
gpl-2.0
logFailedJobs jobs = do let jids = S.fromList . map (qjId . jJob . fst) $ jobs jidsString = commaJoin . map (show . fromJobId) . S.toList $ jids logWarning $ "Starting jobs " ++ jidsString ++ " failed: " ++ show (map snd jobs) return jids -- | Requeue jobs that were previously selected for e...
356
logFailedJobs jobs = do let jids = S.fromList . map (qjId . jJob . fst) $ jobs jidsString = commaJoin . map (show . fromJobId) . S.toList $ jids logWarning $ "Starting jobs " ++ jidsString ++ " failed: " ++ show (map snd jobs) return jids -- | Requeue jobs that were previously selected for e...
356
logFailedJobs jobs = do let jids = S.fromList . map (qjId . jJob . fst) $ jobs jidsString = commaJoin . map (show . fromJobId) . S.toList $ jids logWarning $ "Starting jobs " ++ jidsString ++ " failed: " ++ show (map snd jobs) return jids -- | Requeue jobs that were previously selected for e...
356
false
false
0
15
89
109
53
56
null
null
Bolt64/wyas
src/DataTypes.hs
mit
showType (LispString _) = "LispString"
38
showType (LispString _) = "LispString"
38
showType (LispString _) = "LispString"
38
false
false
0
6
4
16
7
9
null
null
seppeljordan/sdl2
src/SDL/Raw/Basic.hs
bsd-3-clause
logError :: CInt -> CString -> IO () logError category = logMessage category SDL_LOG_PRIORITY_ERROR
99
logError :: CInt -> CString -> IO () logError category = logMessage category SDL_LOG_PRIORITY_ERROR
99
logError category = logMessage category SDL_LOG_PRIORITY_ERROR
62
false
true
0
9
13
37
16
21
null
null
phonohawk/HsOpenSSL
OpenSSL/X509/Store.hs
cc0-1.0
getStoreCtxIssuer :: X509StoreCtx -> IO (Maybe X509) getStoreCtxIssuer ctx = withX509StoreCtxPtr ctx $ \pCtx -> do pCert <- _store_ctx_get0_current_issuer pCtx if pCert == nullPtr then return Nothing else fmap Just $ mask_ $ _x509_ref pCert >> wrapX509 pCert
270
getStoreCtxIssuer :: X509StoreCtx -> IO (Maybe X509) getStoreCtxIssuer ctx = withX509StoreCtxPtr ctx $ \pCtx -> do pCert <- _store_ctx_get0_current_issuer pCtx if pCert == nullPtr then return Nothing else fmap Just $ mask_ $ _x509_ref pCert >> wrapX509 pCert
270
getStoreCtxIssuer ctx = withX509StoreCtxPtr ctx $ \pCtx -> do pCert <- _store_ctx_get0_current_issuer pCtx if pCert == nullPtr then return Nothing else fmap Just $ mask_ $ _x509_ref pCert >> wrapX509 pCert
217
false
true
0
14
49
93
42
51
null
null
danr/agder
backend/Problems.hs
bsd-3-clause
problems :: FilePath problems = "problems"
42
problems :: FilePath problems = "problems"
42
problems = "problems"
21
false
true
0
4
5
11
6
5
null
null
brendanhay/numbersd
test/Properties/Conduit.hs
mpl-2.0
conduitProperties :: Test conduitProperties = testGroup "sinks" [ testGroup "graphite" [ testGroup "aggregate event" [ testProperty "encodes prefix" prop_graphite_aggr_event_encodes_prefix , testProperty "encodes key" prop_graphite_aggr_event_encodes_key , testProperty "e...
1,196
conduitProperties :: Test conduitProperties = testGroup "sinks" [ testGroup "graphite" [ testGroup "aggregate event" [ testProperty "encodes prefix" prop_graphite_aggr_event_encodes_prefix , testProperty "encodes key" prop_graphite_aggr_event_encodes_key , testProperty "e...
1,196
conduitProperties = testGroup "sinks" [ testGroup "graphite" [ testGroup "aggregate event" [ testProperty "encodes prefix" prop_graphite_aggr_event_encodes_prefix , testProperty "encodes key" prop_graphite_aggr_event_encodes_key , testProperty "encodes value" prop_graphit...
1,170
false
true
0
11
274
136
68
68
null
null
awbraunstein/emonad
src/Editor.hs
mit
-- | Modify the minibuffer. modifyMiniBuffer :: (String -> String) -> Editor modifyMiniBuffer f = modify (\(ES bs d c (p, mb) v) -> ES bs d c (p, (f mb)) v)
156
modifyMiniBuffer :: (String -> String) -> Editor modifyMiniBuffer f = modify (\(ES bs d c (p, mb) v) -> ES bs d c (p, (f mb)) v)
128
modifyMiniBuffer f = modify (\(ES bs d c (p, mb) v) -> ES bs d c (p, (f mb)) v)
79
true
true
0
11
31
86
44
42
null
null
ilexius/spf-ips
tests/tests.hs
gpl-3.0
tests = testGroup "Collected" [ TPS.tests ]
43
tests = testGroup "Collected" [ TPS.tests ]
43
tests = testGroup "Collected" [ TPS.tests ]
43
false
false
0
7
6
16
8
8
null
null
forste/haReFork
tools/base/syntax/SyntaxUtil.hs
bsd-3-clause
isVarE _ = False
37
isVarE _ = False
37
isVarE _ = False
37
false
false
0
4
24
10
4
6
null
null
raimohanska/Monads
challenges/State/IncrementBy10.hs
mit
incrementByTen = do -- increment state 10 times times 10 increment -- return state get
94
incrementByTen = do -- increment state 10 times times 10 increment -- return state get
94
incrementByTen = do -- increment state 10 times times 10 increment -- return state get
94
false
false
0
7
22
19
9
10
null
null
barrucadu/nagi
lib/Imageboard/Web/Template.hs
mit
threadSplices :: Maybe LoginId -> Bool -> Board -> Entity Thread -> BoardAction ctx BoardSplices threadSplices loginid omit board (Entity threadid thread) = do posts <- runSQL $ select $ from $ \p -> do where_ (p ^. PostThread ==. val threadid) when (isNothing loginid) $ where_ (p ^. PostHidden ==. val ...
2,400
threadSplices :: Maybe LoginId -> Bool -> Board -> Entity Thread -> BoardAction ctx BoardSplices threadSplices loginid omit board (Entity threadid thread) = do posts <- runSQL $ select $ from $ \p -> do where_ (p ^. PostThread ==. val threadid) when (isNothing loginid) $ where_ (p ^. PostHidden ==. val ...
2,400
threadSplices loginid omit board (Entity threadid thread) = do posts <- runSQL $ select $ from $ \p -> do where_ (p ^. PostThread ==. val threadid) when (isNothing loginid) $ where_ (p ^. PostHidden ==. val False) orderBy [asc (p ^. PostCreatedAt)] pure p let Just (op, rest) = uncons posts ...
2,303
false
true
0
25
612
753
358
395
null
null
ip1981/sproxy2
src/Sproxy/Application.hs
mit
forbidden :: AuthCookie -> W.Application forbidden ac req resp = do Log.info $ "403 Forbidden: " ++ show email ++ ": " ++ showReq req resp $ W.responseLBS forbidden403 [(hContentType, "text/html; charset=utf-8")] page where email = getEmailUtf8 . acUser $ ac page = fromStrict [qc| <!DOCT...
595
forbidden :: AuthCookie -> W.Application forbidden ac req resp = do Log.info $ "403 Forbidden: " ++ show email ++ ": " ++ showReq req resp $ W.responseLBS forbidden403 [(hContentType, "text/html; charset=utf-8")] page where email = getEmailUtf8 . acUser $ ac page = fromStrict [qc| <!DOCT...
595
forbidden ac req resp = do Log.info $ "403 Forbidden: " ++ show email ++ ": " ++ showReq req resp $ W.responseLBS forbidden403 [(hContentType, "text/html; charset=utf-8")] page where email = getEmailUtf8 . acUser $ ac page = fromStrict [qc| <!DOCTYPE html> <html lang="en"> <head> <...
554
false
true
1
11
127
105
53
52
null
null
unisonweb/platform
parser-typechecker/src/Unison/Parser.hs
mit
uniqueBase32Namegen :: forall gen. Random.DRG gen => gen -> UniqueName uniqueBase32Namegen rng = UniqueName $ \pos lenInBase32Hex -> go pos lenInBase32Hex rng where -- if the identifier starts with a number, try again, since -- we want the name to work as a valid wordyId go :: L.Pos -> Int -> gen -> Maybe Tex...
711
uniqueBase32Namegen :: forall gen. Random.DRG gen => gen -> UniqueName uniqueBase32Namegen rng = UniqueName $ \pos lenInBase32Hex -> go pos lenInBase32Hex rng where -- if the identifier starts with a number, try again, since -- we want the name to work as a valid wordyId go :: L.Pos -> Int -> gen -> Maybe Tex...
711
uniqueBase32Namegen rng = UniqueName $ \pos lenInBase32Hex -> go pos lenInBase32Hex rng where -- if the identifier starts with a number, try again, since -- we want the name to work as a valid wordyId go :: L.Pos -> Int -> gen -> Maybe Text go pos lenInBase32Hex rng0 = let (bytes,rng) = Random.randomByt...
640
false
true
0
16
159
225
111
114
null
null
brendanhay/gogol
gogol-serviceuser/gen/Network/Google/Resource/ServiceUser/Projects/Services/Disable.hs
mpl-2.0
-- | Creates a value of 'ProjectsServicesDisable' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'psdXgafv' -- -- * 'psdUploadProtocol' -- -- * 'psdAccessToken' -- -- * 'psdUploadType' -- -- * 'psdPayload' -- -- * 'psdName' -- -- * 'p...
755
projectsServicesDisable :: DisableServiceRequest -- ^ 'psdPayload' -> Text -- ^ 'psdName' -> ProjectsServicesDisable projectsServicesDisable pPsdPayload_ pPsdName_ = ProjectsServicesDisable' { _psdXgafv = Nothing , _psdUploadProtocol = Nothing , _psdAccessToken = Nothing , _psdUploadType =...
423
projectsServicesDisable pPsdPayload_ pPsdName_ = ProjectsServicesDisable' { _psdXgafv = Nothing , _psdUploadProtocol = Nothing , _psdAccessToken = Nothing , _psdUploadType = Nothing , _psdPayload = pPsdPayload_ , _psdName = pPsdName_ , _psdCallback = Nothing }
294
true
true
0
6
150
87
60
27
null
null
ssaavedra/liquidhaskell
tests/todo/gadtEval.hs
bsd-3-clause
equal (B x) (B y) = B (x == y)
31
equal (B x) (B y) = B (x == y)
31
equal (B x) (B y) = B (x == y)
31
false
false
0
7
10
35
16
19
null
null
isovector/dependent-types
src/Parser.hs
bsd-3-clause
readCharacter :: String -> Character readCharacter "Ross" = Ross
68
readCharacter :: String -> Character readCharacter "Ross" = Ross
68
readCharacter "Ross" = Ross
31
false
true
0
5
12
22
10
12
null
null
frantisekfarka/ghc-dsi
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (FCMP reg1 reg2) = hcat [ char '\t', ptext (sLit "fcmpu\tcr0, "), -- Note: we're using fcmpu, not fcmpo -- The difference is with fcmpo, compare with NaN is an invalid operation. -- We don't handle invalid fp ops, so we don't care pprReg reg1, ...
365
pprInstr (FCMP reg1 reg2) = hcat [ char '\t', ptext (sLit "fcmpu\tcr0, "), -- Note: we're using fcmpu, not fcmpo -- The difference is with fcmpo, compare with NaN is an invalid operation. -- We don't handle invalid fp ops, so we don't care pprReg reg1, ...
365
pprInstr (FCMP reg1 reg2) = hcat [ char '\t', ptext (sLit "fcmpu\tcr0, "), -- Note: we're using fcmpu, not fcmpo -- The difference is with fcmpo, compare with NaN is an invalid operation. -- We don't handle invalid fp ops, so we don't care pprReg reg1, ...
365
false
false
0
9
132
66
33
33
null
null
mikeizbicki/homoiconic
old/Algebra5.hs
bsd-3-clause
i :: IFree (I L) Int i = IPure 3
32
i :: IFree (I L) Int i = IPure 3
32
i = IPure 3
11
false
true
2
6
9
33
12
21
null
null
wyager/IHaskell
main/Main.hs
mit
replyTo _ message _ state = do liftIO $ hPutStrLn stderr $ "Unimplemented message: " ++ show message return (state, SendNothing) -- | Handle comm messages
159
replyTo _ message _ state = do liftIO $ hPutStrLn stderr $ "Unimplemented message: " ++ show message return (state, SendNothing) -- | Handle comm messages
159
replyTo _ message _ state = do liftIO $ hPutStrLn stderr $ "Unimplemented message: " ++ show message return (state, SendNothing) -- | Handle comm messages
159
false
false
0
10
30
49
23
26
null
null
DavidAlphaFox/darcs
containers-0.5.2.1/Darcs/Data/Map/Base.hs
gpl-2.0
findMin :: Map k a -> (k,a) findMin (Bin _ kx x Tip _) = (kx,x)
64
findMin :: Map k a -> (k,a) findMin (Bin _ kx x Tip _) = (kx,x)
64
findMin (Bin _ kx x Tip _) = (kx,x)
36
false
true
0
7
16
49
26
23
null
null
darnuria/Yasc
Lisp.hs
mit
getVar :: Env -> String -> IOThrowsError LispVal getVar envRef var = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Getting an unbound variable" var) (liftIO . readIORef) (lookup var env)
236
getVar :: Env -> String -> IOThrowsError LispVal getVar envRef var = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Getting an unbound variable" var) (liftIO . readIORef) (lookup var env)
236
getVar envRef var = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Getting an unbound variable" var) (liftIO . readIORef) (lookup var env)
187
false
true
0
10
61
78
37
41
null
null
damianfral/clay
src/Clay/Flexbox.hs
bsd-3-clause
row, rowReverse, column, columnReverse :: FlexDirection row = FlexDirection "row"
92
row, rowReverse, column, columnReverse :: FlexDirection row = FlexDirection "row"
91
row = FlexDirection "row"
35
false
true
2
5
20
24
13
11
null
null
mbakke/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opQuery :: String opQuery = "Query for resources/items.\n\ \\n\ \ @ivar what: Resources to query for, must be one of L{constants.QR_VIA_OP}\n\ \ @ivar fields: List of fields to retrieve\n\ \ @ivar qfilter: Query filter"
224
opQuery :: String opQuery = "Query for resources/items.\n\ \\n\ \ @ivar what: Resources to query for, must be one of L{constants.QR_VIA_OP}\n\ \ @ivar fields: List of fields to retrieve\n\ \ @ivar qfilter: Query filter"
224
opQuery = "Query for resources/items.\n\ \\n\ \ @ivar what: Resources to query for, must be one of L{constants.QR_VIA_OP}\n\ \ @ivar fields: List of fields to retrieve\n\ \ @ivar qfilter: Query filter"
206
false
true
0
4
38
11
6
5
null
null
acowley/language-c
src/Language/C/Parser/Tokens.hs
bsd-3-clause
posLenOfTok (CTokSwitch pos ) = pos
38
posLenOfTok (CTokSwitch pos ) = pos
38
posLenOfTok (CTokSwitch pos ) = pos
38
false
false
0
6
8
16
7
9
null
null
brendanhay/gogol
gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs
mpl-2.0
-- | List of messages changed in this history record. The fields for specific -- change types, such as \`messagesAdded\` may duplicate messages in this -- field. We recommend using the specific change-type fields instead of -- this. hMessages :: Lens' History [Message] hMessages = lens _hMessages (\ s a -> s{_hMessag...
361
hMessages :: Lens' History [Message] hMessages = lens _hMessages (\ s a -> s{_hMessages = a}) . _Default . _Coerce
128
hMessages = lens _hMessages (\ s a -> s{_hMessages = a}) . _Default . _Coerce
91
true
true
2
8
71
63
32
31
null
null
coghex/abridgefaraway
src/ABFA/World.hs
bsd-3-clause
seedConts state g (l:ls) (k:ks) (j:js) i = do let x = seedGrid state 0 i (fst l) (snd l) g k j seedConts state x ls ks js (i-1) -- creates a single continent
162
seedConts state g (l:ls) (k:ks) (j:js) i = do let x = seedGrid state 0 i (fst l) (snd l) g k j seedConts state x ls ks js (i-1) -- creates a single continent
162
seedConts state g (l:ls) (k:ks) (j:js) i = do let x = seedGrid state 0 i (fst l) (snd l) g k j seedConts state x ls ks js (i-1) -- creates a single continent
162
false
false
0
12
39
102
51
51
null
null
apunktbau/co4
test/CO4/Thesis/WCB_MatrixStandalone.hs
gpl-3.0
matrixShift :: a -> List (List a) -> List (List a) matrixShift zero m = matrixMap (\i j x -> case j of Z -> zero S j' -> matrixGet m (S i) j' zero id') m
157
matrixShift :: a -> List (List a) -> List (List a) matrixShift zero m = matrixMap (\i j x -> case j of Z -> zero S j' -> matrixGet m (S i) j' zero id') m
157
matrixShift zero m = matrixMap (\i j x -> case j of Z -> zero S j' -> matrixGet m (S i) j' zero id') m
106
false
true
0
13
40
95
46
49
null
null
tejon/diagrams-contrib
src/Diagrams/TwoD/Path/Turtle.hs
bsd-3-clause
-- | Modify the current heading to the right by the specified angle in degrees. right :: (OrderedField n, Monad m) => n -> TurtleT n m () right d = ST.modify $ T.right d
169
right :: (OrderedField n, Monad m) => n -> TurtleT n m () right d = ST.modify $ T.right d
89
right d = ST.modify $ T.right d
31
true
true
0
8
34
54
27
27
null
null
aztek/voogie
src/Voogie/Boogie/Syntax.hs
gpl-3.0
opTyped = ":"
13
opTyped = ":"
13
opTyped = ":"
13
false
false
0
4
2
6
3
3
null
null
jwiegley/hnix
src/Nix/Parser.hs
bsd-3-clause
-- postfix name op = (NUnaryDef name op, -- Postfix (opWithLoc name op nUnary)) nixOperators :: Parser (Ann SrcSpan (NAttrPath NExprLoc)) -> [[(NOperatorDef, Operator Parser NExprLoc)]] nixOperators selector = [ -- This is not parsed here, even though technically it's part of the -- expres...
1,703
nixOperators :: Parser (Ann SrcSpan (NAttrPath NExprLoc)) -> [[(NOperatorDef, Operator Parser NExprLoc)]] nixOperators selector = [ -- This is not parsed here, even though technically it's part of the -- expression table. The problem is that in some cases, such as list -- membership, it's also a term. And...
1,603
nixOperators selector = [ -- This is not parsed here, even though technically it's part of the -- expression table. The problem is that in some cases, such as list -- membership, it's also a term. And since terms are effectively the -- highest precedence entities parsed by the expression parser, it ends u...
1,493
true
true
0
12
555
323
181
142
null
null
guillep19/uulib
src/UU/PPrint.hs
bsd-3-clause
double :: Double -> Doc double d = text (show d)
55
double :: Double -> Doc double d = text (show d)
55
double d = text (show d)
31
false
true
0
7
17
32
14
18
null
null
minhdoboi/deprecated-openshift-haskell-api
openshift/scripts/ClientUtils.hs
apache-2.0
defaultPort :: Int defaultPort = 8443
37
defaultPort :: Int defaultPort = 8443
37
defaultPort = 8443
18
false
true
0
6
5
18
7
11
null
null
phischu/game-dsl
tic-tac-toe/Main.hs
bsd-3-clause
renderO :: Rule renderO = do field <- entityTagged Field x <- getAttribute XPosition field y <- getAttribute YPosition field ensure (getTag O field) return (draw (translate (fieldCoordinate x) (fieldCoordinate y) (circleSolid 25)))
251
renderO :: Rule renderO = do field <- entityTagged Field x <- getAttribute XPosition field y <- getAttribute YPosition field ensure (getTag O field) return (draw (translate (fieldCoordinate x) (fieldCoordinate y) (circleSolid 25)))
251
renderO = do field <- entityTagged Field x <- getAttribute XPosition field y <- getAttribute YPosition field ensure (getTag O field) return (draw (translate (fieldCoordinate x) (fieldCoordinate y) (circleSolid 25)))
235
false
true
0
14
52
106
46
60
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
uAddrHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uAddr#")
59
uAddrHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uAddr#")
59
uAddrHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uAddr#")
59
false
false
0
7
7
17
8
9
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 221559 = 5034
33
getValueFromProduct 221559 = 5034
33
getValueFromProduct 221559 = 5034
33
false
false
0
5
3
9
4
5
null
null
AccelerateHS/accelerate-c
Data/Array/Accelerate/C/Exp.hs
bsd-3-clause
primConstToC (PrimMaxBound ty) = maxBoundToC ty
47
primConstToC (PrimMaxBound ty) = maxBoundToC ty
47
primConstToC (PrimMaxBound ty) = maxBoundToC ty
47
false
false
0
7
5
18
8
10
null
null
oldmanmike/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
genCCall64' :: DynFlags -> ForeignTarget -- function to call -> [CmmFormal] -- where to put the result -> [CmmActual] -- arguments (of mixed type) -> NatM InstrBlock genCCall64' dflags target dest_regs args = do -- load up the register argumen...
9,453
genCCall64' :: DynFlags -> ForeignTarget -- function to call -> [CmmFormal] -- where to put the result -> [CmmActual] -- arguments (of mixed type) -> NatM InstrBlock genCCall64' dflags target dest_regs args = do -- load up the register argumen...
9,453
genCCall64' dflags target dest_regs args = do -- load up the register arguments let prom_args = map (maybePromoteCArg dflags W32) args (stack_args, int_regs_used, fp_regs_used, load_args_code) <- if platformOS platform == OSMinGW32 then load_args_win prom_args [] [] (allArgRegs pla...
9,214
false
true
6
21
3,892
2,294
1,162
1,132
null
null