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
ideas-edu/ideas
src/Ideas/Common/Traversal/Navigator.hs
apache-2.0
leftMost = fixp left
21
leftMost = fixp left
21
leftMost = fixp left
21
false
false
0
5
4
9
4
5
null
null
corajr/cataskell
src/Cataskell/Game.hs
bsd-3-clause
otherPlayers :: (RandomGen g) => GameStateReturning g (Map.Map PlayerIndex Player) otherPlayers = do current <- use currentPlayer uses players (Map.filter ((/= current) . view playerIndex))
193
otherPlayers :: (RandomGen g) => GameStateReturning g (Map.Map PlayerIndex Player) otherPlayers = do current <- use currentPlayer uses players (Map.filter ((/= current) . view playerIndex))
193
otherPlayers = do current <- use currentPlayer uses players (Map.filter ((/= current) . view playerIndex))
110
false
true
0
12
28
75
37
38
null
null
worksap-ate/aws-sdk
Cloud/AWS/RDS/DBSecurityGroup.hs
bsd-3-clause
dbSecurityGroupSink :: (MonadThrow m, Applicative m) => XmlElement -> m DBSecurityGroup dbSecurityGroupSink xml = DBSecurityGroup <$> elements "EC2SecurityGroup" (\xml' -> EC2SecurityGroup <$> xml' .< "Status" <*> xml' .< "EC2SecurityGroupOwnerId" <*> xml' .< "EC2SecurityGrou...
635
dbSecurityGroupSink :: (MonadThrow m, Applicative m) => XmlElement -> m DBSecurityGroup dbSecurityGroupSink xml = DBSecurityGroup <$> elements "EC2SecurityGroup" (\xml' -> EC2SecurityGroup <$> xml' .< "Status" <*> xml' .< "EC2SecurityGroupOwnerId" <*> xml' .< "EC2SecurityGrou...
635
dbSecurityGroupSink xml = DBSecurityGroup <$> elements "EC2SecurityGroup" (\xml' -> EC2SecurityGroup <$> xml' .< "Status" <*> xml' .< "EC2SecurityGroupOwnerId" <*> xml' .< "EC2SecurityGroupName" <*> xml' .< "EC2SecurityGroupId" ) xml <*> xml .< "DBSecurityGroupDes...
539
false
true
0
25
182
154
78
76
null
null
janschulz/pandoc
src/Text/Pandoc/Writers/Texinfo.hs
gpl-2.0
tableRowToTexinfo :: [Alignment] -> [[Block]] -> State WriterState Doc tableRowToTexinfo = tableAnyRowToTexinfo "@item "
156
tableRowToTexinfo :: [Alignment] -> [[Block]] -> State WriterState Doc tableRowToTexinfo = tableAnyRowToTexinfo "@item "
156
tableRowToTexinfo = tableAnyRowToTexinfo "@item "
49
false
true
0
8
49
36
19
17
null
null
phi16/MiyuLib
Send.hs
gpl-3.0
main :: IO () main = do args <- getArgs s <- postMiyu $ fromString $ concat $ intersperse " " args putStr s
114
main :: IO () main = do args <- getArgs s <- postMiyu $ fromString $ concat $ intersperse " " args putStr s
114
main = do args <- getArgs s <- postMiyu $ fromString $ concat $ intersperse " " args putStr s
100
false
true
1
11
30
57
24
33
null
null
tingtun/language-guess
Language/Guess.hs
bsd-3-clause
clean ∷ String → String clean (x:y:xs) | isWhite x && isWhite y = clean (' ':xs) | isPunctuation y || isNumber y = clean (x:' ':xs) | isUpper y = clean (x:toLower y:xs) | otherwise = x:clean (y:xs) where isWhite x = isSpace x || isSeparator x
264
clean ∷ String → String clean (x:y:xs) | isWhite x && isWhite y = clean (' ':xs) | isPunctuation y || isNumber y = clean (x:' ':xs) | isUpper y = clean (x:toLower y:xs) | otherwise = x:clean (y:xs) where isWhite x = isSpace x || isSeparator x
264
clean (x:y:xs) | isWhite x && isWhite y = clean (' ':xs) | isPunctuation y || isNumber y = clean (x:' ':xs) | isUpper y = clean (x:toLower y:xs) | otherwise = x:clean (y:xs) where isWhite x = isSpace x || isSeparator x
240
false
true
2
9
69
158
75
83
null
null
matthewleon/libmpd-haskell
src/Network/MPD/Applicative/CurrentPlaylist.hs
mit
prio :: Priority -> (Position, Position) -> Command () prio p range = Command emptyResponse ["prio" <@> p <++> range]
117
prio :: Priority -> (Position, Position) -> Command () prio p range = Command emptyResponse ["prio" <@> p <++> range]
117
prio p range = Command emptyResponse ["prio" <@> p <++> range]
62
false
true
0
8
19
51
26
25
null
null
Taneb/humblr
src/Web/Tumblr.hs
bsd-3-clause
tumblrOAuth :: -- | The Tumblr API key ByteString -> -- | The Tumblr API secret to use ByteString -> OAuth tumblrOAuth key secret = newOAuth { oauthServerName = "tumblr", oauthRequestUri = "https://www.tumblr.com/oauth/request_token", oauthAccessTokenUri = "https://www.tumblr.com/oauth/acces...
468
tumblrOAuth :: -- | The Tumblr API key ByteString -> -- | The Tumblr API secret to use ByteString -> OAuth tumblrOAuth key secret = newOAuth { oauthServerName = "tumblr", oauthRequestUri = "https://www.tumblr.com/oauth/request_token", oauthAccessTokenUri = "https://www.tumblr.com/oauth/acces...
468
tumblrOAuth key secret = newOAuth { oauthServerName = "tumblr", oauthRequestUri = "https://www.tumblr.com/oauth/request_token", oauthAccessTokenUri = "https://www.tumblr.com/oauth/access_token", oauthAuthorizeUri = "https://www.tumblr.com/oauth/authorize", oauthConsumerKey = key, oau...
351
false
true
0
8
95
73
41
32
null
null
svalaskevicius/nested-sets
src/lib/Data/NestedSet.hs
gpl-3.0
isNestedSetsPositionParent :: Position -> Position -> Bool isNestedSetsPositionParent (parentL, parentR) (childL, childR) = parentL < childL && parentR > childR
160
isNestedSetsPositionParent :: Position -> Position -> Bool isNestedSetsPositionParent (parentL, parentR) (childL, childR) = parentL < childL && parentR > childR
160
isNestedSetsPositionParent (parentL, parentR) (childL, childR) = parentL < childL && parentR > childR
101
false
true
0
7
19
48
26
22
null
null
grwlf/scrooge
Scrooge/Base.hs
gpl-3.0
value (Money v _) = v
21
value (Money v _) = v
21
value (Money v _) = v
21
false
false
0
7
5
17
8
9
null
null
eckyputrady/haskell-scotty-realworld-example-app
src/Misc/Client.hs
mit
updateArticle :: (RW r m) => Token -> Slug -> UpdateArticle -> m (Either (Err ArticleError) Article) updateArticle token slug arg = runExceptT $ do url <- buildUrl $ "/articles/" <> unpack slug let opts = defaults & authHeader token let body = Aeson.toJSON $ ArticleWrapper arg articleWrapperArticle <$> exec (pu...
340
updateArticle :: (RW r m) => Token -> Slug -> UpdateArticle -> m (Either (Err ArticleError) Article) updateArticle token slug arg = runExceptT $ do url <- buildUrl $ "/articles/" <> unpack slug let opts = defaults & authHeader token let body = Aeson.toJSON $ ArticleWrapper arg articleWrapperArticle <$> exec (pu...
340
updateArticle token slug arg = runExceptT $ do url <- buildUrl $ "/articles/" <> unpack slug let opts = defaults & authHeader token let body = Aeson.toJSON $ ArticleWrapper arg articleWrapperArticle <$> exec (putWith opts url body)
239
false
true
0
13
61
140
64
76
null
null
ssaavedra/liquidhaskell
tests/neg/AbsApp.hs
bsd-3-clause
{-@ type Neg = Int<{\x -> x < 0}> @-} {-@ three :: Neg @-} three = id2 3
73
three = id2 3
13
three = id2 3
13
true
false
1
5
19
15
6
9
null
null
thlorenz/WebToInk
webtoink-converter/Data/List/Utils.hs
bsd-2-clause
grab :: Int -> State [a] [a] grab count = do g <- get (x, g') <- return $ splitAt count g put g' return x {- | Similar to Data.List.elemIndex. Instead of looking for one element in a list, this function looks for the first occurance of a sublist in the list, and returns the index of the first...
744
grab :: Int -> State [a] [a] grab count = do g <- get (x, g') <- return $ splitAt count g put g' return x {- | Similar to Data.List.elemIndex. Instead of looking for one element in a list, this function looks for the first occurance of a sublist in the list, and returns the index of the first...
744
grab count = do g <- get (x, g') <- return $ splitAt count g put g' return x {- | Similar to Data.List.elemIndex. Instead of looking for one element in a list, this function looks for the first occurance of a sublist in the list, and returns the index of the first element of that occurance. ...
715
false
true
0
10
170
76
35
41
null
null
phischu/fragnix
tests/packages/scotty/Data.Binary.Builder.hs
bsd-3-clause
-- | Write a Word32 in little endian format putWord32le :: Word32 -> Builder putWord32le = B.word32LE
101
putWord32le :: Word32 -> Builder putWord32le = B.word32LE
57
putWord32le = B.word32LE
24
true
true
0
5
16
18
10
8
null
null
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Types/Environments.hs
bsd-3-clause
-- | Functions for Global Binder Environment insertBindEnv :: Symbol -> SortedReft -> BindEnv -> (BindId, BindEnv) insertBindEnv x r (BE n m) = (n, BE (n + 1) (M.insert n (x, r) m))
181
insertBindEnv :: Symbol -> SortedReft -> BindEnv -> (BindId, BindEnv) insertBindEnv x r (BE n m) = (n, BE (n + 1) (M.insert n (x, r) m))
136
insertBindEnv x r (BE n m) = (n, BE (n + 1) (M.insert n (x, r) m))
66
true
true
0
9
33
81
44
37
null
null
HaskellForCats/HaskellForCats
cooking/Main.hs
mit
-- Counts the number of words per line in a file -- Does not crash if file is missing. main :: IO () main = do args <- getArgs let fileName = case args of (a:_) -> a _ -> "input.txt" exists <- doesFileExist fileName input2 <- if exists then readFile fileName else return "" input <-...
434
main :: IO () main = do args <- getArgs let fileName = case args of (a:_) -> a _ -> "input.txt" exists <- doesFileExist fileName input2 <- if exists then readFile fileName else return "" input <- catch (readFile fileName) $ \err -> print (err::SomeException) >> return ""...
347
main = do args <- getArgs let fileName = case args of (a:_) -> a _ -> "input.txt" exists <- doesFileExist fileName input2 <- if exists then readFile fileName else return "" input <- catch (readFile fileName) $ \err -> print (err::SomeException) >> return "" print $ cou...
333
true
true
0
14
122
139
67
72
null
null
fiigii/control-flow
LabeledAst.hs
mit
labelOf (Bool _ l) = l
22
labelOf (Bool _ l) = l
22
labelOf (Bool _ l) = l
22
false
false
0
6
5
18
8
10
null
null
Bodigrim/arithmoi
Math/NumberTheory/Utils/Hyperbola.hs
mit
initBresenham :: Int -> Int -> Bresenham initBresenham n x = Bresenham x beta gamma delta1 epsilon where beta = n `quot` x epsilon = n `rem` x delta1 = n `quot` (x - 1) - beta gamma = beta - (x - 1) * delta1 -- | bresenham(x+1) -> bresenham(x) for x >= (2n)^1/3
286
initBresenham :: Int -> Int -> Bresenham initBresenham n x = Bresenham x beta gamma delta1 epsilon where beta = n `quot` x epsilon = n `rem` x delta1 = n `quot` (x - 1) - beta gamma = beta - (x - 1) * delta1 -- | bresenham(x+1) -> bresenham(x) for x >= (2n)^1/3
286
initBresenham n x = Bresenham x beta gamma delta1 epsilon where beta = n `quot` x epsilon = n `rem` x delta1 = n `quot` (x - 1) - beta gamma = beta - (x - 1) * delta1 -- | bresenham(x+1) -> bresenham(x) for x >= (2n)^1/3
245
false
true
4
8
79
131
61
70
null
null
valis/hoq
src/TypeChecking/Definitions/Termination.hs
gpl-2.0
checkTerm _ _ = GT
18
checkTerm _ _ = GT
18
checkTerm _ _ = GT
18
false
false
1
5
4
12
5
7
null
null
sopvop/cabal
Cabal/Distribution/Types/HookedBuildInfo.hs
bsd-3-clause
emptyHookedBuildInfo :: HookedBuildInfo emptyHookedBuildInfo = (Nothing, [])
76
emptyHookedBuildInfo :: HookedBuildInfo emptyHookedBuildInfo = (Nothing, [])
76
emptyHookedBuildInfo = (Nothing, [])
36
false
true
0
6
6
19
11
8
null
null
baldo/lambdacat
LambdaCat/CmdArgs.hs
bsd-3-clause
-- | This value specifies how the command line arguments should be parsed by -- the CmdArgs package and what help texts should be displayed. cmdArgs :: CmdArgs cmdArgs = CmdArgs { recompile = def &= explicit &= name "recompile" &= help "Recompile your config file and qui...
1,206
cmdArgs :: CmdArgs cmdArgs = CmdArgs { recompile = def &= explicit &= name "recompile" &= help "Recompile your config file and quit" , ouris = def &= explicit &= name "u" &= name "uri" &= typ "URI" ...
1,065
cmdArgs = CmdArgs { recompile = def &= explicit &= name "recompile" &= help "Recompile your config file and quit" , ouris = def &= explicit &= name "u" &= name "uri" &= typ "URI" &= help ...
1,046
true
true
0
13
508
164
83
81
null
null
ekmett/ermine
src/Ermine/Parser/Term.hs
bsd-2-clause
declClauses :: (Monad m, TokenParsing m) => m [Either TyDecl (Text, PBody)] declClauses = semiSep $ (Left <$> typeDecl) <|> (Right <$> termDeclClause)
150
declClauses :: (Monad m, TokenParsing m) => m [Either TyDecl (Text, PBody)] declClauses = semiSep $ (Left <$> typeDecl) <|> (Right <$> termDeclClause)
150
declClauses = semiSep $ (Left <$> typeDecl) <|> (Right <$> termDeclClause)
74
false
true
0
9
22
65
35
30
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT17.hs
gpl-3.0
half :: Nat -> Nat half Z = Z
29
half :: Nat -> Nat half Z = Z
29
half Z = Z
10
false
true
0
7
8
24
10
14
null
null
kaoskorobase/freesound
src/Sound/Freesound/Search/Filter.hs
bsd-2-clause
username :: Text -> Filters username = fromFilter . F_username
62
username :: Text -> Filters username = fromFilter . F_username
62
username = fromFilter . F_username
34
false
true
1
7
9
27
11
16
null
null
ant0nsc/bond
compiler/src/Language/Bond/Parser.hs
mit
userSymbol :: Parser (Either TypeParam (Declaration, [Type])) userSymbol = do name <- qualifiedName params <- asks currentParams case find (isParam name) params of Just param -> return $ Left param Nothing -> do decl <- findSymbol name args <- option [] (angles $ comm...
985
userSymbol :: Parser (Either TypeParam (Declaration, [Type])) userSymbol = do name <- qualifiedName params <- asks currentParams case find (isParam name) params of Just param -> return $ Left param Nothing -> do decl <- findSymbol name args <- option [] (angles $ comm...
985
userSymbol = do name <- qualifiedName params <- asks currentParams case find (isParam name) params of Just param -> return $ Left param Nothing -> do decl <- findSymbol name args <- option [] (angles $ commaSep1 arg) if length args /= paramsCount decl then...
923
false
true
3
19
392
292
138
154
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | Creates a value of 'FlexTemplateRuntimeEnvironment' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ftreSdkContainerImage' -- -- * 'ftreMaxNumWorkers' -- -- * 'ftreDiskSizeGb' -- -- * 'ftreNumWorkers' -- -- * 'ftreEnableStreaming...
1,577
flexTemplateRuntimeEnvironment :: FlexTemplateRuntimeEnvironment flexTemplateRuntimeEnvironment = FlexTemplateRuntimeEnvironment' { _ftreSdkContainerImage = Nothing , _ftreMaxNumWorkers = Nothing , _ftreDiskSizeGb = Nothing , _ftreNumWorkers = Nothing , _ftreEnableStreamingEngine = Nothing ...
838
flexTemplateRuntimeEnvironment = FlexTemplateRuntimeEnvironment' { _ftreSdkContainerImage = Nothing , _ftreMaxNumWorkers = Nothing , _ftreDiskSizeGb = Nothing , _ftreNumWorkers = Nothing , _ftreEnableStreamingEngine = Nothing , _ftreFlexrsGoal = Nothing , _ftreNetwork = Nothing , _ftre...
769
true
true
0
6
286
176
130
46
null
null
Baranowski/SourceGraph
Main.hs
gpl-3.0
putErrLn :: String -> IO () putErrLn = hPutStrLn stderr
55
putErrLn :: String -> IO () putErrLn = hPutStrLn stderr
55
putErrLn = hPutStrLn stderr
27
false
true
0
8
9
29
12
17
null
null
capitanbatata/sandbox
scrapping-expressions-boilerplate/src/Lib.hs
gpl-3.0
substBExpr substMap (Act aExp) = Act aExp' where aExp' = subst substMap aExp -- rename :: Map String String -> Expr -> Expr -- rename substMap e@(Var name) = maybe e Var $ Map.lookup name substMap -- rename _ v@(Val _) = v -- One possible solution is to add a type parameter to `BExpr`: -- -- > d...
487
substBExpr substMap (Act aExp) = Act aExp' where aExp' = subst substMap aExp -- rename :: Map String String -> Expr -> Expr -- rename substMap e@(Var name) = maybe e Var $ Map.lookup name substMap -- rename _ v@(Val _) = v -- One possible solution is to add a type parameter to `BExpr`: -- -- > d...
487
substBExpr substMap (Act aExp) = Act aExp' where aExp' = subst substMap aExp -- rename :: Map String String -> Expr -> Expr -- rename substMap e@(Var name) = maybe e Var $ Map.lookup name substMap -- rename _ v@(Val _) = v -- One possible solution is to add a type parameter to `BExpr`: -- -- > d...
487
false
false
0
7
117
44
27
17
null
null
BlackBrane/quantum-random-numbers
src-lib/Quantum/Random/Store.hs
mit
-- | Update the target store size setting in the settings file. setTargetStoreSize :: Int -> IO () setTargetStoreSize n = updateTarSize n <$> getSettings >>= putSettings
169
setTargetStoreSize :: Int -> IO () setTargetStoreSize n = updateTarSize n <$> getSettings >>= putSettings
105
setTargetStoreSize n = updateTarSize n <$> getSettings >>= putSettings
70
true
true
0
8
26
40
18
22
null
null
afcowie/vaultaire
lib/Vaultaire/Writer.hs
bsd-3-clause
appendExtended :: MonadState BatchState m => Epoch -> Bucket -> Address -> TimeStamp -> Word64 -> ByteString -> m () appendExtended epoch bucket (Address address) (TimeStamp time) len string = do s <- get -- First we write to the simple bucket, inserting a closure that will -- return a build...
1,744
appendExtended :: MonadState BatchState m => Epoch -> Bucket -> Address -> TimeStamp -> Word64 -> ByteString -> m () appendExtended epoch bucket (Address address) (TimeStamp time) len string = do s <- get -- First we write to the simple bucket, inserting a closure that will -- return a build...
1,744
appendExtended epoch bucket (Address address) (TimeStamp time) len string = do s <- get -- First we write to the simple bucket, inserting a closure that will -- return a builder given an offset of the extended bucket write. let pending_map = HashMap.lookupDefault HashMap.empty epoch (pending s) --...
1,612
false
true
0
16
387
397
198
199
null
null
cnc-patch/disass
src/Language/Assembly/X86/Parse.hs
bsd-3-clause
xmmregs = ["xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"]
74
xmmregs = ["xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"]
74
xmmregs = ["xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"]
74
false
false
0
5
9
30
19
11
null
null
mcschroeder/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env, subst1) (Rec prs) = (tidy_env2, Rec prs') where prs' = [ tidyTopPair dflags show_unfold tidy_env2 caf_info name' (id,rhs) | (id,rhs) <- prs, let (name',show_unfold) = expectJust "tidyTop...
1,012
tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env, subst1) (Rec prs) = (tidy_env2, Rec prs') where prs' = [ tidyTopPair dflags show_unfold tidy_env2 caf_info name' (id,rhs) | (id,rhs) <- prs, let (name',show_unfold) = expectJust "tidyTop...
1,012
tidyTopBind dflags this_pkg this_mod cvt_integer unfold_env (occ_env, subst1) (Rec prs) = (tidy_env2, Rec prs') where prs' = [ tidyTopPair dflags show_unfold tidy_env2 caf_info name' (id,rhs) | (id,rhs) <- prs, let (name',show_unfold) = expectJust "tidyTop...
1,012
false
false
0
14
350
234
124
110
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | [Output Only] Server-defined URL for this resource. mtalSelfLink :: Lens' MachineTypeAggregatedList (Maybe Text) mtalSelfLink = lens _mtalSelfLink (\ s a -> s{_mtalSelfLink = a})
185
mtalSelfLink :: Lens' MachineTypeAggregatedList (Maybe Text) mtalSelfLink = lens _mtalSelfLink (\ s a -> s{_mtalSelfLink = a})
128
mtalSelfLink = lens _mtalSelfLink (\ s a -> s{_mtalSelfLink = a})
67
true
true
1
9
27
52
25
27
null
null
mariefarrell/Hets
DFOL/Tests/Test_Analysis_DFOL.hs
gpl-2.0
t6 = Pi [([mTok], Sort)] $ Pi [([xTok], Sort)] $ Univ $ Appl mat [Identifier mTok, Identifier xTok]
99
t6 = Pi [([mTok], Sort)] $ Pi [([xTok], Sort)] $ Univ $ Appl mat [Identifier mTok, Identifier xTok]
99
t6 = Pi [([mTok], Sort)] $ Pi [([xTok], Sort)] $ Univ $ Appl mat [Identifier mTok, Identifier xTok]
99
false
false
1
11
17
68
35
33
null
null
lexml/lexml-linker
src/main/haskell/LexML/Linker/LexerPrim.hs
gpl-2.0
paragrafo :: Action paragrafo = Just . const Paragrafo
54
paragrafo :: Action paragrafo = Just . const Paragrafo
54
paragrafo = Just . const Paragrafo
34
false
true
1
6
8
25
10
15
null
null
JacquesCarette/literate-scientific-software
code/drasil-docLang/Drasil/DocLang/SRS.hs
bsd-2-clause
likeChgLabel = makeSecRef "LCs" "Likely Changes"
54
likeChgLabel = makeSecRef "LCs" "Likely Changes"
54
likeChgLabel = makeSecRef "LCs" "Likely Changes"
54
false
false
0
5
11
11
5
6
null
null
forsyde/forsyde-shallow
src/ForSyDe/Shallow/MoC/Synchronous/Lib.hs
bsd-3-clause
unzip5SY :: Signal (a,b,c,d,e) -> (Signal a,Signal b,Signal c,Signal d,Signal e) unzip5SY NullS = (NullS, NullS, NullS, NullS,NullS)
159
unzip5SY :: Signal (a,b,c,d,e) -> (Signal a,Signal b,Signal c,Signal d,Signal e) unzip5SY NullS = (NullS, NullS, NullS, NullS,NullS)
159
unzip5SY NullS = (NullS, NullS, NullS, NullS,NullS)
68
false
true
0
7
44
81
45
36
null
null
phischu/fragnix
app/Show.hs
bsd-3-clause
symbolToString :: Symbol -> String symbolToString s = symbolModuleToString (symbolModule s) ++ ": " ++ symbolNameToString (symbolName s)
136
symbolToString :: Symbol -> String symbolToString s = symbolModuleToString (symbolModule s) ++ ": " ++ symbolNameToString (symbolName s)
136
symbolToString s = symbolModuleToString (symbolModule s) ++ ": " ++ symbolNameToString (symbolName s)
101
false
true
0
9
17
44
21
23
null
null
ulricha/dsh
src/Database/DSH/VSL/Opt/Properties/TopDown.hs
bsd-3-clause
inferChildProperties :: Ordish r e => NodeMap BottomUpProps -> D.AlgebraDag (VSLOp r e) -> AlgNode -> State InferenceState () inferChildProperties buPropMap d n = do ownProps <- lookupProps n case D.operator n d of Nulla...
1,399
inferChildProperties :: Ordish r e => NodeMap BottomUpProps -> D.AlgebraDag (VSLOp r e) -> AlgNode -> State InferenceState () inferChildProperties buPropMap d n = do ownProps <- lookupProps n case D.operator n d of Nulla...
1,399
inferChildProperties buPropMap d n = do ownProps <- lookupProps n case D.operator n d of NullaryOp _ -> return () UnOp op c -> do cp <- lookupProps c let buProps = lookupUnsafe buPropMap "TopDown.infer" c let cp' = checkError n [cp] d $ inferUnOp buProps ownPr...
1,189
false
true
0
17
562
419
189
230
null
null
Zigazou/deadlink
src/Network/URI/Text.hs
gpl-3.0
isGenDelims :: Char -> Bool isGenDelims c = c `telem` ":/?#[]@"
63
isGenDelims :: Char -> Bool isGenDelims c = c `telem` ":/?#[]@"
63
isGenDelims c = c `telem` ":/?#[]@"
35
false
true
0
7
10
32
15
17
null
null
UCSD-PL/RefScript
src/Language/Rsc/Parser/Lexer.hs
bsd-3-clause
jsLexer = T.makeTokenParser $ emptyDef { identStart = letter <|> oneOf "$_" , identLetter = alphaNum <|> oneOf "$_" }
165
jsLexer = T.makeTokenParser $ emptyDef { identStart = letter <|> oneOf "$_" , identLetter = alphaNum <|> oneOf "$_" }
165
jsLexer = T.makeTokenParser $ emptyDef { identStart = letter <|> oneOf "$_" , identLetter = alphaNum <|> oneOf "$_" }
165
false
false
0
9
67
40
21
19
null
null
yi-editor/yi
yi-core/src/Yi/Interact.hs
gpl-2.0
pushEvent Fail _ = Fail
23
pushEvent Fail _ = Fail
23
pushEvent Fail _ = Fail
23
false
false
0
5
4
11
5
6
null
null
jsavatgy/hatupist
hatupist-104.hs
gpl-2.0
drawKey x y letter selected dupl = do setLineWidth 1.0 let co = qwertyColor(qwertyLetter x y) botColor = if selected then white else black selColor = if dupl then gray else black case co of Just c -> drawRect (intToDouble (zentr xx)) (intToDouble (zentr yy)) ...
898
drawKey x y letter selected dupl = do setLineWidth 1.0 let co = qwertyColor(qwertyLetter x y) botColor = if selected then white else black selColor = if dupl then gray else black case co of Just c -> drawRect (intToDouble (zentr xx)) (intToDouble (zentr yy)) ...
898
drawKey x y letter selected dupl = do setLineWidth 1.0 let co = qwertyColor(qwertyLetter x y) botColor = if selected then white else black selColor = if dupl then gray else black case co of Just c -> drawRect (intToDouble (zentr xx)) (intToDouble (zentr yy)) ...
898
false
false
6
14
339
347
171
176
null
null
Gabriel439/Haskell-Dhall-Library
dhall/src/Dhall/Parser/Token.hs
bsd-3-clause
{-| Parse the @Text/show@ built-in This corresponds to the @Text-show@ rule from the official grammar -} _TextShow :: Parser () _TextShow = builtin "Text/show"
164
_TextShow :: Parser () _TextShow = builtin "Text/show"
54
_TextShow = builtin "Text/show"
31
true
true
0
7
28
26
11
15
null
null
sordina/Edn
Print.hs
mit
fromValue _ (E.Integer i) = decimal i
39
fromValue _ (E.Integer i) = decimal i
39
fromValue _ (E.Integer i) = decimal i
39
false
false
0
8
8
22
10
12
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Window.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Window.captureEvents Mozilla Window.captureEvents documentation> captureEvents :: (MonadDOM m) => Window -> m () captureEvents self = liftDOM (void (self ^. jsf "captureEvents" ()))
239
captureEvents :: (MonadDOM m) => Window -> m () captureEvents self = liftDOM (void (self ^. jsf "captureEvents" ()))
118
captureEvents self = liftDOM (void (self ^. jsf "captureEvents" ()))
70
true
true
0
11
27
56
28
28
null
null
beni55/lit
src/lit.hs
gpl-2.0
options :: [ OptDescr (Options -> IO Options) ] options = [ Option "h" ["html"] (NoArg (\opt -> return opt { optHtml = True })) "Generate html" , Option "m" ["markdown"] (NoArg (\opt -> return opt { optMarkdown = True })) "Generate markdown" , Option "c" ["code"] (NoAr...
1,427
options :: [ OptDescr (Options -> IO Options) ] options = [ Option "h" ["html"] (NoArg (\opt -> return opt { optHtml = True })) "Generate html" , Option "m" ["markdown"] (NoArg (\opt -> return opt { optMarkdown = True })) "Generate markdown" , Option "c" ["code"] (NoAr...
1,427
options = [ Option "h" ["html"] (NoArg (\opt -> return opt { optHtml = True })) "Generate html" , Option "m" ["markdown"] (NoArg (\opt -> return opt { optMarkdown = True })) "Generate markdown" , Option "c" ["code"] (NoArg (\opt -> return opt { optCode = True })) ...
1,379
false
true
0
16
534
430
225
205
null
null
greatest-ape/hs-bt-tracker
src/Web/BitTorrent/Tracker/Utils.hs
gpl-3.0
-- * Helpers for server state fields including STM TVars getConfigField :: (Config -> a) -> AppM a getConfigField f = f <$> asks _config
137
getConfigField :: (Config -> a) -> AppM a getConfigField f = f <$> asks _config
79
getConfigField f = f <$> asks _config
37
true
true
2
8
25
42
19
23
null
null
gcampax/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
maxSize s1@(SizeIs n1 _ _) s2@(SizeIs n2 _ _) | n1 ># n2 = s1 | otherwise = s2
125
maxSize s1@(SizeIs n1 _ _) s2@(SizeIs n2 _ _) | n1 ># n2 = s1 | otherwise = s2
125
maxSize s1@(SizeIs n1 _ _) s2@(SizeIs n2 _ _) | n1 ># n2 = s1 | otherwise = s2
125
false
false
0
8
65
60
27
33
null
null
mcschroeder/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkTopFunBind :: Origin -> Located Name -> [LMatch Name (LHsExpr Name)] -> HsBind Name -- In Name-land, with empty bind_fvs mkTopFunBind origin fn ms = FunBind { fun_id = fn , fun_matches = mkMatchGroupName origin ms , fun_co_fn = idHsW...
533
mkTopFunBind :: Origin -> Located Name -> [LMatch Name (LHsExpr Name)] -> HsBind Name mkTopFunBind origin fn ms = FunBind { fun_id = fn , fun_matches = mkMatchGroupName origin ms , fun_co_fn = idHsWrapper ...
496
mkTopFunBind origin fn ms = FunBind { fun_id = fn , fun_matches = mkMatchGroupName origin ms , fun_co_fn = idHsWrapper , bind_fvs = emptyNameSet -- NB: closed ...
397
true
true
0
11
276
92
51
41
null
null
mcschroeder/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
substIfaceType :: IfaceTySubst -> IfaceType -> IfaceType substIfaceType env ty = go ty where go (IfaceTyVar tv) = substIfaceTyVar env tv go (IfaceAppTy t1 t2) = IfaceAppTy (go t1) (go t2) go (IfaceFunTy t1 t2) = IfaceFunTy (go t1) (go t2) go (IfaceDFunTy t1 t2) = IfaceDFunTy (go ...
2,160
substIfaceType :: IfaceTySubst -> IfaceType -> IfaceType substIfaceType env ty = go ty where go (IfaceTyVar tv) = substIfaceTyVar env tv go (IfaceAppTy t1 t2) = IfaceAppTy (go t1) (go t2) go (IfaceFunTy t1 t2) = IfaceFunTy (go t1) (go t2) go (IfaceDFunTy t1 t2) = IfaceDFunTy (go ...
2,160
substIfaceType env ty = go ty where go (IfaceTyVar tv) = substIfaceTyVar env tv go (IfaceAppTy t1 t2) = IfaceAppTy (go t1) (go t2) go (IfaceFunTy t1 t2) = IfaceFunTy (go t1) (go t2) go (IfaceDFunTy t1 t2) = IfaceDFunTy (go t1) (go t2) go ty@(IfaceLitTy {}) = ty go (If...
2,103
false
true
3
8
563
929
431
498
null
null
nevrenato/HetsAlloy
CASL/Freeness.hs
gpl-2.0
{- | generates a formula of the form make(h(x)) =e= x, for gn_free_s given the SORT s -} make_hom_form :: SORT -> Named CASLFORMULA make_hom_form s = makeNamed ("ga_make_hom_" ++ show s) q_eq where free_s = mkFreeName s v = newVar free_s ot_hom = Op_type Partial [free_s] s nullRange ...
695
make_hom_form :: SORT -> Named CASLFORMULA make_hom_form s = makeNamed ("ga_make_hom_" ++ show s) q_eq where free_s = mkFreeName s v = newVar free_s ot_hom = Op_type Partial [free_s] s nullRange os_hom = mkQualOp homId ot_hom term_hom = mkAppl os_hom [v] ...
606
make_hom_form s = makeNamed ("ga_make_hom_" ++ show s) q_eq where free_s = mkFreeName s v = newVar free_s ot_hom = Op_type Partial [free_s] s nullRange os_hom = mkQualOp homId ot_hom term_hom = mkAppl os_hom [v] ot_mk = Op_type Total [s] free_s nullRange...
563
true
true
2
8
211
164
80
84
null
null
f-me/digestive-functors-heist
src/Text/Digestive/Heist.hs
bsd-3-clause
dfInputSelectGroup :: Monad m => View Text -> Splice m dfInputSelectGroup view = do (ref, attrs) <- getRefAttributes Nothing let ref' = absoluteRef ref view choices = fieldInputChoiceGroup ref view kids = map makeGroup choices value i = ref' `mappend` "." `mappend` i m...
862
dfInputSelectGroup :: Monad m => View Text -> Splice m dfInputSelectGroup view = do (ref, attrs) <- getRefAttributes Nothing let ref' = absoluteRef ref view choices = fieldInputChoiceGroup ref view kids = map makeGroup choices value i = ref' `mappend` "." `mappend` i m...
862
dfInputSelectGroup view = do (ref, attrs) <- getRefAttributes Nothing let ref' = absoluteRef ref view choices = fieldInputChoiceGroup ref view kids = map makeGroup choices value i = ref' `mappend` "." `mappend` i makeGroup (name, options) = X.Element "optgroup" ...
807
false
true
0
16
212
259
135
124
null
null
mgmillani/pictikz
src/Pictikz/Input/SVG.hs
gpl-3.0
mmFactor "cm" = 10
18
mmFactor "cm" = 10
18
mmFactor "cm" = 10
18
false
false
0
5
3
9
4
5
null
null
pepeiborra/yices
Main.hs
bsd-3-clause
nat = VarT "nat"
16
nat = VarT "nat"
16
nat = VarT "nat"
16
false
false
1
5
3
12
4
8
null
null
ptol/oczor
src/Oczor/Test/Tests.hs
mit
refreshc = refreshFile mc
25
refreshc = refreshFile mc
25
refreshc = refreshFile mc
25
false
false
0
5
3
9
4
5
null
null
gabrielPeart/VM.hs
src/VM/Core.hs
mit
runInstruction (Beq r1 r2 idx) cpu = branchIf (==) r1 r2 idx cpu
64
runInstruction (Beq r1 r2 idx) cpu = branchIf (==) r1 r2 idx cpu
64
runInstruction (Beq r1 r2 idx) cpu = branchIf (==) r1 r2 idx cpu
64
false
false
1
7
12
36
17
19
null
null
jtdaugherty/vty
test/VerifyLayersSpanGeneration.hs
bsd-3-clause
tests :: IO [Test] tests = return [ verify "a larger horiz span occludes a smaller span on a lower layer" largerHorizSpanOcclusion , verify "two rows stack vertical equiv to first image layered on top of second with padding (0)" vertStackLayerEquivalence0 , verify "two rows stack vertical eq...
966
tests :: IO [Test] tests = return [ verify "a larger horiz span occludes a smaller span on a lower layer" largerHorizSpanOcclusion , verify "two rows stack vertical equiv to first image layered on top of second with padding (0)" vertStackLayerEquivalence0 , verify "two rows stack vertical eq...
966
tests = return [ verify "a larger horiz span occludes a smaller span on a lower layer" largerHorizSpanOcclusion , verify "two rows stack vertical equiv to first image layered on top of second with padding (0)" vertStackLayerEquivalence0 , verify "two rows stack vertical equiv to first image ...
947
false
true
0
7
226
52
30
22
null
null
evancz/cli
src/Develop/StaticFiles.hs
bsd-3-clause
sansFont :: BS.ByteString sansFont = $(bsToExp =<< runIO (Build.readAsset "source-sans-pro.ttf"))
99
sansFont :: BS.ByteString sansFont = $(bsToExp =<< runIO (Build.readAsset "source-sans-pro.ttf"))
99
sansFont = $(bsToExp =<< runIO (Build.readAsset "source-sans-pro.ttf"))
73
false
true
0
11
11
32
16
16
null
null
leshchevds/ganeti
src/Ganeti/Query/Query.hs
bsd-2-clause
-- | Extracts all quoted strings from a list, ignoring the -- 'NumericValue' entries. getAllQuotedStrings :: [FilterValue] -> [String] getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid...
371
getAllQuotedStrings :: [FilterValue] -> [String] getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid set of names, or we -- have a more complex filter.
285
getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid set of names, or we -- have a more complex filter.
236
true
true
0
8
73
73
36
37
null
null
spechub/Hets
CASL/Logic_CASL.hs
gpl-2.0
trueC :: a -> b -> Bool trueC _ _ = True
40
trueC :: a -> b -> Bool trueC _ _ = True
40
trueC _ _ = True
16
false
true
0
6
11
24
12
12
null
null
aktowns/ftgl
Graphics/Rendering/FTGL.hs
bsd-2-clause
-- | Gets the global line spacing for the face. getFontLineHeight :: Font -> Float getFontLineHeight = realToFrac . fgetFontLineHeight
136
getFontLineHeight :: Font -> Float getFontLineHeight = realToFrac . fgetFontLineHeight
87
getFontLineHeight = realToFrac . fgetFontLineHeight
52
true
true
1
7
21
28
12
16
null
null
elginer/shpider
Network/Shpider.hs
mit
validContentType ct = or $ map ( \ htmlct -> ct =~ htmlct ) htmlContentTypes
120
validContentType ct = or $ map ( \ htmlct -> ct =~ htmlct ) htmlContentTypes
120
validContentType ct = or $ map ( \ htmlct -> ct =~ htmlct ) htmlContentTypes
120
false
false
3
7
58
36
15
21
null
null
hpacheco/HAAP
src/HAAP/Web/Hakyll.hs
mit
traceRoute :: Routes traceRoute = customRoute $ \iden -> trace ("traceRoute " ++ show iden) (toFilePath iden)
109
traceRoute :: Routes traceRoute = customRoute $ \iden -> trace ("traceRoute " ++ show iden) (toFilePath iden)
109
traceRoute = customRoute $ \iden -> trace ("traceRoute " ++ show iden) (toFilePath iden)
88
false
true
0
10
16
41
21
20
null
null
fredokun/piexplorer
src/Equiv.hs
gpl-3.0
initEquiv:: Set Name -> Equiv initEquiv ns = Set.fold finit emptyEquiv ns where finit:: Name -> Equiv -> Equiv finit n@(Static _) res = newName n res finit _ res = res
185
initEquiv:: Set Name -> Equiv initEquiv ns = Set.fold finit emptyEquiv ns where finit:: Name -> Equiv -> Equiv finit n@(Static _) res = newName n res finit _ res = res
185
initEquiv ns = Set.fold finit emptyEquiv ns where finit:: Name -> Equiv -> Equiv finit n@(Static _) res = newName n res finit _ res = res
155
false
true
2
8
49
95
41
54
null
null
MostAwesomeDude/lollerskates
Widget.hs
bsd-2-clause
coreStatsWidget :: CoreStats -> Widget coreStatsWidget cs = [whamlet| <ul> <li>Health: #{getL csHealth cs} <li>Mana: #{getL csMana cs} <li>Health Regen: #{getL csHealthRegen cs} <li>Mana Regen: #{getL csManaRegen cs} <li>AD: #{getL csAttackDamage cs} <li>Armor: #{getL csArmor cs} <li>MR: #{g...
466
coreStatsWidget :: CoreStats -> Widget coreStatsWidget cs = [whamlet| <ul> <li>Health: #{getL csHealth cs} <li>Mana: #{getL csMana cs} <li>Health Regen: #{getL csHealthRegen cs} <li>Mana Regen: #{getL csManaRegen cs} <li>AD: #{getL csAttackDamage cs} <li>Armor: #{getL csArmor cs} <li>MR: #{g...
466
coreStatsWidget cs = [whamlet| <ul> <li>Health: #{getL csHealth cs} <li>Mana: #{getL csMana cs} <li>Health Regen: #{getL csHealthRegen cs} <li>Mana Regen: #{getL csManaRegen cs} <li>AD: #{getL csAttackDamage cs} <li>Armor: #{getL csArmor cs} <li>MR: #{getL csMagicResist cs} <li>AS: #{get...
427
false
true
0
5
93
22
13
9
null
null
fpco/statistics
tests/Tests/ApproxEq.hs
bsd-2-clause
eqlv :: (ApproxEq [a], G.Vector v a) => Bounds [a] -> v a -> v a -> Property eqlv eps a b = eql eps (G.toList a) (G.toList b)
125
eqlv :: (ApproxEq [a], G.Vector v a) => Bounds [a] -> v a -> v a -> Property eqlv eps a b = eql eps (G.toList a) (G.toList b)
125
eqlv eps a b = eql eps (G.toList a) (G.toList b)
48
false
true
0
9
28
87
43
44
null
null
SKA-ScienceDataProcessor/RC
MS6/dna/flow/Flow/Kernel.hs
apache-2.0
-- | Kernel that not only works only on a single region of the output domain at -- a time, but also expects parameters to be single-region. This only -- works if we can meaningfully merge the parameters (as in 'reprMerge'). mergingKernel :: (DataRepr r, IsReprs rs, IsReprKern (ReprType r) rs) => String -> ...
1,789
mergingKernel :: (DataRepr r, IsReprs rs, IsReprKern (ReprType r) rs) => String -> rs -> r -> MergingKernelCode -> ReprKernFun (ReprType r) rs mergingKernel name parReprs retRep code = mappingKernel name parReprs retRep $ \pars reg -> do let merge :: (ReprI, RegionData) -> IO (Vector (), RegionBox) ...
1,565
mergingKernel name parReprs retRep code = mappingKernel name parReprs retRep $ \pars reg -> do let merge :: (ReprI, RegionData) -> IO (Vector (), RegionBox) merge (ReprI parR, par) -- Parameters with just a single region can be passed directly -- to the kernel | [(rbox, v)] <- Map.toList...
1,409
true
true
0
27
514
404
201
203
null
null
ezyang/ghc
compiler/cmm/CmmCommonBlockElim.hs
bsd-3-clause
eqMaybeWith :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool eqMaybeWith eltEq (Just e) (Just e') = eltEq e e'
111
eqMaybeWith :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool eqMaybeWith eltEq (Just e) (Just e') = eltEq e e'
111
eqMaybeWith eltEq (Just e) (Just e') = eltEq e e'
49
false
true
0
11
24
69
32
37
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
emptyImportAvails :: ImportAvails emptyImportAvails = ImportAvails { imp_mods = emptyModuleEnv, imp_dep_mods = emptyUFM, imp_dep_pkgs = [], imp_trust_pkgs = [], ...
468
emptyImportAvails :: ImportAvails emptyImportAvails = ImportAvails { imp_mods = emptyModuleEnv, imp_dep_mods = emptyUFM, imp_dep_pkgs = [], imp_trust_pkgs = [], ...
468
emptyImportAvails = ImportAvails { imp_mods = emptyModuleEnv, imp_dep_mods = emptyUFM, imp_dep_pkgs = [], imp_trust_pkgs = [], imp_trust_own_pkg = False, ...
434
false
true
0
7
275
63
39
24
null
null
brendanhay/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Patch.hs
mpl-2.0
-- | The resource name of the service account. Use one of the following -- formats: * \`projects\/{PROJECT_ID}\/serviceAccounts\/{EMAIL_ADDRESS}\` -- * \`projects\/{PROJECT_ID}\/serviceAccounts\/{UNIQUE_ID}\` As an -- alternative, you can use the \`-\` wildcard character instead of the -- project ID: * \`projects\/-\/s...
874
psapName :: Lens' ProjectsServiceAccountsPatch Text psapName = lens _psapName (\ s a -> s{_psapName = a})
105
psapName = lens _psapName (\ s a -> s{_psapName = a})
53
true
true
0
9
112
50
32
18
null
null
yliu120/K3
src/Language/K3/Utils/Pretty/Syntax.hs
apache-2.0
expr' (tag -> ETuple) = exprError "tuple"
54
expr' (tag -> ETuple) = exprError "tuple"
54
expr' (tag -> ETuple) = exprError "tuple"
54
false
false
0
7
19
19
9
10
null
null
bitemyapp/Lenses
src/Data/Examples.hs
bsd-3-clause
a_y :: (MonadState Triangle m) => StateT Float (StateT Point m) b -> m b a_y = pa . y
85
a_y :: (MonadState Triangle m) => StateT Float (StateT Point m) b -> m b a_y = pa . y
85
a_y = pa . y
12
false
true
1
10
19
55
25
30
null
null
droundy/franchise
Distribution/Franchise/StringSet.hs
bsd-3-clause
foreachS :: Monad m => (String -> m a) -> StringSet -> m [a] foreachS f = mapM f . toListS
90
foreachS :: Monad m => (String -> m a) -> StringSet -> m [a] foreachS f = mapM f . toListS
90
foreachS f = mapM f . toListS
29
false
true
0
9
20
52
25
27
null
null
recursion-ninja/megaparsec
Text/Megaparsec/Error.hs
bsd-2-clause
-- | Merge two error data structures into one joining their collections of -- message items and preferring the longest match. In other words, earlier -- error message is discarded. This may seem counter-intuitive, but -- 'mergeError' is only used to merge error messages of alternative branches -- of parsing and in this...
1,525
mergeError :: (Ord t, Ord e) => ParseError t e -> ParseError t e -> ParseError t e mergeError e1 e2 = case errorPos e1 `compare` errorPos e2 of LT -> e2 EQ -> case (e1, e2) of (TrivialError s1 u1 p1, TrivialError _ u2 p2) -> TrivialError s1 (n u1 u2) (E.union p1 p2) (Fanc...
1,163
mergeError e1 e2 = case errorPos e1 `compare` errorPos e2 of LT -> e2 EQ -> case (e1, e2) of (TrivialError s1 u1 p1, TrivialError _ u2 p2) -> TrivialError s1 (n u1 u2) (E.union p1 p2) (FancyError {}, TrivialError {}) -> e1 (TrivialError {}, FancyError {}) -> e2 ...
1,074
true
true
2
14
389
339
168
171
null
null
spechub/Hets
Temporal/ModalCaslToMu.hs
gpl-2.0
convert (Casl.A phi) = liftM Mu.A (convert' phi)
48
convert (Casl.A phi) = liftM Mu.A (convert' phi)
48
convert (Casl.A phi) = liftM Mu.A (convert' phi)
48
false
false
0
8
7
30
14
16
null
null
jacinabox/Indexing
Driveletters.hs
bsd-2-clause
driveLetters = do letters <- mapM (\letter -> liftM (\n -> (letter, n == 3)) (withTString letter getDriveType)) (map (:":\\") ['A'..'Z']) return $ map fst $ filter snd letters #else driveLetters = error "" #endif
219
driveLetters = do letters <- mapM (\letter -> liftM (\n -> (letter, n == 3)) (withTString letter getDriveType)) (map (:":\\") ['A'..'Z']) return $ map fst $ filter snd letters #else driveLetters = error "" #endif
219
driveLetters = do letters <- mapM (\letter -> liftM (\n -> (letter, n == 3)) (withTString letter getDriveType)) (map (:":\\") ['A'..'Z']) return $ map fst $ filter snd letters #else driveLetters = error "" #endif
219
false
false
0
15
41
94
49
45
null
null
psibi/yesod
yesod-core/test/YesodCoreTest/InternalRequest.hs
mit
respectQueryLang :: Bool respectQueryLang = reqLangs r == ["en-US", "en"] where r = parseWaiRequest' defaultRequest { queryString = [("_LANG", Just "en-US")] } mempty False 1000
179
respectQueryLang :: Bool respectQueryLang = reqLangs r == ["en-US", "en"] where r = parseWaiRequest' defaultRequest { queryString = [("_LANG", Just "en-US")] } mempty False 1000
179
respectQueryLang = reqLangs r == ["en-US", "en"] where r = parseWaiRequest' defaultRequest { queryString = [("_LANG", Just "en-US")] } mempty False 1000
154
false
true
0
12
26
66
34
32
null
null
dgonyeo/hydrazine
src/Hydrazine/Client/UI.hs
mit
drawColumns [x] = x
22
drawColumns [x] = x
22
drawColumns [x] = x
22
false
false
0
6
6
12
6
6
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
mpl-2.0
-- | The layer short name. lShortname :: Lens' Layer (Maybe Text) lShortname = lens _lShortname (\s a -> s { _lShortname = a })
127
lShortname :: Lens' Layer (Maybe Text) lShortname = lens _lShortname (\s a -> s { _lShortname = a })
100
lShortname = lens _lShortname (\s a -> s { _lShortname = a })
61
true
true
0
9
24
46
25
21
null
null
AndrewRademacher/stack
src/test/Stack/GhciSpec.hs
bsd-3-clause
textToLazy :: Text -> LBS.ByteString textToLazy = LBS.fromStrict . T.encodeUtf8
79
textToLazy :: Text -> LBS.ByteString textToLazy = LBS.fromStrict . T.encodeUtf8
79
textToLazy = LBS.fromStrict . T.encodeUtf8
42
false
true
0
8
9
32
14
18
null
null
sordina/Diagrams-AST
test/arrow_wallpaper.hs
bsd-3-clause
path = forwards ++ backwards
33
path = forwards ++ backwards
33
path = forwards ++ backwards
33
false
false
0
5
9
10
5
5
null
null
cordawyn/rdf4h
testsuite/tests/Data/RDF/GraphTestUtils.hs
bsd-3-clause
plainliterals :: [LValue] plainliterals = [plainLL lit lang | lit <- litvalues, lang <- languages]
98
plainliterals :: [LValue] plainliterals = [plainLL lit lang | lit <- litvalues, lang <- languages]
98
plainliterals = [plainLL lit lang | lit <- litvalues, lang <- languages]
72
false
true
0
7
14
38
20
18
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs
mpl-2.0
-- | True, if the seller has paused the deal unilaterally. dpsHasSellerPaused :: Lens' DealPauseStatus (Maybe Bool) dpsHasSellerPaused = lens _dpsHasSellerPaused (\ s a -> s{_dpsHasSellerPaused = a})
207
dpsHasSellerPaused :: Lens' DealPauseStatus (Maybe Bool) dpsHasSellerPaused = lens _dpsHasSellerPaused (\ s a -> s{_dpsHasSellerPaused = a})
148
dpsHasSellerPaused = lens _dpsHasSellerPaused (\ s a -> s{_dpsHasSellerPaused = a})
91
true
true
1
9
35
52
25
27
null
null
mino2357/Hello_Haskell
test001.hsproj/Main.hs
mit
fibo :: Integer -> Integer fibo n | n == 1 = 1 | n == 2 = 1 | n > 2 = fibo (n - 1) + fibo (n - 2) |otherwise = -1
128
fibo :: Integer -> Integer fibo n | n == 1 = 1 | n == 2 = 1 | n > 2 = fibo (n - 1) + fibo (n - 2) |otherwise = -1
128
fibo n | n == 1 = 1 | n == 2 = 1 | n > 2 = fibo (n - 1) + fibo (n - 2) |otherwise = -1
101
false
true
2
8
50
101
46
55
null
null
bkoropoff/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
getExps :: [PArg] -> [PTerm] getExps [] = []
44
getExps :: [PArg] -> [PTerm] getExps [] = []
44
getExps [] = []
15
false
true
0
6
8
28
15
13
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
typeable1ClassKey = mkPreludeClassUnique 21
49
typeable1ClassKey = mkPreludeClassUnique 21
49
typeable1ClassKey = mkPreludeClassUnique 21
49
false
false
0
5
9
9
4
5
null
null
jasonrbriggs/proton
haskell/src/Text/Proton/Xml.hs
apache-2.0
copyElement :: Element -> Element copyElement (Element elemtype s atts xs) = Element elemtype s atts (copyElements xs)
118
copyElement :: Element -> Element copyElement (Element elemtype s atts xs) = Element elemtype s atts (copyElements xs)
118
copyElement (Element elemtype s atts xs) = Element elemtype s atts (copyElements xs)
84
false
true
0
7
17
45
22
23
null
null
achirkin/ghcjs-webgl
src/JavaScript/WebGL/Const.hs
mit
gl_STENCIL_FAIL :: GLenum gl_STENCIL_FAIL = 0x0B94
50
gl_STENCIL_FAIL :: GLenum gl_STENCIL_FAIL = 0x0B94
50
gl_STENCIL_FAIL = 0x0B94
24
false
true
0
4
5
11
6
5
null
null
phadej/boolean-normal-forms
src/Data/Algebra/Boolean/NNF/Tree.hs
mit
nnfOr a b = NNFOr a b
38
nnfOr a b = NNFOr a b
38
nnfOr a b = NNFOr a b
38
false
false
1
5
23
20
7
13
null
null
haskell-distributed/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess.hs
bsd-3-clause
-- | Sets the default 'recvTimeoutPolicy', which gives up after 10k reads. defaultRecvTimeoutPolicy :: RecvTimeoutPolicy defaultRecvTimeoutPolicy = RecvMaxBacklog 10000
168
defaultRecvTimeoutPolicy :: RecvTimeoutPolicy defaultRecvTimeoutPolicy = RecvMaxBacklog 10000
93
defaultRecvTimeoutPolicy = RecvMaxBacklog 10000
47
true
true
0
5
18
15
8
7
null
null
phischu/fragnix
builtins/ghc-prim/GHC.PrimopWrappers.hs
bsd-3-clause
cosDouble# :: Double# -> Double# cosDouble# a1 = (GHC.Prim.cosDouble#) a1
73
cosDouble# :: Double# -> Double# cosDouble# a1 = (GHC.Prim.cosDouble#) a1
73
cosDouble# a1 = (GHC.Prim.cosDouble#) a1
40
false
true
0
7
9
27
14
13
null
null
geekingfrog/advent-of-code
src/Y2017/Day10.hs
bsd-3-clause
answer2 :: IO () answer2 = putStrLn $ knotHash input2
53
answer2 :: IO () answer2 = putStrLn $ knotHash input2
53
answer2 = putStrLn $ knotHash input2
36
false
true
2
7
9
29
12
17
null
null
sdiehl/ghc
libraries/base/Foreign/Marshal/Array.hs
bsd-3-clause
-- allocation -- ---------- -- |Allocate storage for the given number of elements of a storable type -- (like 'Foreign.Marshal.Alloc.malloc', but for multiple elements). -- mallocArray :: forall a . Storable a => Int -> IO (Ptr a) mallocArray size = mallocBytes (size * sizeOf (undefined :: a))
296
mallocArray :: forall a . Storable a => Int -> IO (Ptr a) mallocArray size = mallocBytes (size * sizeOf (undefined :: a))
122
mallocArray size = mallocBytes (size * sizeOf (undefined :: a))
64
true
true
0
10
49
63
34
29
null
null
rasendubi/arachne
src/Network/MQTT/Encoder.hs
bsd-3-clause
flagBits _ = 0
28
flagBits _ = 0
28
flagBits _ = 0
28
false
false
0
5
17
9
4
5
null
null
tensorflow/haskell
tensorflow-ops/tests/GradientTest.hs
apache-2.0
calculateGradWithShape :: TF.Tensor TF.Build Float -> TF.Tensor TF.Value Float -> SessionT IO ([V.Vector Float], [V.Vector Int32]) calculateGradWithShape y x = do gs <- TF.gradients y [x] xs <- TF.run gs (shapes :: [V.Vector Int32]) <- mapM (TF.run . TF.shape) gs return (xs, shapes)
291
calculateGradWithShape :: TF.Tensor TF.Build Float -> TF.Tensor TF.Value Float -> SessionT IO ([V.Vector Float], [V.Vector Int32]) calculateGradWithShape y x = do gs <- TF.gradients y [x] xs <- TF.run gs (shapes :: [V.Vector Int32]) <- mapM (TF.run . TF.shape) gs return (xs, shapes)
291
calculateGradWithShape y x = do gs <- TF.gradients y [x] xs <- TF.run gs (shapes :: [V.Vector Int32]) <- mapM (TF.run . TF.shape) gs return (xs, shapes)
160
false
true
0
12
50
148
72
76
null
null
dterei/Scraps
haskell/parsers/PApplicative.hs
bsd-3-clause
sat :: (Char -> Bool) -> Parser Char sat pred = P go where go [] = [] go (x:xs) | pred x = [(x,xs)] go (x:xs) = []
132
sat :: (Char -> Bool) -> Parser Char sat pred = P go where go [] = [] go (x:xs) | pred x = [(x,xs)] go (x:xs) = []
132
sat pred = P go where go [] = [] go (x:xs) | pred x = [(x,xs)] go (x:xs) = []
95
false
true
1
9
46
96
48
48
null
null
chris-kahn/polymorphcms
src/Utils.hs
bsd-3-clause
checkNewVersion :: Versioned a => a -> Maybe Int64 -> ResponseT a checkNewVersion entity mbGivenVer = case mbGivenVer of Nothing -> return entity Just version -> if getVersion entity > version then pure entity else throwError err304
264
checkNewVersion :: Versioned a => a -> Maybe Int64 -> ResponseT a checkNewVersion entity mbGivenVer = case mbGivenVer of Nothing -> return entity Just version -> if getVersion entity > version then pure entity else throwError err304
264
checkNewVersion entity mbGivenVer = case mbGivenVer of Nothing -> return entity Just version -> if getVersion entity > version then pure entity else throwError err304
198
false
true
2
8
68
81
37
44
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
mayHaveCafRefs _ = False
38
mayHaveCafRefs _ = False
38
mayHaveCafRefs _ = False
38
false
false
0
5
17
9
4
5
null
null
dfoxfranke/llvm-general-util
LLVM/General/Util/Module.hs
mit
moduleFromBitcodeFile :: IO.FilePath -> ModuleBuilder moduleFromBitcodeFile = MBBitcodeFile
92
moduleFromBitcodeFile :: IO.FilePath -> ModuleBuilder moduleFromBitcodeFile = MBBitcodeFile
92
moduleFromBitcodeFile = MBBitcodeFile
37
false
true
0
6
8
17
9
8
null
null