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
bitemyapp/hakaru
Language/Hakaru/Parser/Parser.hs
bsd-3-clause
if_expr :: Parser UExpr if_expr = do reserved "if" test_expr <- expr -- localIndentation Ge (absoluteIndentation expr) reservedOp ":" texp <- expr -- localIndentation Ge (absoluteIndentation expr) reserved "else" reservedOp ":" fexp <- expr -- localIndentation Ge (absoluteIndentation expr) return ...
344
if_expr :: Parser UExpr if_expr = do reserved "if" test_expr <- expr -- localIndentation Ge (absoluteIndentation expr) reservedOp ":" texp <- expr -- localIndentation Ge (absoluteIndentation expr) reserved "else" reservedOp ":" fexp <- expr -- localIndentation Ge (absoluteIndentation expr) return ...
344
if_expr = do reserved "if" test_expr <- expr -- localIndentation Ge (absoluteIndentation expr) reservedOp ":" texp <- expr -- localIndentation Ge (absoluteIndentation expr) reserved "else" reservedOp ":" fexp <- expr -- localIndentation Ge (absoluteIndentation expr) return $ If test_expr texp fexp
320
false
true
0
9
66
82
34
48
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Graph.hs
gpl-3.0
gmap :: (DynGraph gr) => (Context a b -> Context c d) -> gr a b -> gr c d; gmap f = ufold (\ c -> (f c &)) empty
121
gmap :: (DynGraph gr) => (Context a b -> Context c d) -> gr a b -> gr c d gmap f = ufold (\ c -> (f c &)) empty
118
gmap f = ufold (\ c -> (f c &)) empty
37
false
true
1
9
39
86
41
45
null
null
romanb/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/ModifyReplicationGroup.hs
mpl-2.0
-- | 'ModifyReplicationGroup' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'mrgApplyImmediately' @::@ 'Maybe' 'Bool' -- -- * 'mrgAutoMinorVersionUpgrade' @::@ 'Maybe' 'Bool' -- -- * 'mrgAutomaticFailoverEnabled' @::@ 'Maybe' 'Bool' -- -- * 'mrgCacheParameterGroupName' @::@ 'Maybe' ...
1,882
modifyReplicationGroup :: Text -- ^ 'mrgReplicationGroupId' -> ModifyReplicationGroup modifyReplicationGroup p1 = ModifyReplicationGroup { _mrgReplicationGroupId = p1 , _mrgReplicationGroupDescription = Nothing , _mrgPrimaryClusterId = Nothing , _mrgSnapshottin...
926
modifyReplicationGroup p1 = ModifyReplicationGroup { _mrgReplicationGroupId = p1 , _mrgReplicationGroupDescription = Nothing , _mrgPrimaryClusterId = Nothing , _mrgSnapshottingClusterId = Nothing , _mrgAutomaticFailoverEnabled = Nothing , _mrgCacheSecurityGroupNames ...
817
true
true
0
6
397
153
111
42
null
null
mettekou/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
consDataCon_RDR = nameRdrName consDataConName
45
consDataCon_RDR = nameRdrName consDataConName
45
consDataCon_RDR = nameRdrName consDataConName
45
false
false
0
5
3
9
4
5
null
null
markus1189/xmonad-contrib-710
XMonad/Util/EZConfig.hs
bsd-3-clause
-- | Given a configuration record and a list of (key sequence -- description, action) pairs, check the key sequence descriptions -- for validity, and warn the user (via a popup xmessage window) of -- any unparseable or duplicate key sequences. This function is -- appropriate for adding to your @startupHook@, a...
2,059
checkKeymap :: XConfig l -> [(String, a)] -> X () checkKeymap conf km = warn (doKeymapCheck conf km) where warn ([],[]) = return () warn (bad,dup) = spawn $ "xmessage 'Warning:\n" ++ msg "bad" bad ++ "\n" ++ msg "duplicate" dup ++ "'" msg _ [] ...
680
checkKeymap conf km = warn (doKeymapCheck conf km) where warn ([],[]) = return () warn (bad,dup) = spawn $ "xmessage 'Warning:\n" ++ msg "bad" bad ++ "\n" ++ msg "duplicate" dup ++ "'" msg _ [] = "" msg m xs = m ++ " keybindings detecte...
630
true
true
4
14
478
218
128
90
null
null
mariefarrell/Hets
Common/AutoProofUtils.hs
gpl-2.0
initFNodes :: [LNode DGNodeLab] -> [FNode] initFNodes = foldr (\ n@(_, l) t -> case globalTheory l of Nothing -> t Just gt -> let gt' = dgn_theory l gs = map fst $ getThGoals gt' in if null gs then t ...
422
initFNodes :: [LNode DGNodeLab] -> [FNode] initFNodes = foldr (\ n@(_, l) t -> case globalTheory l of Nothing -> t Just gt -> let gt' = dgn_theory l gs = map fst $ getThGoals gt' in if null gs then t ...
422
initFNodes = foldr (\ n@(_, l) t -> case globalTheory l of Nothing -> t Just gt -> let gt' = dgn_theory l gs = map fst $ getThGoals gt' in if null gs then t else FNode (getDGNo...
379
false
true
0
17
212
139
70
69
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
buildName = varQual gHC_BASE (fsLit "build") buildIdKey
68
buildName = varQual gHC_BASE (fsLit "build") buildIdKey
68
buildName = varQual gHC_BASE (fsLit "build") buildIdKey
68
false
false
0
7
19
19
9
10
null
null
sdiehl/llvm-codegen
src/LLVM/Codegen/Logic.hs
mit
-- | Constant true value true :: Codegen Operand true = return $ constant i1 1
78
true :: Codegen Operand true = return $ constant i1 1
53
true = return $ constant i1 1
29
true
true
0
6
15
24
12
12
null
null
Jiggins/Matrix
Math/Matrix.hs
gpl-3.0
identity :: Num a => Int -> Matrix a identity n = matrix n n (\(i,j) -> if i == j then 1 else 0)
96
identity :: Num a => Int -> Matrix a identity n = matrix n n (\(i,j) -> if i == j then 1 else 0)
96
identity n = matrix n n (\(i,j) -> if i == j then 1 else 0)
59
false
true
0
9
24
61
32
29
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/Referencesets/Get.hs
mpl-2.0
-- | Pretty-print response. rgPp :: Lens' ReferencesetsGet Bool rgPp = lens _rgPp (\ s a -> s{_rgPp = a})
105
rgPp :: Lens' ReferencesetsGet Bool rgPp = lens _rgPp (\ s a -> s{_rgPp = a})
77
rgPp = lens _rgPp (\ s a -> s{_rgPp = a})
41
true
true
1
9
19
43
22
21
null
null
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/GetAutoForwarding.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). usgafUploadType :: Lens' UsersSettingsGetAutoForwarding (Maybe Text) usgafUploadType = lens _usgafUploadType (\ s a -> s{_usgafUploadType = a})
222
usgafUploadType :: Lens' UsersSettingsGetAutoForwarding (Maybe Text) usgafUploadType = lens _usgafUploadType (\ s a -> s{_usgafUploadType = a})
151
usgafUploadType = lens _usgafUploadType (\ s a -> s{_usgafUploadType = a})
82
true
true
0
8
34
49
25
24
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Prim.hs
bsd-3-clause
bvOr _ (BV w x) (BV _ y) = BV w (x .|. y)
42
bvOr _ (BV w x) (BV _ y) = BV w (x .|. y)
42
bvOr _ (BV w x) (BV _ y) = BV w (x .|. y)
42
false
false
2
7
14
44
20
24
null
null
fatuhoku/haskell-noughts-and-crosses
src/NAA/Interface/GL.hs
bsd-3-clause
createWindow :: String -> Size -> IO () createWindow title (Size w h) = do initSuccess <- initialize if initSuccess then return () else fail "createWindow: failed initialising GLFW" windSuccess <- openWindow $ defaultDisplayOptions { displayOptions_width = fromIntegral w ...
634
createWindow :: String -> Size -> IO () createWindow title (Size w h) = do initSuccess <- initialize if initSuccess then return () else fail "createWindow: failed initialising GLFW" windSuccess <- openWindow $ defaultDisplayOptions { displayOptions_width = fromIntegral w ...
634
createWindow title (Size w h) = do initSuccess <- initialize if initSuccess then return () else fail "createWindow: failed initialising GLFW" windSuccess <- openWindow $ defaultDisplayOptions { displayOptions_width = fromIntegral w , displa...
594
false
true
0
12
211
133
62
71
null
null
brendanhay/gogol
gogol-dlp/gen/Network/Google/DLP/Types/Product.hs
mpl-2.0
-- | Set if the transformation was limited to a specific InfoType. gpdvtsInfoType :: Lens' GooglePrivacyDlpV2TransformationSummary (Maybe GooglePrivacyDlpV2InfoType) gpdvtsInfoType = lens _gpdvtsInfoType (\ s a -> s{_gpdvtsInfoType = a})
245
gpdvtsInfoType :: Lens' GooglePrivacyDlpV2TransformationSummary (Maybe GooglePrivacyDlpV2InfoType) gpdvtsInfoType = lens _gpdvtsInfoType (\ s a -> s{_gpdvtsInfoType = a})
178
gpdvtsInfoType = lens _gpdvtsInfoType (\ s a -> s{_gpdvtsInfoType = a})
79
true
true
0
9
36
48
25
23
null
null
shlevy/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
-- | Makes a list @(:)@ for lists of the specified type mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr mkConsExpr ty hd tl = mkCoreConApps consDataCon [Type ty, hd, tl]
176
mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr mkConsExpr ty hd tl = mkCoreConApps consDataCon [Type ty, hd, tl]
120
mkConsExpr ty hd tl = mkCoreConApps consDataCon [Type ty, hd, tl]
65
true
true
0
7
31
48
25
23
null
null
gridaphobe/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
bh_RDR = mkVarUnqual (fsLit "b#")
42
bh_RDR = mkVarUnqual (fsLit "b#")
42
bh_RDR = mkVarUnqual (fsLit "b#")
42
false
false
0
7
13
15
7
8
null
null
wolftune/hoogle
src/General/Template.hs
bsd-3-clause
templateFile :: FilePath -> Template templateFile = templateTree . Lam
70
templateFile :: FilePath -> Template templateFile = templateTree . Lam
70
templateFile = templateTree . Lam
33
false
true
0
5
9
19
10
9
null
null
kawamuray/ganeti
src/Ganeti/Constants.hs
gpl-2.0
htSmPool :: String htSmPool = "pool"
36
htSmPool :: String htSmPool = "pool"
36
htSmPool = "pool"
17
false
true
0
4
5
11
6
5
null
null
neongreen/megaparsec
Text/Megaparsec/Expr.hs
bsd-2-clause
pInfixN :: MonadParsec s m t => m (a -> a -> a) -> m a -> a -> m a pInfixN op p x = do f <- op y <- p return $ f x y -- | @pInfixL op p x@ parses left-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
292
pInfixN :: MonadParsec s m t => m (a -> a -> a) -> m a -> a -> m a pInfixN op p x = do f <- op y <- p return $ f x y -- | @pInfixL op p x@ parses left-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
292
pInfixN op p x = do f <- op y <- p return $ f x y -- | @pInfixL op p x@ parses left-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
225
false
true
0
10
74
90
43
47
null
null
Mikolaj/haskell-linux-perf
ghc-events-perf/ghc-events-perf-record.hs
bsd-3-clause
-- | Record these events by default unless the user specifies alternatives. defaultEvents :: [String] defaultEvents = [ -- scheduler events to record "sched:sched_process_exit", "sched:sched_kthread_stop", "sched:sched_kthread_stop_ret", "sched:sched_wakeup", "sched:sched_wakeup_new", "sc...
21,239
defaultEvents :: [String] defaultEvents = [ -- scheduler events to record "sched:sched_process_exit", "sched:sched_kthread_stop", "sched:sched_kthread_stop_ret", "sched:sched_wakeup", "sched:sched_wakeup_new", "sched:sched_switch", "sched:sched_migrate_task", "sched:sched_process_...
21,163
defaultEvents = [ -- scheduler events to record "sched:sched_process_exit", "sched:sched_kthread_stop", "sched:sched_kthread_stop_ret", "sched:sched_wakeup", "sched:sched_wakeup_new", "sched:sched_switch", "sched:sched_migrate_task", "sched:sched_process_free", "sched:sched_pr...
21,137
true
true
19
7
3,169
1,859
1,209
650
null
null
mightymoose/liquidhaskell
tests/pos/primInt0.hs
bsd-3-clause
itake n = 1 + itake (n - 1)
27
itake n = 1 + itake (n - 1)
27
itake n = 1 + itake (n - 1)
27
false
false
3
7
8
28
11
17
null
null
danchoi/jsonsql
Main.hs
mit
tests = test [ "testOne" ~: [] @=? parseText "VALUES (:title, :year, :ratings.imdb)" , "test complex key" ~: [] @=? parseText "values (:imdb, :versions.Rental.HD[0]);" ]
221
tests = test [ "testOne" ~: [] @=? parseText "VALUES (:title, :year, :ratings.imdb)" , "test complex key" ~: [] @=? parseText "values (:imdb, :versions.Rental.HD[0]);" ]
221
tests = test [ "testOne" ~: [] @=? parseText "VALUES (:title, :year, :ratings.imdb)" , "test complex key" ~: [] @=? parseText "values (:imdb, :versions.Rental.HD[0]);" ]
221
false
false
1
9
76
45
20
25
null
null
ahodgen/archer-calc
src/BuiltIn/Math.hs
bsd-2-clause
intToDbl :: Integer -> Double intToDbl = fromIntegral
53
intToDbl :: Integer -> Double intToDbl = fromIntegral
53
intToDbl = fromIntegral
23
false
true
0
7
7
22
9
13
null
null
arne-schroppe/dash
src/Language/Dash/VM/DataEncoding.hs
mit
encodeCompoundSymbolRef :: ConstAddr -> VMWord encodeCompoundSymbolRef = makeVMValue tagCompoundSymbol . ensureRange . fromIntegral . constAddrToInt
226
encodeCompoundSymbolRef :: ConstAddr -> VMWord encodeCompoundSymbolRef = makeVMValue tagCompoundSymbol . ensureRange . fromIntegral . constAddrToInt
226
encodeCompoundSymbolRef = makeVMValue tagCompoundSymbol . ensureRange . fromIntegral . constAddrToInt
179
false
true
0
8
92
30
15
15
null
null
kelecorix/api-afftrack
src/Afftrack/API/Brand/Merchant.hs
bsd-3-clause
getMerchantBlacklist = Call "mer_merchant" "getMerchant" "GET" [ Param "merchant_id" True "" ]
118
getMerchantBlacklist = Call "mer_merchant" "getMerchant" "GET" [ Param "merchant_id" True "" ]
118
getMerchantBlacklist = Call "mer_merchant" "getMerchant" "GET" [ Param "merchant_id" True "" ]
118
false
false
0
7
35
25
12
13
null
null
acowley/language-c
src/Language/C/Data/Ident.hs
bsd-3-clause
bits21 :: Int bits21 = 2^(21::Int)
34
bits21 :: Int bits21 = 2^(21::Int)
34
bits21 = 2^(21::Int)
20
false
true
2
6
5
29
13
16
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_BOOL_VEC2 :: GLenum gl_BOOL_VEC2 = 0x8B57
44
gl_BOOL_VEC2 :: GLenum gl_BOOL_VEC2 = 0x8B57
44
gl_BOOL_VEC2 = 0x8B57
21
false
true
0
4
5
11
6
5
null
null
jimcrayne/lmdb-bindings
Database/LMDB.hs
agpl-3.0
copyTable :: Bool -> FilePath -> S.ByteString -> FilePath -> S.ByteString -> IO [(Bool, (S.ByteString, S.ByteString))] copyTable bAllowDuplicates dir1 tbl dir2 tbl2 | dir1 /= dir2 = withManyDBSDo [dir1,dir2] $ \[dbs1,dbs2] -> do d <- openDB dbs1 tbl flag <- internalGetDBFlags d let (<>) = S.append -- S....
763
copyTable :: Bool -> FilePath -> S.ByteString -> FilePath -> S.ByteString -> IO [(Bool, (S.ByteString, S.ByteString))] copyTable bAllowDuplicates dir1 tbl dir2 tbl2 | dir1 /= dir2 = withManyDBSDo [dir1,dir2] $ \[dbs1,dbs2] -> do d <- openDB dbs1 tbl flag <- internalGetDBFlags d let (<>) = S.append -- S....
763
copyTable bAllowDuplicates dir1 tbl dir2 tbl2 | dir1 /= dir2 = withManyDBSDo [dir1,dir2] $ \[dbs1,dbs2] -> do d <- openDB dbs1 tbl flag <- internalGetDBFlags d let (<>) = S.append -- S.putStrLn (tbl <> S.pack " FLAGS(1): " <> S.pack (show flag)) compare <- wrapCmpFn (\_ _ -> return 1) d2 <- if b...
644
false
true
0
15
191
313
158
155
null
null
kylcarte/harihara
src/Main.hs
bsd-3-clause
-- | The sum configuration must contain the following fields: -- music-dirs :: [String] -- It must contain these fields if the program is to use -- a lastfm operation: -- api-key :: String -- secret :: String -- These may be placed in either .harihara or .lastfm_auth, -- at the user's disc...
442
configFiles :: [ConfigFile] configFiles = [ Required "$(HOME)/.harihara" , Optional "$(HOME)/.lastfm_auth" ]
114
configFiles = [ Required "$(HOME)/.harihara" , Optional "$(HOME)/.lastfm_auth" ]
86
true
true
0
6
100
34
22
12
null
null
CulpaBS/wbBach
src/futhark-py.hs
bsd-3-clause
main :: IO () main = mainWithOptions newCompilerConfig commandLineOptions inspectNonOptions where inspectNonOptions [file] config = Just $ compile config file inspectNonOptions _ _ = Nothing
210
main :: IO () main = mainWithOptions newCompilerConfig commandLineOptions inspectNonOptions where inspectNonOptions [file] config = Just $ compile config file inspectNonOptions _ _ = Nothing
210
main = mainWithOptions newCompilerConfig commandLineOptions inspectNonOptions where inspectNonOptions [file] config = Just $ compile config file inspectNonOptions _ _ = Nothing
196
false
true
1
6
44
57
28
29
null
null
thlorenz/Pricetory
src/Network/RandomRequestGenerator.hs
bsd-3-clause
instruments = 1 :: SymbolCode
29
instruments = 1 :: SymbolCode
29
instruments = 1 :: SymbolCode
29
false
false
2
5
4
15
5
10
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
extendsClassKey, classClassKey :: Unique extendsClassKey = mkPreludeClassUnique 46
82
extendsClassKey, classClassKey :: Unique extendsClassKey = mkPreludeClassUnique 46
82
extendsClassKey = mkPreludeClassUnique 46
41
false
true
0
5
7
16
9
7
null
null
tsuraan/hs-blake2
src/Crypto/Hash/Tsuraan/Blake2/Parallel.hs
bsd-3-clause
-- |Finish hashing. This returns the digest of all the data that's been given -- to the 'update' function. finalize :: Ctx -- ^Hashing context -> IO ByteString finalize (Ctx state) = runFinalize blake2bp_final state
234
finalize :: Ctx -- ^Hashing context -> IO ByteString finalize (Ctx state) = runFinalize blake2bp_final state
127
finalize (Ctx state) = runFinalize blake2bp_final state
55
true
true
0
7
53
35
18
17
null
null
sjoerdvisscher/icfp2011
src/ltg.hs
bsd-3-clause
report :: V.Vector Slot -> String report slots = concatMap (uncurry showIndexedSlot) (zip [0..] (V.toList slots))
138
report :: V.Vector Slot -> String report slots = concatMap (uncurry showIndexedSlot) (zip [0..] (V.toList slots))
138
report slots = concatMap (uncurry showIndexedSlot) (zip [0..] (V.toList slots))
104
false
true
0
10
40
60
27
33
null
null
michel-steuwer/haskell-patterns
src/Patterns.hs
mit
reorder :: forall a. [a] -> [a] reorder = id
44
reorder :: forall a. [a] -> [a] reorder = id
44
reorder = id
12
false
true
0
7
9
26
15
11
null
null
dsorokin/aivika-experiment-chart
examples/InventorySystem/Model.hs
bsd-3-clause
- | The time between demands for a radio. avgRadioDemand = 0.2
63
avgRadioDemand = 0.2
20
avgRadioDemand = 0.2
20
true
false
0
9
12
32
14
18
null
null
mariefarrell/Hets
LF/ComorphFram.hs
gpl-2.0
takeSymValue :: Symbol -> [DEF] -> Maybe EXP takeSymValue sym defs = case defs of [] -> Nothing Def sym2 _ val : ds -> if sym == sym2 then val else takeSymValue sym ds
233
takeSymValue :: Symbol -> [DEF] -> Maybe EXP takeSymValue sym defs = case defs of [] -> Nothing Def sym2 _ val : ds -> if sym == sym2 then val else takeSymValue sym ds
233
takeSymValue sym defs = case defs of [] -> Nothing Def sym2 _ val : ds -> if sym == sym2 then val else takeSymValue sym ds
188
false
true
0
9
100
76
38
38
null
null
cornell-pl/HsAdapton
weak-ctrie/Control/Concurrent/Map/Array.hs
bsd-3-clause
update :: a -> Int -> Int -> Array a -> Array a update x i n arr = runST $ do marr <- newArray n undefined copyArray marr 0 arr 0 n writeArray marr i x unsafeFreezeArray marr
191
update :: a -> Int -> Int -> Array a -> Array a update x i n arr = runST $ do marr <- newArray n undefined copyArray marr 0 arr 0 n writeArray marr i x unsafeFreezeArray marr
191
update x i n arr = runST $ do marr <- newArray n undefined copyArray marr 0 arr 0 n writeArray marr i x unsafeFreezeArray marr
143
false
true
2
10
55
93
40
53
null
null
duplode/stack
src/main/Main.hs
bsd-3-clause
upgradeCmd :: Bool -> GlobalOpts -> IO () upgradeCmd fromGit go = withConfigAndLock go $ upgrade fromGit (globalResolver go)
128
upgradeCmd :: Bool -> GlobalOpts -> IO () upgradeCmd fromGit go = withConfigAndLock go $ upgrade fromGit (globalResolver go)
128
upgradeCmd fromGit go = withConfigAndLock go $ upgrade fromGit (globalResolver go)
86
false
true
0
8
22
47
22
25
null
null
creichert/wai
warp/Network/Wai/Handler/Warp/MultiMap.hs
mit
---------------------------------------------------------------- -- | O(log n) search :: Int -> MMap v -> Maybe v search k m = case I.lookup k m of Nothing -> Nothing Just s -> Just $! NE.head s -- | O(log n)
219
search :: Int -> MMap v -> Maybe v search k m = case I.lookup k m of Nothing -> Nothing Just s -> Just $! NE.head s -- | O(log n)
139
search k m = case I.lookup k m of Nothing -> Nothing Just s -> Just $! NE.head s -- | O(log n)
104
true
true
4
7
47
68
32
36
null
null
sdiehl/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
mkCast (Tick t expr) co = Tick t (mkCast expr co)
52
mkCast (Tick t expr) co = Tick t (mkCast expr co)
52
mkCast (Tick t expr) co = Tick t (mkCast expr co)
52
false
false
0
7
13
32
15
17
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- * V1StatusDetails -- | 'v1StatusDetailsCauses' Lens v1StatusDetailsCausesL :: Lens_' V1StatusDetails (Maybe [V1StatusCause]) v1StatusDetailsCausesL f V1StatusDetails{..} = (\v1StatusDetailsCauses -> V1StatusDetails { v1StatusDetailsCauses, ..} ) <$> f v1StatusDetailsCauses
277
v1StatusDetailsCausesL :: Lens_' V1StatusDetails (Maybe [V1StatusCause]) v1StatusDetailsCausesL f V1StatusDetails{..} = (\v1StatusDetailsCauses -> V1StatusDetails { v1StatusDetailsCauses, ..} ) <$> f v1StatusDetailsCauses
221
v1StatusDetailsCausesL f V1StatusDetails{..} = (\v1StatusDetailsCauses -> V1StatusDetails { v1StatusDetailsCauses, ..} ) <$> f v1StatusDetailsCauses
148
true
true
1
8
27
66
33
33
null
null
beni55/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/Prim.hs
bsd-3-clause
-- | The null address. nullAddr# :: Addr# nullAddr# = let x = x in x
70
nullAddr# :: Addr# nullAddr# = let x = x in x
45
nullAddr# = let x = x in x
26
true
true
0
8
17
30
13
17
null
null
olsner/m3
CodeGen.hs
bsd-3-clause
-- The truly no-op case: the source and target (LLVM!) type are the same cgCast to from lv | encodeType to == encodeType from = return lv
137
cgCast to from lv | encodeType to == encodeType from = return lv
64
cgCast to from lv | encodeType to == encodeType from = return lv
64
true
false
0
9
26
38
15
23
null
null
jmitchell/Idris-dev
src/IRTS/Simplified.hs
bsd-3-clause
-- | Let-bind a list of expressions to variables and construct the -- inner expression with the bound variables. -- If an expression in the list is already a variable we don’t bind it -- again. bindExprs :: [DExp] -> ([LVar] -> SExp) -> State (DDefs, Int) SExp bindExprs es f = bindExprs' es f [] where bindExprs' []...
501
bindExprs :: [DExp] -> ([LVar] -> SExp) -> State (DDefs, Int) SExp bindExprs es f = bindExprs' es f [] where bindExprs' [] f vars = return $ f (reverse vars) bindExprs' (e:es) f vars = bindExprM e (\var -> bindExprs' es f (var:vars)) -- | Special case of 'bindExprs' for just one expression
307
bindExprs es f = bindExprs' es f [] where bindExprs' [] f vars = return $ f (reverse vars) bindExprs' (e:es) f vars = bindExprM e (\var -> bindExprs' es f (var:vars)) -- | Special case of 'bindExprs' for just one expression
240
true
true
0
10
106
136
73
63
null
null
mhwombat/creatur-image-wains
src/ALife/Creatur/Wain/Image/ExamineAgent.hs
bsd-3-clause
fetchWain :: (DS.Serialize a, DS.Serialize rt, Ord a, Tweaker rt, Response a ~ Pattern rt) => FilePath -> IO (PatternWain a rt) fetchWain f = do x <- BS.readFile f let (Right w) = DS.decode x return w
218
fetchWain :: (DS.Serialize a, DS.Serialize rt, Ord a, Tweaker rt, Response a ~ Pattern rt) => FilePath -> IO (PatternWain a rt) fetchWain f = do x <- BS.readFile f let (Right w) = DS.decode x return w
218
fetchWain f = do x <- BS.readFile f let (Right w) = DS.decode x return w
78
false
true
0
12
55
117
53
64
null
null
neothemachine/monadiccp
src/Control/CP/SearchSpec/Language.hs
bsd-3-clause
simplValue (Lt x y) = Lt (simplValue x) (simplValue y)
55
simplValue (Lt x y) = Lt (simplValue x) (simplValue y)
55
simplValue (Lt x y) = Lt (simplValue x) (simplValue y)
55
false
false
0
7
10
34
16
18
null
null
chpatrick/language-glsl
Language/GLSL/Parser.hs
bsd-3-clause
parameterDeclaration :: P ParameterDeclaration parameterDeclaration = do tq <- optionMaybe parameterTypeQualifier q <- optionMaybe parameterQualifier s <- typeSpecifier m <- optionMaybe $ do i <- identifier b <- optionMaybe $ between lbracket rbracket constantExpression -- FIXME can't the bracket be emp...
392
parameterDeclaration :: P ParameterDeclaration parameterDeclaration = do tq <- optionMaybe parameterTypeQualifier q <- optionMaybe parameterQualifier s <- typeSpecifier m <- optionMaybe $ do i <- identifier b <- optionMaybe $ between lbracket rbracket constantExpression -- FIXME can't the bracket be emp...
392
parameterDeclaration = do tq <- optionMaybe parameterTypeQualifier q <- optionMaybe parameterQualifier s <- typeSpecifier m <- optionMaybe $ do i <- identifier b <- optionMaybe $ between lbracket rbracket constantExpression -- FIXME can't the bracket be empty, i.e. a[] ? return (i,b) return $ Para...
345
false
true
0
13
74
106
48
58
null
null
databrary/databrary
src/Model/Activity.hs
agpl-3.0
lookupVolumeActivity :: (MonadDB c m, MonadHasIdentity c m) => Volume -> m [Activity] lookupVolumeActivity vol = do ident <- peek va <- chainPrev (const ()) <$> dbQuery $(selectQuery selectActivityVolume $ "!WHERE volume.id = ${volumeId $ volumeRow vol} AND " ++ activityQual) aa <- chainPrev (partyId . partyR...
489
lookupVolumeActivity :: (MonadDB c m, MonadHasIdentity c m) => Volume -> m [Activity] lookupVolumeActivity vol = do ident <- peek va <- chainPrev (const ()) <$> dbQuery $(selectQuery selectActivityVolume $ "!WHERE volume.id = ${volumeId $ volumeRow vol} AND " ++ activityQual) aa <- chainPrev (partyId . partyR...
489
lookupVolumeActivity vol = do ident <- peek va <- chainPrev (const ()) <$> dbQuery $(selectQuery selectActivityVolume $ "!WHERE volume.id = ${volumeId $ volumeRow vol} AND " ++ activityQual) aa <- chainPrev (partyId . partyRow . volumeAccessParty . activityAccess) <$> dbQuery $(selectQuery (selectActivity...
403
false
true
0
16
82
163
79
84
null
null
rrnewton/accelerate
Data/Array/Accelerate/Debug/Stats.hs
bsd-3-clause
addTick :: TickCount -> Tick -> TickCount addTick tc t = Map.alter f t tc where f Nothing = Just 1 f (Just x) = let x' = x+1 in x' `seq` Just x'
157
addTick :: TickCount -> Tick -> TickCount addTick tc t = Map.alter f t tc where f Nothing = Just 1 f (Just x) = let x' = x+1 in x' `seq` Just x'
157
addTick tc t = Map.alter f t tc where f Nothing = Just 1 f (Just x) = let x' = x+1 in x' `seq` Just x'
115
false
true
0
9
46
87
41
46
null
null
aburnett88/HSat
tests-src/Test/Make/Instances/CNF.hs
mit
name :: String name = "CNF"
27
name :: String name = "CNF"
27
name = "CNF"
12
false
true
0
4
5
11
6
5
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/Workscreen.hs
bsd-2-clause
fromWorkspace :: Int -> [WorkspaceId] -> [Workscreen] fromWorkspace n ws = map (\(a,b) -> Workscreen a b) $ zip [0..] (fromWorkspace' n ws)
139
fromWorkspace :: Int -> [WorkspaceId] -> [Workscreen] fromWorkspace n ws = map (\(a,b) -> Workscreen a b) $ zip [0..] (fromWorkspace' n ws)
139
fromWorkspace n ws = map (\(a,b) -> Workscreen a b) $ zip [0..] (fromWorkspace' n ws)
85
false
true
0
9
22
72
38
34
null
null
GetShopTV/swagger2
src/Data/Swagger/Internal.hs
bsd-3-clause
mimeListDataType :: DataType mimeListDataType = mkDataType "Data.Swagger.MimeList" [mimeListConstr]
99
mimeListDataType :: DataType mimeListDataType = mkDataType "Data.Swagger.MimeList" [mimeListConstr]
99
mimeListDataType = mkDataType "Data.Swagger.MimeList" [mimeListConstr]
70
false
true
0
6
7
19
10
9
null
null
keera-studios/hsQt
Qtc/Gui/QFont.hs
bsd-2-clause
setUnderline :: QFont a -> ((Bool)) -> IO () setUnderline x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QFont_setUnderline cobj_x0 (toCBool x1)
148
setUnderline :: QFont a -> ((Bool)) -> IO () setUnderline x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QFont_setUnderline cobj_x0 (toCBool x1)
148
setUnderline x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QFont_setUnderline cobj_x0 (toCBool x1)
103
false
true
0
9
27
64
32
32
null
null
tonyfischetti/exercism
haskell/grains/Grains.hs
mit
square i = 2 * square (i-1)
27
square i = 2 * square (i-1)
27
square i = 2 * square (i-1)
27
false
false
0
8
6
23
11
12
null
null
ihc/futhark
src/Language/Futhark/Attributes.hs
isc
addRecordArrayElemAliases :: RecordArrayElemTypeBase dim asf -> (asf -> ast) -> RecordArrayElemTypeBase dim ast addRecordArrayElemAliases t f = bimap id f t
208
addRecordArrayElemAliases :: RecordArrayElemTypeBase dim asf -> (asf -> ast) -> RecordArrayElemTypeBase dim ast addRecordArrayElemAliases t f = bimap id f t
208
addRecordArrayElemAliases t f = bimap id f t
44
false
true
0
8
72
48
23
25
null
null
robdockins/edison
edison-api/src/Data/Edison/Seq/ListSeq.hs
mit
zip = Data.List.zip
19
zip = Data.List.zip
19
zip = Data.List.zip
19
false
false
1
6
2
13
5
8
null
null
iliastsi/gac
src/utils/Bag.hs
mit
anyBag p (UnitBag v) = p v
30
anyBag p (UnitBag v) = p v
30
anyBag p (UnitBag v) = p v
30
false
false
0
7
10
20
9
11
null
null
ndmitchell/extra
src/System/Directory/Extra.hs
bsd-3-clause
-- | Like 'listContents', but only returns the files in a directory, not other directories. -- Each file will be prefixed by the query directory. -- -- > listTest listFiles ["bar.txt","foo/baz.txt","zoo"] ["bar.txt","zoo"] listFiles :: FilePath -> IO [FilePath] listFiles dir = filterM doesFileExist =<< listContents d...
322
listFiles :: FilePath -> IO [FilePath] listFiles dir = filterM doesFileExist =<< listContents dir
97
listFiles dir = filterM doesFileExist =<< listContents dir
58
true
true
0
7
47
38
20
18
null
null
sheyll/b9-vm-image-builder
src/lib/B9/Artifact/Content/ErlTerms.hs
mit
erlCharEscaped :: Parser Char erlCharEscaped = char '\\' >> ( do _ <- char '^' choice (zipWith escapedChar ccodes creplacements) <|> do _ <- char 'x' do ds <- between (char '{') (char '...
1,482
erlCharEscaped :: Parser Char erlCharEscaped = char '\\' >> ( do _ <- char '^' choice (zipWith escapedChar ccodes creplacements) <|> do _ <- char 'x' do ds <- between (char '{') (char '...
1,482
erlCharEscaped = char '\\' >> ( do _ <- char '^' choice (zipWith escapedChar ccodes creplacements) <|> do _ <- char 'x' do ds <- between (char '{') (char '}') (fmap h...
1,452
false
true
11
27
645
520
253
267
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M12/D18/Solution.hs
mit
usage :: IO () usage = putStrLn (unlines ["","oeResp [json] <url>", "", "\twhere json indicates that the response will be in json", "\t url is the url of the asset to be embed",""])
193
usage :: IO () usage = putStrLn (unlines ["","oeResp [json] <url>", "", "\twhere json indicates that the response will be in json", "\t url is the url of the asset to be embed",""])
193
usage = putStrLn (unlines ["","oeResp [json] <url>", "", "\twhere json indicates that the response will be in json", "\t url is the url of the asset to be embed",""])
178
false
true
0
8
44
43
24
19
null
null
plow-technologies/ircbrowse
src/Ircbrowse/Controllers.hs
bsd-3-clause
getChannel :: Controller c s Channel getChannel = getChannelMaybe >>= maybe (error "expected a channel on this page!") return
161
getChannel :: Controller c s Channel getChannel = getChannelMaybe >>= maybe (error "expected a channel on this page!") return
161
getChannel = getChannelMaybe >>= maybe (error "expected a channel on this page!") return
124
false
true
3
7
54
38
17
21
null
null
hsyl20/HViperVM
lib/ViperVM/Backends/OpenCL/Program.hs
lgpl-3.0
getProgramInfoSize :: OpenCLLibrary -> CLProgram -> CLProgramInfo_ -> IO CSize getProgramInfoSize lib prg infoid = alloca $ \(value_size :: Ptr CSize) -> do whenSuccess (rawClGetProgramInfo lib prg infoid 0 nullPtr value_size) $ peek value_size -- | Return the program reference count. The reference count retur...
564
getProgramInfoSize :: OpenCLLibrary -> CLProgram -> CLProgramInfo_ -> IO CSize getProgramInfoSize lib prg infoid = alloca $ \(value_size :: Ptr CSize) -> do whenSuccess (rawClGetProgramInfo lib prg infoid 0 nullPtr value_size) $ peek value_size -- | Return the program reference count. The reference count retur...
564
getProgramInfoSize lib prg infoid = alloca $ \(value_size :: Ptr CSize) -> do whenSuccess (rawClGetProgramInfo lib prg infoid 0 nullPtr value_size) $ peek value_size -- | Return the program reference count. The reference count returned should be -- considered immediately stale. It is unsuitable for general use...
485
false
true
0
12
86
87
45
42
null
null
robeverest/accelerate
Data/Array/Accelerate/Debug.hs
bsd-3-clause
-- Add an entry to the statistics counters -- tick :: Tick -> a -> a tick t next = unsafePerformIO (modifyIORef' statistics (simplTick t)) `seq` next
149
tick :: Tick -> a -> a tick t next = unsafePerformIO (modifyIORef' statistics (simplTick t)) `seq` next
103
tick t next = unsafePerformIO (modifyIORef' statistics (simplTick t)) `seq` next
80
true
true
0
10
26
49
26
23
null
null
rleshchinskiy/vector
Data/Vector.hs
bsd-3-clause
unsafeHeadM = G.unsafeHeadM
27
unsafeHeadM = G.unsafeHeadM
27
unsafeHeadM = G.unsafeHeadM
27
false
false
0
5
2
8
4
4
null
null
kojiromike/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
helphead = [ (["Command"], SpecialHeaderArg, "Purpose"), ([""], NoArg, "") ]
84
helphead = [ (["Command"], SpecialHeaderArg, "Purpose"), ([""], NoArg, "") ]
84
helphead = [ (["Command"], SpecialHeaderArg, "Purpose"), ([""], NoArg, "") ]
84
false
false
0
7
17
36
23
13
null
null
vincenthz/language-c
src/Language/C/Analysis/ConstEval.hs
bsd-3-clause
-- Use the withWordBytes function to wrap the results around to the -- correct word size intUnOp :: CUnaryOp -> Integer -> Maybe Integer intUnOp CPlusOp i = Just i
163
intUnOp :: CUnaryOp -> Integer -> Maybe Integer intUnOp CPlusOp i = Just i
74
intUnOp CPlusOp i = Just i
26
true
true
0
8
29
37
17
20
null
null
karljs/blunderbot
src/BlunderLib/Types.hs
bsd-3-clause
ppRank :: M.Map Position (Maybe Unit) -> Int -> String ppRank sqs r | r >= 1 = toEnum (r + fromEnum '0') : ' ' : map (ppLookUnit sqs r) [1..8] ++ "\n" ++ ppRank sqs (pred r) | otherwise = " abcdefgh\n"
225
ppRank :: M.Map Position (Maybe Unit) -> Int -> String ppRank sqs r | r >= 1 = toEnum (r + fromEnum '0') : ' ' : map (ppLookUnit sqs r) [1..8] ++ "\n" ++ ppRank sqs (pred r) | otherwise = " abcdefgh\n"
225
ppRank sqs r | r >= 1 = toEnum (r + fromEnum '0') : ' ' : map (ppLookUnit sqs r) [1..8] ++ "\n" ++ ppRank sqs (pred r) | otherwise = " abcdefgh\n"
170
false
true
3
9
67
121
55
66
null
null
olsner/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (FCTIWZ reg1 reg2) = pprUnary (sLit "fctiwz") reg1 reg2
64
pprInstr (FCTIWZ reg1 reg2) = pprUnary (sLit "fctiwz") reg1 reg2
64
pprInstr (FCTIWZ reg1 reg2) = pprUnary (sLit "fctiwz") reg1 reg2
64
false
false
0
7
9
30
14
16
null
null
li-zhirui/JSAnalyzer
JSAnalyzer.hs
mit
traverseExpression (JSArrayLiteral exprs) =traverseExpressions exprs
68
traverseExpression (JSArrayLiteral exprs) =traverseExpressions exprs
68
traverseExpression (JSArrayLiteral exprs) =traverseExpressions exprs
68
false
false
0
7
4
18
8
10
null
null
kawamuray/ganeti
src/Ganeti/Types.hs
gpl-2.0
addParamsToStorageUnit _ (SURaw StorageSharedFile key) = SUSharedFile key
73
addParamsToStorageUnit _ (SURaw StorageSharedFile key) = SUSharedFile key
73
addParamsToStorageUnit _ (SURaw StorageSharedFile key) = SUSharedFile key
73
false
false
1
6
7
24
10
14
null
null
wz1000/haskell-lsp
lsp-test/src/Language/LSP/Test.hs
mit
outgoingCalls :: CallHierarchyOutgoingCallsParams -> Session [CallHierarchyOutgoingCall] outgoingCalls = resolveRequestWithListResp SCallHierarchyOutgoingCalls
159
outgoingCalls :: CallHierarchyOutgoingCallsParams -> Session [CallHierarchyOutgoingCall] outgoingCalls = resolveRequestWithListResp SCallHierarchyOutgoingCalls
159
outgoingCalls = resolveRequestWithListResp SCallHierarchyOutgoingCalls
70
false
true
0
7
9
24
12
12
null
null
philopon/find-hackage
src/StorePackage.hs
mit
parseUrl' s0 = do let (proto, s1) = T.breakOnEnd "://" (T.pack s0) (user, s2) = T.breakOnEnd ":" s1 (pass, s3) = T.breakOnEnd "@" s2 req <- parseUrl . concat $ map T.unpack [proto, s3] return $ applyBasicAuth (T.encodeUtf8 $ T.init user) (T.encodeUtf8 $ T.init pass) req
300
parseUrl' s0 = do let (proto, s1) = T.breakOnEnd "://" (T.pack s0) (user, s2) = T.breakOnEnd ":" s1 (pass, s3) = T.breakOnEnd "@" s2 req <- parseUrl . concat $ map T.unpack [proto, s3] return $ applyBasicAuth (T.encodeUtf8 $ T.init user) (T.encodeUtf8 $ T.init pass) req
300
parseUrl' s0 = do let (proto, s1) = T.breakOnEnd "://" (T.pack s0) (user, s2) = T.breakOnEnd ":" s1 (pass, s3) = T.breakOnEnd "@" s2 req <- parseUrl . concat $ map T.unpack [proto, s3] return $ applyBasicAuth (T.encodeUtf8 $ T.init user) (T.encodeUtf8 $ T.init pass) req
300
false
false
0
13
75
148
73
75
null
null
danchoi/dsvt
Template.hs
mit
process :: Arrow' process = processTopDown ( interpolateValues >>> ngClass "ng-class" >>> ngShow "ng-show" >>> ngHide "ng-hide" >>> ngBind "ng-bind" )
185
process :: Arrow' process = processTopDown ( interpolateValues >>> ngClass "ng-class" >>> ngShow "ng-show" >>> ngHide "ng-hide" >>> ngBind "ng-bind" )
185
process = processTopDown ( interpolateValues >>> ngClass "ng-class" >>> ngShow "ng-show" >>> ngHide "ng-hide" >>> ngBind "ng-bind" )
167
false
true
0
11
55
45
21
24
null
null
spechub/Hets
RelationalScheme/Keywords.hs
gpl-2.0
rsInteger :: String rsInteger = "integer"
41
rsInteger :: String rsInteger = "integer"
41
rsInteger = "integer"
21
false
true
0
6
5
18
7
11
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 6808 = 2415
31
getValueFromProduct 6808 = 2415
31
getValueFromProduct 6808 = 2415
31
false
false
0
5
3
9
4
5
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter6.hs
mit
-- Alternative definition of invertColour: invertColour' :: Picture -> Picture invertColour' pic = [ [ invertChar ch | ch <- line ] | line <- pic ]
151
invertColour' :: Picture -> Picture invertColour' pic = [ [ invertChar ch | ch <- line ] | line <- pic ]
107
invertColour' pic = [ [ invertChar ch | ch <- line ] | line <- pic ]
71
true
true
0
9
30
50
24
26
null
null
fmapfmapfmap/amazonka
amazonka-redshift/test/Test/AWS/Gen/Redshift.hs
mpl-2.0
testDescribeOrderableClusterOptionsResponse :: DescribeOrderableClusterOptionsResponse -> TestTree testDescribeOrderableClusterOptionsResponse = res "DescribeOrderableClusterOptionsResponse" "fixture/DescribeOrderableClusterOptionsResponse.proto" redshift (Proxy :: Proxy DescribeOrderableClusterOptions)
320
testDescribeOrderableClusterOptionsResponse :: DescribeOrderableClusterOptionsResponse -> TestTree testDescribeOrderableClusterOptionsResponse = res "DescribeOrderableClusterOptionsResponse" "fixture/DescribeOrderableClusterOptionsResponse.proto" redshift (Proxy :: Proxy DescribeOrderableClusterOptions)
320
testDescribeOrderableClusterOptionsResponse = res "DescribeOrderableClusterOptionsResponse" "fixture/DescribeOrderableClusterOptionsResponse.proto" redshift (Proxy :: Proxy DescribeOrderableClusterOptions)
221
false
true
0
6
30
36
17
19
null
null
sdiehl/ghc
testsuite/tests/polykinds/T6035.hs
bsd-3-clause
zero :: SList '[ '[] ] zero = SCons SNil SNil
45
zero :: SList '[ '[] ] zero = SCons SNil SNil
45
zero = SCons SNil SNil
22
false
true
0
9
10
28
14
14
null
null
afcowie/new-snap-server
src/Snap/Internal/Http/Server/Config.hs
bsd-3-clause
setStartupHook :: (StartupInfo m a -> IO ()) -> Config m a -> Config m a setStartupHook x c = c { startupHook = Just x }
123
setStartupHook :: (StartupInfo m a -> IO ()) -> Config m a -> Config m a setStartupHook x c = c { startupHook = Just x }
123
setStartupHook x c = c { startupHook = Just x }
47
false
true
0
9
29
62
30
32
null
null
scvalex/dissemina2
Utils.hs
gpl-3.0
readRequestUri :: Socket -> IO FilePath readRequestUri sock = do -- FIXME Do a better job of reading the request's first line. requestLine <- recv sock 1024 let ("GET" : uri : _) = words requestLine return ('.' : uri)
233
readRequestUri :: Socket -> IO FilePath readRequestUri sock = do -- FIXME Do a better job of reading the request's first line. requestLine <- recv sock 1024 let ("GET" : uri : _) = words requestLine return ('.' : uri)
233
readRequestUri sock = do -- FIXME Do a better job of reading the request's first line. requestLine <- recv sock 1024 let ("GET" : uri : _) = words requestLine return ('.' : uri)
193
false
true
0
12
55
71
33
38
null
null
seckcoder/vector
Data/Vector/Storable.hs
bsd-3-clause
minimum = G.minimum
19
minimum = G.minimum
19
minimum = G.minimum
19
false
false
1
6
2
12
4
8
null
null
evilcandybag/Microscopesoft
hs/microlint.hs
gpl-2.0
main = do as <- getArgs mapM_ verifyFile as -- | Verify that a file is OK, including parsing and contents.
111
main = do as <- getArgs mapM_ verifyFile as -- | Verify that a file is OK, including parsing and contents.
111
main = do as <- getArgs mapM_ verifyFile as -- | Verify that a file is OK, including parsing and contents.
111
false
false
1
8
25
26
10
16
null
null
d12frosted/optparse-applicative-kb
Options/Applicative/Common.hs
bsd-3-clause
evalParser (AltP p1 p2) = evalParser p1 <|> evalParser p2
57
evalParser (AltP p1 p2) = evalParser p1 <|> evalParser p2
57
evalParser (AltP p1 p2) = evalParser p1 <|> evalParser p2
57
false
false
0
7
9
27
12
15
null
null
lostbean/sledge
src/File/ODFReader.hs
gpl-3.0
parseDiscODF :: ByteString -> DiscODF parseDiscODF odf = case parseOnly parseAll odf of Left err -> error ("[ODFReader] Error reading discrete ODF: " ++ show err) Right xs -> xs
185
parseDiscODF :: ByteString -> DiscODF parseDiscODF odf = case parseOnly parseAll odf of Left err -> error ("[ODFReader] Error reading discrete ODF: " ++ show err) Right xs -> xs
185
parseDiscODF odf = case parseOnly parseAll odf of Left err -> error ("[ODFReader] Error reading discrete ODF: " ++ show err) Right xs -> xs
147
false
true
0
11
37
64
28
36
null
null
jberryman/chan-benchmarks
Benchmarks.hs
bsd-3-clause
readMaybeAtomicModifyTVar :: Int -> IO () readMaybeAtomicModifyTVar n = do counter <- newTVarIO 0 stack1 <- newTVarIO [] -- non-contentious work done on these: stack2 <- newTVarIO [] let op stck = do cnt <- readTVarIO counter atomically $ modifyTVar stck (\st-> cnt:st) ...
660
readMaybeAtomicModifyTVar :: Int -> IO () readMaybeAtomicModifyTVar n = do counter <- newTVarIO 0 stack1 <- newTVarIO [] -- non-contentious work done on these: stack2 <- newTVarIO [] let op stck = do cnt <- readTVarIO counter atomically $ modifyTVar stck (\st-> cnt:st) ...
660
readMaybeAtomicModifyTVar n = do counter <- newTVarIO 0 stack1 <- newTVarIO [] -- non-contentious work done on these: stack2 <- newTVarIO [] let op stck = do cnt <- readTVarIO counter atomically $ modifyTVar stck (\st-> cnt:st) cnt' <- readTVarIO counter ...
618
false
true
0
18
236
225
103
122
null
null
olorin/amazonka
gen/src/Gen/AST/Data/Syntax.hs
mpl-2.0
funD :: Text -> Exp -> InstDecl funD f = InsDecl . patBind noLoc (pvar f)
73
funD :: Text -> Exp -> InstDecl funD f = InsDecl . patBind noLoc (pvar f)
73
funD f = InsDecl . patBind noLoc (pvar f)
41
false
true
0
8
15
42
19
23
null
null
GaloisInc/halvm-ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"
56
lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"
56
lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"
56
false
false
0
5
5
13
5
8
null
null
spockwangs/scheme.in.haskell
list6.3.hs
unlicense
spaces :: Parser () spaces = skipMany1 space
44
spaces :: Parser () spaces = skipMany1 space
44
spaces = skipMany1 space
24
false
true
0
7
7
24
10
14
null
null
hvr/text
Data/Text/Show.hs
bsd-2-clause
unpack :: Text -> String unpack = S.unstreamList . stream
57
unpack :: Text -> String unpack = S.unstreamList . stream
57
unpack = S.unstreamList . stream
32
false
true
0
6
9
21
11
10
null
null
jml/graphql-api
src/GraphQL/Internal/Syntax/Tokens.hs
bsd-3-clause
whiteSpace :: Parser () whiteSpace = peekChar >>= traverse_ (\c -> if isSpace c || c == ',' then anyChar *> whiteSpace else when (c == '#') $ manyTill anyChar endOfLine *> whiteSpace)
193
whiteSpace :: Parser () whiteSpace = peekChar >>= traverse_ (\c -> if isSpace c || c == ',' then anyChar *> whiteSpace else when (c == '#') $ manyTill anyChar endOfLine *> whiteSpace)
193
whiteSpace = peekChar >>= traverse_ (\c -> if isSpace c || c == ',' then anyChar *> whiteSpace else when (c == '#') $ manyTill anyChar endOfLine *> whiteSpace)
169
false
true
2
13
42
85
41
44
null
null
seereason/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
displayVer :: VersionRange -> String displayVer = display . simplifyVersionRange
80
displayVer :: VersionRange -> String displayVer = display . simplifyVersionRange
80
displayVer = display . simplifyVersionRange
43
false
true
0
7
9
26
11
15
null
null
HaNoiCodingDojo/HNCDSession12
ReloadCountdown.hs
mit
gun seconds | seconds == 0 = "loaded" | otherwise = "unloaded"
67
gun seconds | seconds == 0 = "loaded" | otherwise = "unloaded"
67
gun seconds | seconds == 0 = "loaded" | otherwise = "unloaded"
67
false
false
0
8
16
34
14
20
null
null
olorin/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/CheckDNSAvailability.hs
mpl-2.0
-- | The fully qualified CNAME to reserve when CreateEnvironment is called -- with the provided prefix. cdarsFullyQualifiedCNAME :: Lens' CheckDNSAvailabilityResponse (Maybe Text) cdarsFullyQualifiedCNAME = lens _cdarsFullyQualifiedCNAME (\ s a -> s{_cdarsFullyQualifiedCNAME = a})
281
cdarsFullyQualifiedCNAME :: Lens' CheckDNSAvailabilityResponse (Maybe Text) cdarsFullyQualifiedCNAME = lens _cdarsFullyQualifiedCNAME (\ s a -> s{_cdarsFullyQualifiedCNAME = a})
177
cdarsFullyQualifiedCNAME = lens _cdarsFullyQualifiedCNAME (\ s a -> s{_cdarsFullyQualifiedCNAME = a})
101
true
true
0
9
33
47
26
21
null
null
typedrat/typedrat-site
app/Typedrat/Templates/PostEditor.hs
gpl-3.0
postEditorTemplate :: (TVContains c "user" (Maybe (User Hask)) xs) => RatTemplate xs () postEditorTemplate = article_ [id_ "new-post"] $ do form_ [method_ "post", action_ "/new_post"] $ do input_ [type_ "text", name_ "title", placeholder_ "Post Title"] textarea_ [name_ "body"] "" section_ [...
910
postEditorTemplate :: (TVContains c "user" (Maybe (User Hask)) xs) => RatTemplate xs () postEditorTemplate = article_ [id_ "new-post"] $ do form_ [method_ "post", action_ "/new_post"] $ do input_ [type_ "text", name_ "title", placeholder_ "Post Title"] textarea_ [name_ "body"] "" section_ [...
910
postEditorTemplate = article_ [id_ "new-post"] $ do form_ [method_ "post", action_ "/new_post"] $ do input_ [type_ "text", name_ "title", placeholder_ "Post Title"] textarea_ [name_ "body"] "" section_ [class_ "preview-area"] $ do Just user <- askVar (K :: Key "user") ...
822
false
true
0
21
263
301
137
164
null
null
urbanslug/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off)
73
mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off)
73
mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off)
73
false
false
0
7
26
22
10
12
null
null
deweyvm/pone
src/Pone/Parser/Expr.hs
gpl-3.0
parseDefinitionBody :: Parser (Maybe (Expr (Type Kind))) parseDefinitionBody = (reserved "as" *> (Just <$> parseExpr)) <|> (reserved "abstract" *> return Nothing)
181
parseDefinitionBody :: Parser (Maybe (Expr (Type Kind))) parseDefinitionBody = (reserved "as" *> (Just <$> parseExpr)) <|> (reserved "abstract" *> return Nothing)
181
parseDefinitionBody = (reserved "as" *> (Just <$> parseExpr)) <|> (reserved "abstract" *> return Nothing)
124
false
true
0
11
39
66
33
33
null
null
fumieval/jugendstil
src/Jugendstil/Doc/Chart.hs
bsd-3-clause
getMinMaxOf :: Ord a => Fold s a -> s -> MinMax a getMinMaxOf l = foldMapOf l (join MinMax)
91
getMinMaxOf :: Ord a => Fold s a -> s -> MinMax a getMinMaxOf l = foldMapOf l (join MinMax)
91
getMinMaxOf l = foldMapOf l (join MinMax)
41
false
true
0
9
19
54
23
31
null
null
gaetjen/FunFreakyPatMan
src/HasseTree.hs
mit
removeInfrequent minSupport ht 1 = filter (\x -> (count x) >= minSupport) ht
76
removeInfrequent minSupport ht 1 = filter (\x -> (count x) >= minSupport) ht
76
removeInfrequent minSupport ht 1 = filter (\x -> (count x) >= minSupport) ht
76
false
false
0
10
12
36
18
18
null
null
soumith/fbthrift
thrift/lib/hs/Thrift/Protocol/Binary.hs
apache-2.0
parseType :: P.Parser ThriftType parseType = toEnum . fromIntegral <$> P.anyWord8
81
parseType :: P.Parser ThriftType parseType = toEnum . fromIntegral <$> P.anyWord8
81
parseType = toEnum . fromIntegral <$> P.anyWord8
48
false
true
0
6
10
26
13
13
null
null