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
sjakobi/brick
src/Brick/Widgets/FileBrowser.hs
bsd-3-clause
renderFileInfo :: Bool -> Int -> Set.Set String -> n -> Bool -> FileInfo -> Widget n renderFileInfo foc maxLen selFiles n listSel info = (if foc then (if listSel then forceAttr listSelectedFocusedAttr else if sel then forceAttr fileBrowserSelectedAttr else id) else (if listSel then forceAtt...
1,028
renderFileInfo :: Bool -> Int -> Set.Set String -> n -> Bool -> FileInfo -> Widget n renderFileInfo foc maxLen selFiles n listSel info = (if foc then (if listSel then forceAttr listSelectedFocusedAttr else if sel then forceAttr fileBrowserSelectedAttr else id) else (if listSel then forceAtt...
1,028
renderFileInfo foc maxLen selFiles n listSel info = (if foc then (if listSel then forceAttr listSelectedFocusedAttr else if sel then forceAttr fileBrowserSelectedAttr else id) else (if listSel then forceAttr listSelectedAttr else if sel then forceAttr fileBrowserSelectedAttr ...
943
false
true
3
18
283
294
155
139
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Deque.hs
mit
emptyDQ :: Deque a emptyDQ = Deque []
40
emptyDQ :: Deque a emptyDQ = Deque []
40
emptyDQ = Deque []
21
false
true
0
6
10
19
9
10
null
null
gnn/Hets
Static/ToXml.hs
gpl-2.0
showSymbolsTh :: HetcatsOpts -> [String] -> String -> GlobalAnnos -> G_theory -> Element showSymbolsTh opts ins name ga th = case th of G_theory lid _ (ExtSign sig _) _ sens _ -> add_attrs [ mkAttr "logic" $ language_name lid , mkNameAttr name ] . unode "Ontology" $ [ unode "Symbols" . map (showSy...
465
showSymbolsTh :: HetcatsOpts -> [String] -> String -> GlobalAnnos -> G_theory -> Element showSymbolsTh opts ins name ga th = case th of G_theory lid _ (ExtSign sig _) _ sens _ -> add_attrs [ mkAttr "logic" $ language_name lid , mkNameAttr name ] . unode "Ontology" $ [ unode "Symbols" . map (showSy...
465
showSymbolsTh opts ins name ga th = case th of G_theory lid _ (ExtSign sig _) _ sens _ -> add_attrs [ mkAttr "logic" $ language_name lid , mkNameAttr name ] . unode "Ontology" $ [ unode "Symbols" . map (showSym lid) $ symlist_of lid sig , unode "Axioms" . map (showSen opts lid ga Nothing si...
376
false
true
11
12
112
183
89
94
null
null
romanb/amazonka
amazonka-cognito-sync/gen/Network/AWS/CognitoSync/ListIdentityPoolUsage.hs
mpl-2.0
-- | Usage information for the identity pools. lipurIdentityPoolUsages :: Lens' ListIdentityPoolUsageResponse [IdentityPoolUsage] lipurIdentityPoolUsages = lens _lipurIdentityPoolUsages (\s a -> s { _lipurIdentityPoolUsages = a }) . _List
250
lipurIdentityPoolUsages :: Lens' ListIdentityPoolUsageResponse [IdentityPoolUsage] lipurIdentityPoolUsages = lens _lipurIdentityPoolUsages (\s a -> s { _lipurIdentityPoolUsages = a }) . _List
203
lipurIdentityPoolUsages = lens _lipurIdentityPoolUsages (\s a -> s { _lipurIdentityPoolUsages = a }) . _List
120
true
true
0
10
39
47
26
21
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
toCIntRectH (Rect _x _y _w h) = toCInt h
41
toCIntRectH (Rect _x _y _w h) = toCInt h
41
toCIntRectH (Rect _x _y _w h) = toCInt h
41
false
false
0
7
9
24
11
13
null
null
nshaheed/EarTraining
earTrainer.hs
bsd-3-clause
buttonPress :: [(Float, Float)] -> (Float, Float) -> Maybe Int buttonPress x y = let z = buttonPressWorker x y in if z >= fromIntegral (length x) then Nothing else Just z
245
buttonPress :: [(Float, Float)] -> (Float, Float) -> Maybe Int buttonPress x y = let z = buttonPressWorker x y in if z >= fromIntegral (length x) then Nothing else Just z
245
buttonPress x y = let z = buttonPressWorker x y in if z >= fromIntegral (length x) then Nothing else Just z
178
false
true
0
11
106
82
42
40
null
null
gcampax/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- pprType prints forall's regardless of -fprint-explict-foralls -- which is what we want here, since we might be saying -- type variable 't' is bound by ... pprPatSkolInfo (PatSynCon ps) = sep [ ptext (sLit "a pattern with pattern synonym:") , nest 2 $ ppr ps <+> dcolon ...
360
pprPatSkolInfo (PatSynCon ps) = sep [ ptext (sLit "a pattern with pattern synonym:") , nest 2 $ ppr ps <+> dcolon <+> pprType (patSynType ps) <> comma ]
181
pprPatSkolInfo (PatSynCon ps) = sep [ ptext (sLit "a pattern with pattern synonym:") , nest 2 $ ppr ps <+> dcolon <+> pprType (patSynType ps) <> comma ]
181
true
false
0
11
104
67
33
34
null
null
futtetennista/IntroductionToFunctionalProgramming
RWH/src/ch19/ParseInt.hs
mit
satisfy :: (Char -> Bool) -> Parser Char satisfy p = do s <- liftP S.get case B.uncons s of Nothing -> E.throwError EndOfInput Just (c, s') | p c -> liftP (S.put s') >> return c | otherwise -> E.throwError (Chatty $ "invalid character: '" ++ B.unpack s ++ "'")
307
satisfy :: (Char -> Bool) -> Parser Char satisfy p = do s <- liftP S.get case B.uncons s of Nothing -> E.throwError EndOfInput Just (c, s') | p c -> liftP (S.put s') >> return c | otherwise -> E.throwError (Chatty $ "invalid character: '" ++ B.unpack s ++ "'")
307
satisfy p = do s <- liftP S.get case B.uncons s of Nothing -> E.throwError EndOfInput Just (c, s') | p c -> liftP (S.put s') >> return c | otherwise -> E.throwError (Chatty $ "invalid character: '" ++ B.unpack s ++ "'")
266
false
true
0
16
97
139
64
75
null
null
nushio3/ghc
compiler/types/Type.hs
bsd-3-clause
typeRepArity n ty = case repType ty of UnaryRep (ForAllTy bndr ty) -> length (flattenRepType (repType (binderType bndr))) + typeRepArity (n - 1) ty _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty, repType ty))
268
typeRepArity n ty = case repType ty of UnaryRep (ForAllTy bndr ty) -> length (flattenRepType (repType (binderType bndr))) + typeRepArity (n - 1) ty _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty, repType ty))
268
typeRepArity n ty = case repType ty of UnaryRep (ForAllTy bndr ty) -> length (flattenRepType (repType (binderType bndr))) + typeRepArity (n - 1) ty _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty, repType ty))
268
false
false
1
15
68
105
49
56
null
null
jcristovao/data-easy
src/Data/Easy.hs
bsd-3-clause
-- | Extracts the right value of an either to a singleton list, or an -- empty list if the Either value is a Left -- -- /Note/: A Left value is lost in the convertion. eitherToList :: Either a b -> [b] eitherToList = either (const []) singleton
244
eitherToList :: Either a b -> [b] eitherToList = either (const []) singleton
76
eitherToList = either (const []) singleton
42
true
true
0
8
48
40
22
18
null
null
Cognimeta/perdure
exe-src/Database/Perdure/TestPersistent.hs
apache-2.0
propPersister :: forall a. (Show a, Eq a) => Persister a -> a -> Property propPersister p a = morallyDubiousIOProperty $ return $ (== a) $ deserializeFromFullArray (unsafeSeqDeserializer p) $ fullArrayRange $ (id :: Id (PrimArray Pinned Word64)) $ serializeToArray p a
291
propPersister :: forall a. (Show a, Eq a) => Persister a -> a -> Property propPersister p a = morallyDubiousIOProperty $ return $ (== a) $ deserializeFromFullArray (unsafeSeqDeserializer p) $ fullArrayRange $ (id :: Id (PrimArray Pinned Word64)) $ serializeToArray p a
290
propPersister p a = morallyDubiousIOProperty $ return $ (== a) $ deserializeFromFullArray (unsafeSeqDeserializer p) $ fullArrayRange $ (id :: Id (PrimArray Pinned Word64)) $ serializeToArray p a
216
false
true
0
11
64
106
54
52
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
toListClassOpKey = mkPreludeMiscIdUnique 501
44
toListClassOpKey = mkPreludeMiscIdUnique 501
44
toListClassOpKey = mkPreludeMiscIdUnique 501
44
false
false
1
5
3
12
4
8
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | A list of valid abuse reasons that are used with \`video.ReportAbuse\`. varrlrItems :: Lens' VideoAbuseReportReasonListResponse [VideoAbuseReportReason] varrlrItems = lens _varrlrItems (\ s a -> s{_varrlrItems = a}) . _Default . _Coerce
255
varrlrItems :: Lens' VideoAbuseReportReasonListResponse [VideoAbuseReportReason] varrlrItems = lens _varrlrItems (\ s a -> s{_varrlrItems = a}) . _Default . _Coerce
178
varrlrItems = lens _varrlrItems (\ s a -> s{_varrlrItems = a}) . _Default . _Coerce
97
true
true
0
11
46
53
28
25
null
null
merijn/lambda-except
AST.hs
bsd-3-clause
instantiateNamed :: Monad f => (b -> a) -> Scope (Named b) f (Named a) -> f (Named a) instantiateNamed f = Bound.instantiate (pure . fmap f)
144
instantiateNamed :: Monad f => (b -> a) -> Scope (Named b) f (Named a) -> f (Named a) instantiateNamed f = Bound.instantiate (pure . fmap f)
144
instantiateNamed f = Bound.instantiate (pure . fmap f)
54
false
true
0
10
30
79
38
41
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsArrows.hs
bsd-3-clause
dsCmdDo :: DsCmdEnv -- arrow combinators -> IdSet -- set of local vars available to this statement -> Type -- return type of the statement -> [CmdLStmt Id] -- statements to desugar -> [Id] -- list of vars in the input to t...
627
dsCmdDo :: DsCmdEnv -- arrow combinators -> IdSet -- set of local vars available to this statement -> Type -- return type of the statement -> [CmdLStmt Id] -- statements to desugar -> [Id] -- list of vars in the input to t...
577
dsCmdDo _ _ _ [] _ = panic "dsCmdDo"
36
true
true
0
12
283
78
43
35
null
null
yeyan/xtag
src/Main.hs
lgpl-3.0
runScotty :: AppData -> XTagScottyM () -> IO () runScotty appData = do scottyT (appData ^. appConfig . port) initApp runM where runM :: ReaderT AppData IO a -> IO a runM m = runReaderT m appData initApp m = runM $ do appData <- ask let conn = appData ^. connecti...
611
runScotty :: AppData -> XTagScottyM () -> IO () runScotty appData = do scottyT (appData ^. appConfig . port) initApp runM where runM :: ReaderT AppData IO a -> IO a runM m = runReaderT m appData initApp m = runM $ do appData <- ask let conn = appData ^. connecti...
611
runScotty appData = do scottyT (appData ^. appConfig . port) initApp runM where runM :: ReaderT AppData IO a -> IO a runM m = runReaderT m appData initApp m = runM $ do appData <- ask let conn = appData ^. connection repos = appData ^. appConfig ...
563
false
true
4
11
231
215
93
122
null
null
olsner/ghc
compiler/utils/Platform.hs
bsd-3-clause
sElfTarget OSAndroid = True
30
osElfTarget OSAndroid = True
30
osElfTarget OSAndroid = True
30
false
false
0
5
6
9
4
5
null
null
burz/Feval
FVL/F.hs
mit
run :: Fix Expr -> Result run e = case run_typecheck e of Nothing -> InconsistentTypes Just t -> case run_eval e of Nothing -> TypeMismatch Just v -> Result (v, t)
187
run :: Fix Expr -> Result run e = case run_typecheck e of Nothing -> InconsistentTypes Just t -> case run_eval e of Nothing -> TypeMismatch Just v -> Result (v, t)
187
run e = case run_typecheck e of Nothing -> InconsistentTypes Just t -> case run_eval e of Nothing -> TypeMismatch Just v -> Result (v, t)
161
false
true
2
9
55
79
36
43
null
null
iatorm/grime
Matcher.hs
mit
-- Modify context anchors, increase logging depth withAnchors :: ([Rect] -> [Rect]) -> Matcher a -> Matcher a withAnchors f = local $ \con -> con{anchors = f $ anchors con, depth = depth con + 1}
195
withAnchors :: ([Rect] -> [Rect]) -> Matcher a -> Matcher a withAnchors f = local $ \con -> con{anchors = f $ anchors con, depth = depth con + 1}
145
withAnchors f = local $ \con -> con{anchors = f $ anchors con, depth = depth con + 1}
85
true
true
0
10
36
79
42
37
null
null
jstolarek/slicer
lib/Language/Slicer/Parser.hs
gpl-3.0
strWith = "with"
25
strWith = "with"
25
strWith = "with"
25
false
false
1
5
11
10
3
7
null
null
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/UserProFiles/GuardianInvitations/List.hs
mpl-2.0
-- | If specified, only results with the specified \`state\` values are -- returned. Otherwise, results with a \`state\` of \`PENDING\` are -- returned. upfgilStates :: Lens' UserProFilesGuardianInvitationsList [UserProFilesGuardianInvitationsListStates] upfgilStates = lens _upfgilStates (\ s a -> s{_upfgilStates = a...
355
upfgilStates :: Lens' UserProFilesGuardianInvitationsList [UserProFilesGuardianInvitationsListStates] upfgilStates = lens _upfgilStates (\ s a -> s{_upfgilStates = a}) . _Default . _Coerce
202
upfgilStates = lens _upfgilStates (\ s a -> s{_upfgilStates = a}) . _Default . _Coerce
100
true
true
3
8
57
61
30
31
null
null
snapframework/snap-templates
project_template/default/src/Site.hs
bsd-3-clause
handleLoginSubmit :: Handler App (AuthManager App) () handleLoginSubmit = loginUser "login" "password" Nothing (\_ -> handleLogin err) (redirect "/") where err = Just "Unknown user or password" ------------------------------------------------------------------------------ -- | Logs out and red...
354
handleLoginSubmit :: Handler App (AuthManager App) () handleLoginSubmit = loginUser "login" "password" Nothing (\_ -> handleLogin err) (redirect "/") where err = Just "Unknown user or password" ------------------------------------------------------------------------------ -- | Logs out and red...
354
handleLoginSubmit = loginUser "login" "password" Nothing (\_ -> handleLogin err) (redirect "/") where err = Just "Unknown user or password" ------------------------------------------------------------------------------ -- | Logs out and redirects the user to the site index.
300
false
true
0
8
65
67
34
33
null
null
charles-l/comp
build_me_a_scheme/scheme.hs
mit
writeProc [obj, Port port] = liftIO $ hPrint port obj >> (return $ Bool True)
77
writeProc [obj, Port port] = liftIO $ hPrint port obj >> (return $ Bool True)
77
writeProc [obj, Port port] = liftIO $ hPrint port obj >> (return $ Bool True)
77
false
false
0
8
14
42
20
22
null
null
Shou/Tombot
Tombot/Discord.hs
gpl-2.0
runDiscord :: TVar Tombot.Config -> IO () runDiscord configt = do setLocaleEncoding utf8 config <- atomically $ do putTMVar stateConfigt configt readTVar configt let apiPath = Tombot._confDirectory config </> "api" apiKeys <- Tombot.readConfig @_ @(Map Text String) apiPath let ma...
857
runDiscord :: TVar Tombot.Config -> IO () runDiscord configt = do setLocaleEncoding utf8 config <- atomically $ do putTMVar stateConfigt configt readTVar configt let apiPath = Tombot._confDirectory config </> "api" apiKeys <- Tombot.readConfig @_ @(Map Text String) apiPath let ma...
857
runDiscord configt = do setLocaleEncoding utf8 config <- atomically $ do putTMVar stateConfigt configt readTVar configt let apiPath = Tombot._confDirectory config </> "api" apiKeys <- Tombot.readConfig @_ @(Map Text String) apiPath let mayToken = join $ Map.lookup "discord-token"...
815
false
true
0
16
230
205
93
112
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_FOLDLEVELCONTRACTED :: Int wxSTC_FOLDLEVELCONTRACTED = 65536
66
wxSTC_FOLDLEVELCONTRACTED :: Int wxSTC_FOLDLEVELCONTRACTED = 65536
66
wxSTC_FOLDLEVELCONTRACTED = 65536
33
false
true
0
6
5
18
7
11
null
null
j-rock/strat
src/Game/Lib/Units/Instances.hs
mit
pacifist :: Attacks pacifist = Attack (const Nothing) Nothing
61
pacifist :: Attacks pacifist = Attack (const Nothing) Nothing
61
pacifist = Attack (const Nothing) Nothing
41
false
true
0
7
8
22
11
11
null
null
jprider63/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Type-specialized version of 'sendChunk' for strict @ByteString@s. -- -- @since 1.2.0 sendChunkBS :: Monad m => S.ByteString -> ConduitT i (Flush Builder) m () sendChunkBS = sendChunk
187
sendChunkBS :: Monad m => S.ByteString -> ConduitT i (Flush Builder) m () sendChunkBS = sendChunk
97
sendChunkBS = sendChunk
23
true
true
0
9
28
44
23
21
null
null
Melvar/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
getExps :: [PArg] -> [PTerm] getExps [] = []
44
getExps :: [PArg] -> [PTerm] getExps [] = []
44
getExps [] = []
15
false
true
0
8
8
34
16
18
null
null
ben-schulz/Idris-dev
src/IRTS/Simplified.hs
bsd-3-clause
simplify tl (DChkCase e alts) = do v <- sVar e alts' <- mapM (sAlt tl) alts case v of (x, Nothing) -> return (SChkCase x alts') (Glob x, Just e) -> ...
401
simplify tl (DChkCase e alts) = do v <- sVar e alts' <- mapM (sAlt tl) alts case v of (x, Nothing) -> return (SChkCase x alts') (Glob x, Just e) -> ...
401
simplify tl (DChkCase e alts) = do v <- sVar e alts' <- mapM (sAlt tl) alts case v of (x, Nothing) -> return (SChkCase x alts') (Glob x, Just e) -> ...
401
false
false
0
16
243
128
61
67
null
null
ghc-android/ghc
testsuite/tests/ghci.debugger/scripts/break014.hs
bsd-3-clause
g i = let a = False b = True c = (a,b) in c
63
g i = let a = False b = True c = (a,b) in c
63
g i = let a = False b = True c = (a,b) in c
63
false
false
1
9
34
40
19
21
null
null
brodyberg/LearnHaskell
Web/sqlitetest/Rosalind/2_DNAtoRNA/DnaToRna.hs
mit
swapT :: Char -> Char swapT 'T' = 'U'
37
swapT :: Char -> Char swapT 'T' = 'U'
37
swapT 'T' = 'U'
15
false
true
0
5
8
22
10
12
null
null
tlaitinen/receipts
backend/Handler/DB/Internal.hs
gpl-3.0
selectRestricted :: forall (m :: * -> *). (MonadLogger m, MonadIO m, MonadThrow m, MonadBaseControl IO m) => SqlPersistT m [RestrictedInstance] selectRestricted = do result_File <- select $ from $ \e -> do let _ = e ^. FileId return e result_UserGroup <- select $ from $ \e -> do...
992
selectRestricted :: forall (m :: * -> *). (MonadLogger m, MonadIO m, MonadThrow m, MonadBaseControl IO m) => SqlPersistT m [RestrictedInstance] selectRestricted = do result_File <- select $ from $ \e -> do let _ = e ^. FileId return e result_UserGroup <- select $ from $ \e -> do...
992
selectRestricted = do result_File <- select $ from $ \e -> do let _ = e ^. FileId return e result_UserGroup <- select $ from $ \e -> do let _ = e ^. UserGroupId return e result_User <- select $ from $ \e -> do let _ = e ^. UserId return e r...
837
false
true
0
15
323
313
148
165
null
null
codemiller/pirate-gold
src/Transform.hs
apache-2.0
translateWord x = x
19
translateWord x = x
19
translateWord x = x
19
false
false
0
5
3
9
4
5
null
null
DougBurke/swish
tests/N3FormatterTest.hs
lgpl-2.1
tx111 = arc b1 p1 o1
20
tx111 = arc b1 p1 o1
20
tx111 = arc b1 p1 o1
20
false
false
1
5
5
16
6
10
null
null
rodrigogribeiro/mptc
src/Iface/IfaceReader.hs
bsd-3-clause
operator = P.operator lexer
27
operator = P.operator lexer
27
operator = P.operator lexer
27
false
false
0
6
3
11
5
6
null
null
mcmaniac/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
getStatType (LMStaticArray _ t) = t
35
getStatType (LMStaticArray _ t) = t
35
getStatType (LMStaticArray _ t) = t
35
false
false
0
7
5
17
8
9
null
null
Fuuzetsu/stack
src/Stack/Fetch.hs
bsd-3-clause
lookupPackageIdentifierExact :: (StackMiniM env m, HasConfig env) => PackageIdentifier -> env -> PackageCaches -> m (Maybe ByteString) lookupPackageIdentifierExact ident env caches = case Map.lookup ident caches of Nothing -> return Nothing Just (index, cache) -> do [bs] <- fli...
845
lookupPackageIdentifierExact :: (StackMiniM env m, HasConfig env) => PackageIdentifier -> env -> PackageCaches -> m (Maybe ByteString) lookupPackageIdentifierExact ident env caches = case Map.lookup ident caches of Nothing -> return Nothing Just (index, cache) -> do [bs] <- fli...
845
lookupPackageIdentifierExact ident env caches = case Map.lookup ident caches of Nothing -> return Nothing Just (index, cache) -> do [bs] <- flip runReaderT env $ withCabalFiles (indexName index) [(ResolvedPackage { rpI...
700
false
true
0
18
327
186
95
91
null
null
bergmark/hlint
src/Hint/Match.hs
bsd-3-clause
dotVersion (fromApps -> xs) | length xs > 1 = first (apps (init xs) :) <$> dotVersion (fromParen $ last xs)
107
dotVersion (fromApps -> xs) | length xs > 1 = first (apps (init xs) :) <$> dotVersion (fromParen $ last xs)
107
dotVersion (fromApps -> xs) | length xs > 1 = first (apps (init xs) :) <$> dotVersion (fromParen $ last xs)
107
false
false
0
11
20
62
29
33
null
null
ezyang/ghc
compiler/coreSyn/PprCore.hs
bsd-3-clause
pprOptCo :: Coercion -> SDoc -- Print a coercion optionally; i.e. honouring -dsuppress-coercions pprOptCo co = sdocWithDynFlags $ \dflags -> if gopt Opt_SuppressCoercions dflags then angleBrackets (text "Co:" <> int (coercionSize co)) else parens (sep [ppr co, dcolon <+> ppr (c...
337
pprOptCo :: Coercion -> SDoc pprOptCo co = sdocWithDynFlags $ \dflags -> if gopt Opt_SuppressCoercions dflags then angleBrackets (text "Co:" <> int (coercionSize co)) else parens (sep [ppr co, dcolon <+> ppr (coercionType co)])
269
pprOptCo co = sdocWithDynFlags $ \dflags -> if gopt Opt_SuppressCoercions dflags then angleBrackets (text "Co:" <> int (coercionSize co)) else parens (sep [ppr co, dcolon <+> ppr (coercionType co)])
240
true
true
0
15
83
94
47
47
null
null
nevrenato/Hets_Fork
GMP/versioning/coloss-0.0.4/examples.coalition.hs
gpl-2.0
phi4 = (cbox [0, 1, 2] (cbox [3, 4, 5] p0)) --> (cbox [0 .. 5] p0)
66
phi4 = (cbox [0, 1, 2] (cbox [3, 4, 5] p0)) --> (cbox [0 .. 5] p0)
66
phi4 = (cbox [0, 1, 2] (cbox [3, 4, 5] p0)) --> (cbox [0 .. 5] p0)
66
false
false
0
10
16
58
33
25
null
null
Soostone/hs-d3
bench/Bench.hs
bsd-3-clause
phantomjs x = do let uri = fromMaybe undefined $ parseURI "http://127.0.0.1:1337" args = [ mkHeader HdrContentLength (show$ length x) , mkHeader HdrContentType "application/x-www-form-urlencoded" ] result <- E.try $ simpleHTTP (Request uri POST args x) >>= getResponseBody case result o...
439
phantomjs x = do let uri = fromMaybe undefined $ parseURI "http://127.0.0.1:1337" args = [ mkHeader HdrContentLength (show$ length x) , mkHeader HdrContentType "application/x-www-form-urlencoded" ] result <- E.try $ simpleHTTP (Request uri POST args x) >>= getResponseBody case result o...
439
phantomjs x = do let uri = fromMaybe undefined $ parseURI "http://127.0.0.1:1337" args = [ mkHeader HdrContentLength (show$ length x) , mkHeader HdrContentType "application/x-www-form-urlencoded" ] result <- E.try $ simpleHTTP (Request uri POST args x) >>= getResponseBody case result o...
439
false
false
1
15
127
142
63
79
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Build.hs
bsd-3-clause
initialBuildSteps :: FilePath -- ^"dist" prefix -> PackageDescription -- ^mostly information from the .cabal file -> LocalBuildInfo -- ^Configuration information -> Verbosity -- ^The verbosity to use -> IO () initialBuildSteps _distPref pkg_descr ...
777
initialBuildSteps :: FilePath -- ^"dist" prefix -> PackageDescription -- ^mostly information from the .cabal file -> LocalBuildInfo -- ^Configuration information -> Verbosity -- ^The verbosity to use -> IO () initialBuildSteps _distPref pkg_descr ...
777
initialBuildSteps _distPref pkg_descr lbi verbosity = do -- check that there's something to build unless (not . null $ allBuildInfo pkg_descr) $ do let name = display (packageId pkg_descr) die $ "No libraries, executables, tests, or benchmarks " ++ "are enabled for package " ++ name ++ "." createD...
495
false
true
0
15
197
136
66
70
null
null
szehk/Haskell-Carbonara-Library
src/Data/Carbonara/Writer.hs
bsd-3-clause
appendListToTuple :: FilePath -> IO () appendListToTuple path = mapM_ (\i -> appendFile path (composeListToTuple i)) [2..62]
124
appendListToTuple :: FilePath -> IO () appendListToTuple path = mapM_ (\i -> appendFile path (composeListToTuple i)) [2..62]
124
appendListToTuple path = mapM_ (\i -> appendFile path (composeListToTuple i)) [2..62]
85
false
true
0
10
16
52
26
26
null
null
wavewave/regstat
exe/regstat.hs
bsd-2-clause
main :: IO () main = do putStrLn "regstat" param <- cmdArgs mode commandLineProcess param
98
main :: IO () main = do putStrLn "regstat" param <- cmdArgs mode commandLineProcess param
97
main = do putStrLn "regstat" param <- cmdArgs mode commandLineProcess param
83
false
true
0
8
23
38
16
22
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma.hs
mit
-- Tyrosine geneticCode "UCA" = 'S'
35
geneticCode "UCA" = 'S'
23
geneticCode "UCA" = 'S'
23
true
false
0
5
5
10
5
5
null
null
haskell-tinc/hpack
src/Hpack/Render.hs
mit
renderPackage :: [String] -> Package -> String renderPackage oldCabalFile = renderPackageWith settings alignment formattingHintsFieldOrder formattingHintsSectionsFieldOrder where FormattingHints{..} = sniffFormattingHints oldCabalFile alignment = fromMaybe 16 formattingHintsAlignment settings = formatting...
339
renderPackage :: [String] -> Package -> String renderPackage oldCabalFile = renderPackageWith settings alignment formattingHintsFieldOrder formattingHintsSectionsFieldOrder where FormattingHints{..} = sniffFormattingHints oldCabalFile alignment = fromMaybe 16 formattingHintsAlignment settings = formatting...
339
renderPackage oldCabalFile = renderPackageWith settings alignment formattingHintsFieldOrder formattingHintsSectionsFieldOrder where FormattingHints{..} = sniffFormattingHints oldCabalFile alignment = fromMaybe 16 formattingHintsAlignment settings = formattingHintsRenderSettings
292
false
true
2
7
41
67
33
34
null
null
Pancia/loki-lang
src/Parser.hs
mit
parseArray :: Parser LokiVal parseArray = do s <- getState Array (newMeta s) <$> between (char '[' >> spacesInLiteral) (char ']') (manyTill (parseExpr1 <* spacesInLiteral) (lookA...
337
parseArray :: Parser LokiVal parseArray = do s <- getState Array (newMeta s) <$> between (char '[' >> spacesInLiteral) (char ']') (manyTill (parseExpr1 <* spacesInLiteral) (lookA...
337
parseArray = do s <- getState Array (newMeta s) <$> between (char '[' >> spacesInLiteral) (char ']') (manyTill (parseExpr1 <* spacesInLiteral) (lookAhead (char ']')))
308
false
true
0
15
169
93
43
50
null
null
randallalexander/LYAH
src/Ch7.hs
bsd-3-clause
chr1 = Char.chr 97
18
chr1 = Char.chr 97
18
chr1 = Char.chr 97
18
false
false
0
6
3
11
5
6
null
null
adbrowne/dynamodb-eventstore
dynamodb-eventstore-web/web/Main.hs
mit
runDynamoCloud' :: RuntimeEnvironment -> EventStore a -> IO (Either EventStoreError a) runDynamoCloud' runtimeEnvironment x = runResourceT $ runAWST runtimeEnvironment $ runExceptT $ x
219
runDynamoCloud' :: RuntimeEnvironment -> EventStore a -> IO (Either EventStoreError a) runDynamoCloud' runtimeEnvironment x = runResourceT $ runAWST runtimeEnvironment $ runExceptT $ x
219
runDynamoCloud' runtimeEnvironment x = runResourceT $ runAWST runtimeEnvironment $ runExceptT $ x
102
false
true
0
9
57
53
25
28
null
null
NICTA/sk-config
src/XMLWrapper.hs
bsd-2-clause
getElements :: Element -> String -> [Element] getElements root name = findElements (qname name) root
100
getElements :: Element -> String -> [Element] getElements root name = findElements (qname name) root
100
getElements root name = findElements (qname name) root
54
false
true
0
7
14
38
19
19
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | If the event is of type 'StartTimerFailed' then this member is set and provides -- detailed information about the event. It is not set for other event types. heStartTimerFailedEventAttributes :: Lens' HistoryEvent (Maybe StartTimerFailedEventAttributes) heStartTimerFailedEventAttributes = lens _heStartTimerFai...
401
heStartTimerFailedEventAttributes :: Lens' HistoryEvent (Maybe StartTimerFailedEventAttributes) heStartTimerFailedEventAttributes = lens _heStartTimerFailedEventAttributes (\s a -> s { _heStartTimerFailedEventAttributes = a })
238
heStartTimerFailedEventAttributes = lens _heStartTimerFailedEventAttributes (\s a -> s { _heStartTimerFailedEventAttributes = a })
142
true
true
0
9
60
47
26
21
null
null
sdiehl/ghc
ghc/Main.hs
bsd-3-clause
dumpFinalStats :: DynFlags -> IO () dumpFinalStats dflags = when (gopt Opt_D_faststring_stats dflags) $ dumpFastStringStats dflags
132
dumpFinalStats :: DynFlags -> IO () dumpFinalStats dflags = when (gopt Opt_D_faststring_stats dflags) $ dumpFastStringStats dflags
132
dumpFinalStats dflags = when (gopt Opt_D_faststring_stats dflags) $ dumpFastStringStats dflags
96
false
true
0
8
17
41
19
22
null
null
andywhardy/haskell-gae
src/Main.hs
bsd-3-clause
first :: TodoItem first = TodoItem { id = 1, description = "Do this first", done = True }
89
first :: TodoItem first = TodoItem { id = 1, description = "Do this first", done = True }
89
first = TodoItem { id = 1, description = "Do this first", done = True }
71
false
true
0
6
18
31
19
12
null
null
silky/Tidal
Sound/Tidal/Parse.hs
gpl-3.0
pDensity :: Parser (Rational) pDensity = angles (pRatio <?> "ratio") <|> return (1 % 1)
109
pDensity :: Parser (Rational) pDensity = angles (pRatio <?> "ratio") <|> return (1 % 1)
109
pDensity = angles (pRatio <?> "ratio") <|> return (1 % 1)
79
false
true
4
7
36
47
23
24
null
null
wuzzeb/yesod
yesod-core/Yesod/Core/Internal/Run.hs
mit
-- | Function used internally by Yesod in the process of converting a -- 'HandlerT' into an 'Application'. Should not be needed by users. runHandler :: ToTypedContent c => RunHandlerEnv site -> HandlerT site IO c -> YesodApp runHandler rhe@RunHandlerEnv {..} handler yreq = withInternalS...
3,918
runHandler :: ToTypedContent c => RunHandlerEnv site -> HandlerT site IO c -> YesodApp runHandler rhe@RunHandlerEnv {..} handler yreq = withInternalState $ \resState -> do let toErrorHandler e = case fromException e of Just (HCError x) -> x ...
3,780
runHandler rhe@RunHandlerEnv {..} handler yreq = withInternalState $ \resState -> do let toErrorHandler e = case fromException e of Just (HCError x) -> x _ -> InternalError $ T.pack $ show e istate <- liftIO $ I.newIORef GHState { ghsSession = reqSession yreq ...
3,660
true
true
0
25
1,509
1,109
543
566
null
null
tweag/distributed-process
src/Control/Distributed/Process/Internal/Types.hs
bsd-3-clause
localProcesses :: Accessor ValidLocalNodeState (Map LocalProcessId LocalProcess) localProcesses = accessor _localProcesses (\procs st -> st { _localProcesses = procs })
168
localProcesses :: Accessor ValidLocalNodeState (Map LocalProcessId LocalProcess) localProcesses = accessor _localProcesses (\procs st -> st { _localProcesses = procs })
168
localProcesses = accessor _localProcesses (\procs st -> st { _localProcesses = procs })
87
false
true
0
9
19
47
25
22
null
null
ankhers/haskell-ide-engine
test/ExtensibleStateSpec.hs
bsd-3-clause
mkCmdWithContext ::(ValidResponse a) => CommandFunc a -> CommandName -> [AcceptedContext] -> [ParamDescription] -> UntaggedCommand mkCmdWithContext cmd n cts pds = Command { cmdDesc = CommandDesc { cmdName = n , cmdUiDescription = "descr...
630
mkCmdWithContext ::(ValidResponse a) => CommandFunc a -> CommandName -> [AcceptedContext] -> [ParamDescription] -> UntaggedCommand mkCmdWithContext cmd n cts pds = Command { cmdDesc = CommandDesc { cmdName = n , cmdUiDescription = "descr...
630
mkCmdWithContext cmd n cts pds = Command { cmdDesc = CommandDesc { cmdName = n , cmdUiDescription = "description" , cmdFileExtensions = [] , cmdContexts = cts , cmdAdditionalParams =...
482
false
true
0
10
305
114
67
47
null
null
Gabriel439/succinct
src/Succinct/Internal/Level.hs
bsd-2-clause
s16 :: Delta -> (Int16,Int16,Int16) s16 (Delta e m n) = (fromIntegral e, fromIntegral m, fromIntegral n)
104
s16 :: Delta -> (Int16,Int16,Int16) s16 (Delta e m n) = (fromIntegral e, fromIntegral m, fromIntegral n)
104
s16 (Delta e m n) = (fromIntegral e, fromIntegral m, fromIntegral n)
68
false
true
0
9
16
61
30
31
null
null
FranklinChen/Hugs
tests/misc/gc.hs
bsd-3-clause
-- All these tests should be run in a freshly started system -- and with the specified heap size/ heap configuration. -- -- (Of course, they should run successfully in a non-fresh system, -- with different heap sizes, etc. - but they've been known to fail -- with the specified size.) -- build Hugs with all gc tests ...
1,035
test1 = show [1..1500]
22
test1 = show [1..1500]
22
true
false
1
6
243
35
24
11
null
null
angelworm/Kikka
Config.example.hs
bsd-3-clause
serv2 = { host = "irc.ircnet.ne.jp" , port = PortNumber 6667 , nick = "kikka" , user = User { username = "kikka" , hostname = "irc.ircnet.ne.jp" , servername = "localhost" , realname = "Nakajima Kikka" ...
363
serv2 = { host = "irc.ircnet.ne.jp" , port = PortNumber 6667 , nick = "kikka" , user = User { username = "kikka" , hostname = "irc.ircnet.ne.jp" , servername = "localhost" , realname = "Nakajima Kikka" ...
363
serv2 = { host = "irc.ircnet.ne.jp" , port = PortNumber 6667 , nick = "kikka" , user = User { username = "kikka" , hostname = "irc.ircnet.ne.jp" , servername = "localhost" , realname = "Nakajima Kikka" ...
363
false
false
15
6
184
89
42
47
null
null
Concomitant/LambdaHack
Game/LambdaHack/Common/Actor.hs
bsd-3-clause
verbCStore :: CStore -> Text verbCStore CGround = "drop"
56
verbCStore :: CStore -> Text verbCStore CGround = "drop"
56
verbCStore CGround = "drop"
27
false
true
0
7
8
24
10
14
null
null
soenkehahn/edith
Edith/Core.hs
agpl-3.0
resetCursor :: Integer -> Edith () resetCursor bufferHeight = do position <- scrolledCursorPosition . buffer_ <$> get when (fst position > bufferHeight) $ error (show position) lift $ do def <- defaultWindow updateWindow def $ do uncurry moveCursor (secondA ^: (+ 8) $ pos...
326
resetCursor :: Integer -> Edith () resetCursor bufferHeight = do position <- scrolledCursorPosition . buffer_ <$> get when (fst position > bufferHeight) $ error (show position) lift $ do def <- defaultWindow updateWindow def $ do uncurry moveCursor (secondA ^: (+ 8) $ pos...
326
resetCursor bufferHeight = do position <- scrolledCursorPosition . buffer_ <$> get when (fst position > bufferHeight) $ error (show position) lift $ do def <- defaultWindow updateWindow def $ do uncurry moveCursor (secondA ^: (+ 8) $ position)
291
false
true
0
17
91
114
53
61
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/ViolinMuted.hs
bsd-3-clause
note6 :: Note note6 = Note (Pitch 277.183 49 "c#4") 7 (Range (NoteRange (NoteRangeAmplitude 9147.03 33 0.38) (NoteRangeHarmonicFreq 1 277.18)) (NoteRange (NoteRangeAmplitude 277.18 1 5857.0) (NoteRangeHarmonicFreq 36 9978.58))) [Harmonic 1 ...
1,368
note6 :: Note note6 = Note (Pitch 277.183 49 "c#4") 7 (Range (NoteRange (NoteRangeAmplitude 9147.03 33 0.38) (NoteRangeHarmonicFreq 1 277.18)) (NoteRange (NoteRangeAmplitude 277.18 1 5857.0) (NoteRangeHarmonicFreq 36 9978.58))) [Harmonic 1 ...
1,368
note6 = Note (Pitch 277.183 49 "c#4") 7 (Range (NoteRange (NoteRangeAmplitude 9147.03 33 0.38) (NoteRangeHarmonicFreq 1 277.18)) (NoteRange (NoteRangeAmplitude 277.18 1 5857.0) (NoteRangeHarmonicFreq 36 9978.58))) [Harmonic 1 1.432 5857.0 ...
1,354
false
true
0
10
391
523
267
256
null
null
sdiehl/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
-- Argument of a function application opPrec = 3
50
opPrec = 3
12
opPrec = 3
12
true
false
1
5
10
11
4
7
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/PublicDelegatedPrefixes/AggregatedList.hs
mpl-2.0
-- | Creates a value of 'PublicDelegatedPrefixesAggregatedList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pdpalIncludeAllScopes' -- -- * 'pdpalReturnPartialSuccess' -- -- * 'pdpalOrderBy' -- -- * 'pdpalProject' -- -- * 'pdpalFil...
831
publicDelegatedPrefixesAggregatedList :: Text -- ^ 'pdpalProject' -> PublicDelegatedPrefixesAggregatedList publicDelegatedPrefixesAggregatedList pPdpalProject_ = PublicDelegatedPrefixesAggregatedList' { _pdpalIncludeAllScopes = Nothing , _pdpalReturnPartialSuccess = Nothing , _pdpalOrderBy = Nothi...
455
publicDelegatedPrefixesAggregatedList pPdpalProject_ = PublicDelegatedPrefixesAggregatedList' { _pdpalIncludeAllScopes = Nothing , _pdpalReturnPartialSuccess = Nothing , _pdpalOrderBy = Nothing , _pdpalProject = pPdpalProject_ , _pdpalFilter = Nothing , _pdpalPageToken = Nothing , _pdpalMa...
340
true
true
0
7
140
89
58
31
null
null
terrelln/air-types
src/AirType/Helpers.hs
mit
fromInput L3 = ['c', 'd', 'e']
30
fromInput L3 = ['c', 'd', 'e']
30
fromInput L3 = ['c', 'd', 'e']
30
false
false
0
5
5
18
10
8
null
null
creichert/persistent
persistent/Database/Persist/Sql/Migration.hs
mit
-- | Add a 'CautiousMigration' (aka a @[('Bool', 'Text')]@) to the -- migration plan. -- -- @since 2.9.2 addMigrations :: CautiousMigration -> Migration addMigrations = lift . tell
188
addMigrations :: CautiousMigration -> Migration addMigrations = lift . tell
83
addMigrations = lift . tell
27
true
true
0
5
35
23
14
9
null
null
Icelandjack/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
conNamedFields f (ForallC a b fs) = ForallC a b <$> conNamedFields f fs
71
conNamedFields f (ForallC a b fs) = ForallC a b <$> conNamedFields f fs
71
conNamedFields f (ForallC a b fs) = ForallC a b <$> conNamedFields f fs
71
false
false
0
7
13
35
16
19
null
null
Peaker/lamdu
src/Lamdu/Sugar/Internal.hs
gpl-3.0
nameWithoutContext :: T.Tag -> InternalName nameWithoutContext tag = InternalName { _inContext = Nothing , _inTag = tag , _inIsAutoName = False }
165
nameWithoutContext :: T.Tag -> InternalName nameWithoutContext tag = InternalName { _inContext = Nothing , _inTag = tag , _inIsAutoName = False }
165
nameWithoutContext tag = InternalName { _inContext = Nothing , _inTag = tag , _inIsAutoName = False }
121
false
true
0
6
41
40
23
17
null
null
fehu/itesm-ga
src/Parcial2/Examples/ChromosomeExample.hs
mit
prepareRoutes (srp:t) accFst accSnd = uncurry (prepareRoutes t) next where next = case srp of SubRoutes _ _ (Left donor) _ -> (donor:accFst, accSnd) SubRoutes _ _ (Right donor) _ -> (accFst, donor:accSnd)
232
prepareRoutes (srp:t) accFst accSnd = uncurry (prepareRoutes t) next where next = case srp of SubRoutes _ _ (Left donor) _ -> (donor:accFst, accSnd) SubRoutes _ _ (Right donor) _ -> (accFst, donor:accSnd)
232
prepareRoutes (srp:t) accFst accSnd = uncurry (prepareRoutes t) next where next = case srp of SubRoutes _ _ (Left donor) _ -> (donor:accFst, accSnd) SubRoutes _ _ (Right donor) _ -> (accFst, donor:accSnd)
232
false
false
0
12
60
104
53
51
null
null
ku-fpg/diagrams-canvas
examples/Geom.hs
bsd-3-clause
aHead :: Diagram B R2 aHead = aLabel <> rsinaLabel <> rLabel <> rcosaLabel <> lengthLabel <> back # lc red <> chord <> r1 <> rTheta <> rMid <> thetaArc <> dot <> sircle <> hd
185
aHead :: Diagram B R2 aHead = aLabel <> rsinaLabel <> rLabel <> rcosaLabel <> lengthLabel <> back # lc red <> chord <> r1 <> rTheta <> rMid <> thetaArc <> dot <> sircle <> hd
185
aHead = aLabel <> rsinaLabel <> rLabel <> rcosaLabel <> lengthLabel <> back # lc red <> chord <> r1 <> rTheta <> rMid <> thetaArc <> dot <> sircle <> hd
163
false
true
10
8
47
81
37
44
null
null
tolysz/rawstring-qm
src/Data/String/QM.hs
bsd-3-clause
unQM a ('}':xs) = AntiQuote (reverse a) : parseQM [] xs
58
unQM a ('}':xs) = AntiQuote (reverse a) : parseQM [] xs
58
unQM a ('}':xs) = AntiQuote (reverse a) : parseQM [] xs
58
false
false
0
8
13
38
18
20
null
null
google/codeworld
codeworld-compiler/src/CodeWorld/Compile/Requirements/Eval.hs
apache-2.0
checkRule (OnFailure msg rule) = do result <- checkRule rule case result of Just (_ : _) -> failure msg other -> return other
137
checkRule (OnFailure msg rule) = do result <- checkRule rule case result of Just (_ : _) -> failure msg other -> return other
137
checkRule (OnFailure msg rule) = do result <- checkRule rule case result of Just (_ : _) -> failure msg other -> return other
137
false
false
0
12
35
62
28
34
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/Demo/ReaderT.hs
unlicense
interp (Var n) = ask >>= \r -> case (lookup n r) of Just x -> return x Nothing -> error ("unbound variable: " ++ n)
139
interp (Var n) = ask >>= \r -> case (lookup n r) of Just x -> return x Nothing -> error ("unbound variable: " ++ n)
139
interp (Var n) = ask >>= \r -> case (lookup n r) of Just x -> return x Nothing -> error ("unbound variable: " ++ n)
139
false
false
2
11
49
67
32
35
null
null
brendanhay/gogol
gogol-commentanalyzer/gen/Network/Google/CommentAnalyzer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'SuggestCommentScoreResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'scsrDetectedLanguages' -- -- * 'scsrClientToken' -- -- * 'scsrRequestedLanguages' suggestCommentScoreResponse :: SuggestCommentS...
511
suggestCommentScoreResponse :: SuggestCommentScoreResponse suggestCommentScoreResponse = SuggestCommentScoreResponse' { _scsrDetectedLanguages = Nothing , _scsrClientToken = Nothing , _scsrRequestedLanguages = Nothing }
241
suggestCommentScoreResponse = SuggestCommentScoreResponse' { _scsrDetectedLanguages = Nothing , _scsrClientToken = Nothing , _scsrRequestedLanguages = Nothing }
178
true
true
1
7
82
47
29
18
null
null
lnunno/blaze-bootstrap3
Bootstrap3/Utils.hs
mit
{- Wrap all outmost tags with a <li></li>. -} toHtmlLs :: [Html] -> [Html] toHtmlLs ls = map (\h -> li h) ls
128
toHtmlLs :: [Html] -> [Html] toHtmlLs ls = map (\h -> li h) ls
62
toHtmlLs ls = map (\h -> li h) ls
33
true
true
0
8
42
41
22
19
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/SetIAMPolicy.hs
mpl-2.0
-- | V1 error format. prcsipXgafv :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Xgafv) prcsipXgafv = lens _prcsipXgafv (\ s a -> s{_prcsipXgafv = a})
157
prcsipXgafv :: Lens' ProjectsRegionsClustersSetIAMPolicy (Maybe Xgafv) prcsipXgafv = lens _prcsipXgafv (\ s a -> s{_prcsipXgafv = a})
135
prcsipXgafv = lens _prcsipXgafv (\ s a -> s{_prcsipXgafv = a})
64
true
true
0
9
23
48
25
23
null
null
eugenkiss/loopgotowhile
src/Language/LoopGotoWhile/While/Strict.hs
bsd-3-clause
eval' env (Assign i j Minus c) = do xj <- getVar env j setVar env i $! (max (xj - c) 0)
95
eval' env (Assign i j Minus c) = do xj <- getVar env j setVar env i $! (max (xj - c) 0)
95
eval' env (Assign i j Minus c) = do xj <- getVar env j setVar env i $! (max (xj - c) 0)
95
false
false
0
11
30
64
29
35
null
null
Shaac/chartleston
src/note.hs
gpl-3.0
-- Get the velocity (i.e. the strength) of a note. velocity :: Note -> Velocity velocity (Note (_, v)) | v == 127 = Accent
127
velocity :: Note -> Velocity velocity (Note (_, v)) | v == 127 = Accent
76
velocity (Note (_, v)) | v == 127 = Accent
47
true
true
0
10
29
47
22
25
null
null
beni55/hermit
src/HERMIT/Dictionary/Common.hs
bsd-2-clause
-- | List all variables bound by a case expression (in the alternatives and the case binder). caseVarsT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Transform c m CoreExpr [Var] caseVarsT = caseT mempty idR mempty (\ _ -> arr altVars) (\ () v () vss -> v : nub (concat vss))
298
caseVarsT :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, Monad m) => Transform c m CoreExpr [Var] caseVarsT = caseT mempty idR mempty (\ _ -> arr altVars) (\ () v () vss -> v : nub (concat vss))
204
caseVarsT = caseT mempty idR mempty (\ _ -> arr altVars) (\ () v () vss -> v : nub (concat vss))
96
true
true
0
11
56
114
57
57
null
null
Skyfold/postgrest
src/PostgREST/OpenAPI.hs
mit
isAuthorityValid :: URI -> Bool isAuthorityValid URI {uriAuthority = a} | isJust a = fAnd [isUserInfoValid, isHostValid, isPortValid] $ fromJust a | otherwise = False
170
isAuthorityValid :: URI -> Bool isAuthorityValid URI {uriAuthority = a} | isJust a = fAnd [isUserInfoValid, isHostValid, isPortValid] $ fromJust a | otherwise = False
170
isAuthorityValid URI {uriAuthority = a} | isJust a = fAnd [isUserInfoValid, isHostValid, isPortValid] $ fromJust a | otherwise = False
138
false
true
0
8
28
64
31
33
null
null
dmjio/stripe
stripe-core/src/Web/Stripe/Types/Util.hs
mit
------------------------------------------------------------------------------ -- | Helper for retrieving `AccountId` getAccountId :: AccountId -> Text getAccountId (AccountId x) = x
182
getAccountId :: AccountId -> Text getAccountId (AccountId x) = x
64
getAccountId (AccountId x) = x
30
true
true
0
7
16
26
14
12
null
null
kRITZCREEK/clippy-api
clippy-lib/Clippy/ES.hs
gpl-3.0
withBH' :: BH IO a -> IO a withBH' = withBH defaultManagerSettings testServer
77
withBH' :: BH IO a -> IO a withBH' = withBH defaultManagerSettings testServer
77
withBH' = withBH defaultManagerSettings testServer
50
false
true
0
7
12
34
14
20
null
null
jkozlowski/kdb-haskell
src/Database/Kdb/Internal/Types/KdbTypes.hs
mit
-- | Kdb @Word8@ value for Minute vector. minuteVT :: Word8 minuteVT = negate minuteT
85
minuteVT :: Word8 minuteVT = negate minuteT
43
minuteVT = negate minuteT
25
true
true
0
5
14
15
8
7
null
null
ezyang/ghc
testsuite/tests/codeGen/should_run/CmmSwitchTest64.hs
bsd-3-clause
ah -11# = 36#
13
ah -11# = 36#
13
ah -11# = 36#
13
false
false
0
5
3
12
5
7
null
null
dylanmc/cryptol
sbv/Data/SBV/SMT/SMTLib1.hs
bsd-3-clause
cvtExp (SBVApp (Rol i) [a]) = rot "rotate_left" i a
54
cvtExp (SBVApp (Rol i) [a]) = rot "rotate_left" i a
54
cvtExp (SBVApp (Rol i) [a]) = rot "rotate_left" i a
54
false
false
0
8
12
34
16
18
null
null
kernelim/leveldb-haskell
src/Database/LevelDB/MonadResource.hs
bsd-3-clause
-- | Position at the last key in the source. The iterator is /valid/ after this -- call iff the source is not empty. iterLast :: MonadResource m => Iterator -> m () iterLast = Base.iterLast
189
iterLast :: MonadResource m => Iterator -> m () iterLast = Base.iterLast
72
iterLast = Base.iterLast
24
true
true
0
8
35
31
16
15
null
null
phischu/fragnix
benchmarks/containers/Data.Set.Base.hs
bsd-3-clause
merge :: Set a -> Set a -> Set a merge Tip r = r
50
merge :: Set a -> Set a -> Set a merge Tip r = r
50
merge Tip r = r
17
false
true
0
7
16
33
15
18
null
null
agentm/project-m36
src/lib/ProjectM36/TransactionGraph/Persist.hs
unlicense
writeGraphTransactionIdFile :: DiskSync -> FilePath -> TransactionGraph -> IO LockFileHash writeGraphTransactionIdFile sync destDirectory (TransactionGraph _ transSet) = writeFileSync sync graphFile uuidInfo >> pure digest where graphFile = transactionLogPath destDirectory uuidInfo = T.intercalate "\n" graphL...
772
writeGraphTransactionIdFile :: DiskSync -> FilePath -> TransactionGraph -> IO LockFileHash writeGraphTransactionIdFile sync destDirectory (TransactionGraph _ transSet) = writeFileSync sync graphFile uuidInfo >> pure digest where graphFile = transactionLogPath destDirectory uuidInfo = T.intercalate "\n" graphL...
772
writeGraphTransactionIdFile sync destDirectory (TransactionGraph _ transSet) = writeFileSync sync graphFile uuidInfo >> pure digest where graphFile = transactionLogPath destDirectory uuidInfo = T.intercalate "\n" graphLines digest = SHA256.hash (encodeUtf8 uuidInfo) graphLines = S.toList $ S.map graph...
681
false
true
0
12
200
216
105
111
null
null
christiaanb/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprUserTypeCtxt DefaultDeclCtxt = ptext (sLit "a type in a `default' declaration")
84
pprUserTypeCtxt DefaultDeclCtxt = ptext (sLit "a type in a `default' declaration")
84
pprUserTypeCtxt DefaultDeclCtxt = ptext (sLit "a type in a `default' declaration")
84
false
false
0
7
12
18
8
10
null
null
spechub/Hets
THF/StaticAnalysisTHF.hs
gpl-2.0
makeType :: THFFormula -> Either (Type, Constant) Diagnosis makeType t = maybe (Right $ mkDiag Error "Error while parsing the type of:" t) Left (thfFormulaToType t)
180
makeType :: THFFormula -> Either (Type, Constant) Diagnosis makeType t = maybe (Right $ mkDiag Error "Error while parsing the type of:" t) Left (thfFormulaToType t)
180
makeType t = maybe (Right $ mkDiag Error "Error while parsing the type of:" t) Left (thfFormulaToType t)
120
false
true
0
8
41
56
28
28
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs
mit
-- | 'queueLeftItemId' Lens queueLeftItemIdL :: Lens_' QueueLeftItem (Maybe Int) queueLeftItemIdL f QueueLeftItem{..} = (\queueLeftItemId -> QueueLeftItem { queueLeftItemId, ..} ) <$> f queueLeftItemId
201
queueLeftItemIdL :: Lens_' QueueLeftItem (Maybe Int) queueLeftItemIdL f QueueLeftItem{..} = (\queueLeftItemId -> QueueLeftItem { queueLeftItemId, ..} ) <$> f queueLeftItemId
173
queueLeftItemIdL f QueueLeftItem{..} = (\queueLeftItemId -> QueueLeftItem { queueLeftItemId, ..} ) <$> f queueLeftItemId
120
true
true
1
8
23
62
30
32
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CMD_HOMEEXTEND :: Int wxSTC_CMD_HOMEEXTEND = 2313
55
wxSTC_CMD_HOMEEXTEND :: Int wxSTC_CMD_HOMEEXTEND = 2313
55
wxSTC_CMD_HOMEEXTEND = 2313
27
false
true
0
6
5
18
7
11
null
null
ekarayel/HTF
Test/Framework/TestManager.hs
lgpl-2.1
flattenTestSuite (AnonTestSuite ts) = let fts = concatMap flattenTest ts in map (\ft -> ft { ft_path = TestPathCompound Nothing (ft_path ft) }) fts
155
flattenTestSuite (AnonTestSuite ts) = let fts = concatMap flattenTest ts in map (\ft -> ft { ft_path = TestPathCompound Nothing (ft_path ft) }) fts
155
flattenTestSuite (AnonTestSuite ts) = let fts = concatMap flattenTest ts in map (\ft -> ft { ft_path = TestPathCompound Nothing (ft_path ft) }) fts
155
false
false
0
14
31
63
31
32
null
null
cchalmers/geometry
src/Geometry/TwoD/Size.hs
bsd-3-clause
-- | Compute the height of an enveloped object. height :: (InSpace V2 n a, Enveloped a) => a -> n height = diameter unitY
121
height :: (InSpace V2 n a, Enveloped a) => a -> n height = diameter unitY
73
height = diameter unitY
23
true
true
0
6
24
38
20
18
null
null
Th30n/hasgel
src/Hasgel/Game/Movement.hs
mit
-- | Returns the new position and the index of the colliding object when moving -- for the given velocity. tryMove :: [Transform] -> Transform -> L.V3 Float -> (Transform, Maybe Int) tryMove [] mobj speed = (translate mobj speed, Nothing)
238
tryMove :: [Transform] -> Transform -> L.V3 Float -> (Transform, Maybe Int) tryMove [] mobj speed = (translate mobj speed, Nothing)
131
tryMove [] mobj speed = (translate mobj speed, Nothing)
55
true
true
0
11
40
68
34
34
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F18.hs
bsd-3-clause
-- glMultiTexCoord4xOES -------------------------------------------------------- glMultiTexCoord4xOES :: MonadIO m => GLenum -- ^ @texture@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit). -> GLfixed -- ^ @s@. -> GLfixed -- ^ @t@. -> GLfixed -- ^ @r@. -> GLfixed -- ^ @q@. -> m () glMultiTexCoo...
400
glMultiTexCoord4xOES :: MonadIO m => GLenum -- ^ @texture@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit). -> GLfixed -- ^ @s@. -> GLfixed -- ^ @t@. -> GLfixed -- ^ @r@. -> GLfixed -- ^ @q@. -> m () glMultiTexCoord4xOES v1 v2 v3 v4 v5 = liftIO $ dyn588 ptr_glMultiTexCoord4xOES v1 v2 v3 v4 v5
318
glMultiTexCoord4xOES v1 v2 v3 v4 v5 = liftIO $ dyn588 ptr_glMultiTexCoord4xOES v1 v2 v3 v4 v5
93
true
true
0
13
68
81
41
40
null
null
shayan-najd/HsParser
Language/Haskell/Syntax/SrcLoc.hs
gpl-3.0
srcSpanEndLine RealSrcSpan'{ srcSpanELine=l } = l
49
srcSpanEndLine RealSrcSpan'{ srcSpanELine=l } = l
49
srcSpanEndLine RealSrcSpan'{ srcSpanELine=l } = l
49
false
false
0
8
5
18
9
9
null
null
toddmohney/branch-deleter
app/Main.hs
mit
confirmPlan :: [(Bool, Branch)] -> IO () confirmPlan plans = showPlan plans >> confirmPlan' where confirmPlan' = do printNorm "Do you approve of this plan? (y/n)\n" answer <- getLine case answer of "y" -> mapM_ (deleteBranch . snd) (filter fst plans) _ -> printNorm "Exiting...\...
322
confirmPlan :: [(Bool, Branch)] -> IO () confirmPlan plans = showPlan plans >> confirmPlan' where confirmPlan' = do printNorm "Do you approve of this plan? (y/n)\n" answer <- getLine case answer of "y" -> mapM_ (deleteBranch . snd) (filter fst plans) _ -> printNorm "Exiting...\...
322
confirmPlan plans = showPlan plans >> confirmPlan' where confirmPlan' = do printNorm "Do you approve of this plan? (y/n)\n" answer <- getLine case answer of "y" -> mapM_ (deleteBranch . snd) (filter fst plans) _ -> printNorm "Exiting...\n"
281
false
true
3
13
86
111
50
61
null
null
SAdams601/HaRe
old/testing/introPattern/MultiParamIn4_TokOut.hs
bsd-3-clause
f Nothing y (Left a) = (hd y) + a
33
f Nothing y (Left a) = (hd y) + a
33
f Nothing y (Left a) = (hd y) + a
33
false
false
0
7
9
31
14
17
null
null