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
jamessanders/s3sync
src/Types.hs
bsd-3-clause
awsConnect :: S3SyncEnvironment -> AWSConnection awsConnect env = amazonS3Connection (accessKey env) (secretKey env)
116
awsConnect :: S3SyncEnvironment -> AWSConnection awsConnect env = amazonS3Connection (accessKey env) (secretKey env)
116
awsConnect env = amazonS3Connection (accessKey env) (secretKey env)
67
false
true
0
7
12
35
17
18
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT44.hs
gpl-3.0
drop _ [] = []
22
drop _ [] = []
22
drop _ [] = []
22
false
false
0
6
12
19
8
11
null
null
s9gf4ult/yesod
yesod-static/test/GeneratorTestUtil.hs
mit
testEntries a b = listE $ zipWith f a' b' where a' = sortBy (\(_,l1,_) (_,l2,_) -> compare l1 l2) a b' = sortBy (\e1 e2 -> ebLocation e1 `compare` ebLocation e2) b f (name, loc, ct) e = testEntry name loc ct e -- | Use this at runtime to assert the 'GenTestResult' is OK
299
testEntries a b = listE $ zipWith f a' b' where a' = sortBy (\(_,l1,_) (_,l2,_) -> compare l1 l2) a b' = sortBy (\e1 e2 -> ebLocation e1 `compare` ebLocation e2) b f (name, loc, ct) e = testEntry name loc ct e -- | Use this at runtime to assert the 'GenTestResult' is OK
299
testEntries a b = listE $ zipWith f a' b' where a' = sortBy (\(_,l1,_) (_,l2,_) -> compare l1 l2) a b' = sortBy (\e1 e2 -> ebLocation e1 `compare` ebLocation e2) b f (name, loc, ct) e = testEntry name loc ct e -- | Use this at runtime to assert the 'GenTestResult' is OK
299
false
false
4
9
84
138
69
69
null
null
atom-haskell/language-haskell
spec/fixture/type-app.hs
mit
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ other.type-application -- ^^^^^^^^^ identifier support.function.prelude.undefined f x@(x:xs) = _
192
f x@(x:xs) = _
14
f x@(x:xs) = _
14
true
false
1
7
67
24
12
12
null
null
sdiehl/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
idRuleFVs :: Id -> FV idRuleFVs id = ASSERT( isId id) FV.mkFVs (dVarSetElems $ ruleInfoFreeVars (idSpecialisation id))
120
idRuleFVs :: Id -> FV idRuleFVs id = ASSERT( isId id) FV.mkFVs (dVarSetElems $ ruleInfoFreeVars (idSpecialisation id))
120
idRuleFVs id = ASSERT( isId id) FV.mkFVs (dVarSetElems $ ruleInfoFreeVars (idSpecialisation id))
98
false
true
0
10
18
51
24
27
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
teHeatBeamSteam = 44 :: Int
30
teHeatBeamSteam = 44 :: Int
30
teHeatBeamSteam = 44 :: Int
30
false
false
0
4
7
9
5
4
null
null
phadej/streaming-commons
Data/Streaming/Network.hs
mit
getNeedLocalAddr :: ServerSettings -> Bool getNeedLocalAddr = serverNeedLocalAddr
81
getNeedLocalAddr :: ServerSettings -> Bool getNeedLocalAddr = serverNeedLocalAddr
81
getNeedLocalAddr = serverNeedLocalAddr
38
false
true
0
7
7
22
9
13
null
null
oshyshko/adventofcode
src/Y15/D16.hs
bsd-3-clause
-- Sue 1: goldfish: 6, trees: 9, akitas: 0 -- Sue 2: goldfish: 7, trees: 1, akitas: 0 sue2clues :: Parser [Sue2Clues] sue2clues = sue2clue `endBy` eol where sue2clue :: Parser Sue2Clues sue2clue = do string "Sue" <* pad sueId <- decimal pad <* char ':' <* pad clues <- clue ...
1,077
sue2clues :: Parser [Sue2Clues] sue2clues = sue2clue `endBy` eol where sue2clue :: Parser Sue2Clues sue2clue = do string "Sue" <* pad sueId <- decimal pad <* char ':' <* pad clues <- clue `sepBy` (char ',' <* pad) :: Parser [Clue] return (sueId, clues) clue :: P...
991
sue2clues = sue2clue `endBy` eol where sue2clue :: Parser Sue2Clues sue2clue = do string "Sue" <* pad sueId <- decimal pad <* char ':' <* pad clues <- clue `sepBy` (char ',' <* pad) :: Parser [Clue] return (sueId, clues) clue :: Parser Clue clue = do ...
959
true
true
4
24
399
339
166
173
null
null
codemac/yi-editor
src/Yi/UI/Utils.hs
gpl-2.0
paintStrokes _ x0 lf [] = fmap (second ($ x0)) lf
50
paintStrokes _ x0 lf [] = fmap (second ($ x0)) lf
50
paintStrokes _ x0 lf [] = fmap (second ($ x0)) lf
50
false
false
0
8
11
32
16
16
null
null
Tener/HaNS
src/Network/TCP/LTS/Time.hs
bsd-3-clause
timer_tt_conn_est sid = tcp_drop_and_close sid
50
timer_tt_conn_est sid = tcp_drop_and_close sid
50
timer_tt_conn_est sid = tcp_drop_and_close sid
50
false
false
0
5
8
12
5
7
null
null
ucsd-progsys/nanomaly
src/NanoML/Pretty.hs
bsd-3-clause
isFun _ = False
22
isFun _ = False
22
isFun _ = False
22
false
false
0
5
10
9
4
5
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs
mpl-2.0
tlAddtional :: Lens' TopicLabels (HashMap Text Text) tlAddtional = lens _tlAddtional (\ s a -> s{_tlAddtional = a}) . _Coerce
133
tlAddtional :: Lens' TopicLabels (HashMap Text Text) tlAddtional = lens _tlAddtional (\ s a -> s{_tlAddtional = a}) . _Coerce
133
tlAddtional = lens _tlAddtional (\ s a -> s{_tlAddtional = a}) . _Coerce
80
false
true
0
10
27
53
27
26
null
null
kkspeed/SICP-Practise
Interpreter/code/Eval.hs
lgpl-3.0
setVar :: Env -> String -> LispVal -> IOThrowsError LispVal setVar envRef var value = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Setting an unbound variable" var) (liftIO . (flip writeIORef value)...
415
setVar :: Env -> String -> LispVal -> IOThrowsError LispVal setVar envRef var value = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Setting an unbound variable" var) (liftIO . (flip writeIORef value)...
415
setVar envRef var value = do env <- liftIO $ readIORef envRef maybe (throwError $ UnboundVar "Setting an unbound variable" var) (liftIO . (flip writeIORef value)) (lookup var env) ...
355
false
true
0
11
203
98
46
52
null
null
stevenremot/fronsduk
src/Assembler.hs
gpl-3.0
lexer :: P.TokenParser () lexer = P.makeTokenParser (emptyDef { P.commentLine = ";" , P.caseSensitive = False })
156
lexer :: P.TokenParser () lexer = P.makeTokenParser (emptyDef { P.commentLine = ";" , P.caseSensitive = False })
156
lexer = P.makeTokenParser (emptyDef { P.commentLine = ";" , P.caseSensitive = False })
130
false
true
0
8
60
44
24
20
null
null
MyForteIsTimeTravel/HaskellEngine
src/Collision.hs
bsd-3-clause
-- | detect and resolve a single Entity to wall collision entityToTheWall :: EntityState -> EntityState entityToTheWall entity = entity { pos = pos' } where pos' = -- hit floor if (y (pos entity)) - (rad entity) <= -fromIntegral height / 2 then ((x (pos enti...
1,105
entityToTheWall :: EntityState -> EntityState entityToTheWall entity = entity { pos = pos' } where pos' = -- hit floor if (y (pos entity)) - (rad entity) <= -fromIntegral height / 2 then ((x (pos entity)), fromIntegral ( height `div` 2 ) - (rad entity)) else...
1,047
entityToTheWall entity = entity { pos = pos' } where pos' = -- hit floor if (y (pos entity)) - (rad entity) <= -fromIntegral height / 2 then ((x (pos entity)), fromIntegral ( height `div` 2 ) - (rad entity)) else -- hit roof ...
1,001
true
true
0
17
383
380
207
173
null
null
andrewthad/vinyl-vectors
src/Data/Relation.hs
bsd-3-clause
proxifyRelOp :: RelOp a rs -> Rec Proxy rs proxifyRelOp = recToProxy . relOpConstraints
87
proxifyRelOp :: RelOp a rs -> Rec Proxy rs proxifyRelOp = recToProxy . relOpConstraints
87
proxifyRelOp = recToProxy . relOpConstraints
44
false
true
0
6
13
29
14
15
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/showInt_1.hs
mit
primCmpInt :: MyInt -> MyInt -> Ordering; primCmpInt (Pos Zero) (Pos Zero) = EQ
83
primCmpInt :: MyInt -> MyInt -> Ordering primCmpInt (Pos Zero) (Pos Zero) = EQ
82
primCmpInt (Pos Zero) (Pos Zero) = EQ
37
false
true
0
7
17
37
19
18
null
null
aelve/Jane
Db.hs
mit
-- fails if db file doesn’t exist readDb :: IO (Maybe DBState) readDb = fmap A.decode . readFile =<< dbPath
107
readDb :: IO (Maybe DBState) readDb = fmap A.decode . readFile =<< dbPath
73
readDb = fmap A.decode . readFile =<< dbPath
44
true
true
3
6
19
41
17
24
null
null
fmthoma/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
isActive :: CompilerPhase -> Activation -> Bool isActive InitialPhase AlwaysActive = True
94
isActive :: CompilerPhase -> Activation -> Bool isActive InitialPhase AlwaysActive = True
94
isActive InitialPhase AlwaysActive = True
46
false
true
0
6
16
29
13
16
null
null
ramin32/ChessEngine
ChessPiece.hs
gpl-3.0
toggleColor Black = White
25
toggleColor Black = White
25
toggleColor Black = White
25
false
false
1
5
3
13
4
9
null
null
kmate/raw-feldspar
src/Feldspar/Optimize.hs
bsd-3-clause
simplifyUp (SymP t Not :$ (SymP _ Gt :$ a :$ b)) = simplifyUp $ SymP t Le :$ a :$ b
83
simplifyUp (SymP t Not :$ (SymP _ Gt :$ a :$ b)) = simplifyUp $ SymP t Le :$ a :$ b
83
simplifyUp (SymP t Not :$ (SymP _ Gt :$ a :$ b)) = simplifyUp $ SymP t Le :$ a :$ b
83
false
false
0
10
21
54
26
28
null
null
portnov/yaledger
YaLedger/Parser/Common.hs
bsd-3-clause
pPath :: Monad m => ParsecT Text st m Path pPath = try identifier `sepBy1` reservedOp "/"
89
pPath :: Monad m => ParsecT Text st m Path pPath = try identifier `sepBy1` reservedOp "/"
89
pPath = try identifier `sepBy1` reservedOp "/"
46
false
true
0
7
16
47
21
26
null
null
Raveline/FQuoter
testsuite/FQuoter/Parser/ParserSpec.hs
gpl-3.0
{- Removing values -} removeMusic = Remove DBQuote "music"
58
removeMusic = Remove DBQuote "music"
36
removeMusic = Remove DBQuote "music"
36
true
false
0
5
8
12
6
6
null
null
robx/puzzle-draw
src/Data/Compose.hs
mit
handle f Mines = f R.mines D.mines
34
handle f Mines = f R.mines D.mines
34
handle f Mines = f R.mines D.mines
34
false
false
0
6
6
21
9
12
null
null
v0lkan/learning-haskell
session-005/001.back-to-the-future.hs
mit
-- Do nothing to lists with a single element sumEveryTwo (x:(y:zs)) = (x + y) : sumEveryTwo zs
94
sumEveryTwo (x:(y:zs)) = (x + y) : sumEveryTwo zs
49
sumEveryTwo (x:(y:zs)) = (x + y) : sumEveryTwo zs
49
true
false
0
9
17
38
20
18
null
null
olsner/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
maybeUnfoldingTemplate _ = Nothing
36
maybeUnfoldingTemplate _ = Nothing
36
maybeUnfoldingTemplate _ = Nothing
36
false
false
0
5
5
9
4
5
null
null
NicolasDP/hop
Hop/PullRequest.hs
bsd-3-clause
createOrUpdateBranch :: String -> String -> IO String createOrUpdateBranch remote branch = do putStrLn $ " * Create or update Pull Request branch: " ++ remoteBranch fetchBranch remote branch either error id <$> tryCommand "git" ["checkout", remoteBranch, "-B", newBranch] return newBranch where new...
439
createOrUpdateBranch :: String -> String -> IO String createOrUpdateBranch remote branch = do putStrLn $ " * Create or update Pull Request branch: " ++ remoteBranch fetchBranch remote branch either error id <$> tryCommand "git" ["checkout", remoteBranch, "-B", newBranch] return newBranch where new...
439
createOrUpdateBranch remote branch = do putStrLn $ " * Create or update Pull Request branch: " ++ remoteBranch fetchBranch remote branch either error id <$> tryCommand "git" ["checkout", remoteBranch, "-B", newBranch] return newBranch where newBranch :: String newBranch = "hop/" ++ branch ...
385
false
true
0
9
93
116
57
59
null
null
Happy0/haskellscrabble
src/Wordify/Rules/FormedWord.hs
gpl-3.0
allWords :: FormedWords -> [FormedWord] allWords (FormedWords main adjacentWords _) = main : adjacentWords
109
allWords :: FormedWords -> [FormedWord] allWords (FormedWords main adjacentWords _) = main : adjacentWords
107
allWords (FormedWords main adjacentWords _) = main : adjacentWords
67
false
true
0
7
16
35
18
17
null
null
tdammers/resourcerer
src/Web/Resourcerer/Mime.hs
bsd-3-clause
-- | Get a MIME type's specificity. Note that no guarantees are promised for -- invalid MIME types; specifically, @*/something@ is reported as 'AnyType', as -- if it were @*/*@. specificity :: MimeType -> Specificity specificity m = case (isWildcard (mimeType m), isWildcard (mimeSubtype m)) of (False, False...
611
specificity :: MimeType -> Specificity specificity m = case (isWildcard (mimeType m), isWildcard (mimeSubtype m)) of (False, False) -> Specific (False, True) -> AnySubtype (True, _) -> AnyType -- | Sort a list of MIME types by their @q@ parameter, highest first, -- defaulting to 1.0; second...
433
specificity m = case (isWildcard (mimeType m), isWildcard (mimeSubtype m)) of (False, False) -> Specific (False, True) -> AnySubtype (True, _) -> AnyType -- | Sort a list of MIME types by their @q@ parameter, highest first, -- defaulting to 1.0; secondary sort criterion is the type's specif...
394
true
true
0
9
123
88
50
38
null
null
brendanhay/gogol
gen/src/Gen/Types.hs
mpl-2.0
-- | hide some conflicting (unneeded) data types from Sum modules preludeSumNS :: NS preludeSumNS = "Network.Google.Prelude hiding (Bytes)"
139
preludeSumNS :: NS preludeSumNS = "Network.Google.Prelude hiding (Bytes)"
73
preludeSumNS = "Network.Google.Prelude hiding (Bytes)"
54
true
true
0
4
18
12
7
5
null
null
spechub/Hets
OWL2/ParseMS.hs
gpl-2.0
arseDatatypeFrame :: GA.PrefixMap -> CharParser st [Axiom] parseDatatypeFrame pm = do pkeyword datatypeC iri <- datatypeUri pm axs <- option [] (try $ (do pkeyword equivalentToC ans <- many $ annotations pm range <- dataRange pm return [DatatypeDefinition (concat ans) iri ran...
440
parseDatatypeFrame :: GA.PrefixMap -> CharParser st [Axiom] parseDatatypeFrame pm = do pkeyword datatypeC iri <- datatypeUri pm axs <- option [] (try $ (do pkeyword equivalentToC ans <- many $ annotations pm range <- dataRange pm return [DatatypeDefinition (concat ans) iri ra...
440
parseDatatypeFrame pm = do pkeyword datatypeC iri <- datatypeUri pm axs <- option [] (try $ (do pkeyword equivalentToC ans <- many $ annotations pm range <- dataRange pm return [DatatypeDefinition (concat ans) iri range] ) <|> parseAnnotationAssertions pm (AnnSubIri iri...
380
false
true
0
19
111
161
73
88
null
null
k0001/reflex-dom
src/Reflex/Dom/Widget/Input.hs
bsd-3-clause
textInput :: MonadWidget t m => TextInputConfig t -> m (TextInput t) textInput (TextInputConfig inputType initial eSetValue dAttrs) = do e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" inputType) dAttrs liftIO $ htmlInputElementSetValue e initial performEvent_ $ fmap (l...
1,234
textInput :: MonadWidget t m => TextInputConfig t -> m (TextInput t) textInput (TextInputConfig inputType initial eSetValue dAttrs) = do e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" inputType) dAttrs liftIO $ htmlInputElementSetValue e initial performEvent_ $ fmap (l...
1,234
textInput (TextInputConfig inputType initial eSetValue dAttrs) = do e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" inputType) dAttrs liftIO $ htmlInputElementSetValue e initial performEvent_ $ fmap (liftIO . htmlInputElementSetValue e) eSetValue eChange <- wrapDomEve...
1,165
false
true
0
19
198
366
166
200
null
null
mightymoose/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs
bsd-3-clause
init :: ByteString -> ByteString init Empty = errorEmptyList "init"
76
init :: ByteString -> ByteString init Empty = errorEmptyList "init"
76
init Empty = errorEmptyList "init"
43
false
true
0
5
18
21
10
11
null
null
pparkkin/eta
libraries/eta-boot/Eta/Serialized.hs
bsd-3-clause
deserializeWord8 [] _ = error "deserializeWord8: unexpected end of stream"
84
deserializeWord8 [] _ = error "deserializeWord8: unexpected end of stream"
84
deserializeWord8 [] _ = error "deserializeWord8: unexpected end of stream"
84
false
false
0
6
19
16
7
9
null
null
anchor/retcon
lib/Retcon/Identifier.hs
bsd-3-clause
compatibleEntity :: (Synchronisable a, Synchronisable b) => a -> b -> Bool compatibleEntity a b = getEntityName a == getEntityName b
148
compatibleEntity :: (Synchronisable a, Synchronisable b) => a -> b -> Bool compatibleEntity a b = getEntityName a == getEntityName b
148
compatibleEntity a b = getEntityName a == getEntityName b
57
false
true
0
9
36
54
25
29
null
null
eugenkiss/loopgotowhile
tests/Language/LoopGotoWhile/Loop/Extended/Tests.hs
bsd-3-clause
testComments3 :: Assertion testComments3 = assertBool "" $ isRight $ runProgram [] $ "x0 := x1 + 2 /*" ++ "This is a longer\n comment" ++ "*/; x0 := x1 + 2"
168
testComments3 :: Assertion testComments3 = assertBool "" $ isRight $ runProgram [] $ "x0 := x1 + 2 /*" ++ "This is a longer\n comment" ++ "*/; x0 := x1 + 2"
168
testComments3 = assertBool "" $ isRight $ runProgram [] $ "x0 := x1 + 2 /*" ++ "This is a longer\n comment" ++ "*/; x0 := x1 + 2"
141
false
true
0
10
43
39
19
20
null
null
alexander-at-github/eta
compiler/ETA/Types/TyCon.hs
bsd-3-clause
tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type]) tyConFamInst_maybe tc = case tyConParent tc of FamInstTyCon _ f ts -> Just (f, ts) _ -> Nothing -- | If this 'TyCon' is that of a family instance, return a 'TyCon' which -- represents a coercion identifying the representation type wit...
379
tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type]) tyConFamInst_maybe tc = case tyConParent tc of FamInstTyCon _ f ts -> Just (f, ts) _ -> Nothing -- | If this 'TyCon' is that of a family instance, return a 'TyCon' which -- represents a coercion identifying the representation type wit...
379
tyConFamInst_maybe tc = case tyConParent tc of FamInstTyCon _ f ts -> Just (f, ts) _ -> Nothing -- | If this 'TyCon' is that of a family instance, return a 'TyCon' which -- represents a coercion identifying the representation type with the type -- instance family. Otherwise, return @No...
326
false
true
0
9
90
73
37
36
null
null
shockkolate/etch
src/Etch/Analysis/Resolution.hs
apache-2.0
paramAnalysis (name `As` ty@(PrimaryType _)) = do t <- typeAnalysis ty scope %= HM.insert name (Term t HM.empty) -- XXX: need scopes pure (name `As` t)
163
paramAnalysis (name `As` ty@(PrimaryType _)) = do t <- typeAnalysis ty scope %= HM.insert name (Term t HM.empty) -- XXX: need scopes pure (name `As` t)
163
paramAnalysis (name `As` ty@(PrimaryType _)) = do t <- typeAnalysis ty scope %= HM.insert name (Term t HM.empty) -- XXX: need scopes pure (name `As` t)
163
false
false
0
11
37
78
39
39
null
null
aartamonau/gossim
src/Gossim/Internal/Simulator.hs
lgpl-3.0
processPendingSideEffects :: Gossim () processPendingSideEffects = do time <- getTime let pred (ts, _) _ = ts <= time (sideEffects, pending') <- PQueue.spanWithKey pred <$> use pendingSideEffects pendingSideEffects .= pending' $logDebug "Found {} pending side-effect(s)" (Only $ length sideEffects) mapMOf_ (...
360
processPendingSideEffects :: Gossim () processPendingSideEffects = do time <- getTime let pred (ts, _) _ = ts <= time (sideEffects, pending') <- PQueue.spanWithKey pred <$> use pendingSideEffects pendingSideEffects .= pending' $logDebug "Found {} pending side-effect(s)" (Only $ length sideEffects) mapMOf_ (...
360
processPendingSideEffects = do time <- getTime let pred (ts, _) _ = ts <= time (sideEffects, pending') <- PQueue.spanWithKey pred <$> use pendingSideEffects pendingSideEffects .= pending' $logDebug "Found {} pending side-effect(s)" (Only $ length sideEffects) mapMOf_ (folded._2) processSideEffect sideEffect...
321
false
true
0
11
54
113
53
60
null
null
MadSciGuys/trebuchet
src/Treb/Types.hs
mit
isAliasType :: DataBlockName -> Bool isAliasType (AliasName _) = True
69
isAliasType :: DataBlockName -> Bool isAliasType (AliasName _) = True
69
isAliasType (AliasName _) = True
32
false
true
0
7
9
24
12
12
null
null
Southern-Exposure-Seed-Exchange/southernexposure.com
server/scripts/ExportProductsRacks.hs
gpl-3.0
makeExportData :: (Entity ProductVariant, Entity Product, Maybe (Entity SeedAttribute), E.Value T.Text) -> ExportData makeExportData (Entity _ ProductVariant {..}, Entity _ Product {..}, maybeAttribute, E.Value categoryName_) = ExportData { sku = productBaseSku <> productVariantSkuSuffix , name = pr...
1,363
makeExportData :: (Entity ProductVariant, Entity Product, Maybe (Entity SeedAttribute), E.Value T.Text) -> ExportData makeExportData (Entity _ ProductVariant {..}, Entity _ Product {..}, maybeAttribute, E.Value categoryName_) = ExportData { sku = productBaseSku <> productVariantSkuSuffix , name = pr...
1,363
makeExportData (Entity _ ProductVariant {..}, Entity _ Product {..}, maybeAttribute, E.Value categoryName_) = ExportData { sku = productBaseSku <> productVariantSkuSuffix , name = productName , slug = productSlug , price = formatCents productVariantPrice , lotSize = maybe "" ...
1,245
false
true
0
10
294
309
166
143
null
null
dolio/vector
Data/Vector/Fusion/Bundle/Monadic.hs
bsd-3-clause
postscanl f = postscanlM (\a b -> return (f a b))
49
postscanl f = postscanlM (\a b -> return (f a b))
49
postscanl f = postscanlM (\a b -> return (f a b))
49
false
false
1
10
10
36
16
20
null
null
sjpet/quark
src/Quark/History.hs
mit
undoEdit :: EditHistory -> EditHistory undoEdit (k, [], future) = (k, [], future)
83
undoEdit :: EditHistory -> EditHistory undoEdit (k, [], future) = (k, [], future)
83
undoEdit (k, [], future) = (k, [], future)
44
false
true
0
7
14
40
23
17
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/tests/map-properties.hs
bsd-3-clause
prop_unionSum :: [(Int,Int)] -> [(Int,Int)] -> Bool prop_unionSum xs ys = sum (elems (unionWith (+) (fromListWith (+) xs) (fromListWith (+) ys))) == (sum (Prelude.map snd xs) + sum (Prelude.map snd ys))
208
prop_unionSum :: [(Int,Int)] -> [(Int,Int)] -> Bool prop_unionSum xs ys = sum (elems (unionWith (+) (fromListWith (+) xs) (fromListWith (+) ys))) == (sum (Prelude.map snd xs) + sum (Prelude.map snd ys))
208
prop_unionSum xs ys = sum (elems (unionWith (+) (fromListWith (+) xs) (fromListWith (+) ys))) == (sum (Prelude.map snd xs) + sum (Prelude.map snd ys))
156
false
true
1
10
36
127
67
60
null
null
VictorCMiraldo/mmm
MMM/Examples/Theoretical/TryAgainStack.hs
mit
-- Note the duplication of the state with diagonal, that's needed to pass -- a copy to (delta noEmptyPop). safeStack :: (Strong m) => MMM m [p] (Either () p) (Either (Either p ()) ()) safeStack = fmap (p2 >< id) . tryagain noEmptyPop stack . (diagonal >< id) where diagonal a = (a , a)
287
safeStack :: (Strong m) => MMM m [p] (Either () p) (Either (Either p ()) ()) safeStack = fmap (p2 >< id) . tryagain noEmptyPop stack . (diagonal >< id) where diagonal a = (a , a)
180
safeStack = fmap (p2 >< id) . tryagain noEmptyPop stack . (diagonal >< id) where diagonal a = (a , a)
103
true
true
0
11
57
110
58
52
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/List.hs
mpl-2.0
-- | Required. The resource name that owns the logs: projects\/[PROJECT_ID] -- organizations\/[ORGANIZATION_ID] billingAccounts\/[BILLING_ACCOUNT_ID] -- folders\/[FOLDER_ID] fllParent :: Lens' FoldersLogsList Text fllParent = lens _fllParent (\ s a -> s{_fllParent = a})
272
fllParent :: Lens' FoldersLogsList Text fllParent = lens _fllParent (\ s a -> s{_fllParent = a})
98
fllParent = lens _fllParent (\ s a -> s{_fllParent = a})
58
true
true
0
9
33
44
24
20
null
null
kmicklas/pyrec
src/Pyrec/Misc.hs
mit
-- | should be pretty self explanatory for :: Functor f => f a -> (a -> b) -> f b for = flip fmap
97
for :: Functor f => f a -> (a -> b) -> f b for = flip fmap
58
for = flip fmap
15
true
true
0
10
24
49
22
27
null
null
abakst/brisk-prelude
src/Control/Distributed/Process/Brisk.hs
bsd-3-clause
regSpec :: String -> ProcessId -> Process () regSpec _ _ = return ()
68
regSpec :: String -> ProcessId -> Process () regSpec _ _ = return ()
68
regSpec _ _ = return ()
23
false
true
0
8
13
34
16
18
null
null
jpanda109/Hcommand
src/Hcommand.hs
bsd-3-clause
parseArgs' ctx (arg1 : arg2 : rest) = if "-" `List.isPrefixOf` arg1 then let spec = Maybe.fromMaybe (error "invalid flag") (Map.lookup arg1 (Spec.flags $ ctxSpec ctx)) in case spec of Spec.Flag -> let newFlags = Map.insert arg1 (Arg arg2) (ctxFlags ctx) newCtx = ctx {ct...
734
parseArgs' ctx (arg1 : arg2 : rest) = if "-" `List.isPrefixOf` arg1 then let spec = Maybe.fromMaybe (error "invalid flag") (Map.lookup arg1 (Spec.flags $ ctxSpec ctx)) in case spec of Spec.Flag -> let newFlags = Map.insert arg1 (Arg arg2) (ctxFlags ctx) newCtx = ctx {ct...
734
parseArgs' ctx (arg1 : arg2 : rest) = if "-" `List.isPrefixOf` arg1 then let spec = Maybe.fromMaybe (error "invalid flag") (Map.lookup arg1 (Spec.flags $ ctxSpec ctx)) in case spec of Spec.Flag -> let newFlags = Map.insert arg1 (Arg arg2) (ctxFlags ctx) newCtx = ctx {ct...
734
false
false
0
17
237
259
131
128
null
null
jepugs/simpl
Simpl/Parser.hs
apache-2.0
dummyPos = newPos "" 0 0
24
dummyPos = newPos "" 0 0
24
dummyPos = newPos "" 0 0
24
false
false
0
5
5
13
6
7
null
null
mrgaaron/dcpu-16
src/haskell/Assembler.hs
bsd-2-clause
genMemLocHex (MemLocation "B") = 0x09 :: Word16
47
genMemLocHex (MemLocation "B") = 0x09 :: Word16
47
genMemLocHex (MemLocation "B") = 0x09 :: Word16
47
false
false
0
7
6
18
9
9
null
null
GaloisInc/halvm-ghc
compiler/main/HscTypes.hs
bsd-3-clause
noVectInfo :: VectInfo noVectInfo = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyDVarSet emptyNameSet
110
noVectInfo :: VectInfo noVectInfo = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyDVarSet emptyNameSet
110
noVectInfo = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyDVarSet emptyNameSet
87
false
true
0
6
12
29
12
17
null
null
andyarvanitis/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
process fn (NewDefn decls) = do logLvl 3 ("Defining names using these decls: " ++ show (showDecls verbosePPOption decls)) mapM_ defineName namedGroups where namedGroups = groupBy (\d1 d2 -> getName d1 == getName d2) decls getName :: PDecl -> Maybe Name getName (PTy docs argdocs syn fc opts name ty...
3,062
process fn (NewDefn decls) = do logLvl 3 ("Defining names using these decls: " ++ show (showDecls verbosePPOption decls)) mapM_ defineName namedGroups where namedGroups = groupBy (\d1 d2 -> getName d1 == getName d2) decls getName :: PDecl -> Maybe Name getName (PTy docs argdocs syn fc opts name ty...
3,062
process fn (NewDefn decls) = do logLvl 3 ("Defining names using these decls: " ++ show (showDecls verbosePPOption decls)) mapM_ defineName namedGroups where namedGroups = groupBy (\d1 d2 -> getName d1 == getName d2) decls getName :: PDecl -> Maybe Name getName (PTy docs argdocs syn fc opts name ty...
3,062
false
false
42
12
640
1,001
501
500
null
null
talanis85/mudblood
src/Mudblood/Contrib/MG/Communication.hs
gpl-3.0
triggerCommunication :: (AttrString -> MBTrigger u [TriggerEvent]) -> TriggerEvent -> MBTrigger u [TriggerEvent] triggerCommunication f = (guardGMCP >=> triggerGmcpCommunication >=> f . toAS) <||> (loopT (guardLine >=> (keep1 $ regexAS "^\\[[^]]+:[^]]+]") >=> f) (guardLine >=> (keep1 $ regexAS "^...
469
triggerCommunication :: (AttrString -> MBTrigger u [TriggerEvent]) -> TriggerEvent -> MBTrigger u [TriggerEvent] triggerCommunication f = (guardGMCP >=> triggerGmcpCommunication >=> f . toAS) <||> (loopT (guardLine >=> (keep1 $ regexAS "^\\[[^]]+:[^]]+]") >=> f) (guardLine >=> (keep1 $ regexAS "^...
469
triggerCommunication f = (guardGMCP >=> triggerGmcpCommunication >=> f . toAS) <||> (loopT (guardLine >=> (keep1 $ regexAS "^\\[[^]]+:[^]]+]") >=> f) (guardLine >=> (keep1 $ regexAS "^ ") >=> f)) <||> (loopT (guardLine >=> (keep1 $ regexAS "^.+ teilt Dir mit:") >=> f) (guardLin...
356
false
true
6
13
105
181
94
87
null
null
fpco/stackage-view
server/Control/Concurrent/STM/SwapQueue.hs
mit
-- | Start a swap queue. newSwapQueue :: IO (IO a -> STM (STM (Maybe a))) newSwapQueue = do tvar <- newEmptyTMVarIO void (forkIO (forever (do (action,signal) <- atomically (takeTMVar tvar) result <- try action atomically ...
677
newSwapQueue :: IO (IO a -> STM (STM (Maybe a))) newSwapQueue = do tvar <- newEmptyTMVarIO void (forkIO (forever (do (action,signal) <- atomically (takeTMVar tvar) result <- try action atomically (putTMVar signal ...
652
newSwapQueue = do tvar <- newEmptyTMVarIO void (forkIO (forever (do (action,signal) <- atomically (takeTMVar tvar) result <- try action atomically (putTMVar signal (case resul...
603
true
true
0
24
356
170
80
90
null
null
rkoeninger/GameCom
src/lib/CPU.hs
mit
decode 0x1e = (asl, abxMode, 7)
31
decode 0x1e = (asl, abxMode, 7)
31
decode 0x1e = (asl, abxMode, 7)
31
false
false
0
5
5
18
10
8
null
null
keera-studios/gtk-helpers
gtk3/src/Graphics/UI/Gtk/Layout/BackgroundContainer.hs
bsd-3-clause
backgroundContainerNew :: IO BackgroundContainer backgroundContainerNew = do ev <- eventBoxNew ref <- newIORef Nothing return $ BackgroundContainer ev ref
161
backgroundContainerNew :: IO BackgroundContainer backgroundContainerNew = do ev <- eventBoxNew ref <- newIORef Nothing return $ BackgroundContainer ev ref
161
backgroundContainerNew = do ev <- eventBoxNew ref <- newIORef Nothing return $ BackgroundContainer ev ref
112
false
true
0
8
25
43
19
24
null
null
tjakway/ghcjvm
libraries/base/GHC/Enum.hs
bsd-3-clause
go_up_char_fb :: (Char -> a -> a) -> a -> Int# -> Int# -> Int# -> a go_up_char_fb c n x0 delta lim = go_up x0 where go_up x | isTrue# (x ># lim) = n | otherwise = C# (chr# x) `c` go_up (x +# delta)
226
go_up_char_fb :: (Char -> a -> a) -> a -> Int# -> Int# -> Int# -> a go_up_char_fb c n x0 delta lim = go_up x0 where go_up x | isTrue# (x ># lim) = n | otherwise = C# (chr# x) `c` go_up (x +# delta)
226
go_up_char_fb c n x0 delta lim = go_up x0 where go_up x | isTrue# (x ># lim) = n | otherwise = C# (chr# x) `c` go_up (x +# delta)
158
false
true
1
10
75
122
59
63
null
null
limaner2002/EPC-tools
RapidFire/src/Appian/Internal/Arbitrary.hs
bsd-3-clause
paragraphArbitrary :: (Applicative f, Effective m r f, MonadGen m, Plated s, AsValue s, AsJSON s) => Text -> Int -> (Either Text Update -> f (Either Text Update)) -> s -> f s paragraphArbitrary label size = failing (paragraphArbitraryNoError label size) (to $ const $ Left $ "Could not find paragraph field " <> tshow la...
379
paragraphArbitrary :: (Applicative f, Effective m r f, MonadGen m, Plated s, AsValue s, AsJSON s) => Text -> Int -> (Either Text Update -> f (Either Text Update)) -> s -> f s paragraphArbitrary label size = failing (paragraphArbitraryNoError label size) (to $ const $ Left $ "Could not find paragraph field " <> tshow la...
379
paragraphArbitrary label size = failing (paragraphArbitraryNoError label size) (to $ const $ Left $ "Could not find paragraph field " <> tshow label) . act (mapM $ fillParagraph size) . to (fmap toUpdate)
204
false
true
0
13
66
166
81
85
null
null
Potregon/while
src/Interface/TAC.hs
gpl-3.0
-- $ added getDefVariables (FSub v _ _) = [v]
45
getDefVariables (FSub v _ _) = [v]
34
getDefVariables (FSub v _ _) = [v]
34
true
false
0
7
9
23
12
11
null
null
Pnom/haskell-ast-pretty
Test/examples/Directory.hs
mit
getCurrentDirectory :: IO FilePath getCurrentDirectory = do Win32.getCurrentDirectory {- |If the operating system has a notion of current directories, @'setCurrentDirectory' dir@ changes the current directory of the calling process to /dir/. The operation may fail with: * 'HardwareFault' A physical I\/O error has ...
870
getCurrentDirectory :: IO FilePath getCurrentDirectory = do Win32.getCurrentDirectory {- |If the operating system has a notion of current directories, @'setCurrentDirectory' dir@ changes the current directory of the calling process to /dir/. The operation may fail with: * 'HardwareFault' A physical I\/O error has ...
870
getCurrentDirectory = do Win32.getCurrentDirectory {- |If the operating system has a notion of current directories, @'setCurrentDirectory' dir@ changes the current directory of the calling process to /dir/. The operation may fail with: * 'HardwareFault' A physical I\/O error has occurred. @[EIO]@ * 'InvalidArgume...
835
false
true
0
7
123
20
10
10
null
null
phischu/pem-images
src/GUI.hs
bsd-3-clause
-- | Create a button to save the program. createSaveProgramButton :: Frame () -> Output Request -> IO (Button ()) createSaveProgramButton parentFrame saveProgramO = button parentFrame attributes where attributes = [text := "Save", on command := sendSaveProgramRequest] sendSaveProgramRequest = do maybeFi...
696
createSaveProgramButton :: Frame () -> Output Request -> IO (Button ()) createSaveProgramButton parentFrame saveProgramO = button parentFrame attributes where attributes = [text := "Save", on command := sendSaveProgramRequest] sendSaveProgramRequest = do maybeFilepath <- fileSaveDialog paren...
654
createSaveProgramButton parentFrame saveProgramO = button parentFrame attributes where attributes = [text := "Save", on command := sendSaveProgramRequest] sendSaveProgramRequest = do maybeFilepath <- fileSaveDialog parentFrame True True "Save Image Queries" [("Image Query File",[...
582
true
true
0
20
185
174
83
91
null
null
Yukits/classyou
src/Classifier/LU.hs
mit
sublu :: Int -> [Double] ->[[Double]]-> ([Double], [Double]) -> ([Double], [Double]) sublu i [] _ (l, u) = (l,u)
112
sublu :: Int -> [Double] ->[[Double]]-> ([Double], [Double]) -> ([Double], [Double]) sublu i [] _ (l, u) = (l,u)
112
sublu i [] _ (l, u) = (l,u)
27
false
true
0
10
18
83
49
34
null
null
kejace/minimalbug
dist/build/autogen/Paths_minimalbug.hs
mit
getSysconfDir = catchIO (getEnv "minimalbug_sysconfdir") (\_ -> return sysconfdir)
82
getSysconfDir = catchIO (getEnv "minimalbug_sysconfdir") (\_ -> return sysconfdir)
82
getSysconfDir = catchIO (getEnv "minimalbug_sysconfdir") (\_ -> return sysconfdir)
82
false
false
0
8
8
28
14
14
null
null
muspellsson/hiccup
RToken.hs
lgpl-2.1
tryParsed :: BString -> TokResult tryParsed m = case runParse m of Left w -> Left $ "parse failed: " ++ w Right (r,rs) -> if B.null rs then Right (subCmdToCmds r) else Left ("incomplete parse: " ++ show rs)
250
tryParsed :: BString -> TokResult tryParsed m = case runParse m of Left w -> Left $ "parse failed: " ++ w Right (r,rs) -> if B.null rs then Right (subCmdToCmds r) else Left ("incomplete parse: " ++ show rs)
250
tryParsed m = case runParse m of Left w -> Left $ "parse failed: " ++ w Right (r,rs) -> if B.null rs then Right (subCmdToCmds r) else Left ("incomplete parse: " ++ show rs)
216
false
true
0
12
83
95
46
49
null
null
zaxtax/hakaru
commands/Hakaru.hs
bsd-3-clause
main :: IO () main = do args <- getArgs g <- MWC.createSystemRandom progs <- mapM readFromFile args case progs of [prog1, prog2] -> randomWalk' g prog1 prog2 [prog] -> runHakaru' g prog _ -> IO.hPutStrLn stderr "Usage: hakaru <file>\n\ ...
397
main :: IO () main = do args <- getArgs g <- MWC.createSystemRandom progs <- mapM readFromFile args case progs of [prog1, prog2] -> randomWalk' g prog1 prog2 [prog] -> runHakaru' g prog _ -> IO.hPutStrLn stderr "Usage: hakaru <file>\n\ ...
397
main = do args <- getArgs g <- MWC.createSystemRandom progs <- mapM readFromFile args case progs of [prog1, prog2] -> randomWalk' g prog1 prog2 [prog] -> runHakaru' g prog _ -> IO.hPutStrLn stderr "Usage: hakaru <file>\n\ ...
383
false
true
0
11
156
97
46
51
null
null
kawamuray/ganeti
src/Ganeti/Locking/Locks.hs
gpl-2.0
lockLevelFromName "nodegroup" = return LevelNodeGroup
53
lockLevelFromName "nodegroup" = return LevelNodeGroup
53
lockLevelFromName "nodegroup" = return LevelNodeGroup
53
false
false
1
5
4
16
5
11
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
button2recv :: Pattern Int -> ControlPattern button2recv busid = pI "^button2" busid
84
button2recv :: Pattern Int -> ControlPattern button2recv busid = pI "^button2" busid
84
button2recv busid = pI "^button2" busid
39
false
true
0
7
11
33
13
20
null
null
facebookincubator/duckling
Duckling/Time/EL/Rules.hs
bsd-3-clause
ruleInduringThePartofday :: Rule ruleInduringThePartofday = Rule { name = "in|during the <part-of-day>" , pattern = [ regex "κατά τη διάρκεια του|(μέσα )?σ?το" , Predicate isAPartOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
309
ruleInduringThePartofday :: Rule ruleInduringThePartofday = Rule { name = "in|during the <part-of-day>" , pattern = [ regex "κατά τη διάρκεια του|(μέσα )?σ?το" , Predicate isAPartOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
309
ruleInduringThePartofday = Rule { name = "in|during the <part-of-day>" , pattern = [ regex "κατά τη διάρκεια του|(μέσα )?σ?το" , Predicate isAPartOfDay ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ notLatent td _ -> Nothing }
276
false
true
0
15
77
91
48
43
null
null
mariefarrell/Hets
OMDoc/XmlInterface.hs
gpl-2.0
xmlIn :: XmlParseable a => a -> IO (Result OMDoc) xmlIn s = do res <- parseXml s return $ case res of Right e -> fromXml e >>= maybe (fail "xmlIn") return Left msg -> fail msg
203
xmlIn :: XmlParseable a => a -> IO (Result OMDoc) xmlIn s = do res <- parseXml s return $ case res of Right e -> fromXml e >>= maybe (fail "xmlIn") return Left msg -> fail msg
203
xmlIn s = do res <- parseXml s return $ case res of Right e -> fromXml e >>= maybe (fail "xmlIn") return Left msg -> fail msg
153
false
true
0
14
65
94
42
52
null
null
jkarni/bobkonf
src/Main.hs
bsd-3-clause
-- }}} --}}}------------------------------------------------------------------------- -- As a type {{{-------------------------------------------------------------- ------------------------------------------------------------------------------ -- Implication {{{---------------------------------------------------------...
444
safeDiv :: (c `Implies` (Not (Equals 0))) => Integer -> Validated c Integer -> Integer safeDiv n d = n `div` getVal d
119
safeDiv n d = n `div` getVal d
30
true
true
0
12
38
77
40
37
null
null
jthornber/language-c-ejt
test-framework/Language/C/Test/Environment.hs
bsd-3-clause
-- | Takes a list of additional environment variable descriptions, and produces a document providing help -- on the influental environment variables. envHelpDoc :: [(String, (String, Maybe String ))] -> Doc envHelpDoc addEnvHelp = text "Influental environment variables:" $+$ (nest 4 . vcat . map varInfo) (envHe...
572
envHelpDoc :: [(String, (String, Maybe String ))] -> Doc envHelpDoc addEnvHelp = text "Influental environment variables:" $+$ (nest 4 . vcat . map varInfo) (envHelp ++ addEnvHelp) where varInfo (var, (descr, def)) = text var $$ nest 30 (prettyDescr descr def) prettyDescr descr def = text descr <> pretty...
420
envHelpDoc addEnvHelp = text "Influental environment variables:" $+$ (nest 4 . vcat . map varInfo) (envHelp ++ addEnvHelp) where varInfo (var, (descr, def)) = text var $$ nest 30 (prettyDescr descr def) prettyDescr descr def = text descr <> prettyDef def prettyDef Nothing = empty prettyDef (Just...
363
true
true
0
10
115
169
86
83
null
null
emwap/feldspar-language
src/Feldspar/Core/Frontend/Mutable.hs
bsd-3-clause
when :: Data Bool -> M () -> M () when = sugarSymC Feature.When
63
when :: Data Bool -> M () -> M () when = sugarSymC Feature.When
63
when = sugarSymC Feature.When
29
false
true
0
8
13
37
17
20
null
null
mstksg/hledger
hledger-lib/Hledger/Utils/String.hs
gpl-3.0
padtop :: Int -> String -> String padtop h s = intercalate "\n" xpadded where ls = lines s sh = length ls sw | null ls = 0 | otherwise = maximum $ map length ls ypadded = replicate (difforzero h sh) "" ++ ls xpadded = map (padleft sw) ypadded -- | Convert a multi-line string ...
382
padtop :: Int -> String -> String padtop h s = intercalate "\n" xpadded where ls = lines s sh = length ls sw | null ls = 0 | otherwise = maximum $ map length ls ypadded = replicate (difforzero h sh) "" ++ ls xpadded = map (padleft sw) ypadded -- | Convert a multi-line string ...
382
padtop h s = intercalate "\n" xpadded where ls = lines s sh = length ls sw | null ls = 0 | otherwise = maximum $ map length ls ypadded = replicate (difforzero h sh) "" ++ ls xpadded = map (padleft sw) ypadded -- | Convert a multi-line string to a rectangular string bottom-pad...
348
false
true
3
8
110
123
58
65
null
null
elieux/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | Test whether a 'GeneralFlag' is set gopt :: GeneralFlag -> DynFlags -> Bool gopt f dflags = fromEnum f `IntSet.member` generalFlags dflags
144
gopt :: GeneralFlag -> DynFlags -> Bool gopt f dflags = fromEnum f `IntSet.member` generalFlags dflags
103
gopt f dflags = fromEnum f `IntSet.member` generalFlags dflags
63
true
true
0
6
24
39
20
19
null
null
dmjio/miso
src/Miso/Html/Element.hs
bsd-3-clause
-- | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details details_ :: [Attribute action] -> [View action] -> View action details_ = nodeHtml "details"
163
details_ :: [Attribute action] -> [View action] -> View action details_ = nodeHtml "details"
92
details_ = nodeHtml "details"
29
true
true
0
9
16
44
20
24
null
null
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeEngineDefaultClusterParameters.hs
mpl-2.0
-- | The name of the DB cluster parameter group family to return engine -- parameter information for. dedcpDBParameterGroupFamily :: Lens' DescribeEngineDefaultClusterParameters Text dedcpDBParameterGroupFamily = lens _dedcpDBParameterGroupFamily (\ s a -> s{_dedcpDBParameterGroupFamily = a})
293
dedcpDBParameterGroupFamily :: Lens' DescribeEngineDefaultClusterParameters Text dedcpDBParameterGroupFamily = lens _dedcpDBParameterGroupFamily (\ s a -> s{_dedcpDBParameterGroupFamily = a})
191
dedcpDBParameterGroupFamily = lens _dedcpDBParameterGroupFamily (\ s a -> s{_dedcpDBParameterGroupFamily = a})
110
true
true
0
9
33
41
23
18
null
null
tidalcycles/Tidal
src/Sound/Tidal/UI.hs
gpl-3.0
rolled :: Pattern a -> Pattern a rolled = rolledBy (1/4)
56
rolled :: Pattern a -> Pattern a rolled = rolledBy (1/4)
56
rolled = rolledBy (1/4)
23
false
true
0
7
10
36
16
20
null
null
endJunction/settleDyn
src/BulletFFI.hs
gpl-3.0
plCreateConvexRigidBody :: Real a => [Triple a] -> IO PlRigidBodyHandle plCreateConvexRigidBody ps = do ch <- plNewConvexHullShape Foreign.nullPtr 0 0 mapM_ (plAddVertex ch) ps plSetScaling ch (1-0.04, 1-0.04, 1-0.04 :: CFloat) -- New rigid body with given mass and shape. plCreateRigidBody Foreign.n...
331
plCreateConvexRigidBody :: Real a => [Triple a] -> IO PlRigidBodyHandle plCreateConvexRigidBody ps = do ch <- plNewConvexHullShape Foreign.nullPtr 0 0 mapM_ (plAddVertex ch) ps plSetScaling ch (1-0.04, 1-0.04, 1-0.04 :: CFloat) -- New rigid body with given mass and shape. plCreateRigidBody Foreign.n...
331
plCreateConvexRigidBody ps = do ch <- plNewConvexHullShape Foreign.nullPtr 0 0 mapM_ (plAddVertex ch) ps plSetScaling ch (1-0.04, 1-0.04, 1-0.04 :: CFloat) -- New rigid body with given mass and shape. plCreateRigidBody Foreign.nullPtr 1 ch
259
false
true
0
10
63
114
53
61
null
null
aquatir/remember_java_api
code-sample-haskell/typed_fp_basics_cource/02_function_in_haskell/code.hs
mit
lastElem (_:xs) = lastElem xs
29
lastElem (_:xs) = lastElem xs
29
lastElem (_:xs) = lastElem xs
29
false
false
0
7
4
19
9
10
null
null
tomahawkins/acl2
Language/ACL2.hs
bsd-2-clause
implies :: Expr -> Expr -> Expr implies = bin "implies"
55
implies :: Expr -> Expr -> Expr implies = bin "implies"
55
implies = bin "implies"
23
false
true
0
8
10
29
12
17
null
null
Ertruby/PPFinalProject
src/Sprockell/System.hs
gpl-2.0
memDevice :: IODevice memDevice mem (addr, ReadReq) = return (mem, Just (mem !!! addr))
94
memDevice :: IODevice memDevice mem (addr, ReadReq) = return (mem, Just (mem !!! addr))
94
memDevice mem (addr, ReadReq) = return (mem, Just (mem !!! addr))
72
false
true
1
9
20
46
22
24
null
null
ezyang/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
startPhase "bc" = LlvmLlc
31
startPhase "bc" = LlvmLlc
31
startPhase "bc" = LlvmLlc
31
false
false
0
5
9
9
4
5
null
null
rwbarton/rw
Crawl/Equipment.hs
bsd-3-clause
baseEVP ARM_ICE_DRAGON_ARMOUR = 3
33
baseEVP ARM_ICE_DRAGON_ARMOUR = 3
33
baseEVP ARM_ICE_DRAGON_ARMOUR = 3
33
false
false
0
5
3
9
4
5
null
null
nevrenato/HetsAlloy
Maude/Sentence.hs
gpl-2.0
-- * Testing -- | True iff the given 'Sentence' is a 'Rule'. isRule :: Sentence -> Bool isRule sent = case sent of Rule _ -> True _ -> False
149
isRule :: Sentence -> Bool isRule sent = case sent of Rule _ -> True _ -> False
87
isRule sent = case sent of Rule _ -> True _ -> False
60
true
true
3
5
39
37
20
17
null
null
hbrouwer/pdrt-sandbox
src/Data/PDRS/LambdaCalculus.hs
apache-2.0
--------------------------------------------------------------------------- -- ** Purifying PVars --------------------------------------------------------------------------- --------------------------------------------------------------------------- -- | Replaces duplicate uses of projection variables by new variables...
1,079
purifyPVars :: (PDRS,[PVar]) -> PDRS -> (PDRS,[PVar]) purifyPVars (lp@(LambdaPDRS _),pvs) _ = (lp,pvs)
103
purifyPVars (lp@(LambdaPDRS _),pvs) _ = (lp,pvs)
49
true
true
1
12
144
90
57
33
null
null
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateLayer.hs
mpl-2.0
-- | For custom layers only, use this parameter to specify the layer\'s short -- name, which is used internally by AWS OpsWorksand by Chef. The short -- name is also used as the name for the directory where your app files are -- installed. It can have a maximum of 200 characters and must be in the -- following format: ...
646
ulShortname :: Lens' UpdateLayer (Maybe Text) ulShortname = lens _ulShortname (\ s a -> s{_ulShortname = a})
108
ulShortname = lens _ulShortname (\ s a -> s{_ulShortname = a})
62
true
true
0
9
100
54
33
21
null
null
brendanhay/gogol
gogol-composer/gen/Network/Google/Composer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Empty' with the minimum fields required to make a request. -- empty :: Empty empty = Empty'
120
empty :: Empty empty = Empty'
33
empty = Empty'
14
true
true
0
6
26
20
9
11
null
null
dmjio/miso
src/Miso/Svg/Attribute.hs
bsd-3-clause
-- | <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointsAtZ> pointsAtZ_ :: MisoString -> Attribute action pointsAtZ_ = attr "pointsAtZ"
151
pointsAtZ_ :: MisoString -> Attribute action pointsAtZ_ = attr "pointsAtZ"
75
pointsAtZ_ = attr "pointsAtZ"
29
true
true
0
6
13
22
11
11
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Types/Dictionaries.hs
bsd-3-clause
makeDictionary :: RInstance SpecType -> (Symbol, M.HashMap Symbol SpecType) makeDictionary (RI c t xts) = (makeDictionaryName c t, M.fromList (mapFst val <$> xts))
163
makeDictionary :: RInstance SpecType -> (Symbol, M.HashMap Symbol SpecType) makeDictionary (RI c t xts) = (makeDictionaryName c t, M.fromList (mapFst val <$> xts))
163
makeDictionary (RI c t xts) = (makeDictionaryName c t, M.fromList (mapFst val <$> xts))
87
false
true
0
9
22
74
36
38
null
null
imccoy/utopia
src/Lam.hs
mit
record :: [T.Text] -> Typeish Identity record = Record . fmap pure
66
record :: [T.Text] -> Typeish Identity record = Record . fmap pure
66
record = Record . fmap pure
27
false
true
1
8
11
37
16
21
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
isSpecial '\8217' = True
24
isSpecial '\8217' = True
24
isSpecial '\8217' = True
24
false
false
1
5
3
13
4
9
null
null
randen/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
lookupRn :: Name -> RnM DocName lookupRn name = do lkp <- getLookupRn case lkp name of (False,maps_to) -> do outRn name; return maps_to (True, maps_to) -> return maps_to
181
lookupRn :: Name -> RnM DocName lookupRn name = do lkp <- getLookupRn case lkp name of (False,maps_to) -> do outRn name; return maps_to (True, maps_to) -> return maps_to
181
lookupRn name = do lkp <- getLookupRn case lkp name of (False,maps_to) -> do outRn name; return maps_to (True, maps_to) -> return maps_to
149
false
true
0
13
40
83
38
45
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
mONAD = mkBaseModule (fsLit "Control.Monad")
54
mONAD = mkBaseModule (fsLit "Control.Monad")
54
mONAD = mkBaseModule (fsLit "Control.Monad")
54
false
false
1
7
14
18
7
11
null
null
travisrobinson/coursera-specializations
data-structures-and-algorithms/algorithmic-toolbox/week-2/week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.hs
cc0-1.0
-- by Kirill Elagin fibonacci_sum_naive :: Integer -> Int fibonacci_sum_naive = helper (0, 1, 0) where helper (_, _, s) 0 = s `mod` 10 helper (a, b, s) i = helper (b, a + b, s + b) (i - 1)
199
fibonacci_sum_naive :: Integer -> Int fibonacci_sum_naive = helper (0, 1, 0) where helper (_, _, s) 0 = s `mod` 10 helper (a, b, s) i = helper (b, a + b, s + b) (i - 1)
178
fibonacci_sum_naive = helper (0, 1, 0) where helper (_, _, s) 0 = s `mod` 10 helper (a, b, s) i = helper (b, a + b, s + b) (i - 1)
140
true
true
1
8
52
103
59
44
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/System/Guarded.hs
gpl-3.0
isConjunction :: Guarded s c v -> Bool isConjunction (GConj _) = True
70
isConjunction :: Guarded s c v -> Bool isConjunction (GConj _) = True
70
isConjunction (GConj _) = True
31
false
true
0
9
13
37
16
21
null
null
adamwalker/orientation
hs_sources/Graphics/Orientation.hs
bsd-3-clause
parseObj :: [String] -> ([GLfloat], [GLfloat]) parseObj lines = (concat verts, concat norms) where (verts, norms) = unzip faces vertices = toMap $ map parse3Coord $ map (drop 2) $ filter (command "v") lines texCoords = toMap $ map parse2Coord $ map (drop 3) $ filter (command "vt") lines normals ...
1,223
parseObj :: [String] -> ([GLfloat], [GLfloat]) parseObj lines = (concat verts, concat norms) where (verts, norms) = unzip faces vertices = toMap $ map parse3Coord $ map (drop 2) $ filter (command "v") lines texCoords = toMap $ map parse2Coord $ map (drop 3) $ filter (command "vt") lines normals ...
1,223
parseObj lines = (concat verts, concat norms) where (verts, norms) = unzip faces vertices = toMap $ map parse3Coord $ map (drop 2) $ filter (command "v") lines texCoords = toMap $ map parse2Coord $ map (drop 3) $ filter (command "vt") lines normals = toMap $ map parse3Coord $ map (drop 3) $ filt...
1,176
false
true
0
11
370
533
273
260
null
null
noamz/linlam-gos
src/Scott1980.hs
mit
isIdempotent :: ULT -> Bool isIdempotent t = beta (compose t t) t
65
isIdempotent :: ULT -> Bool isIdempotent t = beta (compose t t) t
65
isIdempotent t = beta (compose t t) t
37
false
true
0
7
12
37
16
21
null
null
siddhanathan/ghc
testsuite/tests/programs/jtod_circint/LogFun.hs
bsd-3-clause
tt_inv = (1,0)
16
tt_inv = (1,0)
16
tt_inv = (1,0)
16
false
false
0
5
4
12
7
5
null
null
krakrjak/ImplicitCAD
tests/ParserSpec/Util.hs
agpl-3.0
append = fapp "++"
18
append = fapp "++"
18
append = fapp "++"
18
false
false
0
5
3
9
4
5
null
null