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
ghc/packages-utf8-string
Codec/Binary/UTF8/Generic.hs
bsd-3-clause
uncons :: UTF8Bytes b s => b -> Maybe (Char,b) uncons bs = do (c,n) <- decode bs return (c, bdrop n bs) -- | Traverse a bytestring (right biased).
163
uncons :: UTF8Bytes b s => b -> Maybe (Char,b) uncons bs = do (c,n) <- decode bs return (c, bdrop n bs) -- | Traverse a bytestring (right biased).
163
uncons bs = do (c,n) <- decode bs return (c, bdrop n bs) -- | Traverse a bytestring (right biased).
116
false
true
0
9
46
70
35
35
null
null
andreasfrom/truths
Semtab.hs
mit
closeBranches :: FormTab -> FormTab closeBranches tab = go tab [] where go :: FormTab -> Env -> FormTab go c@(Case _ p t) env = if closes env (p,t) then Cons c Closed else c go (Cons a@(Case Nothing p t) x) env = if closes env (p,t) then Cons a (cons x Closed) else Cons a (go x ((p,t):env)...
536
closeBranches :: FormTab -> FormTab closeBranches tab = go tab [] where go :: FormTab -> Env -> FormTab go c@(Case _ p t) env = if closes env (p,t) then Cons c Closed else c go (Cons a@(Case Nothing p t) x) env = if closes env (p,t) then Cons a (cons x Closed) else Cons a (go x ((p,t):env)...
536
closeBranches tab = go tab [] where go :: FormTab -> Env -> FormTab go c@(Case _ p t) env = if closes env (p,t) then Cons c Closed else c go (Cons a@(Case Nothing p t) x) env = if closes env (p,t) then Cons a (cons x Closed) else Cons a (go x ((p,t):env)) go (Cons a b) env = cons a...
500
false
true
7
13
166
286
146
140
null
null
ulricha/dsh
src/Database/DSH/SL/Builtins.hs
bsd-3-clause
shredLiteral :: Type -> L.Val -> Build TSL (Shape DVec) shredLiteral (ListT t) (L.ListV vs) = literalShape $ VShape (payloadType t, S.singleton seg) lyt where initLyt = shredType t (seg, lyt) = shredList vs initLyt
227
shredLiteral :: Type -> L.Val -> Build TSL (Shape DVec) shredLiteral (ListT t) (L.ListV vs) = literalShape $ VShape (payloadType t, S.singleton seg) lyt where initLyt = shredType t (seg, lyt) = shredList vs initLyt
227
shredLiteral (ListT t) (L.ListV vs) = literalShape $ VShape (payloadType t, S.singleton seg) lyt where initLyt = shredType t (seg, lyt) = shredList vs initLyt
171
false
true
0
9
47
102
50
52
null
null
jystic/hsimport
tests/Main.hs
bsd-3-clause
importPosBeforeLast :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe HI.ImportPos importPosBeforeLast _ [] = Nothing
117
importPosBeforeLast :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe HI.ImportPos importPosBeforeLast _ [] = Nothing
117
importPosBeforeLast _ [] = Nothing
39
false
true
0
8
17
38
19
19
null
null
nevrenato/Hets_Fork
HasCASL/MixAna.hs
gpl-2.0
termToType :: Term -> Maybe Type termToType t = case P.runParser ((case getPosList t of [] -> return () p : _ -> P.setPosition $ fromPos p) >> parseType << P.eof) (emptyAnnos ()) "" $ showDoc t "" of Right x -> Just x _ -> Nothing
252
termToType :: Term -> Maybe Type termToType t = case P.runParser ((case getPosList t of [] -> return () p : _ -> P.setPosition $ fromPos p) >> parseType << P.eof) (emptyAnnos ()) "" $ showDoc t "" of Right x -> Just x _ -> Nothing
252
termToType t = case P.runParser ((case getPosList t of [] -> return () p : _ -> P.setPosition $ fromPos p) >> parseType << P.eof) (emptyAnnos ()) "" $ showDoc t "" of Right x -> Just x _ -> Nothing
219
false
true
0
16
68
129
60
69
null
null
fmapfmapfmap/amazonka
amazonka-ec2/test/Test/AWS/Gen/EC2.hs
mpl-2.0
testDeleteTags :: DeleteTags -> TestTree testDeleteTags = req "DeleteTags" "fixture/DeleteTags.yaml"
108
testDeleteTags :: DeleteTags -> TestTree testDeleteTags = req "DeleteTags" "fixture/DeleteTags.yaml"
108
testDeleteTags = req "DeleteTags" "fixture/DeleteTags.yaml"
67
false
true
0
5
17
20
10
10
null
null
Lupino/dispatch-article
src/Article/GraphQL.hs
bsd-3-clause
timelineMeta :: HasMySQL u => Resolver (GenHaxl u w) timelineMeta = objectA' "timeline_meta" $ \argv -> case getTextValue "name" argv of Nothing -> empty Just name -> maybe [] timelineMeta_ <$> getTimelineMeta (unpack name)
235
timelineMeta :: HasMySQL u => Resolver (GenHaxl u w) timelineMeta = objectA' "timeline_meta" $ \argv -> case getTextValue "name" argv of Nothing -> empty Just name -> maybe [] timelineMeta_ <$> getTimelineMeta (unpack name)
235
timelineMeta = objectA' "timeline_meta" $ \argv -> case getTextValue "name" argv of Nothing -> empty Just name -> maybe [] timelineMeta_ <$> getTimelineMeta (unpack name)
182
false
true
0
13
45
90
41
49
null
null
ihc/futhark
src/Futhark/Construct.hs
isc
-- | As 'eIf', but an 'IfSort' can be given. eIf' :: (MonadBinder m, BranchType (Lore m) ~ ExtType) => m (Exp (Lore m)) -> m (Body (Lore m)) -> m (Body (Lore m)) -> IfSort -> m (Exp (Lore m)) eIf' ce te fe if_sort = do ce' <- letSubExp "cond" =<< ce te' <- insertStmsM te fe' <- insertStmsM fe ...
884
eIf' :: (MonadBinder m, BranchType (Lore m) ~ ExtType) => m (Exp (Lore m)) -> m (Body (Lore m)) -> m (Body (Lore m)) -> IfSort -> m (Exp (Lore m)) eIf' ce te fe if_sort = do ce' <- letSubExp "cond" =<< ce te' <- insertStmsM te fe' <- insertStmsM fe -- We need to construct the context. ts <- ...
839
eIf' ce te fe if_sort = do ce' <- letSubExp "cond" =<< ce te' <- insertStmsM te fe' <- insertStmsM fe -- We need to construct the context. ts <- generaliseExtTypes <$> bodyExtType te' <*> bodyExtType fe' te'' <- addContextForBranch ts te' fe'' <- addContextForBranch ts fe' return $ If ce' te'' fe'' $ If...
674
true
true
0
15
239
332
153
179
null
null
emaphis/Haskell-Practice
cis194/src/Week01/Lecture01.hs
bsd-3-clause
isEven :: Integer -> Bool isEven n | n `mod` 2 == 0 = True | otherwise = False
87
isEven :: Integer -> Bool isEven n | n `mod` 2 == 0 = True | otherwise = False
87
isEven n | n `mod` 2 == 0 = True | otherwise = False
61
false
true
0
9
27
51
23
28
null
null
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs
mpl-2.0
-- | Output only. The unique resource name of the project. It is an int64 -- generated number prefixed by \"projects\/\". Example: -- \`projects\/415104041262\` pName :: Lens' Project (Maybe Text) pName = lens _pName (\ s a -> s{_pName = a})
241
pName :: Lens' Project (Maybe Text) pName = lens _pName (\ s a -> s{_pName = a})
80
pName = lens _pName (\ s a -> s{_pName = a})
44
true
true
0
9
40
48
27
21
null
null
wavewave/madgraph-auto
src/HEP/Automation/MadGraph/Log.hs
gpl-3.0
oticeMsg :: (MonadIO m) => LogChan -> Message -> m () noticeMsg = convertMonadIO2 L.noticeM
92
noticeMsg :: (MonadIO m) => LogChan -> Message -> m () noticeMsg = convertMonadIO2 L.noticeM
92
noticeMsg = convertMonadIO2 L.noticeM
37
false
true
0
10
15
43
20
23
null
null
arne-schroppe/dash
src/Language/Dash/CodeGen/CodeGenState.hs
mit
resetSelfReferenceSlot :: CodeGen () resetSelfReferenceSlot = do scope <- getScope putScope $ scope { selfReferenceSlot = Nothing }
135
resetSelfReferenceSlot :: CodeGen () resetSelfReferenceSlot = do scope <- getScope putScope $ scope { selfReferenceSlot = Nothing }
135
resetSelfReferenceSlot = do scope <- getScope putScope $ scope { selfReferenceSlot = Nothing }
98
false
true
0
9
21
38
19
19
null
null
kyagrd/mininax
src/Infer.hs
bsd-2-clause
nullState = UState [] []
24
nullState = UState [] []
24
nullState = UState [] []
24
false
false
0
6
4
15
7
8
null
null
MichaelBaker/zgy-cli
src/List.hs
mit
completeOptions = Complete <$> argument str (metavar "LIST_NAME") <*> argument auto (metavar "ITEM_NUMBER")
109
completeOptions = Complete <$> argument str (metavar "LIST_NAME") <*> argument auto (metavar "ITEM_NUMBER")
109
completeOptions = Complete <$> argument str (metavar "LIST_NAME") <*> argument auto (metavar "ITEM_NUMBER")
109
false
false
1
9
14
39
17
22
null
null
Numberartificial/workflow
snipets/src/Craft/Chapter5.hs
mit
list9 :: String list9 = ['a' .. 'm']
36
list9 :: String list9 = ['a' .. 'm']
36
list9 = ['a' .. 'm']
20
false
true
0
6
7
24
11
13
null
null
magicant/flesh
src/Flesh/Language/Parser/Error.hs
gpl-2.0
-- | Returns a failed attempt with the given (soft) error. failureOfError :: MonadError Failure m => Error -> m a failureOfError e = throwError (Soft, e)
153
failureOfError :: MonadError Failure m => Error -> m a failureOfError e = throwError (Soft, e)
94
failureOfError e = throwError (Soft, e)
39
true
true
0
8
26
44
21
23
null
null
ingemaradahl/bilder
src/TypeChecker/Renamer.hs
lgpl-3.0
trd3 ∷ (a,b,c) → c trd3 (_,_,x) = x
35
trd3 ∷ (a,b,c) → c trd3 (_,_,x) = x
35
trd3 (_,_,x) = x
16
false
true
0
6
8
40
22
18
null
null
maltem/zlib-enum
Codec/Zlib/Enum.hs
mit
decompress' :: MonadIO m => Inflate -> Enumeratee ByteString ByteString m b decompress' inf (Continue k) = do x <- EL.head case x of Nothing -> do chunk <- liftIO $ finishInflate inf lift $ runIteratee $ k $ Chunks [chunk] Just bs -> do chunks <- liftIO $ (fee...
441
decompress' :: MonadIO m => Inflate -> Enumeratee ByteString ByteString m b decompress' inf (Continue k) = do x <- EL.head case x of Nothing -> do chunk <- liftIO $ finishInflate inf lift $ runIteratee $ k $ Chunks [chunk] Just bs -> do chunks <- liftIO $ (fee...
441
decompress' inf (Continue k) = do x <- EL.head case x of Nothing -> do chunk <- liftIO $ finishInflate inf lift $ runIteratee $ k $ Chunks [chunk] Just bs -> do chunks <- liftIO $ (feedInflate inf bs >>= callback) step <- lift $ runIteratee $ k $ C...
365
false
true
0
18
150
167
75
92
null
null
RefactoringTools/HaRe
test/testdata/MoveDef/Demote.hs
bsd-3-clause
-- c,d :: Integer c = 7
23
c = 7
5
c = 7
5
true
false
1
5
6
11
4
7
null
null
Moskau/estuary
Estuary/Widgets/Sound.hs
gpl-3.0
textWidget::MonadWidget t m => Sound -> Event t ContainerSignal -> m (Dynamic t (Sound, Event t GenericSignal)) textWidget _ _= el "div" $ mdo sampleTextField <- textInput $ def & textInputConfig_attributes .~ constDyn ("style"=:"border-color:green") let sampleName = _textInput_value sampleTextField sampleNumber...
1,691
textWidget::MonadWidget t m => Sound -> Event t ContainerSignal -> m (Dynamic t (Sound, Event t GenericSignal)) textWidget _ _= el "div" $ mdo sampleTextField <- textInput $ def & textInputConfig_attributes .~ constDyn ("style"=:"border-color:green") let sampleName = _textInput_value sampleTextField sampleNumber...
1,691
textWidget _ _= el "div" $ mdo sampleTextField <- textInput $ def & textInputConfig_attributes .~ constDyn ("style"=:"border-color:green") let sampleName = _textInput_value sampleTextField sampleNumberField <- textInput $ def & textInputConfig_inputType .~"number" & textInputConfig_attributes .~ sampleNAttrs le...
1,578
false
true
1
16
238
580
289
291
null
null
joshcough/HaskellTestingDemo
TastyMain.hs
mit
properties = testGroup "Properties" [scProps, qcProps]
54
properties = testGroup "Properties" [scProps, qcProps]
54
properties = testGroup "Properties" [scProps, qcProps]
54
false
false
1
6
5
20
9
11
null
null
NicolasDP/keeper
Keeper/KeeperDB.hs
bsd-3-clause
dispatchOptions :: BS.ByteString -> Command -> IO () dispatchOptions home (CmdCreate) = createKeeperTable home
120
dispatchOptions :: BS.ByteString -> Command -> IO () dispatchOptions home (CmdCreate) = createKeeperTable home
120
dispatchOptions home (CmdCreate) = createKeeperTable home
67
false
true
0
8
23
37
18
19
null
null
reactive-systems/syfco
src/lib/Writer/Formats/Unbeast.hs
mit
----------------------------------------------------------------------------- -- | Unbeast format writer. writeFormat :: Configuration -> Specification -> Either Error String writeFormat c s = do (es,ss,rs,as,is,gs) <- eval c s us <- mapM (simplify' (c { noRelease = True, noWeak = True })) $ case ss of ...
4,585
writeFormat :: Configuration -> Specification -> Either Error String writeFormat c s = do (es,ss,rs,as,is,gs) <- eval c s us <- mapM (simplify' (c { noRelease = True, noWeak = True })) $ case ss of [] -> filter (/= FFalse) $ es ++ map fGlobally rs ++ as _ -> filter (/= FFalse) $ es ++ ...
4,476
writeFormat c s = do (es,ss,rs,as,is,gs) <- eval c s us <- mapM (simplify' (c { noRelease = True, noWeak = True })) $ case ss of [] -> filter (/= FFalse) $ es ++ map fGlobally rs ++ as _ -> filter (/= FFalse) $ es ++ map (\f -> fOr [fNot $ fAnd ss, f]) (map fGloball...
4,405
true
true
125
19
1,547
1,596
740
856
null
null
sfultong/stand-in-language
src/SIL/Llvm.hs
apache-2.0
optimizeModule :: JITConfig -> Mod.Module -> IO () optimizeModule jitConfig module' = do withPassManager defaultCuratedPassSetSpec { optLevel = Just (optimizerLevelToWord (optimizerLevel jitConfig)) } $ \pm -> do _ <- runPassManager pm module' pure ()
265
optimizeModule :: JITConfig -> Mod.Module -> IO () optimizeModule jitConfig module' = do withPassManager defaultCuratedPassSetSpec { optLevel = Just (optimizerLevelToWord (optimizerLevel jitConfig)) } $ \pm -> do _ <- runPassManager pm module' pure ()
265
optimizeModule jitConfig module' = do withPassManager defaultCuratedPassSetSpec { optLevel = Just (optimizerLevelToWord (optimizerLevel jitConfig)) } $ \pm -> do _ <- runPassManager pm module' pure ()
214
false
true
0
15
47
94
43
51
null
null
fros1y/umbral
src/Game.hs
bsd-3-clause
getPlayerActions :: DisplayContext -> Entity -> GameM (ActionsByEntity, Maybe GameCommand) getPlayerActions display player = do let playerActs = returnActionsFor player input <- liftIO $ getPlayerCommand display case input of Nothing -> return (playerActs [], Just C...
952
getPlayerActions :: DisplayContext -> Entity -> GameM (ActionsByEntity, Maybe GameCommand) getPlayerActions display player = do let playerActs = returnActionsFor player input <- liftIO $ getPlayerCommand display case input of Nothing -> return (playerActs [], Just C...
952
getPlayerActions display player = do let playerActs = returnActionsFor player input <- liftIO $ getPlayerCommand display case input of Nothing -> return (playerActs [], Just C_NOP) Just Pass -> return (playerActs [ActWait], Nothing) Just Quit -> return (playerActs [], Just C_Quit) ...
827
false
true
0
21
301
334
157
177
null
null
michael-j-clark/hjs99
src/21to30/TwentyFour.hs
bsd-3-clause
--Lotto: Draw N different random numbers from the set 1..M. rndSelect :: Int -> [Int] rndSelect n = zipWith (!!) (replicate n [1..n]) (take n $ randomRs (0,(n-1)) (mkStdGen 9127401298374))
191
rndSelect :: Int -> [Int] rndSelect n = zipWith (!!) (replicate n [1..n]) (take n $ randomRs (0,(n-1)) (mkStdGen 9127401298374))
128
rndSelect n = zipWith (!!) (replicate n [1..n]) (take n $ randomRs (0,(n-1)) (mkStdGen 9127401298374))
102
true
true
0
11
32
78
42
36
null
null
jfdm/hUML
src/MsgDiagram/Lexer.hs
bsd-3-clause
-- | Lex these bad boys -> ';' semi :: Parser () semi = void (Tok.semi lexer)
77
semi :: Parser () semi = void (Tok.semi lexer)
46
semi = void (Tok.semi lexer)
28
true
true
1
8
16
32
14
18
null
null
idris-hackers/idris-java
src/IRTS/CodegenJava.hs
bsd-3-clause
varPos (Glob name) = do vars <- globalVariables <$> get case lookup name vars of (Just varIdx) -> return (Left varIdx) Nothing -> throwError $ "Invalid global variable id: " ++ show name
198
varPos (Glob name) = do vars <- globalVariables <$> get case lookup name vars of (Just varIdx) -> return (Left varIdx) Nothing -> throwError $ "Invalid global variable id: " ++ show name
198
varPos (Glob name) = do vars <- globalVariables <$> get case lookup name vars of (Just varIdx) -> return (Left varIdx) Nothing -> throwError $ "Invalid global variable id: " ++ show name
198
false
false
0
12
44
76
35
41
null
null
acowley/language-c
src/Language/C/Syntax/Constants.hs
bsd-3-clause
escapeChar :: Char -> String escapeChar '\\' = "\\\\"
53
escapeChar :: Char -> String escapeChar '\\' = "\\\\"
53
escapeChar '\\' = "\\\\"
24
false
true
0
5
8
18
9
9
null
null
manugunther/sat
Sat/GUI/SVGBoardAlt.hs
gpl-3.0
redA = colorAlpha Names.red 220
40
redA = colorAlpha Names.red 220
40
redA = colorAlpha Names.red 220
40
false
false
0
6
13
13
6
7
null
null
castaway/pandoc
src/Text/Pandoc/Shared.hs
gpl-2.0
splitAt' :: Int -> [Char] -> ([Char],[Char]) splitAt' _ [] = ([],[])
77
splitAt' :: Int -> [Char] -> ([Char],[Char]) splitAt' _ [] = ([],[])
77
splitAt' _ [] = ([],[])
32
false
true
0
8
20
51
29
22
null
null
Persi/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [word@(T_DoubleQuoted id list)]] _) = when (any (\x -> willSplit x && not (mayBecomeMultipleArgs x)) list || (liftM wouldHaveBeenGlob (getLiteralString word) == Just True)) $ err id 2066 "Since you double quoted this, it will not word split, and th...
347
checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [word@(T_DoubleQuoted id list)]] _) = when (any (\x -> willSplit x && not (mayBecomeMultipleArgs x)) list || (liftM wouldHaveBeenGlob (getLiteralString word) == Just True)) $ err id 2066 "Since you double quoted this, it will not word split, and th...
347
checkForInQuoted _ (T_ForIn _ f [T_NormalWord _ [word@(T_DoubleQuoted id list)]] _) = when (any (\x -> willSplit x && not (mayBecomeMultipleArgs x)) list || (liftM wouldHaveBeenGlob (getLiteralString word) == Just True)) $ err id 2066 "Since you double quoted this, it will not word split, and th...
347
false
false
0
15
75
116
57
59
null
null
l-d-s/lambda-repl
src/LambdaCalculus/Conversions.hs
unlicense
normalReduce :: LambdaTerm -> LambdaTerm normalReduce lt = case lt of Var i -> Var i Lam i a -> Lam i (normalReduce a) App (Lam i a) b -> betaReduce i b a App a b | hasBetaRedex a -> App (normalReduce a) b ...
451
normalReduce :: LambdaTerm -> LambdaTerm normalReduce lt = case lt of Var i -> Var i Lam i a -> Lam i (normalReduce a) App (Lam i a) b -> betaReduce i b a App a b | hasBetaRedex a -> App (normalReduce a) b ...
451
normalReduce lt = case lt of Var i -> Var i Lam i a -> Lam i (normalReduce a) App (Lam i a) b -> betaReduce i b a App a b | hasBetaRedex a -> App (normalReduce a) b | hasBetaRedex b -> App...
410
false
true
7
9
222
124
60
64
null
null
DanielWaterworth/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
toC :: Name -> [BC] -> String toC f code = -- "/* " ++ show code ++ "*/\n\n" ++ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n" ++ indent 1 ++ "INITFRAME;\n" ++ concatMap (bcc 1) code ++ "}\n\n"
241
toC :: Name -> [BC] -> String toC f code = -- "/* " ++ show code ++ "*/\n\n" ++ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n" ++ indent 1 ++ "INITFRAME;\n" ++ concatMap (bcc 1) code ++ "}\n\n"
241
toC f code = -- "/* " ++ show code ++ "*/\n\n" ++ "void " ++ cname f ++ "(VM* vm, VAL* oldbase) {\n" ++ indent 1 ++ "INITFRAME;\n" ++ concatMap (bcc 1) code ++ "}\n\n"
211
false
true
0
11
86
74
35
39
null
null
gianlucagiorgolo/glue-xle
DataStructures.hs
mit
drawBinTree :: Show a => BinTree a -> String drawBinTree = drawTree . toTree . fmap show
88
drawBinTree :: Show a => BinTree a -> String drawBinTree = drawTree . toTree . fmap show
88
drawBinTree = drawTree . toTree . fmap show
43
false
true
2
8
16
44
18
26
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Primitive.hs
bsd-3-clause
ifoldl' = G.ifoldl'
19
ifoldl' = G.ifoldl'
19
ifoldl' = G.ifoldl'
19
false
false
1
6
2
12
4
8
null
null
rabipelais/cloudpoint
src/Generate.hs
mit
sampleCube :: Int -> [Point] sampleCube samples = points where front = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (1/2)) (randomListPairs (mkStdGen 1)) back = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (-1/2)) (randomListPairs (mkStdGen 2)) top = take (s...
838
sampleCube :: Int -> [Point] sampleCube samples = points where front = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (1/2)) (randomListPairs (mkStdGen 1)) back = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (-1/2)) (randomListPairs (mkStdGen 2)) top = take (s...
838
sampleCube samples = points where front = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (1/2)) (randomListPairs (mkStdGen 1)) back = take (samples `quot` 6) $ map (\(a, b) -> point (a - 0.5) (b - 0.5) (-1/2)) (randomListPairs (mkStdGen 2)) top = take (samples `quot` 6) $ map (\(a, ...
808
false
true
0
12
186
536
295
241
null
null
pandaychen/PFQ
user/Haskell/Network/PFq/Default.hs
gpl-2.0
-- | Evaluate to /Pass SkBuff/ if it is an UDP packet (on top of IPv6), /Drop/ it otherwise. udp6 = MFunction "udp6" () () () () () () () () :: NetFunction
155
udp6 = MFunction "udp6" () () () () () () () () :: NetFunction
62
udp6 = MFunction "udp6" () () () () () () () () :: NetFunction
62
true
false
0
6
32
45
23
22
null
null
oldmanmike/ghc
compiler/profiling/CostCentre.hs
bsd-3-clause
noCCSAttached _ = False
47
noCCSAttached _ = False
47
noCCSAttached _ = False
47
false
false
0
5
27
9
4
5
null
null
trygvis/hledger
hledger/Hledger/Cli/Options.hs
gpl-3.0
formatFromOpts :: [Opt] -> [FormatString] formatFromOpts opts = case parseFormatFromOpts opts of Left err -> error' err Right format -> format -- | Get the value of the (last) depth option, if any.
206
formatFromOpts :: [Opt] -> [FormatString] formatFromOpts opts = case parseFormatFromOpts opts of Left err -> error' err Right format -> format -- | Get the value of the (last) depth option, if any.
206
formatFromOpts opts = case parseFormatFromOpts opts of Left err -> error' err Right format -> format -- | Get the value of the (last) depth option, if any.
164
false
true
0
8
41
53
26
27
null
null
green-haskell/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
isDataConId_maybe :: Id -> Maybe DataCon isDataConId_maybe id = case Var.idDetails id of DataConWorkId con -> Just con DataConWrapId con -> Just con _ -> Nothing
252
isDataConId_maybe :: Id -> Maybe DataCon isDataConId_maybe id = case Var.idDetails id of DataConWorkId con -> Just con DataConWrapId con -> Just con _ -> Nothing
252
isDataConId_maybe id = case Var.idDetails id of DataConWorkId con -> Just con DataConWrapId con -> Just con _ -> Nothing
211
false
true
0
8
116
60
27
33
null
null
beala/twiphon
app/Main.hs
bsd-3-clause
screenNameParam :: BS.ByteString -> QueryParams screenNameParam sn = [("screen_name", Just sn)]
95
screenNameParam :: BS.ByteString -> QueryParams screenNameParam sn = [("screen_name", Just sn)]
95
screenNameParam sn = [("screen_name", Just sn)]
47
false
true
0
7
10
32
17
15
null
null
spacekitteh/smcghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprInstr (ADD size src dst) = pprSizeOpOp (sLit "add") size src dst
69
pprInstr (ADD size src dst) = pprSizeOpOp (sLit "add") size src dst
69
pprInstr (ADD size src dst) = pprSizeOpOp (sLit "add") size src dst
69
false
false
0
7
13
34
16
18
null
null
hackern/halfs
test/deps/hfuse/examples/HelloFS.hs
bsd-3-clause
helloGetFileStat _ = return $ Left eNOENT
45
helloGetFileStat _ = return $ Left eNOENT
45
helloGetFileStat _ = return $ Left eNOENT
45
false
false
0
6
10
16
7
9
null
null
Gabriel439/succinct
src/Succinct/Sequence.hs
bsd-2-clause
isBoundary RightBoundary = True
31
isBoundary RightBoundary = True
31
isBoundary RightBoundary = True
31
false
false
1
5
3
13
4
9
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 588115 = 4737
33
getValueFromProduct 588115 = 4737
33
getValueFromProduct 588115 = 4737
33
false
false
0
5
3
9
4
5
null
null
siddhanathan/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
collectLStmtsBinders :: [LStmtLR idL idR body] -> [idL] collectLStmtsBinders = concatMap collectLStmtBinders
108
collectLStmtsBinders :: [LStmtLR idL idR body] -> [idL] collectLStmtsBinders = concatMap collectLStmtBinders
108
collectLStmtsBinders = concatMap collectLStmtBinders
52
false
true
0
7
11
31
16
15
null
null
ecaustin/haskhol-deductive
src/HaskHOL/Deductive.hs
bsd-2-clause
-- | The quasi-quoter for the deductive libraries. An alias to 'typeQuant'. deductive :: QuasiQuoter deductive = typeQuant
123
deductive :: QuasiQuoter deductive = typeQuant
46
deductive = typeQuant
21
true
true
0
4
18
12
7
5
null
null
denumerate/raven
src/Raven/REPL.hs
bsd-3-clause
-- |io interpreter wrapper runPlot :: (MonadInterpreter m) => String -> m (Either String ByteString) runPlot code = interpret code (as :: IO (Either String ByteString)) >>= liftIO
179
runPlot :: (MonadInterpreter m) => String -> m (Either String ByteString) runPlot code = interpret code (as :: IO (Either String ByteString)) >>= liftIO
152
runPlot code = interpret code (as :: IO (Either String ByteString)) >>= liftIO
78
true
true
0
10
27
65
33
32
null
null
ptitfred/ftv-vods
app/CLI.hs
bsd-3-clause
dispatch :: [String] -> Client () dispatch ("auto-pls": count : _) | present count = autoPlaylists (read count)
115
dispatch :: [String] -> Client () dispatch ("auto-pls": count : _) | present count = autoPlaylists (read count)
115
dispatch ("auto-pls": count : _) | present count = autoPlaylists (read count)
81
false
true
0
10
21
59
27
32
null
null
bosu/josh
t/Test.hs
bsd-3-clause
getEnvVar :: String -> IO (Either IOError String) getEnvVar = E.try . getEnv
76
getEnvVar :: String -> IO (Either IOError String) getEnvVar = E.try . getEnv
76
getEnvVar = E.try . getEnv
26
false
true
0
8
12
32
16
16
null
null
christiaanb/clash-bin
GhciTags.hs
bsd-3-clause
createCTagsWithLineNumbersCmd file = ghciCreateTagsFile CTagsWithLineNumbers file
83
createCTagsWithLineNumbersCmd file = ghciCreateTagsFile CTagsWithLineNumbers file
83
createCTagsWithLineNumbersCmd file = ghciCreateTagsFile CTagsWithLineNumbers file
83
false
false
0
5
7
14
6
8
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_CLIP_DISTANCE0 :: GLenum gl_CLIP_DISTANCE0 = 0x3000
54
gl_CLIP_DISTANCE0 :: GLenum gl_CLIP_DISTANCE0 = 0x3000
54
gl_CLIP_DISTANCE0 = 0x3000
26
false
true
0
4
5
11
6
5
null
null
simonjohnthompson/Interaction
Interaction.hs
mit
{- make_Output is the function which puts its first argument, a piece of Output, at the front of the Output stream. It is used in the rept function so that the piece of Output will appear on ...
613
make_Output :: Output -> (Input,a,Output) -> (Input,a,Output) make_Output piece ~(input,st,out) = (input,st,piece++out)
119
make_Output piece ~(input,st,out) = (input,st,piece++out)
57
true
true
0
7
296
71
40
31
null
null
PierreR/basic-prelude
test-is-a-prelude.hs
mit
(+) = (P.+)
11
(+) = (P.+)
11
(+) = (P.+)
11
false
false
1
6
2
16
8
8
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
-- TODO: Inline the get/set's simpleOp IndexArrayArrayOp_ByteArray = Just $ normalOp $ invokevirtual (mkMethodRef stgArray "get" [jint] (ret closureType)) <> gconv closureType stgByteArrayType
204
simpleOp IndexArrayArrayOp_ByteArray = Just $ normalOp $ invokevirtual (mkMethodRef stgArray "get" [jint] (ret closureType)) <> gconv closureType stgByteArrayType
174
simpleOp IndexArrayArrayOp_ByteArray = Just $ normalOp $ invokevirtual (mkMethodRef stgArray "get" [jint] (ret closureType)) <> gconv closureType stgByteArrayType
174
true
false
0
11
34
51
25
26
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/UI/GLUT/Constants.hs
bsd-3-clause
glut_KEY_PAGE_DOWN = 105
44
glut_KEY_PAGE_DOWN = 105
44
glut_KEY_PAGE_DOWN = 105
44
false
false
0
4
22
6
3
3
null
null
ucsd-progsys/nanomaly
src/NanoML/Pretty.hs
bsd-3-clause
prettyAlt z (p, g, e) = text "|" <+> prettyPrec z p <> maybe empty (\g -> text " when" <+> prettyPrec z g) g <+> text "->" <+> prettyPrec z e
185
prettyAlt z (p, g, e) = text "|" <+> prettyPrec z p <> maybe empty (\g -> text " when" <+> prettyPrec z g) g <+> text "->" <+> prettyPrec z e
185
prettyAlt z (p, g, e) = text "|" <+> prettyPrec z p <> maybe empty (\g -> text " when" <+> prettyPrec z g) g <+> text "->" <+> prettyPrec z e
185
false
false
0
12
75
79
38
41
null
null
spechub/Hets
CoCASL/StatAna.hs
gpl-2.0
comakeInjective :: (Maybe Id, OpType, [COCOMPONENTS]) -> Maybe (Named (FORMULA f)) comakeInjective a = do let (i1, v1, _) = coselForms1 "X" a (i2, v2, _) = coselForms1 "Y" a (c, t1) <- i1 (_, t2) <- i2 let p = posOfId c return $ makeNamed ("ga_injective_" ++ showId c "")...
578
comakeInjective :: (Maybe Id, OpType, [COCOMPONENTS]) -> Maybe (Named (FORMULA f)) comakeInjective a = do let (i1, v1, _) = coselForms1 "X" a (i2, v2, _) = coselForms1 "Y" a (c, t1) <- i1 (_, t2) <- i2 let p = posOfId c return $ makeNamed ("ga_injective_" ++ showId c "")...
578
comakeInjective a = do let (i1, v1, _) = coselForms1 "X" a (i2, v2, _) = coselForms1 "Y" a (c, t1) <- i1 (_, t2) <- i2 let p = posOfId c return $ makeNamed ("ga_injective_" ++ showId c "") $ mkForallRange (v1 ++ v2) (Relation (Equation t1 Strong t2 p) Equivalence (let c...
474
false
true
0
22
202
255
127
128
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Core/Variant.hs
mit
variantMapGet' :: VariantStorable a => Ptr VariantMap -> Ptr StringHash -> IO (Maybe a) variantMapGet' mp keyHash = do variantM <- hashMapLookup keyHash mp join <$> whenJust variantM getVariant -- | Same as @variantMapGet'@ but returns default value if not found
267
variantMapGet' :: VariantStorable a => Ptr VariantMap -> Ptr StringHash -> IO (Maybe a) variantMapGet' mp keyHash = do variantM <- hashMapLookup keyHash mp join <$> whenJust variantM getVariant -- | Same as @variantMapGet'@ but returns default value if not found
267
variantMapGet' mp keyHash = do variantM <- hashMapLookup keyHash mp join <$> whenJust variantM getVariant -- | Same as @variantMapGet'@ but returns default value if not found
179
false
true
0
10
45
76
33
43
null
null
typedvar/hLand
hcore/PrettyPrinter.hs
mit
pprDefn :: (Name, CoreExpr) -> Iseq pprDefn (name, expr) = iConcat [ iStr name, iStr " = ", iIndent (pprExpr expr) ]
116
pprDefn :: (Name, CoreExpr) -> Iseq pprDefn (name, expr) = iConcat [ iStr name, iStr " = ", iIndent (pprExpr expr) ]
116
pprDefn (name, expr) = iConcat [ iStr name, iStr " = ", iIndent (pprExpr expr) ]
80
false
true
0
9
21
57
30
27
null
null
Ornedan/dom3statusbot
GameInfo.hs
bsd-3-clause
nationName 11 = "EA Pangaea"
28
nationName 11 = "EA Pangaea"
28
nationName 11 = "EA Pangaea"
28
false
false
0
5
4
9
4
5
null
null
fferreira/hnh
ProgramUtils.hs
gpl-3.0
procK (ListK ids i k) = mapM putId ids >> putId i >> procK k
109
procK (ListK ids i k) = mapM putId ids >> putId i >> procK k
109
procK (ListK ids i k) = mapM putId ids >> putId i >> procK k
109
false
false
0
7
63
39
17
22
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp IndexOffAddrOp_Word32 = _ILIT(286)
47
tagOf_PrimOp IndexOffAddrOp_Word32 = _ILIT(286)
47
tagOf_PrimOp IndexOffAddrOp_Word32 = _ILIT(286)
47
false
false
0
6
3
15
7
8
null
null
Lemmih/haskell-tc
src/Language/Haskell/TypeCheck/Monad.hs
mit
setKnot :: Entity -> Pin s -> TI s () setKnot gname pin = modify $ \st -> st{tcStateKnots = (gname,pin) : tcStateKnots st}
126
setKnot :: Entity -> Pin s -> TI s () setKnot gname pin = modify $ \st -> st{tcStateKnots = (gname,pin) : tcStateKnots st}
126
setKnot gname pin = modify $ \st -> st{tcStateKnots = (gname,pin) : tcStateKnots st}
88
false
true
0
10
27
64
33
31
null
null
distillation/language-core
Language/Core/Parser.hs
gpl-3.0
parseType (LHE.TyApp (LHE.TyApp (LHE.TyCon v) (LHE.TyVar v')) (LHE.TyVar v'')) = DataType (parseQName v) [parseName v', parseName v''] [] Nothing []
148
parseType (LHE.TyApp (LHE.TyApp (LHE.TyCon v) (LHE.TyVar v')) (LHE.TyVar v'')) = DataType (parseQName v) [parseName v', parseName v''] [] Nothing []
148
parseType (LHE.TyApp (LHE.TyApp (LHE.TyCon v) (LHE.TyVar v')) (LHE.TyVar v'')) = DataType (parseQName v) [parseName v', parseName v''] [] Nothing []
148
false
false
0
11
19
87
42
45
null
null
alephcloud/hs-aws-kinesis-client
cli/CLI/Config.hs
apache-2.0
configRegion ∷ Lens' Config Region configRegion = lens _configRegion $ \x y → x { _configRegion = y }
101
configRegion ∷ Lens' Config Region configRegion = lens _configRegion $ \x y → x { _configRegion = y }
101
configRegion = lens _configRegion $ \x y → x { _configRegion = y }
66
false
true
1
9
18
43
20
23
null
null
rdnetto/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
-- | Same as '&~>.', but works against a Maybe type (?&~>.) :: forall val nes nes1. PersistEntity nes1 => EntityField val (Maybe nes1) -> NestedField nes1 nes -> NestedField val nes (?&~>.) = MidNestFldsNullable
211
(?&~>.) :: forall val nes nes1. PersistEntity nes1 => EntityField val (Maybe nes1) -> NestedField nes1 nes -> NestedField val nes (?&~>.) = MidNestFldsNullable
159
(?&~>.) = MidNestFldsNullable
29
true
true
0
10
34
59
32
27
null
null
el-devo/SAT
ParseDimacs.hs
bsd-3-clause
int :: Parser Int int = liftM fromIntegral $ T.integer tokenizer
64
int :: Parser Int int = liftM fromIntegral $ T.integer tokenizer
64
int = liftM fromIntegral $ T.integer tokenizer
46
false
true
0
7
10
26
12
14
null
null
flipstone/kioku
src/Database/Kioku/Internal/TrieIndex.hs
mit
trieLookupMany keys (TI buf rootDrop root) = go (mkMultiKey keys) rootDrop root [] where go :: MultiKey -> Int -> Int -> [Int] -> [Int] go multiKey arcDrop offset rest = let DecodedNode { d_arc = fullArc , d_subtrieCount = subtrieCount , d_readSubtrieN = readSubtr...
2,305
trieLookupMany keys (TI buf rootDrop root) = go (mkMultiKey keys) rootDrop root [] where go :: MultiKey -> Int -> Int -> [Int] -> [Int] go multiKey arcDrop offset rest = let DecodedNode { d_arc = fullArc , d_subtrieCount = subtrieCount , d_readSubtrieN = readSubtr...
2,305
trieLookupMany keys (TI buf rootDrop root) = go (mkMultiKey keys) rootDrop root [] where go :: MultiKey -> Int -> Int -> [Int] -> [Int] go multiKey arcDrop offset rest = let DecodedNode { d_arc = fullArc , d_subtrieCount = subtrieCount , d_readSubtrieN = readSubtr...
2,305
false
false
0
15
889
428
225
203
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserLandingPages/Update.hs
mpl-2.0
-- | JSONP alpuCallback :: Lens' AdvertiserLandingPagesUpdate (Maybe Text) alpuCallback = lens _alpuCallback (\ s a -> s{_alpuCallback = a})
142
alpuCallback :: Lens' AdvertiserLandingPagesUpdate (Maybe Text) alpuCallback = lens _alpuCallback (\ s a -> s{_alpuCallback = a})
131
alpuCallback = lens _alpuCallback (\ s a -> s{_alpuCallback = a})
67
true
true
0
9
21
48
25
23
null
null
adityam/teams
Data/Teams/Examples/MAB.hs
gpl-3.0
c1 = mkDeterministic "c1"
26
c1 = mkDeterministic "c1"
26
c1 = mkDeterministic "c1"
26
false
false
0
5
4
9
4
5
null
null
nulldatamap/bastet
src/Ast.hs
bsd-3-clause
ufield f s = Fix $ Expression (EField f) s
49
ufield f s = Fix $ Expression (EField f) s
49
ufield f s = Fix $ Expression (EField f) s
49
false
false
0
8
16
26
12
14
null
null
aisamanra/matterhorn
src/Themes.hs
bsd-3-clause
emojiAttr :: AttrName emojiAttr = "emoji"
41
emojiAttr :: AttrName emojiAttr = "emoji"
41
emojiAttr = "emoji"
19
false
true
0
4
5
11
6
5
null
null
alevy/mappend
src/Blog/Models/Comment.hs
agpl-3.0
blogspamUrl :: H.Request blogspamUrl = url { H.method = "POST" } where url = fromJust $ H.parseUrl "http://test.blogspam.net:9999/"
133
blogspamUrl :: H.Request blogspamUrl = url { H.method = "POST" } where url = fromJust $ H.parseUrl "http://test.blogspam.net:9999/"
133
blogspamUrl = url { H.method = "POST" } where url = fromJust $ H.parseUrl "http://test.blogspam.net:9999/"
108
false
true
3
7
19
53
23
30
null
null
leshchevds/ganeti
src/Ganeti/JQScheduler/Filtering.hs
bsd-2-clause
-- | Authenticated RAPI user submitted a job. It's always the last entry userOf :: QueuedJob -> String -> String userOf job default_user = foldl extractRapiUser default_user $ reasonsOf job where extractRapiUser current_user (source, reason, _) = if source == opcodeReasonSrcRlib2 then fromMaybe ...
777
userOf :: QueuedJob -> String -> String userOf job default_user = foldl extractRapiUser default_user $ reasonsOf job where extractRapiUser current_user (source, reason, _) = if source == opcodeReasonSrcRlib2 then fromMaybe current_user (stripPrefix opcodeReasonAuthUser reason) else cur...
704
userOf job default_user = foldl extractRapiUser default_user $ reasonsOf job where extractRapiUser current_user (source, reason, _) = if source == opcodeReasonSrcRlib2 then fromMaybe current_user (stripPrefix opcodeReasonAuthUser reason) else current_user -- | Like `evaluateFilterM`,...
664
true
true
0
8
142
99
51
48
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
checkStderrRedirect _ _ = return ()
35
checkStderrRedirect _ _ = return ()
35
checkStderrRedirect _ _ = return ()
35
false
false
0
6
5
16
7
9
null
null
bobjflong/intercom-haskell
test/Tests.hs
mit
main :: IO () main = hspec $ do describe "user parsing" $ do it "grabs the name" $ do (userL ^. users . ix 0 . name) `shouldBe` Just "bob" it "grabs the custom_attributes" $ do (userL ^. users . ix 0 . customAttributes & M.lookup "foo") `shouldBe` Just (String "bar") it "grabs the next page" $...
611
main :: IO () main = hspec $ do describe "user parsing" $ do it "grabs the name" $ do (userL ^. users . ix 0 . name) `shouldBe` Just "bob" it "grabs the custom_attributes" $ do (userL ^. users . ix 0 . customAttributes & M.lookup "foo") `shouldBe` Just (String "bar") it "grabs the next page" $...
611
main = hspec $ do describe "user parsing" $ do it "grabs the name" $ do (userL ^. users . ix 0 . name) `shouldBe` Just "bob" it "grabs the custom_attributes" $ do (userL ^. users . ix 0 . customAttributes & M.lookup "foo") `shouldBe` Just (String "bar") it "grabs the next page" $ do (use...
597
false
true
0
19
141
206
96
110
null
null
jimsnow/polink
PolinkState.hs
gpl-2.0
-- This user dislikes this ID-addressable object. addDislike :: Uid -> Id -> S () addDislike uid id = do dislike . at id . traverse %= (S.insert uid) like . at id . traverse %= (S.delete uid) users . at uid . traverse . likes %= (S.delete id) users . at uid . traverse . dislikes %= (S.insert id)
318
addDislike :: Uid -> Id -> S () addDislike uid id = do dislike . at id . traverse %= (S.insert uid) like . at id . traverse %= (S.delete uid) users . at uid . traverse . likes %= (S.delete id) users . at uid . traverse . dislikes %= (S.insert id)
268
addDislike uid id = do dislike . at id . traverse %= (S.insert uid) like . at id . traverse %= (S.delete uid) users . at uid . traverse . likes %= (S.delete id) users . at uid . traverse . dislikes %= (S.insert id)
236
true
true
0
11
81
147
68
79
null
null
lukexi/bindings-Oculus
Bindings/OculusRift.hs
apache-2.0
-- | Creates a handle to an HMD which doubles as a description structure. -- Index can [0 .. ovrHmd_Detect()-1]. Index mappings can cange after each ovrHmd_Detect call. -- If not null, then the returned handle must be freed with ovrHmd_Destroy. ovrHmd_Create :: Int -> IO (Maybe OvrHmd) ovrHmd_Create idx = do hdl <- c...
435
ovrHmd_Create :: Int -> IO (Maybe OvrHmd) ovrHmd_Create idx = do hdl <- c_ovrHmd_Create $ fromIntegral idx return $ if hdl /= nullPtr then Just hdl else Nothing
190
ovrHmd_Create idx = do hdl <- c_ovrHmd_Create $ fromIntegral idx return $ if hdl /= nullPtr then Just hdl else Nothing
148
true
true
0
9
98
66
33
33
null
null
BartAdv/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
updateDef :: Name -> (a -> a) -> Ctxt a -> Ctxt a updateDef n f ctxt = let ds = lookupCtxtName n ctxt in foldr (\ (n, t) c -> addDef n (f t) c) ctxt ds
161
updateDef :: Name -> (a -> a) -> Ctxt a -> Ctxt a updateDef n f ctxt = let ds = lookupCtxtName n ctxt in foldr (\ (n, t) c -> addDef n (f t) c) ctxt ds
161
updateDef n f ctxt = let ds = lookupCtxtName n ctxt in foldr (\ (n, t) c -> addDef n (f t) c) ctxt ds
111
false
true
0
10
47
100
48
52
null
null
zaxtax/hakaru
haskell/Language/Hakaru/Types/HClasses.hs
bsd-3-clause
sing_HEq (HEq_Pair a b) = sPair (sing_HEq a) (sing_HEq b)
61
sing_HEq (HEq_Pair a b) = sPair (sing_HEq a) (sing_HEq b)
61
sing_HEq (HEq_Pair a b) = sPair (sing_HEq a) (sing_HEq b)
61
false
false
0
7
13
34
16
18
null
null
mboes/distributed-process
src/Control/Distributed/Process/Internal/CQueue.hs
bsd-3-clause
spanMatchChan :: [MatchOn m a] -> ([STM a], [MatchOn m a]) spanMatchChan [] = ([],[])
85
spanMatchChan :: [MatchOn m a] -> ([STM a], [MatchOn m a]) spanMatchChan [] = ([],[])
85
spanMatchChan [] = ([],[])
26
false
true
0
10
14
64
32
32
null
null
stephane-rolland/aastraal
aastraal-node-local/src/DecisionEngine.hs
gpl-3.0
process (TaskSetDescription u w) n = processTaskUuid u n (\x -> ES.TaskSetDescription x w)
90
process (TaskSetDescription u w) n = processTaskUuid u n (\x -> ES.TaskSetDescription x w)
90
process (TaskSetDescription u w) n = processTaskUuid u n (\x -> ES.TaskSetDescription x w)
90
false
false
0
9
13
41
20
21
null
null
ethercrow/yi
yi-core/src/Yi/Config/Simple.hs
gpl-2.0
modeBindKeysByName :: T.Text -> Keymap -> ConfigM () modeBindKeysByName name k = ensureModeRegistered "modeBindKeysByName" name modMode where f :: (KeymapSet -> KeymapSet) -> KeymapSet -> KeymapSet f mkm km = topKeymapA %~ (||> k) $ mkm km modMode = modifyModeByName name (modeKeymapA %~ f) -- | Regist...
394
modeBindKeysByName :: T.Text -> Keymap -> ConfigM () modeBindKeysByName name k = ensureModeRegistered "modeBindKeysByName" name modMode where f :: (KeymapSet -> KeymapSet) -> KeymapSet -> KeymapSet f mkm km = topKeymapA %~ (||> k) $ mkm km modMode = modifyModeByName name (modeKeymapA %~ f) -- | Regist...
394
modeBindKeysByName name k = ensureModeRegistered "modeBindKeysByName" name modMode where f :: (KeymapSet -> KeymapSet) -> KeymapSet -> KeymapSet f mkm km = topKeymapA %~ (||> k) $ mkm km modMode = modifyModeByName name (modeKeymapA %~ f) -- | Register the given mode. It will be preferred over any mode...
341
false
true
0
8
77
105
54
51
null
null
begriffs/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
-- |Returns a handle to the currently focused window getCurrentWindow :: WebDriver wd => wd WindowHandle getCurrentWindow = doSessCommand methodGet "/window_handle" Null
169
getCurrentWindow :: WebDriver wd => wd WindowHandle getCurrentWindow = doSessCommand methodGet "/window_handle" Null
116
getCurrentWindow = doSessCommand methodGet "/window_handle" Null
64
true
true
0
6
21
29
14
15
null
null
ksaveljev/chip-8-emulator
Chip8/Emulator.hs
mit
execute (JP (Ram addr)) = store Pc (MemoryValue16 addr)
55
execute (JP (Ram addr)) = store Pc (MemoryValue16 addr)
55
execute (JP (Ram addr)) = store Pc (MemoryValue16 addr)
55
false
false
0
9
8
32
15
17
null
null
codemac/yi-editor
src/Yi/Style.hs
gpl-2.0
brown = RGB 165 42 42
27
brown = RGB 165 42 42
27
brown = RGB 165 42 42
27
false
false
0
5
11
13
6
7
null
null
jtapolczai/wumpus
Agent/Intelligent/MessageHandling.hs
apache-2.0
-- |Prepends (by concatenation) a list of messages to the new messages of an agent. addMessages :: [AgentMessage'] -> AgentState -> AgentState addMessages ms = newMessages %~ (ms++)
181
addMessages :: [AgentMessage'] -> AgentState -> AgentState addMessages ms = newMessages %~ (ms++)
97
addMessages ms = newMessages %~ (ms++)
38
true
true
2
8
27
42
21
21
null
null
gnn/Hets
Syntax/AS_Library.der.hs
gpl-2.0
fromBasicSpec :: LibName -> SPEC_NAME -> G_basic_spec -> LIB_DEFN fromBasicSpec ln sn gbs = Lib_defn ln [makeSpecItem sn $ makeSpec gbs] nullRange []
153
fromBasicSpec :: LibName -> SPEC_NAME -> G_basic_spec -> LIB_DEFN fromBasicSpec ln sn gbs = Lib_defn ln [makeSpecItem sn $ makeSpec gbs] nullRange []
153
fromBasicSpec ln sn gbs = Lib_defn ln [makeSpecItem sn $ makeSpec gbs] nullRange []
87
false
true
0
8
26
54
26
28
null
null
mrVanDalo/azubi
src/Azubi/Core/Boot.hs
gpl-3.0
systemConfig :: Option System -> Option System systemConfig opt = opt { optionLongFlags = ["system"] , optionDefault = Gentoo , optionDescription = descriptionHelper [ "The System type the States should" , "be enforced on. Different Systems have" , "different commands" ] ...
341
systemConfig :: Option System -> Option System systemConfig opt = opt { optionLongFlags = ["system"] , optionDefault = Gentoo , optionDescription = descriptionHelper [ "The System type the States should" , "be enforced on. Different Systems have" , "different commands" ] ...
341
systemConfig opt = opt { optionLongFlags = ["system"] , optionDefault = Gentoo , optionDescription = descriptionHelper [ "The System type the States should" , "be enforced on. Different Systems have" , "different commands" ] [Gentoo ..] }
294
false
true
0
9
99
69
38
31
null
null
sboosali/enumerate
enumerate-function/sources/Enumerate/Function/Map.hs
mit
-------------------------------------------------- {-| Wraps 'Map.lookup'. >>> (unsafeFromList [(False,True),(True,False)]) False True >>> (unsafeFromList [(False,True),(True,False)]) True False @ 'unsafeFromList' = 'unsafeToFunction' . 'Map.fromList' @ -} unsafeFromList :: (Ord a) => [(a,b)] -> (a -> b) unsaf...
364
unsafeFromList :: (Ord a) => [(a,b)] -> (a -> b) unsafeFromList = unsafeToFunction . Map.fromList
101
unsafeFromList = unsafeToFunction . Map.fromList
49
true
true
0
10
46
55
29
26
null
null
snoyberg/ghc
compiler/hsSyn/HsLit.hs
bsd-3-clause
pmPprHsLit (HsDoublePrim d) = ppr d
37
pmPprHsLit (HsDoublePrim d) = ppr d
37
pmPprHsLit (HsDoublePrim d) = ppr d
37
false
false
0
7
7
18
8
10
null
null
nilcons/haskell-tz
benchmarks/benchGreg.hs
apache-2.0
toOrdinalImproved !mjd | b0 <= 0 = toOrdinalB0 m & ydYear +~ d * 400 | otherwise = toOrdinalB0 b0 where b0 = mjd + 678575 (d,m) = b0 `divMod` 146097
162
toOrdinalImproved !mjd | b0 <= 0 = toOrdinalB0 m & ydYear +~ d * 400 | otherwise = toOrdinalB0 b0 where b0 = mjd + 678575 (d,m) = b0 `divMod` 146097
162
toOrdinalImproved !mjd | b0 <= 0 = toOrdinalB0 m & ydYear +~ d * 400 | otherwise = toOrdinalB0 b0 where b0 = mjd + 678575 (d,m) = b0 `divMod` 146097
162
false
false
1
9
44
76
37
39
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types/Product.hs
mpl-2.0
-- | Undocumented member. dDiskAllocationType :: Lens' Disk (Maybe Text) dDiskAllocationType = lens _dDiskAllocationType (\ s a -> s{_dDiskAllocationType = a})
159
dDiskAllocationType :: Lens' Disk (Maybe Text) dDiskAllocationType = lens _dDiskAllocationType (\ s a -> s{_dDiskAllocationType = a})
133
dDiskAllocationType = lens _dDiskAllocationType (\ s a -> s{_dDiskAllocationType = a})
86
true
true
0
9
20
46
25
21
null
null
dolio/vector
Data/Vector/Generic.hs
bsd-3-clause
modifyWithBundle p v s = new (New.modifyWithBundle p (clone v) s)
65
modifyWithBundle p v s = new (New.modifyWithBundle p (clone v) s)
65
modifyWithBundle p v s = new (New.modifyWithBundle p (clone v) s)
65
false
false
0
9
10
34
16
18
null
null
rblaze/haskell-dbus
lib/DBus/Client.hs
apache-2.0
unpackVariant :: IsValue a => MethodCall -> Variant -> Either MethodError a unpackVariant MethodCall { methodCallSender = sender } variant = maybeToEither dummyMethodError { methodErrorBody = [variant, toVariant $ show $ variantType variant] , meth...
399
unpackVariant :: IsValue a => MethodCall -> Variant -> Either MethodError a unpackVariant MethodCall { methodCallSender = sender } variant = maybeToEither dummyMethodError { methodErrorBody = [variant, toVariant $ show $ variantType variant] , meth...
399
unpackVariant MethodCall { methodCallSender = sender } variant = maybeToEither dummyMethodError { methodErrorBody = [variant, toVariant $ show $ variantType variant] , methodErrorSender = sender } $ fromVariant vari...
323
false
true
0
11
145
86
44
42
null
null
changlinli/nikki
src/Distribution/AutoUpdate/Paths.hs
lgpl-3.0
repoPaths :: [String] repoPaths = System.Info.os : System.Info.arch : []
72
repoPaths :: [String] repoPaths = System.Info.os : System.Info.arch : []
72
repoPaths = System.Info.os : System.Info.arch : []
50
false
true
0
7
9
37
18
19
null
null
Proclivis/wxHaskell
wx/src/Graphics/UI/WX/Events.hs
lgpl-2.1
- | Change the event type. mapEvent :: (a -> b) -> (a -> b -> a) -> Event w a -> Event w b mapEvent get set (Event attr) = Event (mapAttr get set attr)
154
mapEvent :: (a -> b) -> (a -> b -> a) -> Event w a -> Event w b mapEvent get set (Event attr) = Event (mapAttr get set attr)
126
mapEvent get set (Event attr) = Event (mapAttr get set attr)
62
true
true
3
9
38
98
46
52
null
null
mrmonday/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
-- | Pretty-print the type of some name pprintDelabTy :: IState -> Name -> Doc OutputAnnotation pprintDelabTy i n = case lookupTy n (tt_ctxt i) of (ty:_) -> annotate (AnnTerm [] ty) . prettyIst i $ case lookupCtxt n (idris_implicits i) of (imps:_) -> resugar ...
494
pprintDelabTy :: IState -> Name -> Doc OutputAnnotation pprintDelabTy i n = case lookupTy n (tt_ctxt i) of (ty:_) -> annotate (AnnTerm [] ty) . prettyIst i $ case lookupCtxt n (idris_implicits i) of (imps:_) -> resugar i $ delabTy' i imps ty False False ...
454
pprintDelabTy i n = case lookupTy n (tt_ctxt i) of (ty:_) -> annotate (AnnTerm [] ty) . prettyIst i $ case lookupCtxt n (idris_implicits i) of (imps:_) -> resugar i $ delabTy' i imps ty False False _ -> resugar i $ delabTy' i [] ty Fa...
398
true
true
0
14
170
167
79
88
null
null