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
tjakway/ghcjvm
compiler/cmm/PprC.hs
bsd-3-clause
signedOp (MO_S_Neg _) = True
32
signedOp (MO_S_Neg _) = True
32
signedOp (MO_S_Neg _) = True
32
false
false
0
7
8
15
7
8
null
null
CanvasHS/Canvas.hs
canvashs-module/CanvasHs/Colors.hs
lgpl-2.1
indigo = (75, 0, 130, 1.0)
26
indigo = (75, 0, 130, 1.0)
26
indigo = (75, 0, 130, 1.0)
26
false
false
0
5
5
18
11
7
null
null
enolan/Idris-dev
src/Idris/Parser/Helpers.hs
bsd-3-clause
{- | Consumes a multi-line comment @ MultiLineComment_t ::= '{ -- }' | '{ -' InCommentChars_t ; @ @ InCommentChars_t ::= '- }' | MultiLineComment_t InCommentChars_t | ~'- }'+ InCommentChars_t ; @ -} multiLineComment :: MonadicParsing m => m () multiLineComment = try (string "{-" *> (strin...
1,029
multiLineComment :: MonadicParsing m => m () multiLineComment = try (string "{-" *> (string "-}") *> pure ()) <|> string "{-" *> inCommentChars <?> "" where inCommentChars :: MonadicParsing m => m () inCommentChars = string "-}" *> pure () ...
803
multiLineComment = try (string "{-" *> (string "-}") *> pure ()) <|> string "{-" *> inCommentChars <?> "" where inCommentChars :: MonadicParsing m => m () inCommentChars = string "-}" *> pure () <|> try (multiLineComment) *> inCommentChars...
758
true
true
19
12
373
230
108
122
null
null
ml9951/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
mkTcEqPred :: TcType -> TcType -> Type -- During type checking we build equalities between -- type variables with OpenKind or ArgKind. Ultimately -- they will all settle, but we want the equality predicate -- itself to have kind '*'. I think. -- -- But for now we call mkTyConApp, not mkEqPred, because the invariants ...
680
mkTcEqPred :: TcType -> TcType -> Type mkTcEqPred ty1 ty2 = mkTyConApp eqTyCon [k, ty1, ty2] where k = typeKind ty1 -- | Make a representational equality predicate
172
mkTcEqPred ty1 ty2 = mkTyConApp eqTyCon [k, ty1, ty2] where k = typeKind ty1 -- | Make a representational equality predicate
133
true
true
0
6
133
61
37
24
null
null
tolysz/prepare-ghcjs
spec-lts8/base-pure/GHC/TopHandler.hs
bsd-3-clause
useSafeExit = 0
15
useSafeExit = 0
15
useSafeExit = 0
15
false
false
0
4
2
6
3
3
null
null
zeniuseducation/poly-euler
haskell/special/one.hs
epl-1.0
gerakB t | even x = 100 - (rem (6 * t) 100) | otherwise = rem (6 * t) 100 where x = div (6* t) 100
104
gerakB t | even x = 100 - (rem (6 * t) 100) | otherwise = rem (6 * t) 100 where x = div (6* t) 100
104
gerakB t | even x = 100 - (rem (6 * t) 100) | otherwise = rem (6 * t) 100 where x = div (6* t) 100
104
false
false
2
9
33
75
37
38
null
null
avieth/diplomacy
Diplomacy/OrderResolution.hs
bsd-3-clause
assumeNoOrder :: Zone -> TypicalResolutionInput -> TypicalResolutionInput assumeNoOrder = M.alter (const Nothing)
125
assumeNoOrder :: Zone -> TypicalResolutionInput -> TypicalResolutionInput assumeNoOrder = M.alter (const Nothing)
125
assumeNoOrder = M.alter (const Nothing)
39
false
true
0
8
23
36
16
20
null
null
hsyl20/HViperVM
apps/PlatformTest.hs
lgpl-3.0
main :: IO () main = do let logger = stdOutLogger . filterLevel LogDebug config = Configuration { libraryOpenCL = "/usr/lib/libOpenCL.so", eventHandler = \e -> logger (CustomLog (show e)) } putStrLn "Initializing platform..." platform <- initPlatform config putStrLn "Q...
745
main :: IO () main = do let logger = stdOutLogger . filterLevel LogDebug config = Configuration { libraryOpenCL = "/usr/lib/libOpenCL.so", eventHandler = \e -> logger (CustomLog (show e)) } putStrLn "Initializing platform..." platform <- initPlatform config putStrLn "Q...
745
main = do let logger = stdOutLogger . filterLevel LogDebug config = Configuration { libraryOpenCL = "/usr/lib/libOpenCL.so", eventHandler = \e -> logger (CustomLog (show e)) } putStrLn "Initializing platform..." platform <- initPlatform config putStrLn "Querying platfo...
731
false
true
1
18
182
219
99
120
null
null
Oblosys/webviews
tryout/TypedJSFunctionsHList.hs
mit
main = do { putStrLn $ callFn Submit functions2 --; putStrLn $ show test }
83
main = do { putStrLn $ callFn Submit functions2 --; putStrLn $ show test }
83
main = do { putStrLn $ callFn Submit functions2 --; putStrLn $ show test }
83
false
false
0
8
23
21
11
10
null
null
nathyong/microghc-ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
{- ************************************************************************ * * \subsection[dsMonoBinds]{Desugaring a @MonoBinds@} * * ***********************************************...
450
dsTopLHsBinds :: LHsBinds Id -> DsM (OrdList (Id,CoreExpr)) dsTopLHsBinds binds = ds_lhs_binds binds
100
dsTopLHsBinds binds = ds_lhs_binds binds
40
true
true
0
9
162
40
20
20
null
null
jozefg/c_of_scheme
src/CodeGen.hs
mit
generate (Set v e) = (<--) <$> fmap fromString (mangle v) <*> generate e
72
generate (Set v e) = (<--) <$> fmap fromString (mangle v) <*> generate e
72
generate (Set v e) = (<--) <$> fmap fromString (mangle v) <*> generate e
72
false
false
0
9
13
41
20
21
null
null
energyflowanalysis/efa-2.1
src/EFA/Flow/Draw.hs
bsd-3-clause
dotEdgeInPart :: Part part => part -> DotEdge T.Text -> DotEdge T.Text dotEdgeInPart part (DotEdge x y attrs) = DotEdge (dotIdentInPart part x) (dotIdentInPart part y) attrs
182
dotEdgeInPart :: Part part => part -> DotEdge T.Text -> DotEdge T.Text dotEdgeInPart part (DotEdge x y attrs) = DotEdge (dotIdentInPart part x) (dotIdentInPart part y) attrs
182
dotEdgeInPart part (DotEdge x y attrs) = DotEdge (dotIdentInPart part x) (dotIdentInPart part y) attrs
105
false
true
0
9
35
74
35
39
null
null
ekmett/ghc
compiler/nativeGen/PIC.hs
bsd-3-clause
pprGotDeclaration _ _ _ = panic "pprGotDeclaration: no match"
69
pprGotDeclaration _ _ _ = panic "pprGotDeclaration: no match"
69
pprGotDeclaration _ _ _ = panic "pprGotDeclaration: no match"
69
false
false
0
5
16
16
7
9
null
null
forked-upstream-packages-for-ghcjs/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (TyCon "Int32#") []) = "int32PrimTy"
55
ppType (TyApp (TyCon "Int32#") []) = "int32PrimTy"
55
ppType (TyApp (TyCon "Int32#") []) = "int32PrimTy"
55
false
false
0
8
11
26
12
14
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs
mpl-2.0
-- | Creates a value of 'RemarketingListSharesPatch' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rlspXgafv' -- -- * 'rlspUploadProtocol' -- -- * 'rlspAccessToken' -- -- * 'rlspUploadType' -- -- * 'rlspProFileId' -- -- * 'rlspPaylo...
913
remarketingListSharesPatch :: Int64 -- ^ 'rlspProFileId' -> RemarketingListShare -- ^ 'rlspPayload' -> Int64 -- ^ 'rlspId' -> RemarketingListSharesPatch remarketingListSharesPatch pRlspProFileId_ pRlspPayload_ pRlspId_ = RemarketingListSharesPatch' { _rlspXgafv = Nothing , _rlspUploadProtocol ...
549
remarketingListSharesPatch pRlspProFileId_ pRlspPayload_ pRlspId_ = RemarketingListSharesPatch' { _rlspXgafv = Nothing , _rlspUploadProtocol = Nothing , _rlspAccessToken = Nothing , _rlspUploadType = Nothing , _rlspProFileId = _Coerce # pRlspProFileId_ , _rlspPayload = pRlspPayload_ , _rls...
380
true
true
0
9
176
119
76
43
null
null
kwrooijen/sdl-game
End/Global/Object.hs
gpl-3.0
intersects sp (Rect bx by bw bh:xs) | t py + ph > by && t py < by + bh && t px + pw > bx && t px < bx + bw = True | otherwise = intersects sp xs where t = truncate (px,py,pw,ph) = (sp^.box.x, sp^.box.y, sp^.box.w, sp^.box.h)
261
intersects sp (Rect bx by bw bh:xs) | t py + ph > by && t py < by + bh && t px + pw > bx && t px < bx + bw = True | otherwise = intersects sp xs where t = truncate (px,py,pw,ph) = (sp^.box.x, sp^.box.y, sp^.box.w, sp^.box.h)
261
intersects sp (Rect bx by bw bh:xs) | t py + ph > by && t py < by + bh && t px + pw > bx && t px < bx + bw = True | otherwise = intersects sp xs where t = truncate (px,py,pw,ph) = (sp^.box.x, sp^.box.y, sp^.box.w, sp^.box.h)
261
false
false
0
19
89
169
83
86
null
null
snowmantw/Frag
src/Main.hs
gpl-2.0
isKeyDown _ = False
23
isKeyDown _ = False
23
isKeyDown _ = False
23
false
false
0
5
7
9
4
5
null
null
pparkkin/eta
compiler/ETA/TypeCheck/TcGenGenerics.hs
bsd-3-clause
-- Bindings for the Generic instance mkBindsRep :: GenericKind -> TyCon -> LHsBinds RdrName mkBindsRep gk tycon = unitBag (mkRdrFunBind (L loc from01_RDR) from_matches) `unionBags` unitBag (mkRdrFunBind (L loc to01_RDR) to_matches) where from_matches = [mkSimpleHsAlt pat rhs | (pat,rhs) <- from...
1,336
mkBindsRep :: GenericKind -> TyCon -> LHsBinds RdrName mkBindsRep gk tycon = unitBag (mkRdrFunBind (L loc from01_RDR) from_matches) `unionBags` unitBag (mkRdrFunBind (L loc to01_RDR) to_matches) where from_matches = [mkSimpleHsAlt pat rhs | (pat,rhs) <- from_alts] to_matches = [mkSim...
1,299
mkBindsRep gk tycon = unitBag (mkRdrFunBind (L loc from01_RDR) from_matches) `unionBags` unitBag (mkRdrFunBind (L loc to01_RDR) to_matches) where from_matches = [mkSimpleHsAlt pat rhs | (pat,rhs) <- from_alts] to_matches = [mkSimpleHsAlt pat rhs | (pat,rhs) <- to_alts ] loc ...
1,244
true
true
7
11
425
317
159
158
null
null
StevenWInfo/haskell-soda
src/Soda.hs
mit
-- Possibly shouldn't export this, although I suppose exposing low level stuff could be useful if a user can't do something with the main functions. --urlBuilder :: Domain -> DatasetID -> ResponseFormat -> Url Https -- |Builds the non-parameter part of the URL out of the Domain, DatasetID, and ResponseFormat. urlBuilde...
647
urlBuilder domain datasetID format = https domain' /: "resource" /: (datasetID' `append` "." `append` format') where domain' = pack domain datasetID' = pack datasetID format' = pack (formatToUrl format) -- TODO Improve name. -- |The type to allow you to determine what type the field is be...
336
urlBuilder domain datasetID format = https domain' /: "resource" /: (datasetID' `append` "." `append` format') where domain' = pack domain datasetID' = pack datasetID format' = pack (formatToUrl format) -- TODO Improve name. -- |The type to allow you to determine what type the field is be...
336
true
false
0
8
129
79
42
37
null
null
elieux/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
extendEvBinds :: EvBindMap -> EvBind -> EvBindMap extendEvBinds bs ev_bind = EvBindMap { ev_bind_varenv = extendDVarEnv (ev_bind_varenv bs) (eb_lhs ev_bind) ev_bind }
262
extendEvBinds :: EvBindMap -> EvBind -> EvBindMap extendEvBinds bs ev_bind = EvBindMap { ev_bind_varenv = extendDVarEnv (ev_bind_varenv bs) (eb_lhs ev_bind) ev_bind }
262
extendEvBinds bs ev_bind = EvBindMap { ev_bind_varenv = extendDVarEnv (ev_bind_varenv bs) (eb_lhs ev_bind) ev_bind }
212
false
true
0
9
117
51
26
25
null
null
jbearer/hspl
benchmarks/utils/Bench.hs
mit
genPrologGoal (If c t f) = "(" ++ genPrologGoal c ++ "*->" ++ genPrologGoal t ++ ";" ++ genPrologGoal f ++ ")"
112
genPrologGoal (If c t f) = "(" ++ genPrologGoal c ++ "*->" ++ genPrologGoal t ++ ";" ++ genPrologGoal f ++ ")"
112
genPrologGoal (If c t f) = "(" ++ genPrologGoal c ++ "*->" ++ genPrologGoal t ++ ";" ++ genPrologGoal f ++ ")"
112
false
false
0
11
23
52
24
28
null
null
mzini/qlogic
Qlogic/Arctic.hs
gpl-3.0
Fin x <= Fin y = x Prelude.<= y
34
Fin x <= Fin y = x Prelude.<= y
34
Fin x <= Fin y = x Prelude.<= y
34
false
false
0
6
11
24
10
14
null
null
cjlarose/advent-2016
src/BathroomSecurity.hs
bsd-3-clause
labelOnCrazyGrid (Button (2, 4)) = '9'
38
labelOnCrazyGrid (Button (2, 4)) = '9'
38
labelOnCrazyGrid (Button (2, 4)) = '9'
38
false
false
0
8
5
21
11
10
null
null
apyrgio/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
-- | Cluster-wide default directory for storing shared-file-backed disks. pClusterSharedFileStorageDir :: Field pClusterSharedFileStorageDir = renameField "ClusterSharedFileStorageDir" $ optionalStringField "shared_file_storage_dir"
236
pClusterSharedFileStorageDir :: Field pClusterSharedFileStorageDir = renameField "ClusterSharedFileStorageDir" $ optionalStringField "shared_file_storage_dir"
162
pClusterSharedFileStorageDir = renameField "ClusterSharedFileStorageDir" $ optionalStringField "shared_file_storage_dir"
124
true
true
0
6
22
22
11
11
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Unboxed.hs
bsd-3-clause
ifoldr = G.ifoldr
17
ifoldr = G.ifoldr
17
ifoldr = G.ifoldr
17
false
false
1
6
2
12
4
8
null
null
mstksg/hledger
hledger-ui/Hledger/UI/AccountsScreen.hs
gpl-3.0
accountsScreen :: Screen accountsScreen = AccountsScreen{ sInit = asInit ,sDraw = asDraw ,sHandle = asHandle ,_asList = list AccountsList V.empty 1 ,_asSelectedAccount = "" }
202
accountsScreen :: Screen accountsScreen = AccountsScreen{ sInit = asInit ,sDraw = asDraw ,sHandle = asHandle ,_asList = list AccountsList V.empty 1 ,_asSelectedAccount = "" }
202
accountsScreen = AccountsScreen{ sInit = asInit ,sDraw = asDraw ,sHandle = asHandle ,_asList = list AccountsList V.empty 1 ,_asSelectedAccount = "" }
177
false
true
0
8
52
52
31
21
null
null
rvion/stack
src/Stack/Constants.hs
bsd-3-clause
-- | Relative location of directory for HPC work. hpcRelativeDir :: (MonadThrow m, MonadReader env m, HasPlatform env, HasEnvConfig env) => m (Path Rel Dir) hpcRelativeDir = liftM (</> $(mkRelDir "hpc")) distRelativeDir
238
hpcRelativeDir :: (MonadThrow m, MonadReader env m, HasPlatform env, HasEnvConfig env) => m (Path Rel Dir) hpcRelativeDir = liftM (</> $(mkRelDir "hpc")) distRelativeDir
188
hpcRelativeDir = liftM (</> $(mkRelDir "hpc")) distRelativeDir
66
true
true
0
9
50
68
35
33
null
null
bollu/symengine.hs
src/Symengine/DenseMatrix.hs
mit
densematrix_lu :: (KnownNat r, KnownNat c) => DenseMatrix r c-> (L r c, U r c) densematrix_lu mat = unsafePerformIO $ do l <- densematrix_new u <- densematrix_new throwOnSymIntException =<< with3 l u mat cdensematrix_lu return (L l, U u)
249
densematrix_lu :: (KnownNat r, KnownNat c) => DenseMatrix r c-> (L r c, U r c) densematrix_lu mat = unsafePerformIO $ do l <- densematrix_new u <- densematrix_new throwOnSymIntException =<< with3 l u mat cdensematrix_lu return (L l, U u)
249
densematrix_lu mat = unsafePerformIO $ do l <- densematrix_new u <- densematrix_new throwOnSymIntException =<< with3 l u mat cdensematrix_lu return (L l, U u)
170
false
true
0
10
51
106
50
56
null
null
frerich/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
fromBcp47 ("ar":"LB":_) = "ar-lb"
35
fromBcp47 ("ar":"LB":_) = "ar-lb"
35
fromBcp47 ("ar":"LB":_) = "ar-lb"
35
false
false
0
8
5
20
10
10
null
null
thoughtpolice/binary-serialise-cbor
Data/Binary/Serialise/CBOR/Read.hs
bsd-3-clause
go_fast (ConsumeBreakOr k) !bs = case tryConsumeBreakOr (unsafeHead bs) of DecodeFailure -> go_fast (k False) bs DecodedToken sz _ -> go_fast (k True) (BS.unsafeDrop sz bs)
192
go_fast (ConsumeBreakOr k) !bs = case tryConsumeBreakOr (unsafeHead bs) of DecodeFailure -> go_fast (k False) bs DecodedToken sz _ -> go_fast (k True) (BS.unsafeDrop sz bs)
192
go_fast (ConsumeBreakOr k) !bs = case tryConsumeBreakOr (unsafeHead bs) of DecodeFailure -> go_fast (k False) bs DecodedToken sz _ -> go_fast (k True) (BS.unsafeDrop sz bs)
192
false
false
0
11
45
83
38
45
null
null
FranklinChen/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
getCallback :: [BC] -> [(FDesc, Int)] getCallback bc = getCallback' (reverse bc) where getCallback' (x:xs) = case hasCallback x of [] -> getCallback' xs cbs -> case findCons cbs xs of [] -> error "Idris f...
654
getCallback :: [BC] -> [(FDesc, Int)] getCallback bc = getCallback' (reverse bc) where getCallback' (x:xs) = case hasCallback x of [] -> getCallback' xs cbs -> case findCons cbs xs of [] -> error "Idris f...
654
getCallback bc = getCallback' (reverse bc) where getCallback' (x:xs) = case hasCallback x of [] -> getCallback' xs cbs -> case findCons cbs xs of [] -> error "Idris function couldn't be wrapped." ...
616
false
true
3
11
293
278
127
151
null
null
fgaray/shakespeare
Text/Hamlet/Parse.hs
mit
attrToContent (Nothing, k, [(Nothing, Nothing)]) = [DocContent $ ContentRaw $ ' ' : k]
86
attrToContent (Nothing, k, [(Nothing, Nothing)]) = [DocContent $ ContentRaw $ ' ' : k]
86
attrToContent (Nothing, k, [(Nothing, Nothing)]) = [DocContent $ ContentRaw $ ' ' : k]
86
false
false
0
8
13
42
24
18
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/SetIAMPolicy.hs
mpl-2.0
-- | OAuth access token. pldssipAccessToken :: Lens' ProjectsLocationsDataSetsSetIAMPolicy (Maybe Text) pldssipAccessToken = lens _pldssipAccessToken (\ s a -> s{_pldssipAccessToken = a})
195
pldssipAccessToken :: Lens' ProjectsLocationsDataSetsSetIAMPolicy (Maybe Text) pldssipAccessToken = lens _pldssipAccessToken (\ s a -> s{_pldssipAccessToken = a})
170
pldssipAccessToken = lens _pldssipAccessToken (\ s a -> s{_pldssipAccessToken = a})
91
true
true
1
9
29
52
25
27
null
null
johnjcamilleri/maltese-functional-morphology
lib/Dictionary.hs
lgpl-3.0
-- | Translate an inflection function with inherent information to an Entry. entryI :: Dict a => (a -> Str) -> [Inherent] -> Entry entryI f ihs = (entry_id f ihs [], dictword f, "", category f, ihs, infTable f,[])
213
entryI :: Dict a => (a -> Str) -> [Inherent] -> Entry entryI f ihs = (entry_id f ihs [], dictword f, "", category f, ihs, infTable f,[])
136
entryI f ihs = (entry_id f ihs [], dictword f, "", category f, ihs, infTable f,[])
82
true
true
0
9
39
89
45
44
null
null
jmitchell/Idris-dev
src/Idris/ASTUtils.hs
bsd-3-clause
fmodifyState :: MonadState s m => Field s a -> (a -> a) -> m () fmodifyState field f = modify $ fmodify field f
111
fmodifyState :: MonadState s m => Field s a -> (a -> a) -> m () fmodifyState field f = modify $ fmodify field f
111
fmodifyState field f = modify $ fmodify field f
47
false
true
0
9
24
59
28
31
null
null
aaronc/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
pToV' n i (Proj t idx) = Proj (pToV' n i t) idx
47
pToV' n i (Proj t idx) = Proj (pToV' n i t) idx
47
pToV' n i (Proj t idx) = Proj (pToV' n i t) idx
47
false
false
0
6
12
40
17
23
null
null
dmbarbour/awelon
hsrc/AO/AOFile.hs
bsd-3-clause
-- obtain the next 'todo' import, filtering those imports -- that have already been processed. This ensures each file -- is loaded at most once regardless of dups or cycles. getNextTodo :: (Monad m) => LoadAO m (Maybe Import) getNextTodo = get >>= \ ld -> case ld_todo ld of [] -> return Nothing ...
659
getNextTodo :: (Monad m) => LoadAO m (Maybe Import) getNextTodo = get >>= \ ld -> case ld_todo ld of [] -> return Nothing (x:xs) -> let lCompleted = fmap aof_imp (ld_completed ld) in let beenDone = L.elem x lCompleted in let ld' = ld { ld_todo = xs } in ...
484
getNextTodo = get >>= \ ld -> case ld_todo ld of [] -> return Nothing (x:xs) -> let lCompleted = fmap aof_imp (ld_completed ld) in let beenDone = L.elem x lCompleted in let ld' = ld { ld_todo = xs } in put ld' >> if beenDone then getNex...
432
true
true
4
15
215
161
81
80
null
null
yav/parsimony
src/Parsimony/Pos.hs
bsd-2-clause
setSourceLine :: SourcePos -> Line -> SourcePos setSourceLine p n = p { sourceLine = n }
95
setSourceLine :: SourcePos -> Line -> SourcePos setSourceLine p n = p { sourceLine = n }
95
setSourceLine p n = p { sourceLine = n }
42
false
true
0
6
23
32
17
15
null
null
kazu-yamamoto/rpf
RPF/Parser.hs
bsd-3-clause
opMatch :: Parser (Variable -> Constant -> Cond) opMatch = op "==" (:==)
75
opMatch :: Parser (Variable -> Constant -> Cond) opMatch = op "==" (:==)
75
opMatch = op "==" (:==)
26
false
true
0
9
15
39
18
21
null
null
Noeda/userinterface
src/Graphics/UI/Label.hs
mit
setBuddy :: HasManagedQObject a b => Label -> a -> UIAction () setBuddy label thing = liftIO $ withManagedQObject label $ \label_ptr -> withManagedQObject thing $ \(castPtr -> thing_ptr) -> set_label_buddy label_ptr thing_ptr
241
setBuddy :: HasManagedQObject a b => Label -> a -> UIAction () setBuddy label thing = liftIO $ withManagedQObject label $ \label_ptr -> withManagedQObject thing $ \(castPtr -> thing_ptr) -> set_label_buddy label_ptr thing_ptr
241
setBuddy label thing = liftIO $ withManagedQObject label $ \label_ptr -> withManagedQObject thing $ \(castPtr -> thing_ptr) -> set_label_buddy label_ptr thing_ptr
178
false
true
0
10
48
78
38
40
null
null
ocramz/slepc-hs
src/Numerical/SLEPc/Raw/Internal.hs
lgpl-3.0
typeNameId :: String -> CT.TypeSpecifier typeNameId = CT.TypeName . CT.Identifier
81
typeNameId :: String -> CT.TypeSpecifier typeNameId = CT.TypeName . CT.Identifier
81
typeNameId = CT.TypeName . CT.Identifier
40
false
true
0
6
9
25
13
12
null
null
barrucadu/nagi
lib/Imageboard/Crypto.hs
mit
secureTripCode :: Salt -> Text -> Either CryptoError Text secureTripCode = trip . base64 . sha1 where trip salt = fmap (takeLast 10 . shiftJIStoUTF8Lossy) . iteratedDES 16 salt . extend 128 . utf8toShiftJIS -- | Produce a short poster ID, by hashing the poster's IP and some thread...
354
secureTripCode :: Salt -> Text -> Either CryptoError Text secureTripCode = trip . base64 . sha1 where trip salt = fmap (takeLast 10 . shiftJIStoUTF8Lossy) . iteratedDES 16 salt . extend 128 . utf8toShiftJIS -- | Produce a short poster ID, by hashing the poster's IP and some thread...
354
secureTripCode = trip . base64 . sha1 where trip salt = fmap (takeLast 10 . shiftJIStoUTF8Lossy) . iteratedDES 16 salt . extend 128 . utf8toShiftJIS -- | Produce a short poster ID, by hashing the poster's IP and some thread -- identifier with a secret salt.
296
false
true
0
11
93
76
38
38
null
null
text-utf8/text
tests/Tests/Properties.hs
bsd-2-clause
t_toTitle_title t = all (<= 1) (caps w) where caps = fmap (T.length . T.filter isUpper) . T.words . T.toTitle -- TIL: there exist uppercase-only letters w = T.filter (\c -> if C.isUpper c then C.toLower c /= c else True) t
246
t_toTitle_title t = all (<= 1) (caps w) where caps = fmap (T.length . T.filter isUpper) . T.words . T.toTitle -- TIL: there exist uppercase-only letters w = T.filter (\c -> if C.isUpper c then C.toLower c /= c else True) t
246
t_toTitle_title t = all (<= 1) (caps w) where caps = fmap (T.length . T.filter isUpper) . T.words . T.toTitle -- TIL: there exist uppercase-only letters w = T.filter (\c -> if C.isUpper c then C.toLower c /= c else True) t
246
false
false
1
12
65
105
53
52
null
null
liyanchang/scheme-in-haskell
src/chp7.hs
mit
car [badArg] = throwError $ TypeMismatch "pair" badArg
54
car [badArg] = throwError $ TypeMismatch "pair" badArg
54
car [badArg] = throwError $ TypeMismatch "pair" badArg
54
false
false
0
6
7
22
10
12
null
null
parapluu/encore
src/back/CodeGen/CCodeNames.hs
bsd-3-clause
envVar :: CCode Lval envVar = Var env
37
envVar :: CCode Lval envVar = Var env
37
envVar = Var env
16
false
true
0
6
7
23
9
14
null
null
Unoriginal-War/unoriginal-war
src/Game.hs
mit
snapIfTrue :: Ord a => a -> (a -> a) -> (a -> a -> Bool) -> a -> a snapIfTrue boundary addFunc check v = let x = addFunc v in if check x boundary then x else boundary
198
snapIfTrue :: Ord a => a -> (a -> a) -> (a -> a -> Bool) -> a -> a snapIfTrue boundary addFunc check v = let x = addFunc v in if check x boundary then x else boundary
198
snapIfTrue boundary addFunc check v = let x = addFunc v in if check x boundary then x else boundary
131
false
true
0
11
71
88
44
44
null
null
thomasdziedzic/hs-spotify
example/high-login.hs
mit
process_events :: Broadcast () -> Session -> IO () process_events process_events_broadcast session = do -- TODO error handling (Right nextTimeout) <- processEvents session let delay_us = (1000 * fromIntegral nextTimeout) putStrLn $ "delaying " ++ show delay_us ++ "us" Broadcast.silence process_events_broadc...
390
process_events :: Broadcast () -> Session -> IO () process_events process_events_broadcast session = do -- TODO error handling (Right nextTimeout) <- processEvents session let delay_us = (1000 * fromIntegral nextTimeout) putStrLn $ "delaying " ++ show delay_us ++ "us" Broadcast.silence process_events_broadc...
390
process_events process_events_broadcast session = do -- TODO error handling (Right nextTimeout) <- processEvents session let delay_us = (1000 * fromIntegral nextTimeout) putStrLn $ "delaying " ++ show delay_us ++ "us" Broadcast.silence process_events_broadcast delay_process_events' process_events_broadca...
339
false
true
0
12
59
106
48
58
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/AssignInstance.hs
mpl-2.0
-- | 'AssignInstance' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'aiInstanceId' @::@ 'Text' -- -- * 'aiLayerIds' @::@ ['Text'] -- assignInstance :: Text -- ^ 'aiInstanceId' -> AssignInstance assignInstance p1 = AssignInstance { _aiInstanceId = p1 , _aiLayer...
340
assignInstance :: Text -- ^ 'aiInstanceId' -> AssignInstance assignInstance p1 = AssignInstance { _aiInstanceId = p1 , _aiLayerIds = mempty }
170
assignInstance p1 = AssignInstance { _aiInstanceId = p1 , _aiLayerIds = mempty }
94
true
true
0
6
75
41
27
14
null
null
mpickering/HaRe
old/testing/refacFunDef/Test15AST.hs
bsd-3-clause
f n = n * (f (n - 1))
21
f n = n * (f (n - 1))
21
f n = n * (f (n - 1))
21
false
false
0
9
8
26
13
13
null
null
AlexanderPankiv/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (IdLabel _ _ info) = idInfoLabelType info
70
labelType (IdLabel _ _ info) = idInfoLabelType info
70
labelType (IdLabel _ _ info) = idInfoLabelType info
70
false
false
0
6
26
23
10
13
null
null
adinapoli/snaplet-acid-state
examples/Site.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | The application initializer. app :: SnapletInit App App app = makeSnaplet "app" "An snaplet example application." Nothing $ do a <- nestSnaplet "acid" acid $ acidInit (PersistentState 0) addRoutes routes return $ App a
314
app :: SnapletInit App App app = makeSnaplet "app" "An snaplet example application." Nothing $ do a <- nestSnaplet "acid" acid $ acidInit (PersistentState 0) addRoutes routes return $ App a
201
app = makeSnaplet "app" "An snaplet example application." Nothing $ do a <- nestSnaplet "acid" acid $ acidInit (PersistentState 0) addRoutes routes return $ App a
174
true
true
1
13
48
74
32
42
null
null
CulpaBS/wbBach
src/Futhark/Analysis/AlgSimplify.hs
bsd-3-clause
-------------------------------------- --- MaxMin related simplifications --- -------------------------------------- simplifyScal (MaxMin _ []) = badAlgSimplifyM "Scalar MaxMin expression with empty arglist."
212
simplifyScal (MaxMin _ []) = badAlgSimplifyM "Scalar MaxMin expression with empty arglist."
95
simplifyScal (MaxMin _ []) = badAlgSimplifyM "Scalar MaxMin expression with empty arglist."
95
true
false
0
8
22
25
13
12
null
null
ribag/ganeti-experiments
src/Ganeti/Query/Instance.hs
gpl-2.0
-- | Retrieves a value from an array at an index, using the Maybe monad to -- indicate failure. maybeAt :: Int -> [a] -> Maybe a maybeAt index list | index >= length list = Nothing | otherwise = Just $ list !! index
230
maybeAt :: Int -> [a] -> Maybe a maybeAt index list | index >= length list = Nothing | otherwise = Just $ list !! index
134
maybeAt index list | index >= length list = Nothing | otherwise = Just $ list !! index
101
true
true
2
9
59
69
32
37
null
null
kmyk/proof-haskell
Main.hs
mit
f :: X -> Y f X = Y
19
f :: X -> Y f X = Y
19
f X = Y
7
false
true
0
7
8
24
10
14
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Language/Haskell/Extension.hs
bsd-3-clause
knownLanguages :: [Language] knownLanguages = [Haskell98, Haskell2010]
70
knownLanguages :: [Language] knownLanguages = [Haskell98, Haskell2010]
70
knownLanguages = [Haskell98, Haskell2010]
41
false
true
0
5
6
20
12
8
null
null
schell/pusher
src/UserOps.hs
gpl-3.0
addCreds :: UserDetail -> M.Map Bucket AwsCreds -> UserDetail addCreds (UserDetail lvl name pass creds) creds' = UserDetail lvl name pass $ M.union creds' creds
164
addCreds :: UserDetail -> M.Map Bucket AwsCreds -> UserDetail addCreds (UserDetail lvl name pass creds) creds' = UserDetail lvl name pass $ M.union creds' creds
164
addCreds (UserDetail lvl name pass creds) creds' = UserDetail lvl name pass $ M.union creds' creds
102
false
true
2
10
28
69
30
39
null
null
lgeorget/ogma
server/src/Ogma/Server.hs
mit
getDocumentH :: (Entity User) -> Int64 -> OgmaM GetDocument getDocumentH (Entity userId _) docInt = do let docId = toSqlKey docInt perm <- queryDb $ getPerm userId docId if perm >= ReadOnly then do doc <- fromJust <$> (queryDb $ get docId) -- getPerm ensures queryDb returns s...
625
getDocumentH :: (Entity User) -> Int64 -> OgmaM GetDocument getDocumentH (Entity userId _) docInt = do let docId = toSqlKey docInt perm <- queryDb $ getPerm userId docId if perm >= ReadOnly then do doc <- fromJust <$> (queryDb $ get docId) -- getPerm ensures queryDb returns s...
625
getDocumentH (Entity userId _) docInt = do let docId = toSqlKey docInt perm <- queryDb $ getPerm userId docId if perm >= ReadOnly then do doc <- fromJust <$> (queryDb $ get docId) -- getPerm ensures queryDb returns something return $ GetDocument (documentTitle doc) ...
539
false
true
0
14
256
151
72
79
null
null
np/hlatex
Language/LaTeX/Checker.hs
bsd-3-clause
checkDocument :: Document -> Maybe ErrorMessage checkDocument doc | not . null $ missingPkgs = Just ("Missing packages: " ++ show missingPkgs) | otherwise = Nothing where providedPkgs = providedPackages . documentPreamble $ doc neededPkgs = neededPackages doc missingPkgs = map getPk...
381
checkDocument :: Document -> Maybe ErrorMessage checkDocument doc | not . null $ missingPkgs = Just ("Missing packages: " ++ show missingPkgs) | otherwise = Nothing where providedPkgs = providedPackages . documentPreamble $ doc neededPkgs = neededPackages doc missingPkgs = map getPk...
381
checkDocument doc | not . null $ missingPkgs = Just ("Missing packages: " ++ show missingPkgs) | otherwise = Nothing where providedPkgs = providedPackages . documentPreamble $ doc neededPkgs = neededPackages doc missingPkgs = map getPkgName . Set.toList $ neededPkgs `Set.difference`...
333
false
true
3
9
84
107
52
55
null
null
zenhack/phascal
src/Phascal/Parser.hs
gpl-3.0
factor = choice [ liftM Var ident , parens expr , liftM Num num , sym "true" T , sym "false" F , liftM Not $ keyword "not" >> factor , liftM Pos $ keyword "+" >> factor , liftM Neg $ keyword "-" >> factor ...
334
factor = choice [ liftM Var ident , parens expr , liftM Num num , sym "true" T , sym "false" F , liftM Not $ keyword "not" >> factor , liftM Pos $ keyword "+" >> factor , liftM Neg $ keyword "-" >> factor ...
334
factor = choice [ liftM Var ident , parens expr , liftM Num num , sym "true" T , sym "false" F , liftM Not $ keyword "not" >> factor , liftM Pos $ keyword "+" >> factor , liftM Neg $ keyword "-" >> factor ...
334
false
false
1
9
174
101
47
54
null
null
narrative/stack
src/Stack/Setup.hs
bsd-3-clause
installGHCWindows :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m) => Version -> SetupInfo -> Path Abs File -> ArchiveType -> Path Abs Dir ->...
610
installGHCWindows :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m) => Version -> SetupInfo -> Path Abs File -> ArchiveType -> Path Abs Dir ->...
610
installGHCWindows version si archiveFile archiveType destDir = do tarComponent <- parseRelDir $ "ghc-" ++ versionString version withUnpackedTarball7z "GHC" si archiveFile archiveType (Just tarComponent) destDir $logInfo $ "GHC installed to " <> T.pack (toFilePath destDir)
284
false
true
0
13
188
174
81
93
null
null
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/Desugar/Generic/Others.hs
bsd-3-clause
desugarUnQual = noDesugaring
28
desugarUnQual = noDesugaring
28
desugarUnQual = noDesugaring
28
false
false
0
4
2
6
3
3
null
null
christiaanb/clash-compiler
clash-vhdl/src/CLaSH/Backend/VHDL.hs
bsd-2-clause
entity :: Component -> VHDLM Doc entity c = do rec (p,ls) <- fmap unzip (ports (maximum ls)) "entity" <+> text (componentName c) <+> "is" <$> (case p of [] -> empty _ -> indent 2 ("port" <> parens (align $ vcat $ punctuate semi (A.pure p)) <> ...
852
entity :: Component -> VHDLM Doc entity c = do rec (p,ls) <- fmap unzip (ports (maximum ls)) "entity" <+> text (componentName c) <+> "is" <$> (case p of [] -> empty _ -> indent 2 ("port" <> parens (align $ vcat $ punctuate semi (A.pure p)) <> ...
852
entity c = do rec (p,ls) <- fmap unzip (ports (maximum ls)) "entity" <+> text (componentName c) <+> "is" <$> (case p of [] -> empty _ -> indent 2 ("port" <> parens (align $ vcat $ punctuate semi (A.pure p)) <> semi) ) <$> "en...
819
false
true
0
24
317
390
195
195
null
null
erantapaa/hackage-server
Distribution/Client/Mirror/Repo/Secure.hs
bsd-3-clause
repoFP :: Sec.Path.AbsolutePath -> (Sec.RepoLayout -> Sec.RepoPath) -> FilePath repoFP repoRoot f = Sec.Path.toFilePath $ Sec.anchorRepoPathLocally repoRoot $ f Sec.hackageRepoLayout
218
repoFP :: Sec.Path.AbsolutePath -> (Sec.RepoLayout -> Sec.RepoPath) -> FilePath repoFP repoRoot f = Sec.Path.toFilePath $ Sec.anchorRepoPathLocally repoRoot $ f Sec.hackageRepoLayout
218
repoFP repoRoot f = Sec.Path.toFilePath $ Sec.anchorRepoPathLocally repoRoot $ f Sec.hackageRepoLayout
138
false
true
0
9
55
59
30
29
null
null
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Invitations/Accept.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). iaUploadProtocol :: Lens' InvitationsAccept (Maybe Text) iaUploadProtocol = lens _iaUploadProtocol (\ s a -> s{_iaUploadProtocol = a})
204
iaUploadProtocol :: Lens' InvitationsAccept (Maybe Text) iaUploadProtocol = lens _iaUploadProtocol (\ s a -> s{_iaUploadProtocol = a})
142
iaUploadProtocol = lens _iaUploadProtocol (\ s a -> s{_iaUploadProtocol = a})
85
true
true
0
8
33
49
25
24
null
null
ephemient/aoc2016
src/Day21.hs
mit
unscramble (RotateRight n) s = scramble (RotateLeft n) s
56
unscramble (RotateRight n) s = scramble (RotateLeft n) s
56
unscramble (RotateRight n) s = scramble (RotateLeft n) s
56
false
false
0
7
8
28
13
15
null
null
phadej/yaml
Data/Yaml.hs
bsd-2-clause
encode :: ToJSON a => a -> ByteString encode obj = unsafePerformIO $ runResourceT $ CL.sourceList (objToEvents $ toJSON obj) C.$$ Y.encode
158
encode :: ToJSON a => a -> ByteString encode obj = unsafePerformIO $ runResourceT $ CL.sourceList (objToEvents $ toJSON obj) C.$$ Y.encode
158
encode obj = unsafePerformIO $ runResourceT $ CL.sourceList (objToEvents $ toJSON obj) C.$$ Y.encode
120
false
true
6
8
41
64
28
36
null
null
ezyang/ghc
testsuite/tests/monadfail/MonadFailErrors.hs
bsd-3-clause
singleConMatch :: Identity a singleConMatch = do Data x <- undefined undefined
86
singleConMatch :: Identity a singleConMatch = do Data x <- undefined undefined
86
singleConMatch = do Data x <- undefined undefined
57
false
true
0
8
19
33
13
20
null
null
k16shikano/hpdft
src/PDF/ContentStream.hs
mit
dictEntry :: PSParser T.Text dictEntry = choice [ try name , try letters , T.pack <$> try hex , T.pack <$> try (many1 digit) ] <* spaces where hex = string "<" >> (manyTill (oneOf "0123456789abcdefABCDEF") (try $ string ">"))
307
dictEntry :: PSParser T.Text dictEntry = choice [ try name , try letters , T.pack <$> try hex , T.pack <$> try (many1 digit) ] <* spaces where hex = string "<" >> (manyTill (oneOf "0123456789abcdefABCDEF") (try $ string ">"))
307
dictEntry = choice [ try name , try letters , T.pack <$> try hex , T.pack <$> try (many1 digit) ] <* spaces where hex = string "<" >> (manyTill (oneOf "0123456789abcdefABCDEF") (try $ string ">"))
278
false
true
0
11
121
104
51
53
null
null
maurotrb/haskdeep
src/HaskDeep/KnownHash/Reader.hs
bsd-3-clause
skipNewline :: Parser () skipNewline = A.skip isNewline
55
skipNewline :: Parser () skipNewline = A.skip isNewline
55
skipNewline = A.skip isNewline
30
false
true
1
6
7
24
10
14
null
null
authchir/mini-ml
src/Interpreter.hs
isc
eval env (LitInt _ n) = Just (ConstInt n)
42
eval env (LitInt _ n) = Just (ConstInt n)
42
eval env (LitInt _ n) = Just (ConstInt n)
42
false
false
0
6
9
30
13
17
null
null
wtetzner/hatemail
haskell/src/Parse.hs
gpl-3.0
envelope = do C8.char '(' date <- nstring sp subject <- nstring sp from <- naddrs sp sender <- naddrs sp replyTo <- naddrs sp to <- naddrs sp ...
1,037
envelope = do C8.char '(' date <- nstring sp subject <- nstring sp from <- naddrs sp sender <- naddrs sp replyTo <- naddrs sp to <- naddrs sp ...
1,037
envelope = do C8.char '(' date <- nstring sp subject <- nstring sp from <- naddrs sp sender <- naddrs sp replyTo <- naddrs sp to <- naddrs sp ...
1,037
false
false
1
10
680
192
92
100
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Code.hs
lgpl-2.1
-- | Export a toplevel (i.e. belonging to no section) symbol. exportToplevel :: SymbolName -> CodeGen () exportToplevel t = export (Export ExportToplevel t)
156
exportToplevel :: SymbolName -> CodeGen () exportToplevel t = export (Export ExportToplevel t)
94
exportToplevel t = export (Export ExportToplevel t)
51
true
true
0
7
23
35
17
18
null
null
snoyberg/ghc
compiler/profiling/CostCentre.hs
bsd-3-clause
currentCCS = CurrentCCS
36
currentCCS = CurrentCCS
36
currentCCS = CurrentCCS
36
false
false
0
4
15
6
3
3
null
null
da-x/lamdu
Lamdu/GUI/ExpressionEdit/BinderEdit.hs
gpl-3.0
nonOperatorName _ = False
25
nonOperatorName _ = False
25
nonOperatorName _ = False
25
false
false
0
4
3
10
4
6
null
null
thalerjonathan/phd
thesis/code/sugarscape/src/test/Agent/Move.hs
gpl-3.0
------------------------------------------------------------------------------- -- selectBestSites ------------------------------------------------------------------------------- {- Assuming the following cells layout with X is the reference coord (0,0) (1,0) (1,1) (0,1) X (2,1) (0,2) (1,2) (2,2) -} ---------------...
613
test_selectBestSites_bestSugarLevel_empty :: TestTree test_selectBestSites_bestSugarLevel_empty = testCase "empty cells" $ do let bcs = selectBestSites sugarSiteMeasure (0,0) [] assertBool "cells should be empty" (null bcs)
227
test_selectBestSites_bestSugarLevel_empty = testCase "empty cells" $ do let bcs = selectBestSites sugarSiteMeasure (0,0) [] assertBool "cells should be empty" (null bcs)
173
true
true
0
12
59
61
32
29
null
null
printedheart/Dao
src/Dao/Object.hs
agpl-3.0
simpleSetInfixOp :: (forall a . Bits a => a -> a -> a) -> (T_map -> T_map -> T_map) -> Simple -> Simple -> Simple simpleSetInfixOp bit set a b = case a of OMap a -> case b of OMap b -> let map = set a b in if M.null map then ONull else OMap map _ -> OVoid OInt a -> case b of OInt b -> OI...
1,036
simpleSetInfixOp :: (forall a . Bits a => a -> a -> a) -> (T_map -> T_map -> T_map) -> Simple -> Simple -> Simple simpleSetInfixOp bit set a b = case a of OMap a -> case b of OMap b -> let map = set a b in if M.null map then ONull else OMap map _ -> OVoid OInt a -> case b of OInt b -> OI...
1,036
simpleSetInfixOp bit set a b = case a of OMap a -> case b of OMap b -> let map = set a b in if M.null map then ONull else OMap map _ -> OVoid OInt a -> case b of OInt b -> OInt $ bit a b OLong b -> OLong $ bit (toInteger a) b _ -> OVoid OLong a -> case b of OInt b -> OLong...
916
false
true
0
15
265
273
131
142
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/Xhtml/Decl.hs
gpl-3.0
-------------------------------------------------------------------------------- -- * Type families -------------------------------------------------------------------------------- ppTyFamHeader :: Bool -> Bool -> FamilyDecl DocName -> Unicode -> Qualification -> Html ppTyFamHeader summary associated d@...
891
ppTyFamHeader :: Bool -> Bool -> FamilyDecl DocName -> Unicode -> Qualification -> Html ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info , fdKindSig = mkind }) unicode qual = (case info of OpenTypeFamily | associated ...
708
ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info , fdKindSig = mkind }) unicode qual = (case info of OpenTypeFamily | associated -> keyword "type" | otherwise -> keyword "type family" DataFamily | associated -> ...
606
true
true
2
12
256
193
92
101
null
null
bgwines/zora
Zora/List.hs
bsd-3-clause
-- | List appending. -- -- > snoc 4 [1,2,3] == [1,2,3,4] snoc :: a -> [a] -> [a] snoc e l = l ++ [e]
102
snoc :: a -> [a] -> [a] snoc e l = l ++ [e]
43
snoc e l = l ++ [e]
19
true
true
0
7
27
40
23
17
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey
73
functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey
73
functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey
73
false
false
0
7
10
19
9
10
null
null
csrhodes/pandoc
src/Text/Pandoc/Writers/Textile.hs
gpl-2.0
-- | Convert list of Pandoc inline elements to Textile. inlineListToTextile :: WriterOptions -> [Inline] -> State WriterState String inlineListToTextile opts lst = mapM (inlineToTextile opts) lst >>= return . concat
217
inlineListToTextile :: WriterOptions -> [Inline] -> State WriterState String inlineListToTextile opts lst = mapM (inlineToTextile opts) lst >>= return . concat
161
inlineListToTextile opts lst = mapM (inlineToTextile opts) lst >>= return . concat
84
true
true
0
8
32
58
27
31
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
fromListNName = varQual gHC_EXTS (fsLit "fromListN") fromListNClassOpKey
74
false
false
0
7
8
19
9
10
null
null
rfranek/duckling
Duckling/Time/HR/Rules.hs
bsd-3-clause
ruleNamedday :: Rule ruleNamedday = Rule { name = "named-day" , pattern = [ regex "ponedjelja?ka?|pon\\.?" ] , prod = \_ -> Just . Token Time $ dayOfWeek 1 }
173
ruleNamedday :: Rule ruleNamedday = Rule { name = "named-day" , pattern = [ regex "ponedjelja?ka?|pon\\.?" ] , prod = \_ -> Just . Token Time $ dayOfWeek 1 }
173
ruleNamedday = Rule { name = "named-day" , pattern = [ regex "ponedjelja?ka?|pon\\.?" ] , prod = \_ -> Just . Token Time $ dayOfWeek 1 }
152
false
true
0
11
45
60
32
28
null
null
jean-edouard/manager
dbd2/Path.hs
gpl-2.0
isNullPath :: Path -> Bool isNullPath = null
44
isNullPath :: Path -> Bool isNullPath = null
44
isNullPath = null
17
false
true
0
5
7
15
8
7
null
null
Delapouite/dotfiles
link/.xmonad/xmonad.lafayette.hs
mit
-- }}} -- Pretty Print for xmobar {{{ myPP = xmobarPP { ppCurrent = xmobarColor "#D33682" "" . wrap "<" ">", ppVisible = wrap "(" ")", ppHidden = id, ppHiddenNoWindows = const "", ppTitle = xmobarColor "#FFFFFF" "", ppLayout = xmobarColor "#6C71C4" "", ppSep = " | " }
284
myPP = xmobarPP { ppCurrent = xmobarColor "#D33682" "" . wrap "<" ">", ppVisible = wrap "(" ")", ppHidden = id, ppHiddenNoWindows = const "", ppTitle = xmobarColor "#FFFFFF" "", ppLayout = xmobarColor "#6C71C4" "", ppSep = " | " }
244
myPP = xmobarPP { ppCurrent = xmobarColor "#D33682" "" . wrap "<" ">", ppVisible = wrap "(" ")", ppHidden = id, ppHiddenNoWindows = const "", ppTitle = xmobarColor "#FFFFFF" "", ppLayout = xmobarColor "#6C71C4" "", ppSep = " | " }
244
true
false
0
8
64
84
47
37
null
null
brendanhay/gogol
gogol-file/gen/Network/Google/File/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gStartTime' -- -- * 'gReason' -- -- * 'gDuration' -- -- * 'gSliName' googleCloudSaasacceleratorManag...
652
googleCloudSaasacceleratorManagementProvidersV1SloExclusion :: GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion googleCloudSaasacceleratorManagementProvidersV1SloExclusion = GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion' { _gStartTime = Nothing , _gReason = Nothing , _gDuratio...
363
googleCloudSaasacceleratorManagementProvidersV1SloExclusion = GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion' { _gStartTime = Nothing , _gReason = Nothing , _gDuration = Nothing , _gSliName = Nothing }
236
true
true
0
6
94
48
34
14
null
null
jwbuurlage/category-theory-programmers
examples/parser/lisp_like_dsl.hs
mit
dependencies :: Expression -> [Id] dependencies expr = toList $ getvars expr where getvars (Variable x) = singleton x getvars (BinaryOperation _ (e, e')) = getvars e `union` getvars e' getvars _ = Set.empty
230
dependencies :: Expression -> [Id] dependencies expr = toList $ getvars expr where getvars (Variable x) = singleton x getvars (BinaryOperation _ (e, e')) = getvars e `union` getvars e' getvars _ = Set.empty
230
dependencies expr = toList $ getvars expr where getvars (Variable x) = singleton x getvars (BinaryOperation _ (e, e')) = getvars e `union` getvars e' getvars _ = Set.empty
195
false
true
2
8
57
102
47
55
null
null
meteficha/yesod
yesod-core/Yesod/Core/Internal/TH.hs
mit
mkYesodDataGeneral :: String -> Bool -> [ResourceTree String] -> Q [Dec] mkYesodDataGeneral name isSub res = do let (name':rest) = words name fmap fst $ mkYesodGeneral name' (fmap Left rest) isSub return res -- | See 'mkYesodData'.
240
mkYesodDataGeneral :: String -> Bool -> [ResourceTree String] -> Q [Dec] mkYesodDataGeneral name isSub res = do let (name':rest) = words name fmap fst $ mkYesodGeneral name' (fmap Left rest) isSub return res -- | See 'mkYesodData'.
240
mkYesodDataGeneral name isSub res = do let (name':rest) = words name fmap fst $ mkYesodGeneral name' (fmap Left rest) isSub return res -- | See 'mkYesodData'.
167
false
true
0
11
45
92
44
48
null
null
meiersi-11ce/stack
src/Stack/Types/Config.hs
bsd-3-clause
resolverName :: Resolver -> Text resolverName (ResolverSnapshot name) = renderSnapName name
91
resolverName :: Resolver -> Text resolverName (ResolverSnapshot name) = renderSnapName name
91
resolverName (ResolverSnapshot name) = renderSnapName name
58
false
true
0
7
10
27
13
14
null
null
GaloisInc/gidl
src/Gidl/Schema.hs
bsd-3-clause
consumerSchema :: Interface -> Schema consumerSchema ir = Schema "Consumer" [(mkMsgId m, m) | m <- messages ] where messages = concatMap consumerMessages (interfaceMethods ir)
179
consumerSchema :: Interface -> Schema consumerSchema ir = Schema "Consumer" [(mkMsgId m, m) | m <- messages ] where messages = concatMap consumerMessages (interfaceMethods ir)
179
consumerSchema ir = Schema "Consumer" [(mkMsgId m, m) | m <- messages ] where messages = concatMap consumerMessages (interfaceMethods ir)
141
false
true
0
8
28
62
31
31
null
null
fredmorcos/attic
projects/pet/archive/pet_expenses_haskell_tmp_2/Main.hs
isc
foo :: String -> String -- foo s = map toUpper s foo = unwords . words
70
foo :: String -> String foo = unwords . words
45
foo = unwords . words
21
true
true
0
7
16
27
12
15
null
null
petester42/haskell-hockey
src/Hockey/Types.hs
mit
fromStrength Powerplay = 702
28
fromStrength Powerplay = 702
28
fromStrength Powerplay = 702
28
false
false
0
5
3
9
4
5
null
null
Heather/Idris-dev
src/IRTS/JavaScript/Codegen.hs
bsd-3-clause
doCodegenDecl :: CGConf -> Map Name LDecl -> LDecl -> (Text, CGStats) doCodegenDecl conf defs (LFun _ n args def) = let (ast, stats) = cgFun conf defs n args def in (T.concat [jsStmt2Text (JsComment $ T.pack $ show n), "\n", jsStmt2Text ast], stats)
253
doCodegenDecl :: CGConf -> Map Name LDecl -> LDecl -> (Text, CGStats) doCodegenDecl conf defs (LFun _ n args def) = let (ast, stats) = cgFun conf defs n args def in (T.concat [jsStmt2Text (JsComment $ T.pack $ show n), "\n", jsStmt2Text ast], stats)
253
doCodegenDecl conf defs (LFun _ n args def) = let (ast, stats) = cgFun conf defs n args def in (T.concat [jsStmt2Text (JsComment $ T.pack $ show n), "\n", jsStmt2Text ast], stats)
183
false
true
0
15
47
130
64
66
null
null
rimmington/pirandello
src/Pipes/Network/TCP/UIO.hs
gpl-3.0
(>^>) ∷ (MFunctor b, MonadTrans a, MonadTrans b, Monad i, Monad (b i), Monad (a i), Monad (b (a i))) ⇒ Producer x (a i) r → Consumer x (b i) r → Effect (b (a i)) r (>^>) a b = hoist lift a >-> hoist (hoist lift) b
217
(>^>) ∷ (MFunctor b, MonadTrans a, MonadTrans b, Monad i, Monad (b i), Monad (a i), Monad (b (a i))) ⇒ Producer x (a i) r → Consumer x (b i) r → Effect (b (a i)) r (>^>) a b = hoist lift a >-> hoist (hoist lift) b
217
(>^>) a b = hoist lift a >-> hoist (hoist lift) b
49
false
true
0
13
53
165
81
84
null
null
gbataille/pandoc
src/Text/Pandoc/Templates.hs
gpl-2.0
pConditional :: Parser Template pConditional = do P.try $ P.string "$if(" id' <- pIdent P.string ")$" -- if newline after the "if", then a newline after "endif" will be swallowed multiline <- P.option False (True <$ skipEndline) ifContents <- pTemplate elseContents <- P.option mempty $ P.try $ ...
560
pConditional :: Parser Template pConditional = do P.try $ P.string "$if(" id' <- pIdent P.string ")$" -- if newline after the "if", then a newline after "endif" will be swallowed multiline <- P.option False (True <$ skipEndline) ifContents <- pTemplate elseContents <- P.option mempty $ P.try $ ...
560
pConditional = do P.try $ P.string "$if(" id' <- pIdent P.string ")$" -- if newline after the "if", then a newline after "endif" will be swallowed multiline <- P.option False (True <$ skipEndline) ifContents <- pTemplate elseContents <- P.option mempty $ P.try $ do P.string "$else$" ...
528
false
true
0
13
162
166
72
94
null
null
sdiehl/ghc
compiler/GHC/Hs/ImpExp.hs
bsd-3-clause
ieNames (IEThingAll _ (L _ n) ) = [ieWrappedName n]
58
ieNames (IEThingAll _ (L _ n) ) = [ieWrappedName n]
58
ieNames (IEThingAll _ (L _ n) ) = [ieWrappedName n]
58
false
false
0
9
16
31
15
16
null
null
rueshyna/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/UserProFiles/Guardians/Get.hs
mpl-2.0
-- | OAuth access token. upfggAccessToken :: Lens' UserProFilesGuardiansGet (Maybe Text) upfggAccessToken = lens _upfggAccessToken (\ s a -> s{_upfggAccessToken = a})
174
upfggAccessToken :: Lens' UserProFilesGuardiansGet (Maybe Text) upfggAccessToken = lens _upfggAccessToken (\ s a -> s{_upfggAccessToken = a})
149
upfggAccessToken = lens _upfggAccessToken (\ s a -> s{_upfggAccessToken = a})
85
true
true
0
9
29
48
25
23
null
null
ekmett/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
cmmOffset _ (CmmRegOff reg m) byte_off = cmmRegOff reg (m+byte_off)
67
cmmOffset _ (CmmRegOff reg m) byte_off = cmmRegOff reg (m+byte_off)
67
cmmOffset _ (CmmRegOff reg m) byte_off = cmmRegOff reg (m+byte_off)
67
false
false
0
7
9
33
16
17
null
null
mcmaniac/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
-- | If the expression is trivial and doesn't refer to a global -- register, return it. Otherwise, assign the expression to a -- temporary register and return an expression referring to this -- register. assignTemp_ :: CmmExpr -> FCode CmmExpr assignTemp_ e | isTrivialCmmExpr e && hasNoGlobalRegs e = return e ...
457
assignTemp_ :: CmmExpr -> FCode CmmExpr assignTemp_ e | isTrivialCmmExpr e && hasNoGlobalRegs e = return e | otherwise = do reg <- newTemp (cmmExprType e) stmtC (CmmAssign (CmmLocal reg) e) return (CmmReg (CmmLocal reg))
252
assignTemp_ e | isTrivialCmmExpr e && hasNoGlobalRegs e = return e | otherwise = do reg <- newTemp (cmmExprType e) stmtC (CmmAssign (CmmLocal reg) e) return (CmmReg (CmmLocal reg))
212
true
true
0
13
102
114
51
63
null
null
randen/cabal
cabal-install/Distribution/Client/InstallPlan.hs
bsd-3-clause
checkConfiguredPackage :: (Package srcpkg, Package ipkg) => GenericPlanPackage ipkg srcpkg iresult ifailure -> Maybe srcpkg checkConfiguredPackage (Configured pkg) = Just pkg
220
checkConfiguredPackage :: (Package srcpkg, Package ipkg) => GenericPlanPackage ipkg srcpkg iresult ifailure -> Maybe srcpkg checkConfiguredPackage (Configured pkg) = Just pkg
220
checkConfiguredPackage (Configured pkg) = Just pkg
50
false
true
0
7
66
54
26
28
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Attrs/Attrs.hs
bsd-3-clause
sbAllowTopNavigatiion = attrSetSandbox (Sandbox [SBAllowTopNavigation])
71
sbAllowTopNavigatiion = attrSetSandbox (Sandbox [SBAllowTopNavigation])
71
sbAllowTopNavigatiion = attrSetSandbox (Sandbox [SBAllowTopNavigation])
71
false
false
1
8
4
21
9
12
null
null