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
WraithM/haskell-opaleye
src/Opaleye/Internal/Aggregate.hs
bsd-3-clause
extractAggregateFields :: T.Tag -> (Maybe (HPQ.AggrOp, [HPQ.OrderExpr], HPQ.AggrDistinct), HPQ.PrimExpr) -> PM.PM [(HPQ.Symbol, (Maybe (HPQ.AggrOp, [HPQ.OrderExpr], HPQ.AggrDistinct), HPQ.PrimExpr))] HPQ.PrimExpr extractAggregateFields = PM.extractAttr "result"
267
extractAggregateFields :: T.Tag -> (Maybe (HPQ.AggrOp, [HPQ.OrderExpr], HPQ.AggrDistinct), HPQ.PrimExpr) -> PM.PM [(HPQ.Symbol, (Maybe (HPQ.AggrOp, [HPQ.OrderExpr], HPQ.AggrDistinct), HPQ.PrimExpr))] HPQ.PrimExpr extractAggregateFields = PM.extractAttr "result"
267
extractAggregateFields = PM.extractAttr "result"
48
false
true
0
14
27
104
58
46
null
null
rleshchinskiy/vector
Data/Vector/Internal/Check.hs
bsd-3-clause
False || x = x
14
False || x = x
14
False || x = x
14
false
false
0
5
4
16
6
10
null
null
choener/FormalGrammars
src/TwoTableNussinov.hs
gpl-3.0
runNussinov :: Int -> String -> (Int,[String]) runNussinov k inp = (d, take k . S.toList . unId $ axiom b) where i = VU.fromList . Prelude.map toUpper $ inp n = VU.length i !(Z:.s:.t) = mutateTablesDefault $ gNussinov bpmax (ITbl EmptyOk (PA.fromAssocs (subword 0 0) (subword 0 n) (-9...
1,664
runNussinov :: Int -> String -> (Int,[String]) runNussinov k inp = (d, take k . S.toList . unId $ axiom b) where i = VU.fromList . Prelude.map toUpper $ inp n = VU.length i !(Z:.s:.t) = mutateTablesDefault $ gNussinov bpmax (ITbl EmptyOk (PA.fromAssocs (subword 0 0) (subword 0 n) (-9...
1,664
runNussinov k inp = (d, take k . S.toList . unId $ axiom b) where i = VU.fromList . Prelude.map toUpper $ inp n = VU.length i !(Z:.s:.t) = mutateTablesDefault $ gNussinov bpmax (ITbl EmptyOk (PA.fromAssocs (subword 0 0) (subword 0 n) (-999999) [])) (ITbl EmptyOk (PA....
1,617
false
true
0
14
416
380
189
191
null
null
valderman/haste-app
src/Haste/App.hs
mit
native _ = error "expression only available on native nodes"
60
native _ = error "expression only available on native nodes"
60
native _ = error "expression only available on native nodes"
60
false
false
0
5
9
12
5
7
null
null
mikegehard/haskellBookExercises
chapter11/Trees.hs
mit
preorder (Node left val right) = val : (preorder left ++ preorder right)
72
preorder (Node left val right) = val : (preorder left ++ preorder right)
72
preorder (Node left val right) = val : (preorder left ++ preorder right)
72
false
false
0
8
12
36
17
19
null
null
ezyang/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
gen_Ix_binds :: SrcSpan -> TyCon -> TcM (LHsBinds GhcPs, BagDerivStuff) gen_Ix_binds loc tycon = do dflags <- getDynFlags return $ if isEnumerationTyCon tycon then (enum_ixes dflags, listToBag $ map DerivAuxBind [DerivCon2Tag tycon, DerivTag2Con tycon, DerivMaxTag tycon]) else (s...
7,158
gen_Ix_binds :: SrcSpan -> TyCon -> TcM (LHsBinds GhcPs, BagDerivStuff) gen_Ix_binds loc tycon = do dflags <- getDynFlags return $ if isEnumerationTyCon tycon then (enum_ixes dflags, listToBag $ map DerivAuxBind [DerivCon2Tag tycon, DerivTag2Con tycon, DerivMaxTag tycon]) else (si...
7,157
gen_Ix_binds loc tycon = do dflags <- getDynFlags return $ if isEnumerationTyCon tycon then (enum_ixes dflags, listToBag $ map DerivAuxBind [DerivCon2Tag tycon, DerivTag2Con tycon, DerivMaxTag tycon]) else (single_con_ixes, unitBag (DerivAuxBind (DerivCon2Tag tycon))) where ...
7,085
false
true
8
17
2,344
1,181
610
571
null
null
PipocaQuemada/ermine
src/Ermine/Inference/Type.hs
bsd-2-clause
inferHardType (DataCon g t) | g^.name == "Nothing" = unfurl (bimap absurd absurd t) $ dataCon [] 0 g | g^.name == "Just" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 1 g | g^.name == "E" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 0 g | g^.name == "String#" = unfurl (bi...
372
inferHardType (DataCon g t) | g^.name == "Nothing" = unfurl (bimap absurd absurd t) $ dataCon [] 0 g | g^.name == "Just" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 1 g | g^.name == "E" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 0 g | g^.name == "String#" = unfurl (bi...
372
inferHardType (DataCon g t) | g^.name == "Nothing" = unfurl (bimap absurd absurd t) $ dataCon [] 0 g | g^.name == "Just" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 1 g | g^.name == "E" = unfurl (bimap absurd absurd t) $ dataCon [_Convention # C] 0 g | g^.name == "String#" = unfurl (bi...
372
false
false
0
9
86
207
98
109
null
null
bergmark/http2
test-hpack/hpack-stat.hs
bsd-3-clause
get :: (FilePath -> IO Int) -> String -> IO [Int] get func dir = do files0 <- valid . sort <$> getDirectoryContents dir files1 <- filterM doesFileExist files0 mapM func files1 where valid = map (dir </>) . filter (isSuffixOf ".json")
251
get :: (FilePath -> IO Int) -> String -> IO [Int] get func dir = do files0 <- valid . sort <$> getDirectoryContents dir files1 <- filterM doesFileExist files0 mapM func files1 where valid = map (dir </>) . filter (isSuffixOf ".json")
251
get func dir = do files0 <- valid . sort <$> getDirectoryContents dir files1 <- filterM doesFileExist files0 mapM func files1 where valid = map (dir </>) . filter (isSuffixOf ".json")
201
false
true
1
9
59
113
51
62
null
null
tittoassini/flat
test/Spec.hs
bsd-3-clause
c3a = [3, 99, 99, 99, 0]
24
c3a = [3, 99, 99, 99, 0]
24
c3a = [3, 99, 99, 99, 0]
24
false
false
1
5
6
24
13
11
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Luxid job death testing -- | The number of attempts to prove that a job is dead after sending it a -- KILL signal. luxidJobDeathDetectionRetries :: Int luxidJobDeathDetectionRetries = 3
191
luxidJobDeathDetectionRetries :: Int luxidJobDeathDetectionRetries = 3
70
luxidJobDeathDetectionRetries = 3
33
true
true
0
4
32
14
9
5
null
null
databrary/databrary
src/Controller/Web.hs
agpl-3.0
bsLCEq :: BS.ByteString -> BS.ByteString -> Bool bsLCEq t s | BS.length t == BS.length s = t == BSC.map toLower s | otherwise = False
137
bsLCEq :: BS.ByteString -> BS.ByteString -> Bool bsLCEq t s | BS.length t == BS.length s = t == BSC.map toLower s | otherwise = False
137
bsLCEq t s | BS.length t == BS.length s = t == BSC.map toLower s | otherwise = False
88
false
true
1
10
29
72
32
40
null
null
sbidin/sdl2-ttf
src/SDL/Font.hs
mit
fromMaskWith :: (Enum a, Bounded a) => (a -> CInt) -> CInt -> [a] fromMaskWith convert cint = concatMap (\a -> find (a, convert a)) [minBound..] where find (a, i) = [a | i == i .&. cint] -- Helper function for converting a list of values into a bitmask.
260
fromMaskWith :: (Enum a, Bounded a) => (a -> CInt) -> CInt -> [a] fromMaskWith convert cint = concatMap (\a -> find (a, convert a)) [minBound..] where find (a, i) = [a | i == i .&. cint] -- Helper function for converting a list of values into a bitmask.
260
fromMaskWith convert cint = concatMap (\a -> find (a, convert a)) [minBound..] where find (a, i) = [a | i == i .&. cint] -- Helper function for converting a list of values into a bitmask.
194
false
true
0
10
56
116
60
56
null
null
kim/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DescribeConfigurationOptions.hs
mpl-2.0
-- | The name of the application associated with the configuration template or -- environment. Only needed if you want to describe the configuration options -- associated with either the configuration template or environment. dcoApplicationName :: Lens' DescribeConfigurationOptions (Maybe Text) dcoApplicationName = ...
385
dcoApplicationName :: Lens' DescribeConfigurationOptions (Maybe Text) dcoApplicationName = lens _dcoApplicationName (\s a -> s { _dcoApplicationName = a })
159
dcoApplicationName = lens _dcoApplicationName (\s a -> s { _dcoApplicationName = a })
89
true
true
0
9
56
48
27
21
null
null
maurer/hseve
lib/EVE/Monad.hs
bsd-3-clause
eveCacheCheck :: Query -- ^ The question -> EVE (Maybe Response) -- ^ The response if present eveCacheCheck q = do s <- get t <- liftIO $ getCurrentTime state $ cacheCheck q t
210
eveCacheCheck :: Query -- ^ The question -> EVE (Maybe Response) eveCacheCheck q = do s <- get t <- liftIO $ getCurrentTime state $ cacheCheck q t
181
eveCacheCheck q = do s <- get t <- liftIO $ getCurrentTime state $ cacheCheck q t
87
true
true
0
8
68
59
28
31
null
null
mtlstats/mtlstats
src/Mtlstats/Types.hs
gpl-3.0
-- | Adds two sets of 'GoalieStats' addGoalieStats :: GoalieStats -> GoalieStats -> GoalieStats addGoalieStats g1 g2 = GoalieStats { _gsGames = g1^.gsGames + g2^.gsGames , _gsMinsPlayed = g1^.gsMinsPlayed + g2^.gsMinsPlayed , _gsGoalsAllowed = g1^.gsGoalsAllowed + g2^.gsGoalsAllowed , _gsShuto...
533
addGoalieStats :: GoalieStats -> GoalieStats -> GoalieStats addGoalieStats g1 g2 = GoalieStats { _gsGames = g1^.gsGames + g2^.gsGames , _gsMinsPlayed = g1^.gsMinsPlayed + g2^.gsMinsPlayed , _gsGoalsAllowed = g1^.gsGoalsAllowed + g2^.gsGoalsAllowed , _gsShutouts = g1^.gsShutouts + g2^.g...
497
addGoalieStats g1 g2 = GoalieStats { _gsGames = g1^.gsGames + g2^.gsGames , _gsMinsPlayed = g1^.gsMinsPlayed + g2^.gsMinsPlayed , _gsGoalsAllowed = g1^.gsGoalsAllowed + g2^.gsGoalsAllowed , _gsShutouts = g1^.gsShutouts + g2^.gsShutouts , _gsWins = g1^.gsWins + g2^.gsW...
437
true
true
0
10
147
157
85
72
null
null
MerelyAPseudonym/cmdtheline
src/System/Console/CmdTheLine/Term.hs
mit
eval :: [String] -> ( Term a, TermInfo ) -> IO a eval = evalBy evalTerm
71
eval :: [String] -> ( Term a, TermInfo ) -> IO a eval = evalBy evalTerm
71
eval = evalBy evalTerm
22
false
true
0
8
15
37
19
18
null
null
kcsmnt0/demesne
src/Stdlib.hs
bsd-3-clause
opDel [VInt x, VDom y] = VDom (Set.delete x y)
46
opDel [VInt x, VDom y] = VDom (Set.delete x y)
46
opDel [VInt x, VDom y] = VDom (Set.delete x y)
46
false
false
0
8
9
34
16
18
null
null
massysett/penny
penny/lib/Penny/Copper/Decopperize.hs
bsd-3-clause
dMemo :: Memo Char a -> Seq Text dMemo (Memo _ _ bl) = dBracketedList bl
72
dMemo :: Memo Char a -> Seq Text dMemo (Memo _ _ bl) = dBracketedList bl
72
dMemo (Memo _ _ bl) = dBracketedList bl
39
false
true
0
7
15
39
18
21
null
null
mgsloan/ghcjs-jquery
JavaScript/JQuery.hs
mit
mouseenter :: (Event -> IO ()) -> HandlerSettings -> JQuery -> IO (IO ()) mouseenter a = on a "mouseenter"
106
mouseenter :: (Event -> IO ()) -> HandlerSettings -> JQuery -> IO (IO ()) mouseenter a = on a "mouseenter"
106
mouseenter a = on a "mouseenter"
32
false
true
0
11
19
54
26
28
null
null
yu-i9/thih
src/Thih/TI/Unify.hs
bsd-3-clause
match (TCon tc1) (TCon tc2) | tc1==tc2 = return nullSubst
74
match (TCon tc1) (TCon tc2) | tc1==tc2 = return nullSubst
74
match (TCon tc1) (TCon tc2) | tc1==tc2 = return nullSubst
74
false
false
0
8
26
38
16
22
null
null
fmapfmapfmap/amazonka
gen/src/Gen/JSON.hs
mpl-2.0
decode :: ByteString -> Either Error Object decode = first LText.pack . eitherDecode' . LBS.fromStrict
102
decode :: ByteString -> Either Error Object decode = first LText.pack . eitherDecode' . LBS.fromStrict
102
decode = first LText.pack . eitherDecode' . LBS.fromStrict
58
false
true
0
8
14
41
18
23
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | Unset a 'DumpFlag' dopt_unset :: DynFlags -> DumpFlag -> DynFlags dopt_unset dfs f = dfs{ dumpFlags = IntSet.delete (fromEnum f) (dumpFlags dfs) }
151
dopt_unset :: DynFlags -> DumpFlag -> DynFlags dopt_unset dfs f = dfs{ dumpFlags = IntSet.delete (fromEnum f) (dumpFlags dfs) }
127
dopt_unset dfs f = dfs{ dumpFlags = IntSet.delete (fromEnum f) (dumpFlags dfs) }
80
true
true
0
9
24
52
27
25
null
null
green-haskell/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
isTcReflCo (TcCoercion co) = isReflCo co
40
isTcReflCo (TcCoercion co) = isReflCo co
40
isTcReflCo (TcCoercion co) = isReflCo co
40
false
false
0
7
5
18
8
10
null
null
JustusAdam/marvin
src/Marvin/Util/JSON.hs
bsd-3-clause
-- | Write some data to a file using JSON serialization writeJSON :: (MonadIO m, ToJSON a) => FilePath -> a -> m () writeJSON fp = liftIO . B.writeFile fp . encode
163
writeJSON :: (MonadIO m, ToJSON a) => FilePath -> a -> m () writeJSON fp = liftIO . B.writeFile fp . encode
107
writeJSON fp = liftIO . B.writeFile fp . encode
47
true
true
0
9
32
56
28
28
null
null
iemxblog/sivi-haskell
examples/cap.hs
gpl-2.0
d2 = 14 + 0.4
13
d2 = 14 + 0.4
13
d2 = 14 + 0.4
13
false
false
1
5
4
13
5
8
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a586 :: IO (); a586 = forever $ putStrLn "a586"
47
a586 :: IO () a586 = forever $ putStrLn "a586"
46
a586 = forever $ putStrLn "a586"
32
false
true
0
6
9
24
12
12
null
null
paf31/typescript-docs
src/Language/TypeScript/Docs/Html.hs
mit
renderExported :: Exported -> H.Html renderExported _ = keyword "export" >> sp
78
renderExported :: Exported -> H.Html renderExported _ = keyword "export" >> sp
78
renderExported _ = keyword "export" >> sp
41
false
true
0
6
11
27
13
14
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck.hs
bsd-3-clause
-- Don't warn about incomplete patterns -- in list comprehensions, pattern guards -- etc. They are often *supposed* to be -- incomplete -- True <==> singular pprContext :: Bool -> DsMatchContext -> SDoc...
850
pprContext :: Bool -> DsMatchContext -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc pprContext singular (DsMatchContext kind _loc) msg rest_of_msg_fun = vcat [text txt <+> msg, sep [ text "In" <+> ppr_match <> char ':' , nest 4 (rest_of_msg_fun pref)]] where txt | singular = "Pattern match...
574
pprContext singular (DsMatchContext kind _loc) msg rest_of_msg_fun = vcat [text txt <+> msg, sep [ text "In" <+> ppr_match <> char ':' , nest 4 (rest_of_msg_fun pref)]] where txt | singular = "Pattern match" | otherwise = "Pattern match(es)" (ppr_match, pref) = case...
493
true
true
1
13
330
215
110
105
null
null
harendra-kumar/asyncly
src/Streamly/Internal/Benchmark/FileIO/Array.hs
bsd-3-clause
decodeUtf8Lenient :: Handle -> IO () decodeUtf8Lenient inh = S.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunksWithBufferOf (1024*1024) inh
154
decodeUtf8Lenient :: Handle -> IO () decodeUtf8Lenient inh = S.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunksWithBufferOf (1024*1024) inh
154
decodeUtf8Lenient inh = S.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunksWithBufferOf (1024*1024) inh
117
false
true
0
8
28
49
24
25
null
null
bitemyapp/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pInstanceCommunication :: Field pInstanceCommunication = withDoc C.instanceCommunicationDoc $ defaultFalse "instance_communication"
135
pInstanceCommunication :: Field pInstanceCommunication = withDoc C.instanceCommunicationDoc $ defaultFalse "instance_communication"
135
pInstanceCommunication = withDoc C.instanceCommunicationDoc $ defaultFalse "instance_communication"
103
false
true
0
7
13
23
11
12
null
null
ankeshs/numerikell
tmp/Stats.hs
bsd-3-clause
-- |function to find Pearson product-moment correlation coefficient pearson :: (Fractional a, Floating a) => [a] -> [a] -> Either String a pearson x y = if (length x/=length y) then Left "Length of vectors must Match" else Right (xy/(sqrt(x2)*sqrt(y2))) where xmean = mean x ...
654
pearson :: (Fractional a, Floating a) => [a] -> [a] -> Either String a pearson x y = if (length x/=length y) then Left "Length of vectors must Match" else Right (xy/(sqrt(x2)*sqrt(y2))) where xmean = mean x ymean = mean y xy = sum (map ...
584
pearson x y = if (length x/=length y) then Left "Length of vectors must Match" else Right (xy/(sqrt(x2)*sqrt(y2))) where xmean = mean x ymean = mean y xy = sum (map (\(u,v)->u*v) (zip x1 y1)) x1 = map (\t -> t-xmea...
513
true
true
0
12
287
272
144
128
null
null
phischu/fragnix
tests/packages/scotty/Control.Monad.Trans.Resource.hs
bsd-3-clause
-- $internalState -- -- A @ResourceT@ internally is a modified @ReaderT@ monad transformer holding -- onto a mutable reference to all of the release actions still remaining to be -- performed. If you are building up a custom application monad, it may be more -- efficient to embed this @ReaderT@ functionality directly i...
810
createInternalState :: MonadBase IO m => m InternalState createInternalState = liftBase $ I.newIORef $ ReleaseMap maxBound (minBound + 1) IntMap.empty
190
createInternalState = liftBase $ I.newIORef $ ReleaseMap maxBound (minBound + 1) IntMap.empty
133
true
true
0
8
163
62
37
25
null
null
vTurbine/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
hsPatNeedsParens p@(ConPatOut {}) = conPatNeedsParens (pat_args p)
69
hsPatNeedsParens p@(ConPatOut {}) = conPatNeedsParens (pat_args p)
69
hsPatNeedsParens p@(ConPatOut {}) = conPatNeedsParens (pat_args p)
69
false
false
0
8
9
28
14
14
null
null
LeoMingo/RPNMathParser
Functions/Series/Series.hs
gpl-3.0
lnOfx :: Float -> Float lnOfx x = netSum f 1 33 where f i = 2*(1/oddTerm)*((x-1)/(x+1))**oddTerm where oddTerm = 2*i-1 netSum f minB maxB = sum $ reverse [f i | i <- [minB .. maxB]] {- - Or another way around lnOfx2 :: Float -> Float lnOfx2 x = netSum f 1 33 where f i = (1/i)*((x-1)/x)**...
403
lnOfx :: Float -> Float lnOfx x = netSum f 1 33 where f i = 2*(1/oddTerm)*((x-1)/(x+1))**oddTerm where oddTerm = 2*i-1 netSum f minB maxB = sum $ reverse [f i | i <- [minB .. maxB]] {- - Or another way around lnOfx2 :: Float -> Float lnOfx2 x = netSum f 1 33 where f i = (1/i)*((x-1)/x)**...
403
lnOfx x = netSum f 1 33 where f i = 2*(1/oddTerm)*((x-1)/(x+1))**oddTerm where oddTerm = 2*i-1 netSum f minB maxB = sum $ reverse [f i | i <- [minB .. maxB]] {- - Or another way around lnOfx2 :: Float -> Float lnOfx2 x = netSum f 1 33 where f i = (1/i)*((x-1)/x)**i netSum f min...
379
false
true
0
12
124
130
68
62
null
null
leshchevds/ganeti
src/Ganeti/HTools/Instance.hs
bsd-2-clause
isRunning :: Instance -> Bool isRunning (Instance {runSt = T.Running}) = True
77
isRunning :: Instance -> Bool isRunning (Instance {runSt = T.Running}) = True
77
isRunning (Instance {runSt = T.Running}) = True
47
false
true
3
7
11
39
18
21
null
null
Tener/haskell-minirotate
src/Main.hs
bsd-3-clause
showX xs = "[" ++ intercalate ", " xs ++ "]"
44
showX xs = "[" ++ intercalate ", " xs ++ "]"
44
showX xs = "[" ++ intercalate ", " xs ++ "]"
44
false
false
0
7
10
22
10
12
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Insert.hs
mpl-2.0
-- | Project ID for this request. iiiProject :: Lens' InstancesInsert Text iiiProject = lens _iiiProject (\ s a -> s{_iiiProject = a})
136
iiiProject :: Lens' InstancesInsert Text iiiProject = lens _iiiProject (\ s a -> s{_iiiProject = a})
102
iiiProject = lens _iiiProject (\ s a -> s{_iiiProject = a})
61
true
true
1
9
24
44
22
22
null
null
scottgw/language-eiffel
Language/Eiffel/Util.hs
bsd-3-clause
findFeatureEx :: AbsClas body expr -> Text -> Maybe (FeatureEx expr) findFeatureEx = findFeature
96
findFeatureEx :: AbsClas body expr -> Text -> Maybe (FeatureEx expr) findFeatureEx = findFeature
96
findFeatureEx = findFeature
27
false
true
0
9
13
33
16
17
null
null
ratatosk/traceblade
MatchEval.hs
bsd-3-clause
cond _ = throwError "'cond' requires list of pairs (condition statement)"
73
cond _ = throwError "'cond' requires list of pairs (condition statement)"
73
cond _ = throwError "'cond' requires list of pairs (condition statement)"
73
false
false
0
5
10
12
5
7
null
null
snoyberg/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp) normalGE g e = do { g1 <- g; e1 <- e; return (NormalG g1, e1) }
106
normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp) normalGE g e = do { g1 <- g; e1 <- e; return (NormalG g1, e1) }
106
normalGE g e = do { g1 <- g; e1 <- e; return (NormalG g1, e1) }
63
false
true
0
10
25
71
35
36
null
null
NCrashed/hjass
src/library/Language/Jass/Codegen/Type.hs
mit
sizeOfType JHandle = return 8
29
sizeOfType JHandle = return 8
29
sizeOfType JHandle = return 8
29
false
false
0
5
4
12
5
7
null
null
benkio/VRP
src/Behaviour/Genetics/Algorithm.hs
gpl-3.0
{- From a list of path return a list of all the pairs between all the element in the list. -} pathPair :: [Path] -> [(Path,Path)] pathPair [] = []
151
pathPair :: [Path] -> [(Path,Path)] pathPair [] = []
52
pathPair [] = []
16
true
true
0
9
34
41
21
20
null
null
sdiehl/ghc
compiler/main/SysTools/Process.hs
bsd-3-clause
breakColon :: String -> Maybe (String, String) breakColon xs = case break (':' ==) xs of (ys, _:zs) -> Just (ys, zs) _ -> Nothing
169
breakColon :: String -> Maybe (String, String) breakColon xs = case break (':' ==) xs of (ys, _:zs) -> Just (ys, zs) _ -> Nothing
169
breakColon xs = case break (':' ==) xs of (ys, _:zs) -> Just (ys, zs) _ -> Nothing
122
false
true
0
9
64
76
39
37
null
null
CulpaBS/wbBach
src/Futhark/Analysis/AlgSimplify.hs
bsd-3-clause
negateSimplified (SRem e1 e2) = return $ SRem e1 e2
55
negateSimplified (SRem e1 e2) = return $ SRem e1 e2
55
negateSimplified (SRem e1 e2) = return $ SRem e1 e2
55
false
false
0
7
13
26
12
14
null
null
Proclivis/wxHaskell
wxc/Setup.hs
lgpl-2.1
x_config :: [String] -> IO String wx_config parms = do b <- isWindowsMsys if b then do (r, e, c) <- rawShellSystemStdInOut normal "wx-config" parms unless (c == ExitSuccess) $ do putStrLn $ "Error: Failed to execute wx-config command \n" ++ e exitFailure ...
542
wx_config :: [String] -> IO String wx_config parms = do b <- isWindowsMsys if b then do (r, e, c) <- rawShellSystemStdInOut normal "wx-config" parms unless (c == ExitSuccess) $ do putStrLn $ "Error: Failed to execute wx-config command \n" ++ e exitFailure ...
541
wx_config parms = do b <- isWindowsMsys if b then do (r, e, c) <- rawShellSystemStdInOut normal "wx-config" parms unless (c == ExitSuccess) $ do putStrLn $ "Error: Failed to execute wx-config command \n" ++ e exitFailure return r else readP...
506
false
true
0
15
175
127
61
66
null
null
mgrebenets/hackerrank
alg/strings/anagram.hs
mit
split l = (take (half + adj) l, drop (half + adj) l) where len = length l half = div len 2 adj = mod len 2
120
split l = (take (half + adj) l, drop (half + adj) l) where len = length l half = div len 2 adj = mod len 2
120
split l = (take (half + adj) l, drop (half + adj) l) where len = length l half = div len 2 adj = mod len 2
120
false
false
0
8
41
70
35
35
null
null
kumasento/accelerate
Data/Array/Accelerate/Pretty/Traverse.hs
bsd-3-clause
labelForPrimFun PrimLOr = "PrimLOr"
50
labelForPrimFun PrimLOr = "PrimLOr"
50
labelForPrimFun PrimLOr = "PrimLOr"
50
false
false
0
4
18
10
4
6
null
null
gbwey/persistent
persistent-template/Database/Persist/TH.hs
mit
mkLenses :: MkPersistSettings -> EntityDef -> Q [Dec] mkLenses mps _ | not (mpsGenerateLenses mps) = return []
110
mkLenses :: MkPersistSettings -> EntityDef -> Q [Dec] mkLenses mps _ | not (mpsGenerateLenses mps) = return []
110
mkLenses mps _ | not (mpsGenerateLenses mps) = return []
56
false
true
0
10
17
50
23
27
null
null
beni55/ghcjs
src/Gen2/Optimizer.hs
mit
doubleInfixOp NeqOp (SaneDouble d1) (SaneDouble d2) = eBool (d1 /= d2)
71
doubleInfixOp NeqOp (SaneDouble d1) (SaneDouble d2) = eBool (d1 /= d2)
71
doubleInfixOp NeqOp (SaneDouble d1) (SaneDouble d2) = eBool (d1 /= d2)
71
false
false
0
7
11
35
17
18
null
null
stschiff/rarecoal-tools
src-combineHistograms/combineHistograms.hs
gpl-3.0
addHistograms :: RareAlleleHistogram -> RareAlleleHistogram -> Script RareAlleleHistogram addHistograms hist1 hist2 = do when (raNames hist1 /= raNames hist2) $ throwE "histograms have different names" when (raNVec hist1 /= raNVec hist2) $ throwE "histograms have different NVecs" when (raMaxAf hist1 /= raMa...
1,099
addHistograms :: RareAlleleHistogram -> RareAlleleHistogram -> Script RareAlleleHistogram addHistograms hist1 hist2 = do when (raNames hist1 /= raNames hist2) $ throwE "histograms have different names" when (raNVec hist1 /= raNVec hist2) $ throwE "histograms have different NVecs" when (raMaxAf hist1 /= raMa...
1,099
addHistograms hist1 hist2 = do when (raNames hist1 /= raNames hist2) $ throwE "histograms have different names" when (raNVec hist1 /= raNVec hist2) $ throwE "histograms have different NVecs" when (raMaxAf hist1 /= raMaxAf hist2) $ throwE "histograms have different maxAf" when (raConditionOn hist1 /= raC...
1,009
false
true
0
14
220
264
121
143
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ByteStringPP.hs
gpl-3.0
sddecl sd | sd = text "standalone='yes'" | otherwise = text "standalone='no'"
104
sddecl sd | sd = text "standalone='yes'" | otherwise = text "standalone='no'"
104
sddecl sd | sd = text "standalone='yes'" | otherwise = text "standalone='no'"
104
false
false
2
5
38
27
12
15
null
null
danieldk/lbfgs-hs
Numeric/LBFGS.hs
apache-2.0
mergeL1NormCoefficient :: L1NormCoefficient -> CInt -> CLBFGSParameter -> CLBFGSParameter mergeL1NormCoefficient Nothing _ p = p
154
mergeL1NormCoefficient :: L1NormCoefficient -> CInt -> CLBFGSParameter -> CLBFGSParameter mergeL1NormCoefficient Nothing _ p = p
154
mergeL1NormCoefficient Nothing _ p = p
38
false
true
0
7
40
30
15
15
null
null
a-ford/notghc
Llvm/Types.hs
bsd-3-clause
getStatType (LMAdd t _) = getStatType t
47
getStatType (LMAdd t _) = getStatType t
47
getStatType (LMAdd t _) = getStatType t
47
false
false
0
7
14
20
9
11
null
null
bwalkowi/RBT
src/RBT.hs
bsd-3-clause
max (Node _ _ _ right) = RBT.max right
38
max (Node _ _ _ right) = RBT.max right
38
max (Node _ _ _ right) = RBT.max right
38
false
false
0
6
8
27
12
15
null
null
tsahyt/midi-simple
src/Sound/MIDI/Parser.hs
lgpl-3.0
aftertouch :: Parser ChannelVoice aftertouch = channelMessage 0x0A $ \c -> Aftertouch (Channel c) <$> pitch <*> touch
121
aftertouch :: Parser ChannelVoice aftertouch = channelMessage 0x0A $ \c -> Aftertouch (Channel c) <$> pitch <*> touch
121
aftertouch = channelMessage 0x0A $ \c -> Aftertouch (Channel c) <$> pitch <*> touch
87
false
true
1
8
21
47
21
26
null
null
phischu/fragnix
benchmarks/containers/Data.Map.Base.hs
bsd-3-clause
showTree :: (Show k,Show a) => Map k a -> String showTree m = showTreeWith showElem True False m where showElem k x = show k ++ ":=" ++ show x {- | /O(n)/. The expression (@'showTreeWith' showelem hang wide map@) shows the tree that implements the map. Elements are shown using the @showElem@ function. If @h...
972
showTree :: (Show k,Show a) => Map k a -> String showTree m = showTreeWith showElem True False m where showElem k x = show k ++ ":=" ++ show x {- | /O(n)/. The expression (@'showTreeWith' showelem hang wide map@) shows the tree that implements the map. Elements are shown using the @showElem@ function. If @h...
972
showTree m = showTreeWith showElem True False m where showElem k x = show k ++ ":=" ++ show x {- | /O(n)/. The expression (@'showTreeWith' showelem hang wide map@) shows the tree that implements the map. Elements are shown using the @showElem@ function. If @hang@ is 'True', a /hanging/ tree is shown otherw...
923
false
true
5
8
243
90
37
53
null
null
ant0nsc/bond
compiler/src/Language/Bond/Syntax/Util.hs
mit
isScalar BT_Bool = True
23
isScalar BT_Bool = True
23
isScalar BT_Bool = True
23
false
false
0
4
3
10
4
6
null
null
vasily-kartashov/playground
99-problems/problem-46.hs
apache-2.0
not' False = True
17
not' False = True
17
not' False = True
17
false
false
0
5
3
9
4
5
null
null
romanofski/gtfsbrisbane
test/Main.hs
bsd-3-clause
-- unit tests -- unittests :: TestTree unittests = testGroup "unit tests" [feedTests, importTests, updateTests, scheduleTests]
130
unittests :: TestTree unittests = testGroup "unit tests" [feedTests, importTests, updateTests, scheduleTests]
113
unittests = testGroup "unit tests" [feedTests, importTests, updateTests, scheduleTests]
91
true
true
0
6
19
30
18
12
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SugarScape/Common.hs
gpl-3.0
potentialLender :: SugarScapeAgentState -> Maybe Double potentialLender s | tooOldForChildren s = Just $ half (sugAgSugarLevel s) | isFertile s = fertileLending s | otherwise = Nothing where fertileLending :: SugarScapeAgentState -> Maybe Double fertileLending s | ex...
497
potentialLender :: SugarScapeAgentState -> Maybe Double potentialLender s | tooOldForChildren s = Just $ half (sugAgSugarLevel s) | isFertile s = fertileLending s | otherwise = Nothing where fertileLending :: SugarScapeAgentState -> Maybe Double fertileLending s | exc...
496
potentialLender s | tooOldForChildren s = Just $ half (sugAgSugarLevel s) | isFertile s = fertileLending s | otherwise = Nothing where fertileLending :: SugarScapeAgentState -> Maybe Double fertileLending s | excessAmount > 0 = Just excessAmount | otherwi...
440
false
true
2
9
164
154
65
89
null
null
NorfairKing/project-euler
005/haskell/solution.hs
gpl-2.0
lcml :: Integral a => [a] -> a lcml = foldl' lcm 1
50
lcml :: Integral a => [a] -> a lcml = foldl' lcm 1
50
lcml = foldl' lcm 1
19
false
true
0
8
12
38
16
22
null
null
deech/fltkhs
Setup.hs
mit
registerHook pkg_descr localbuildinfo _ flags = if hasLibs pkg_descr then register pkg_descr localbuildinfo flags else setupMessage verbosity "Package contains no library to register:" (packageId pkg_descr) where verbosity = fromFlag (regVerbosity flags)
279
registerHook pkg_descr localbuildinfo _ flags = if hasLibs pkg_descr then register pkg_descr localbuildinfo flags else setupMessage verbosity "Package contains no library to register:" (packageId pkg_descr) where verbosity = fromFlag (regVerbosity flags)
279
registerHook pkg_descr localbuildinfo _ flags = if hasLibs pkg_descr then register pkg_descr localbuildinfo flags else setupMessage verbosity "Package contains no library to register:" (packageId pkg_descr) where verbosity = fromFlag (regVerbosity flags)
279
false
false
0
8
55
63
30
33
null
null
DavidAlphaFox/darcs
src/Darcs/Util/IsoDate.hs
gpl-2.0
theBeginning :: CalendarTime theBeginning = unsafePerformIO $ toCalendarTime $ TOD 0 0
86
theBeginning :: CalendarTime theBeginning = unsafePerformIO $ toCalendarTime $ TOD 0 0
86
theBeginning = unsafePerformIO $ toCalendarTime $ TOD 0 0
57
false
true
0
6
11
24
12
12
null
null
valderman/selda
selda/src/Database/Selda/Query.hs
mit
orderRandom :: Query s () orderRandom = order (One (NulOp (Fun0 "RANDOM") :: Exp SQL Int)) Asc
94
orderRandom :: Query s () orderRandom = order (One (NulOp (Fun0 "RANDOM") :: Exp SQL Int)) Asc
94
orderRandom = order (One (NulOp (Fun0 "RANDOM") :: Exp SQL Int)) Asc
68
false
true
0
11
16
55
25
30
null
null
beni55/hermit
src/HERMIT/Context.hs
bsd-2-clause
-- | Determine whether a variable is in scope. inScope :: BoundVars c => c -> Var -> Bool inScope c v = not (isDeadBinder v || (isLocalVar v && (v `notElemVarSet` boundVars c)))
177
inScope :: BoundVars c => c -> Var -> Bool inScope c v = not (isDeadBinder v || (isLocalVar v && (v `notElemVarSet` boundVars c)))
130
inScope c v = not (isDeadBinder v || (isLocalVar v && (v `notElemVarSet` boundVars c)))
87
true
true
0
12
33
67
34
33
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/BidMetrics/List.hs
mpl-2.0
-- | Requested page size. The server may return fewer results than requested. -- If unspecified, the server will pick an appropriate default. bfsbmlPageSize :: Lens' BiddersFilterSetsBidMetricsList (Maybe Int32) bfsbmlPageSize = lens _bfsbmlPageSize (\ s a -> s{_bfsbmlPageSize = a}) . mapping _Coerce
315
bfsbmlPageSize :: Lens' BiddersFilterSetsBidMetricsList (Maybe Int32) bfsbmlPageSize = lens _bfsbmlPageSize (\ s a -> s{_bfsbmlPageSize = a}) . mapping _Coerce
173
bfsbmlPageSize = lens _bfsbmlPageSize (\ s a -> s{_bfsbmlPageSize = a}) . mapping _Coerce
103
true
true
2
8
56
61
29
32
null
null
tjakway/ghcjvm
compiler/specialise/Rules.hs
bsd-3-clause
findBest :: (Id, [CoreExpr]) -> (CoreRule,CoreExpr) -> [(CoreRule,CoreExpr)] -> (CoreRule,CoreExpr) -- All these pairs matched the expression -- Return the pair the the most specific rule -- The (fn,args) is just for overlap reporting findBest _ (rule,ans) [] = (rule,ans)
289
findBest :: (Id, [CoreExpr]) -> (CoreRule,CoreExpr) -> [(CoreRule,CoreExpr)] -> (CoreRule,CoreExpr) findBest _ (rule,ans) [] = (rule,ans)
153
findBest _ (rule,ans) [] = (rule,ans)
44
true
true
0
10
56
83
48
35
null
null
cutsea110/aop
src/Traditional.hs
bsd-3-clause
empty = Empty
13
empty = Empty
13
empty = Empty
13
false
false
0
4
2
6
3
3
null
null
supermitch/learn-haskell
edx-fp101x/1_hw.hs
mit
average ns = sum ns `div` length ns
35
average ns = sum ns `div` length ns
35
average ns = sum ns `div` length ns
35
false
false
0
6
7
21
10
11
null
null
gallais/potpourri
haskell/hsubst/Context.hs
gpl-3.0
wkSubstTm (SubstTm v u) = SubstTm (Just v) (wkNf u)
51
wkSubstTm (SubstTm v u) = SubstTm (Just v) (wkNf u)
51
wkSubstTm (SubstTm v u) = SubstTm (Just v) (wkNf u)
51
false
false
0
7
9
34
16
18
null
null
liyanchang/scheme-in-haskell
src/chp3.hs
mit
{-| main = do args <- getArgs putStrLn (readExpr (args !! 0)) -} symbol :: Parser Char symbol = oneOf "!$%&|*+-/:<=?>@^~#"
131
symbol :: Parser Char symbol = oneOf "!$%&|*+-/:<=?>@^~#"
57
symbol = oneOf "!$%&|*+-/:<=?>@^~#"
35
true
true
0
6
29
24
10
14
null
null
MihaiVisu/HaskellStuff
tutorial3 week5/tutorial3.hs
mit
- b. andRec :: [Bool] -> Bool andRec [] = True
47
andRec :: [Bool] -> Bool andRec [] = True
41
andRec [] = True
16
true
true
1
8
11
35
16
19
null
null
chrisjpn/CPIB_ILMCompiler
src/Parser.hs
bsd-3-clause
parseExpr :: Parser IMLVal parseExpr = try parseBoolExpr <|> try parseTerm1
79
parseExpr :: Parser IMLVal parseExpr = try parseBoolExpr <|> try parseTerm1
79
parseExpr = try parseBoolExpr <|> try parseTerm1
52
false
true
3
5
14
27
13
14
null
null
Yuras/hfd
src/Print.hs
bsd-3-clause
-- | Print variable doPrint :: MonadIO m => [String] -> App m () doPrint v = do vs <- getFrame let vs' = filter (\a -> amfUndecoratedName a == head v) vs unless (null vs') (doPrintProps (tail v) (head vs')) -- | Print object properties as requested
255
doPrint :: MonadIO m => [String] -> App m () doPrint v = do vs <- getFrame let vs' = filter (\a -> amfUndecoratedName a == head v) vs unless (null vs') (doPrintProps (tail v) (head vs')) -- | Print object properties as requested
235
doPrint v = do vs <- getFrame let vs' = filter (\a -> amfUndecoratedName a == head v) vs unless (null vs') (doPrintProps (tail v) (head vs')) -- | Print object properties as requested
190
true
true
0
14
54
110
53
57
null
null
pgj/bead
src/Bead/View/RouteOf.hs
bsd-3-clause
routeWithParams :: (IsString s) => Page a b c d e -> [ReqParam] -> s routeWithParams p rs = fromString . join $ [routeOf p, "?"] ++ (intersperse "&" (map queryStringParam rs))
177
routeWithParams :: (IsString s) => Page a b c d e -> [ReqParam] -> s routeWithParams p rs = fromString . join $ [routeOf p, "?"] ++ (intersperse "&" (map queryStringParam rs))
177
routeWithParams p rs = fromString . join $ [routeOf p, "?"] ++ (intersperse "&" (map queryStringParam rs))
108
false
true
0
9
33
84
43
41
null
null
skill-lang/skill
src/main/resources/haskell/Methods.hs
bsd-3-clause
remodel' :: (Get a, Get a) -> Get (a, a) remodel' (g1, g2) = g1 >>= \v1 -> g2 >>= \v2 -> return (v1, v2)
105
remodel' :: (Get a, Get a) -> Get (a, a) remodel' (g1, g2) = g1 >>= \v1 -> g2 >>= \v2 -> return (v1, v2)
104
remodel' (g1, g2) = g1 >>= \v1 -> g2 >>= \v2 -> return (v1, v2)
63
false
true
2
10
25
74
39
35
null
null
uuhan/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (ElabScriptStuck tm) = text "Can't run" <+> pprintTT [] tm <+> text "as an elaborator script." <$> text "Is it a stuck term?"
142
pprintErr' i (ElabScriptStuck tm) = text "Can't run" <+> pprintTT [] tm <+> text "as an elaborator script." <$> text "Is it a stuck term?"
142
pprintErr' i (ElabScriptStuck tm) = text "Can't run" <+> pprintTT [] tm <+> text "as an elaborator script." <$> text "Is it a stuck term?"
142
false
false
0
9
28
47
20
27
null
null
spacekitteh/smcghc
ghc/Main.hs
bsd-3-clause
isInterpretiveMode _ = False
40
isInterpretiveMode _ = False
40
isInterpretiveMode _ = False
40
false
false
0
5
15
9
4
5
null
null
JoeyEremondi/utrecht-apa-p1
src/Elm/Compiler/Module.hs
bsd-3-clause
-- POKING AROUND INTERFACES interfacePorts :: Interface -> [String] interfacePorts interface = Module.iPorts interface
123
interfacePorts :: Interface -> [String] interfacePorts interface = Module.iPorts interface
94
interfacePorts interface = Module.iPorts interface
54
true
true
0
6
18
27
14
13
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'MapS.updateMax' ms_updateMax = MapS.updateMax
50
ms_updateMax = MapS.updateMax
29
ms_updateMax = MapS.updateMax
29
true
false
0
5
4
9
5
4
null
null
peter-fogg/pardoc
src/Text/Pandoc/Writers/DokuWiki.hs
gpl-2.0
blockToDokuWiki _ HorizontalRule = return "\n----\n"
52
blockToDokuWiki _ HorizontalRule = return "\n----\n"
52
blockToDokuWiki _ HorizontalRule = return "\n----\n"
52
false
false
0
5
5
14
6
8
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
cutoffCountTo :: String -> Pattern Double -> Pattern ValueMap cutoffCountTo name ipat = innerJoin $ (\i -> pStateF "cutoff" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat
168
cutoffCountTo :: String -> Pattern Double -> Pattern ValueMap cutoffCountTo name ipat = innerJoin $ (\i -> pStateF "cutoff" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat
168
cutoffCountTo name ipat = innerJoin $ (\i -> pStateF "cutoff" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat
106
false
true
2
13
27
84
43
41
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/ArgRep.hs
bsd-3-clause
toArgRep :: PrimRep -> ArgRep toArgRep VoidRep = V
60
toArgRep :: PrimRep -> ArgRep toArgRep VoidRep = V
60
toArgRep VoidRep = V
30
false
true
0
5
18
22
10
12
null
null
jdreaver/quantities
test-suite/Data/Quantities/ConstructorsSpec.hs
bsd-3-clause
isLeftDimError _ = False
24
isLeftDimError _ = False
24
isLeftDimError _ = False
24
false
false
0
5
3
9
4
5
null
null
alexvong1995/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
fromBcp47 ("de":"DE":_) = "de-de"
35
fromBcp47 ("de":"DE":_) = "de-de"
35
fromBcp47 ("de":"DE":_) = "de-de"
35
false
false
0
7
5
21
10
11
null
null
chip2n/tin172-project
haskell/src/Shrdlite/Planner.hs
gpl-3.0
makeFloorSpace (w:ws) = 2 * length w : makeFloorSpace ws
56
makeFloorSpace (w:ws) = 2 * length w : makeFloorSpace ws
56
makeFloorSpace (w:ws) = 2 * length w : makeFloorSpace ws
56
false
false
0
7
9
30
14
16
null
null
cabbibo/gallery
app/Types.hs
bsd-3-clause
startHeight :: GLfloat startHeight = 1.5
40
startHeight :: GLfloat startHeight = 1.5
40
startHeight = 1.5
17
false
true
0
6
5
18
7
11
null
null
csrhodes/pandoc
pandoc.hs
gpl-2.0
adjustImagePath :: FilePath -> [FilePath] -> Inline -> Inline adjustImagePath dir paths (Image lab (src, tit)) | src `elem` paths = Image lab (dir ++ "/" ++ src, tit)
169
adjustImagePath :: FilePath -> [FilePath] -> Inline -> Inline adjustImagePath dir paths (Image lab (src, tit)) | src `elem` paths = Image lab (dir ++ "/" ++ src, tit)
169
adjustImagePath dir paths (Image lab (src, tit)) | src `elem` paths = Image lab (dir ++ "/" ++ src, tit)
107
false
true
0
9
31
78
41
37
null
null
noinia/balbst
src/Data/MergeableDict.hs
bsd-3-clause
blackHeight :: RBTree t -> BlackHeight blackHeight Leaf = 0
71
blackHeight :: RBTree t -> BlackHeight blackHeight Leaf = 0
71
blackHeight Leaf = 0
32
false
true
0
6
21
25
11
14
null
null
emwap/syntactic
src/Data/Syntactic/Interpretation.hs
bsd-3-clause
renderArgsSmart args sym | isInfix = "(" ++ unwords [a,op,b] ++ ")" | otherwise = "(" ++ unwords (name : args) ++ ")" where name = renderSym sym [a,b] = args op = init $ tail name isInfix = not (null name) && head name == '(' && last name == ')' && length args ==...
363
renderArgsSmart args sym | isInfix = "(" ++ unwords [a,op,b] ++ ")" | otherwise = "(" ++ unwords (name : args) ++ ")" where name = renderSym sym [a,b] = args op = init $ tail name isInfix = not (null name) && head name == '(' && last name == ')' && length args ==...
363
renderArgsSmart args sym | isInfix = "(" ++ unwords [a,op,b] ++ ")" | otherwise = "(" ++ unwords (name : args) ++ ")" where name = renderSym sym [a,b] = args op = init $ tail name isInfix = not (null name) && head name == '(' && last name == ')' && length args ==...
363
false
false
8
9
122
152
72
80
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/CanvasRenderingContext2D.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern Mozilla CanvasRenderingContext2D.createPattern documentation> createPattern_ :: (MonadDOM m, IsCanvasImageSource image, ToJSString repetition) => CanvasRenderingContext2D -> image -> repetition...
465
createPattern_ :: (MonadDOM m, IsCanvasImageSource image, ToJSString repetition) => CanvasRenderingContext2D -> image -> repetition -> m () createPattern_ self image repetition = liftDOM (void (self ^. jsf "createPattern" [toJSVal image, toJSVal repetition]))
308
createPattern_ self image repetition = liftDOM (void (self ^. jsf "createPattern" [toJSVal image, toJSVal repetition]))
136
true
true
0
12
87
90
45
45
null
null
rawlep/EQS
sourceCode/GlobalParameters.hs
mit
runInfoMessage mStr string = do dia <- newMessageInfo string maybe (return ()) (\str -> G.set dia [G.windowTitle G.:= str]) mStr ans <- G.dialogRun dia G.dialogResponse dia ans G.widgetDestroy dia -- a decision message dialog: displays a message requesting whether or not to -- execute a process. If...
390
runInfoMessage mStr string = do dia <- newMessageInfo string maybe (return ()) (\str -> G.set dia [G.windowTitle G.:= str]) mStr ans <- G.dialogRun dia G.dialogResponse dia ans G.widgetDestroy dia -- a decision message dialog: displays a message requesting whether or not to -- execute a process. If...
390
runInfoMessage mStr string = do dia <- newMessageInfo string maybe (return ()) (\str -> G.set dia [G.windowTitle G.:= str]) mStr ans <- G.dialogRun dia G.dialogResponse dia ans G.widgetDestroy dia -- a decision message dialog: displays a message requesting whether or not to -- execute a process. If...
390
false
false
1
14
79
103
46
57
null
null
oldmanmike/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
pprCLbl (AsmTempLabel {}) = panic "pprCLbl AsmTempLabel"
62
pprCLbl (AsmTempLabel {}) = panic "pprCLbl AsmTempLabel"
62
pprCLbl (AsmTempLabel {}) = panic "pprCLbl AsmTempLabel"
62
false
false
0
6
12
20
9
11
null
null
bergmark/hlint
src/Language/Haskell/HLint2.hs
bsd-3-clause
esolveBuiltin :: [String] -> [Hint] resolveBuiltin builtin = map f $ nub $ concat [if x == "All" then map fst builtinHints else [x] | x <- builtin] where f x = fromMaybe (error $ "Unknown builtin hints: HLint.Builtin." ++ x) $ lookup x builtinHints -- | Snippet from the documentation, if this changes, update the d...
333
resolveBuiltin :: [String] -> [Hint] resolveBuiltin builtin = map f $ nub $ concat [if x == "All" then map fst builtinHints else [x] | x <- builtin] where f x = fromMaybe (error $ "Unknown builtin hints: HLint.Builtin." ++ x) $ lookup x builtinHints -- | Snippet from the documentation, if this changes, update the ...
333
resolveBuiltin builtin = map f $ nub $ concat [if x == "All" then map fst builtinHints else [x] | x <- builtin] where f x = fromMaybe (error $ "Unknown builtin hints: HLint.Builtin." ++ x) $ lookup x builtinHints -- | Snippet from the documentation, if this changes, update the documentation
296
false
true
0
11
62
103
53
50
null
null
darthdeus/ghc-mod-ng
Language/Haskell/GhcMod/Evaluator.hs
bsd-3-clause
---------------------------------------------------------------- argspec :: [OptDescr (Options -> Options)] argspec = [ Option "l" ["tolisp"] (NoArg (\opts -> opts { outputStyle = LispStyle })) "print as a list of Lisp" , Option "h" ["hlintOpt"] (ReqArg (\h opts -> opts { ...
1,106
argspec :: [OptDescr (Options -> Options)] argspec = [ Option "l" ["tolisp"] (NoArg (\opts -> opts { outputStyle = LispStyle })) "print as a list of Lisp" , Option "h" ["hlintOpt"] (ReqArg (\h opts -> opts { hlintOpts = h : hlintOpts opts }) "hlintOpt") "hlint o...
1,040
argspec = [ Option "l" ["tolisp"] (NoArg (\opts -> opts { outputStyle = LispStyle })) "print as a list of Lisp" , Option "h" ["hlintOpt"] (ReqArg (\h opts -> opts { hlintOpts = h : hlintOpts opts }) "hlintOpt") "hlint options" , Option "g" ["ghcOpt"] ...
997
true
true
0
14
378
313
174
139
null
null
danr/hipspec
src/HipSpec/ATP/Results.hs
gpl-3.0
isSuccess :: ProverResult -> Bool isSuccess Success{} = True
60
isSuccess :: ProverResult -> Bool isSuccess Success{} = True
60
isSuccess Success{} = True
26
false
true
0
6
8
22
11
11
null
null
Prillan/haskell-jsontools
app/jless/Program.hs
bsd-3-clause
drawState :: ProgramM () drawState = do jz <- gets obj d <- gets redraw c <- gets color if d then drawInitial else uw $ setTouched True clean b <- gets botBar lift $ updateWindow b $ do moveCursor 1 0 clearLine moveCursor 1 0 drawText . rfc6901pointer . fromList . reve...
560
drawState :: ProgramM () drawState = do jz <- gets obj d <- gets redraw c <- gets color if d then drawInitial else uw $ setTouched True clean b <- gets botBar lift $ updateWindow b $ do moveCursor 1 0 clearLine moveCursor 1 0 drawText . rfc6901pointer . fromList . reve...
560
drawState = do jz <- gets obj d <- gets redraw c <- gets color if d then drawInitial else uw $ setTouched True clean b <- gets botBar lift $ updateWindow b $ do moveCursor 1 0 clearLine moveCursor 1 0 drawText . rfc6901pointer . fromList . reverse . map fst $ jzHistory...
535
false
true
0
16
172
228
101
127
null
null
ku-fpg/kansas-amber
legacy/Deep/SemExample.hs
bsd-3-clause
semExample :: IO () semExample = withArduino True "/dev/cu.usbmodem1421" $ do initExample -- Query to confirm task creation tasks <- queryAllTasksE liftIO $ print tasks task1 <- queryTaskE 1 liftIO $ print task1 task2 <- queryTaskE 2 liftIO $ print task2 -- Wait for any debug messgae...
350
semExample :: IO () semExample = withArduino True "/dev/cu.usbmodem1421" $ do initExample -- Query to confirm task creation tasks <- queryAllTasksE liftIO $ print tasks task1 <- queryTaskE 1 liftIO $ print task1 task2 <- queryTaskE 2 liftIO $ print task2 -- Wait for any debug messgae...
350
semExample = withArduino True "/dev/cu.usbmodem1421" $ do initExample -- Query to confirm task creation tasks <- queryAllTasksE liftIO $ print tasks task1 <- queryTaskE 1 liftIO $ print task1 task2 <- queryTaskE 2 liftIO $ print task2 -- Wait for any debug messgaes from Arduino d...
330
false
true
0
9
89
97
40
57
null
null
mietek/mighttpd2
test/ConfigSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "parseConfig" $ do it "parses example.conf correctly" $ do res <- parseOption "conf/example.conf" "foo" res `shouldBe` ans
190
spec :: Spec spec = do describe "parseConfig" $ do it "parses example.conf correctly" $ do res <- parseOption "conf/example.conf" "foo" res `shouldBe` ans
190
spec = do describe "parseConfig" $ do it "parses example.conf correctly" $ do res <- parseOption "conf/example.conf" "foo" res `shouldBe` ans
177
false
true
0
14
59
52
24
28
null
null
happyherp/lazyset
Data/Map/Lazier.hs
mit
-- | Check if a key exists in this Map. member :: Ord k => k -> Map k e -> Bool member key = LS.member (JustKey key)
117
member :: Ord k => k -> Map k e -> Bool member key = LS.member (JustKey key)
76
member key = LS.member (JustKey key)
36
true
true
0
8
28
46
22
24
null
null