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
vikraman/ghc
compiler/basicTypes/VarSet.hs
bsd-3-clause
-- | Map the function over the list, and union the results mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet mapUnionDVarSet get_set xs = foldr (unionDVarSet . get_set) emptyDVarSet xs
187
mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet mapUnionDVarSet get_set xs = foldr (unionDVarSet . get_set) emptyDVarSet xs
128
mapUnionDVarSet get_set xs = foldr (unionDVarSet . get_set) emptyDVarSet xs
75
true
true
0
7
31
49
26
23
null
null
andorp/grin
grin/src/Test/Test.hs
bsd-3-clause
tryout :: [GoalM a] -> GoalM a tryout gs = do (g, gs') <- select gs g `mplus` tryout gs'
92
tryout :: [GoalM a] -> GoalM a tryout gs = do (g, gs') <- select gs g `mplus` tryout gs'
92
tryout gs = do (g, gs') <- select gs g `mplus` tryout gs'
61
false
true
0
8
23
55
27
28
null
null
siddhanathan/ghc
compiler/cmm/PprC.hs
bsd-3-clause
te_Target :: ForeignTarget -> TE () te_Target (ForeignTarget e _) = te_Expr e
82
te_Target :: ForeignTarget -> TE () te_Target (ForeignTarget e _) = te_Expr e
82
te_Target (ForeignTarget e _) = te_Expr e
46
false
true
0
9
17
39
17
22
null
null
daleooo/barrelfish
tools/mackerel/CSyntax.hs
mit
multerm (i, sl) = printf "(%d%s)" i l where l = concat [ ("*" ++ e) | e <- sl ] -- -- Expressions relative to the device pointer --
136
multerm (i, sl) = printf "(%d%s)" i l where l = concat [ ("*" ++ e) | e <- sl ] -- -- Expressions relative to the device pointer --
136
multerm (i, sl) = printf "(%d%s)" i l where l = concat [ ("*" ++ e) | e <- sl ] -- -- Expressions relative to the device pointer --
136
false
false
0
10
34
53
29
24
null
null
mydaum/cabal
cabal-install/Distribution/Solver/Modular/PSQ.hs
bsd-3-clause
maximumBy :: (k -> Int) -> PSQ k a -> (k, a) maximumBy sel (PSQ xs) = S.minimumBy (flip (comparing (sel . fst))) xs
117
maximumBy :: (k -> Int) -> PSQ k a -> (k, a) maximumBy sel (PSQ xs) = S.minimumBy (flip (comparing (sel . fst))) xs
117
maximumBy sel (PSQ xs) = S.minimumBy (flip (comparing (sel . fst))) xs
72
false
true
0
11
25
74
38
36
null
null
chocoluffy/courseography
hs/Css/Graph.hs
gpl-3.0
graphContainer :: Css graphContainer = do "#graph" ? do width (px 1195) minHeight (px 700) height (px 700) overflow hidden margin (px 10) (px 10) (px 10) (px 10) display inlineBlock position absolute textAlign $ alignSide sideCenter "left" -: "...
531
graphContainer :: Css graphContainer = do "#graph" ? do width (px 1195) minHeight (px 700) height (px 700) overflow hidden margin (px 10) (px 10) (px 10) (px 10) display inlineBlock position absolute textAlign $ alignSide sideCenter "left" -: "...
531
graphContainer = do "#graph" ? do width (px 1195) minHeight (px 700) height (px 700) overflow hidden margin (px 10) (px 10) (px 10) (px 10) display inlineBlock position absolute textAlign $ alignSide sideCenter "left" -: "40px" "#graphRootS...
509
false
true
0
12
183
165
70
95
null
null
Peaker/lamdu
src/Lamdu/Sugar/Annotations.hs
gpl-3.0
markCaseHandler :: Term v n i o # Annotated (ConvertPayload m (ShowAnnotation, a)) -> Term v n i o # Annotated (ConvertPayload m (ShowAnnotation, a)) markCaseHandler = _BodyLam . lamFunc . fBody . SugarLens.binderResultExpr . Lens.ifiltered (const . Lens.nullOf SugarLens.bodyUnfinished) . pInput . u...
360
markCaseHandler :: Term v n i o # Annotated (ConvertPayload m (ShowAnnotation, a)) -> Term v n i o # Annotated (ConvertPayload m (ShowAnnotation, a)) markCaseHandler = _BodyLam . lamFunc . fBody . SugarLens.binderResultExpr . Lens.ifiltered (const . Lens.nullOf SugarLens.bodyUnfinished) . pInput . u...
360
markCaseHandler = _BodyLam . lamFunc . fBody . SugarLens.binderResultExpr . Lens.ifiltered (const . Lens.nullOf SugarLens.bodyUnfinished) . pInput . userData . _1 .~ neverShowAnnotations
202
false
true
6
11
71
140
66
74
null
null
dmuneras/LambdaMethods
src/Integracion.hs
gpl-2.0
f1 :: Func --Para esta funcion probar con n = 12 que es el ejercicio hecho en clase f1 = FDiv (FMult (FExp (FMult (FConst (-1)) (FVar 'x'))) (FLn (FRes (FPot (FVar 'x') (FConst 2)) (FConst 3)))) (FVar 'x')
205
f1 :: Func f1 = FDiv (FMult (FExp (FMult (FConst (-1)) (FVar 'x'))) (FLn (FRes (FPot (FVar 'x') (FConst 2)) (FConst 3)))) (FVar 'x')
132
f1 = FDiv (FMult (FExp (FMult (FConst (-1)) (FVar 'x'))) (FLn (FRes (FPot (FVar 'x') (FConst 2)) (FConst 3)))) (FVar 'x')
121
true
true
0
15
38
108
53
55
null
null
bgamari/linear
src/Linear/V4.hs
bsd-3-clause
_yzw f = _xyzw $ \(V4 a b c d) -> f (V3 b c d) <&> \(V3 b' c' d') -> V4 a b' c' d'
82
_yzw f = _xyzw $ \(V4 a b c d) -> f (V3 b c d) <&> \(V3 b' c' d') -> V4 a b' c' d'
82
_yzw f = _xyzw $ \(V4 a b c d) -> f (V3 b c d) <&> \(V3 b' c' d') -> V4 a b' c' d'
82
false
false
1
10
26
74
35
39
null
null
ezyang/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ res WriteByteArrayOp_Word64 args = doWriteByteArrayOp Nothing b64 res args
102
emitPrimOp _ res WriteByteArrayOp_Word64 args = doWriteByteArrayOp Nothing b64 res args
102
emitPrimOp _ res WriteByteArrayOp_Word64 args = doWriteByteArrayOp Nothing b64 res args
102
false
false
1
5
25
28
11
17
null
null
bvdelft/parac2
src/Language/Java/Paragon/Annotated.hs
bsd-3-clause
removeAnnotation :: Annotated ast => ast l -> ast () removeAnnotation = fmap (const ())
87
removeAnnotation :: Annotated ast => ast l -> ast () removeAnnotation = fmap (const ())
87
removeAnnotation = fmap (const ())
34
false
true
0
9
14
46
20
26
null
null
gtk2hs/gconf
demo/GConfDemo.hs
lgpl-2.1
usageMessage = "To use this gconf demo program, first create the required gconf entrys.\n" ++ "Use the following commands:\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/intValue --type int 3\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/boolValue --type bool false\n" ++ " gconftool-2 --set /apps...
1,069
usageMessage = "To use this gconf demo program, first create the required gconf entrys.\n" ++ "Use the following commands:\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/intValue --type int 3\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/boolValue --type bool false\n" ++ " gconftool-2 --set /apps...
1,069
usageMessage = "To use this gconf demo program, first create the required gconf entrys.\n" ++ "Use the following commands:\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/intValue --type int 3\n" ++ " gconftool-2 --set /apps/gtk2hs-gconf-demo/boolValue --type bool false\n" ++ " gconftool-2 --set /apps...
1,069
false
false
28
5
196
77
31
46
null
null
seppeljordan/haskell-calendar
src/Colors.hs
gpl-3.0
esc :: String esc = "\x1b"
26
esc :: String esc = "\x1b"
26
esc = "\x1b"
12
false
true
0
6
5
18
7
11
null
null
paolino/sprites
Sprite/D2.hs
bsd-3-clause
(x,y) ./. (k,h) = (x/k,y/h)
27
(x,y) ./. (k,h) = (x/k,y/h)
27
(x,y) ./. (k,h) = (x/k,y/h)
27
false
false
0
6
4
38
21
17
null
null
raichoo/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
findCalls :: SC -> [Name] -> [(Name, [[Name]])] findCalls sc topargs = nub $ nu' topargs sc where nu' ps (Case _ n alts) = nub (concatMap (nua (n : ps)) alts) nu' ps (ProjCase t alts) = nub $ nut ps t ++ concatMap (nua ps) alts nu' ps (STerm t) = nub $ nut ps t nu' ps _ = [] nua ps (ConCase n i...
1,254
findCalls :: SC -> [Name] -> [(Name, [[Name]])] findCalls sc topargs = nub $ nu' topargs sc where nu' ps (Case _ n alts) = nub (concatMap (nua (n : ps)) alts) nu' ps (ProjCase t alts) = nub $ nut ps t ++ concatMap (nua ps) alts nu' ps (STerm t) = nub $ nut ps t nu' ps _ = [] nua ps (ConCase n i...
1,254
findCalls sc topargs = nub $ nu' topargs sc where nu' ps (Case _ n alts) = nub (concatMap (nua (n : ps)) alts) nu' ps (ProjCase t alts) = nub $ nut ps t ++ concatMap (nua ps) alts nu' ps (STerm t) = nub $ nut ps t nu' ps _ = [] nua ps (ConCase n i args sc) = nub (nu' (ps ++ args) sc) nua ps...
1,206
false
true
0
14
437
707
352
355
null
null
HIPERFIT/futhark
src/Futhark/IR/Primitive.hs
isc
cmpOpType (CmpUle t) = IntType t
32
cmpOpType (CmpUle t) = IntType t
32
cmpOpType (CmpUle t) = IntType t
32
false
false
0
6
5
19
8
11
null
null
stschiff/rarecoal
src/RarecoalLib/MaxUtils.hs
gpl-3.0
singletonErrorsF :: Int -> F.FoldM (ST s) (SitePattern, Double) [Double] singletonErrorsF nrPops = F.FoldM step initial extract where step vec (p, se) = do when (sum p == 1) $ do let i = snd . head . filter ((>0) . fst) $ zip p [0..] VM.modify vec (\v -> v + se ^ (2::Int)) i ...
466
singletonErrorsF :: Int -> F.FoldM (ST s) (SitePattern, Double) [Double] singletonErrorsF nrPops = F.FoldM step initial extract where step vec (p, se) = do when (sum p == 1) $ do let i = snd . head . filter ((>0) . fst) $ zip p [0..] VM.modify vec (\v -> v + se ^ (2::Int)) i ...
466
singletonErrorsF nrPops = F.FoldM step initial extract where step vec (p, se) = do when (sum p == 1) $ do let i = snd . head . filter ((>0) . fst) $ zip p [0..] VM.modify vec (\v -> v + se ^ (2::Int)) i return vec initial = do v <- VM.new nrPops VM.set v...
393
false
true
0
18
156
232
114
118
null
null
spl/emgm
src/Generics/EMGM/Functions/Enum.hs
bsd-3-clause
-- | Returns the first element of the enumeration from 'enum'. This is -- often called the neutral or empty value. empty :: (Rep Enum a) => a empty = head $ enumN (1::Int)
171
empty :: (Rep Enum a) => a empty = head $ enumN (1::Int)
56
empty = head $ enumN (1::Int)
29
true
true
2
7
33
44
22
22
null
null
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeLifecycleHooks.hs
mpl-2.0
-- | The names of one or more lifecycle hooks. dlhLifecycleHookNames :: Lens' DescribeLifecycleHooks [Text] dlhLifecycleHookNames = lens _dlhLifecycleHookNames (\ s a -> s{_dlhLifecycleHookNames = a}) . _Default . _Coerce
221
dlhLifecycleHookNames :: Lens' DescribeLifecycleHooks [Text] dlhLifecycleHookNames = lens _dlhLifecycleHookNames (\ s a -> s{_dlhLifecycleHookNames = a}) . _Default . _Coerce
174
dlhLifecycleHookNames = lens _dlhLifecycleHookNames (\ s a -> s{_dlhLifecycleHookNames = a}) . _Default . _Coerce
113
true
true
0
11
29
51
28
23
null
null
brendanhay/gogol
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs
mpl-2.0
-- | Creates a value of 'AutomaticScaling' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'asNetworkUtilization' -- -- * 'asMaxTotalInstances' -- -- * 'asMinIdleInstances' -- -- * 'asDiskUtilization' -- -- * 'asMinPendingLatency' -- -...
1,132
automaticScaling :: AutomaticScaling automaticScaling = AutomaticScaling' { _asNetworkUtilization = Nothing , _asMaxTotalInstances = Nothing , _asMinIdleInstances = Nothing , _asDiskUtilization = Nothing , _asMinPendingLatency = Nothing , _asCPUUtilization = Nothing , _asMaxIdleInstanc...
570
automaticScaling = AutomaticScaling' { _asNetworkUtilization = Nothing , _asMaxTotalInstances = Nothing , _asMinIdleInstances = Nothing , _asDiskUtilization = Nothing , _asMinPendingLatency = Nothing , _asCPUUtilization = Nothing , _asMaxIdleInstances = Nothing , _asMinTotalInstances =...
529
true
true
0
7
202
130
90
40
null
null
ancientlanguage/haskell-analysis
greek-script/src/Grammar/Greek/Script/Rounds/UnicodeSymbol.hs
mit
symbolToChar S_Κ = 'Κ'
22
symbolToChar S_Κ = 'Κ'
22
symbolToChar S_Κ = 'Κ'
22
false
false
0
5
3
11
5
6
null
null
eneas193933/regex-derivatives
test/RegexSpec.hs
bsd-2-clause
-- Really could be any character exhaustiveMatches Empty = [""]
69
exhaustiveMatches Empty = [""]
36
exhaustiveMatches Empty = [""]
36
true
false
0
5
15
14
7
7
null
null
glutamate/cvutils
CVUtils.hs
bsd-3-clause
markObjsOnImage :: [Obj] -> Image -> IO (Image) markObjsOnImage objs im = do mutIm <- thaw im forM_ objs $ \(Obj _ _ _ cx cy _) -> do writeArray mutIm (round cy, round cx, 2) 255 writeArray mutIm (round cy, round cx, 0) 0 writeArray mutIm (round cy, round cx, 1) 0 freeze (mutI...
361
markObjsOnImage :: [Obj] -> Image -> IO (Image) markObjsOnImage objs im = do mutIm <- thaw im forM_ objs $ \(Obj _ _ _ cx cy _) -> do writeArray mutIm (round cy, round cx, 2) 255 writeArray mutIm (round cy, round cx, 0) 0 writeArray mutIm (round cy, round cx, 1) 0 freeze (mutI...
361
markObjsOnImage objs im = do mutIm <- thaw im forM_ objs $ \(Obj _ _ _ cx cy _) -> do writeArray mutIm (round cy, round cx, 2) 255 writeArray mutIm (round cy, round cx, 0) 0 writeArray mutIm (round cy, round cx, 1) 0 freeze (mutIm::MImage) --updateBgIm :: Image ->
313
false
true
0
13
107
162
79
83
null
null
kawamuray/ganeti
src/Ganeti/HTools/Program/Hspace.hs
gpl-2.0
-- | Compute the tiered spec counts from a list of allocated -- instances. tieredSpecMap :: [Instance.Instance] -> [(RSpec, Int)] tieredSpecMap trl_ixes = let fin_trl_ixes = reverse trl_ixes ix_byspec = groupBy ((==) `on` Instance.specOf) fin_trl_ixes -- head is "safe" here, as groupBy retur...
459
tieredSpecMap :: [Instance.Instance] -> [(RSpec, Int)] tieredSpecMap trl_ixes = let fin_trl_ixes = reverse trl_ixes ix_byspec = groupBy ((==) `on` Instance.specOf) fin_trl_ixes -- head is "safe" here, as groupBy returns list of non-empty lists spec_map = map (\ixs -> (Instance.specOf $...
384
tieredSpecMap trl_ixes = let fin_trl_ixes = reverse trl_ixes ix_byspec = groupBy ((==) `on` Instance.specOf) fin_trl_ixes -- head is "safe" here, as groupBy returns list of non-empty lists spec_map = map (\ixs -> (Instance.specOf $ head ixs, length ixs)) ix_byspec in spec_map
315
true
true
0
14
113
108
60
48
null
null
konn/pandoc-japanese-docx
src/Text/Pandoc/Readers/Docx/Japanese.hs
gpl-2.0
runToInlines :: Run -> DocxContext Inlines runToInlines (Run rs runElems) | Just (s, _) <- rStyle rs , s `elem` codeStyles = return $ code $ concatMap runElemToString runElems | otherwise = do let ils = concatReduce (map runElemToInlines runElems) return $ (runStyleToTransform $ resolveDependentRunSty...
330
runToInlines :: Run -> DocxContext Inlines runToInlines (Run rs runElems) | Just (s, _) <- rStyle rs , s `elem` codeStyles = return $ code $ concatMap runElemToString runElems | otherwise = do let ils = concatReduce (map runElemToInlines runElems) return $ (runStyleToTransform $ resolveDependentRunSty...
330
runToInlines (Run rs runElems) | Just (s, _) <- rStyle rs , s `elem` codeStyles = return $ code $ concatMap runElemToString runElems | otherwise = do let ils = concatReduce (map runElemToInlines runElems) return $ (runStyleToTransform $ resolveDependentRunStyle rs) ils
287
false
true
1
13
64
122
58
64
null
null
sdiehl/ghc
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
bsd-3-clause
infixE Nothing s (Just y) = do { s' <- s; b <- y; pure (InfixE Nothing s' (Just b))}
119
infixE Nothing s (Just y) = do { s' <- s; b <- y; pure (InfixE Nothing s' (Just b))}
119
infixE Nothing s (Just y) = do { s' <- s; b <- y; pure (InfixE Nothing s' (Just b))}
119
false
false
0
11
54
61
29
32
null
null
orion-42/barnes-hut
BH.hs
mit
boxForPoints :: [MassPoint] -> Box boxForPoints !ps = Box (minimum (map (fst . pointPosition) ps)) (maximum (map (fst . pointPosition) ps)) (minimum (map (snd . pointPosition) ps)) (maximum (map (snd . pointPosition) ps))
237
boxForPoints :: [MassPoint] -> Box boxForPoints !ps = Box (minimum (map (fst . pointPosition) ps)) (maximum (map (fst . pointPosition) ps)) (minimum (map (snd . pointPosition) ps)) (maximum (map (snd . pointPosition) ps))
237
boxForPoints !ps = Box (minimum (map (fst . pointPosition) ps)) (maximum (map (fst . pointPosition) ps)) (minimum (map (snd . pointPosition) ps)) (maximum (map (snd . pointPosition) ps))
202
false
true
0
11
48
123
60
63
null
null
RossMeikleham/GPC
src/GPC/Interpreter.hs
bsd-2-clause
performBinCompareOp :: (Literal -> Literal -> Bool) -> Literal -> Literal -> Either String Expr performBinCompareOp operation l1 l2 = Right $ ExpLit $ Bl $ l1 `operation` l2
177
performBinCompareOp :: (Literal -> Literal -> Bool) -> Literal -> Literal -> Either String Expr performBinCompareOp operation l1 l2 = Right $ ExpLit $ Bl $ l1 `operation` l2
177
performBinCompareOp operation l1 l2 = Right $ ExpLit $ Bl $ l1 `operation` l2
81
false
true
0
8
32
64
33
31
null
null
thomie/cabal
Cabal/Distribution/Simple.hs
bsd-3-clause
replAction :: UserHooks -> ReplFlags -> Args -> IO () replAction hooks flags args = do distPref <- findDistPrefOrDefault (replDistPref flags) let verbosity = fromFlag $ replVerbosity flags flags' = flags { replDistPref = toFlag distPref } lbi <- getBuildConfig hooks verbosity distPref progs <- reconfigur...
716
replAction :: UserHooks -> ReplFlags -> Args -> IO () replAction hooks flags args = do distPref <- findDistPrefOrDefault (replDistPref flags) let verbosity = fromFlag $ replVerbosity flags flags' = flags { replDistPref = toFlag distPref } lbi <- getBuildConfig hooks verbosity distPref progs <- reconfigur...
716
replAction hooks flags args = do distPref <- findDistPrefOrDefault (replDistPref flags) let verbosity = fromFlag $ replVerbosity flags flags' = flags { replDistPref = toFlag distPref } lbi <- getBuildConfig hooks verbosity distPref progs <- reconfigurePrograms verbosity (replProgramPaths fla...
662
false
true
0
12
164
210
99
111
null
null
roberth/uu-helium
test/benchmarks/Parser.hs
gpl-3.0
leTakeLitChars d l n ('\n':cs) = leFail l n "Literal exceeds line"
68
leTakeLitChars d l n ('\n':cs) = leFail l n "Literal exceeds line"
68
leTakeLitChars d l n ('\n':cs) = leFail l n "Literal exceeds line"
68
false
false
0
6
13
35
14
21
null
null
urbanslug/ghc
testsuite/tests/programs/joao-circular/Main.hs
bsd-3-clause
showCode [] = "\n"
22
showCode [] = "\n"
22
showCode [] = "\n"
22
false
false
0
5
7
12
5
7
null
null
kawu/feature-structure
src/NLP/FeatureStructure/Join.hs
bsd-2-clause
-- | Retrieve node hidden behind the given identifier. getNode :: (Functor m, Monad m, Ord i) => i -> JoinT i f a m (Node i f a) getNode i = maybeT =<< M.lookup <$> getRepr i <*> S.gets (nodeMap.graph)
205
getNode :: (Functor m, Monad m, Ord i) => i -> JoinT i f a m (Node i f a) getNode i = maybeT =<< M.lookup <$> getRepr i <*> S.gets (nodeMap.graph)
150
getNode i = maybeT =<< M.lookup <$> getRepr i <*> S.gets (nodeMap.graph)
76
true
true
0
9
44
88
44
44
null
null
exclipy/pdata
Data/BitUtil.hs
bsd-3-clause
bitCount8 237 = 6
17
bitCount8 237 = 6
17
bitCount8 237 = 6
17
false
false
0
5
3
9
4
5
null
null
yoo-e/yesod-helpers
Yesod/Helpers/Aeson.hs
bsd-3-clause
-- | parse a list or after spliting the text into a list -- use a Parsec parser to split the the text parseListSepParsec :: String -> ParsecT Text () Identity b -- ^ separator parser -> (Value -> Parser a) -- ^ parse each value of the list -- the value maybe a ...
585
parseListSepParsec :: String -> ParsecT Text () Identity b -- ^ separator parser -> (Value -> Parser a) -- ^ parse each value of the list -- the value maybe a String if it is -- from spliting a long text, ...
483
parseListSepParsec _ _ f (A.Array arr) = mapM f $ V.toList arr
79
true
true
0
10
241
90
47
43
null
null
zachsully/hakaru
haskell/Language/Hakaru/Sample.hs
bsd-3-clause
identityElement (Prod HSemiring_Nat) = VNat 1
47
identityElement (Prod HSemiring_Nat) = VNat 1
47
identityElement (Prod HSemiring_Nat) = VNat 1
47
false
false
0
7
7
18
8
10
null
null
edsko/cabal
Cabal/src/Distribution/ParseUtils.hs
bsd-3-clause
locatedErrorMsg (TabsError n) = (Just n, "Tab used as indentation.")
75
locatedErrorMsg (TabsError n) = (Just n, "Tab used as indentation.")
75
locatedErrorMsg (TabsError n) = (Just n, "Tab used as indentation.")
75
false
false
0
7
16
24
12
12
null
null
fffej/HS-Poker
SimpleEvaluator.hs
bsd-3-clause
mkStraightFlush :: Hand -> BestHand mkStraightFlush hand = StraightFlush v where (Straight v) = mkStraight hand
117
mkStraightFlush :: Hand -> BestHand mkStraightFlush hand = StraightFlush v where (Straight v) = mkStraight hand
117
mkStraightFlush hand = StraightFlush v where (Straight v) = mkStraight hand
81
false
true
0
6
21
39
18
21
null
null
yav/smtLib
src/SMTLib1/QF_BV.hs
mit
bvsrem :: Term -> Term -> Term bvsrem s t = App "bvsrem" [s,t]
62
bvsrem :: Term -> Term -> Term bvsrem s t = App "bvsrem" [s,t]
62
bvsrem s t = App "bvsrem" [s,t]
31
false
true
0
6
13
35
18
17
null
null
pxqr/algorithm-wm
src/AST.hs
mit
toList :: Exp -> Maybe [Exp] toList (ConE "Nil") = return []
78
toList :: Exp -> Maybe [Exp] toList (ConE "Nil") = return []
78
toList (ConE "Nil") = return []
49
false
true
0
7
29
35
17
18
null
null
spechub/Hets
Common/XPath.hs
gpl-2.0
-- | skip right paren rpar :: Parser () rpar = forget (symbol ")")
66
rpar :: Parser () rpar = forget (symbol ")")
44
rpar = forget (symbol ")")
26
true
true
0
7
13
26
13
13
null
null
slpopejoy/fadno-xml
src/Fadno/MusicXml/MusicXml30.hs
bsd-2-clause
parseHarmonyChord :: P.XParse HarmonyChord parseHarmonyChord = HarmonyChord <$> parseChxHarmonyChord <*> (P.xchild (P.name "kind") (parseKind)) <*> P.optional (P.xchild (P.name "inversion") (parseInversion)) <*> P.optional (P.xchild (P.name "bass") (parseBass)) <*> P.many ...
362
parseHarmonyChord :: P.XParse HarmonyChord parseHarmonyChord = HarmonyChord <$> parseChxHarmonyChord <*> (P.xchild (P.name "kind") (parseKind)) <*> P.optional (P.xchild (P.name "inversion") (parseInversion)) <*> P.optional (P.xchild (P.name "bass") (parseBass)) <*> P.many ...
362
parseHarmonyChord = HarmonyChord <$> parseChxHarmonyChord <*> (P.xchild (P.name "kind") (parseKind)) <*> P.optional (P.xchild (P.name "inversion") (parseInversion)) <*> P.optional (P.xchild (P.name "bass") (parseBass)) <*> P.many (P.xchild (P.name "degree") (parseDegree))
319
false
true
0
13
78
135
68
67
null
null
patperry/hs-linear-algebra
lib/Numeric/LinearAlgebra/Matrix/STBase.hs
bsd-3-clause
-- | Create a new matrix of given shape, but do not initialize the elements. new_ :: (Storable e) => (Int,Int) -> ST s (STMatrix s e) new_ (m,n) | m < 0 || n < 0 = error $ printf "new_ (%d,%d): invalid dimensions" m n | otherwise = unsafeIOToST $ do f <- mallocForeignPtrArray (m*n) retu...
450
new_ :: (Storable e) => (Int,Int) -> ST s (STMatrix s e) new_ (m,n) | m < 0 || n < 0 = error $ printf "new_ (%d,%d): invalid dimensions" m n | otherwise = unsafeIOToST $ do f <- mallocForeignPtrArray (m*n) return $ STMatrix $ M.unsafeFromForeignPtr f 0 (m,n) (max 1 m) -- | Create a mat...
373
new_ (m,n) | m < 0 || n < 0 = error $ printf "new_ (%d,%d): invalid dimensions" m n | otherwise = unsafeIOToST $ do f <- mallocForeignPtrArray (m*n) return $ STMatrix $ M.unsafeFromForeignPtr f 0 (m,n) (max 1 m) -- | Create a matrix with every element initialized to the same value.
316
true
true
0
12
114
149
75
74
null
null
gafiatulin/codewars
src/Beta/Tcegilmopyya.hs
mit
g :: String -> String g [] = []
31
g :: String -> String g [] = []
31
g [] = []
9
false
true
0
5
8
26
12
14
null
null
verement/etamoo
src/MOO/String.hs
bsd-3-clause
decodeBinary :: Text -> Maybe ByteString decodeBinary = fmap BS.pack . decode . T.unpack where decode :: String -> Maybe [Word8] decode ('~':q:r:rest) = do q' <- fromHex q r' <- fromHex r let b = 16 * q' + r' (b :) <$> decode rest decode ('~':_) = Nothing ...
744
decodeBinary :: Text -> Maybe ByteString decodeBinary = fmap BS.pack . decode . T.unpack where decode :: String -> Maybe [Word8] decode ('~':q:r:rest) = do q' <- fromHex q r' <- fromHex r let b = 16 * q' + r' (b :) <$> decode rest decode ('~':_) = Nothing ...
744
decodeBinary = fmap BS.pack . decode . T.unpack where decode :: String -> Maybe [Word8] decode ('~':q:r:rest) = do q' <- fromHex q r' <- fromHex r let b = 16 * q' + r' (b :) <$> decode rest decode ('~':_) = Nothing decode (c:rest) | isAscii c &...
703
false
true
4
11
281
306
138
168
null
null
athanclark/urlpath
src/Data/Url.hs
mit
packLocation :: Strict.Maybe T.Text -> Bool -> URIAuth -> Location -> URI packLocation scheme slashes auth loc = URI scheme slashes auth (Strict.Just $ either getPathChunks getPathChunks (locPath loc) ) (V.fromList $ map (\(l,r) -> T.pack l Strict.:!: maybe Strict.Nothing (Strict.Just ...
429
packLocation :: Strict.Maybe T.Text -> Bool -> URIAuth -> Location -> URI packLocation scheme slashes auth loc = URI scheme slashes auth (Strict.Just $ either getPathChunks getPathChunks (locPath loc) ) (V.fromList $ map (\(l,r) -> T.pack l Strict.:!: maybe Strict.Nothing (Strict.Just ...
429
packLocation scheme slashes auth loc = URI scheme slashes auth (Strict.Just $ either getPathChunks getPathChunks (locPath loc) ) (V.fromList $ map (\(l,r) -> T.pack l Strict.:!: maybe Strict.Nothing (Strict.Just . T.pack) r) $ getQuery loc ) (maybe Strict.Nothing (Stric...
355
false
true
0
15
104
175
86
89
null
null
metabrainz/musicbrainz-data-service
src/MusicBrainz/API/Work.hs
gpl-2.0
-------------------------------------------------------------------------------- findByIswc :: Form Text MusicBrainz [CoreEntity Work] findByIswc = runApi $ MB.findByIswc <$> "iswc" .: iswcF
190
findByIswc :: Form Text MusicBrainz [CoreEntity Work] findByIswc = runApi $ MB.findByIswc <$> "iswc" .: iswcF
109
findByIswc = runApi $ MB.findByIswc <$> "iswc" .: iswcF
55
true
true
0
8
16
39
20
19
null
null
fmthoma/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
pcDataCon :: Name -> [TyVar] -> [Type] -> TyCon -> DataCon pcDataCon = pcDataConWithFixity False
96
pcDataCon :: Name -> [TyVar] -> [Type] -> TyCon -> DataCon pcDataCon = pcDataConWithFixity False
96
pcDataCon = pcDataConWithFixity False
37
false
true
0
8
14
36
19
17
null
null
shnarazk/gradcondtools
LectTypes.hs
gpl-3.0
-- | 引数に渡された科目(点数)リストの合計単位数 unitSum :: Subjective s => [s] -> Double unitSum l = sum $ map numUnits l
101
unitSum :: Subjective s => [s] -> Double unitSum l = sum $ map numUnits l
73
unitSum l = sum $ map numUnits l
32
true
true
0
7
18
38
19
19
null
null
walpurgisriot/unitparty
UnitParty/Units.hs
gpl-3.0
electronVolt = constant (1.602176565 * 10 ** (-19)) *~ joule
60
electronVolt = constant (1.602176565 * 10 ** (-19)) *~ joule
60
electronVolt = constant (1.602176565 * 10 ** (-19)) *~ joule
60
false
false
0
10
9
29
15
14
null
null
Chase-C/Octree
src/Octree.hs
gpl-2.0
--------------------------------------------------------- getOctant :: Vec3D -> Vec3D -> Octant getOctant (Vec3D (cx, cy, cz)) (Vec3D (px, py, pz)) = toEnum $ (fromEnum right) + (2 * fromEnum top) + (4 * fromEnum front) where front = pz < cz top = py < cy right = px < cx
298
getOctant :: Vec3D -> Vec3D -> Octant getOctant (Vec3D (cx, cy, cz)) (Vec3D (px, py, pz)) = toEnum $ (fromEnum right) + (2 * fromEnum top) + (4 * fromEnum front) where front = pz < cz top = py < cy right = px < cx
239
getOctant (Vec3D (cx, cy, cz)) (Vec3D (px, py, pz)) = toEnum $ (fromEnum right) + (2 * fromEnum top) + (4 * fromEnum front) where front = pz < cz top = py < cy right = px < cx
201
true
true
0
9
74
122
66
56
null
null
mietek/stack
src/System/Process/Read.hs
bsd-3-clause
-- | Get the environment variables from @EnvOverride@ unEnvOverride :: EnvOverride -> Map Text Text unEnvOverride = eoTextMap
125
unEnvOverride :: EnvOverride -> Map Text Text unEnvOverride = eoTextMap
71
unEnvOverride = eoTextMap
25
true
true
0
6
17
21
11
10
null
null
chip2n/tin172-project
related-stuff/AStarExamples.hs
gpl-3.0
graphEx 3 = S.singleton 4
25
graphEx 3 = S.singleton 4
25
graphEx 3 = S.singleton 4
25
false
false
0
6
4
14
6
8
null
null
mosigo/haskell-sandbox
app/PDBParser.hs
bsd-3-clause
main :: IO () main = do args <- getArgs contents <- TIO.readFile $ head args result $ parse pdbLinesParser "pdb parser" contents
134
main :: IO () main = do args <- getArgs contents <- TIO.readFile $ head args result $ parse pdbLinesParser "pdb parser" contents
134
main = do args <- getArgs contents <- TIO.readFile $ head args result $ parse pdbLinesParser "pdb parser" contents
120
false
true
0
10
28
59
25
34
null
null
ierton/yteratee
src/BitBasket.hs
bsd-3-clause
bbtake :: (Bits a) => Int -> BitBasket a -> a bbtake 0 _ = 0
60
bbtake :: (Bits a) => Int -> BitBasket a -> a bbtake 0 _ = 0
60
bbtake 0 _ = 0
14
false
true
0
9
15
42
19
23
null
null
rodrigogribeiro/mptc
src/Language/Haskell/Exts/Pretty.hs
bsd-3-clause
unDocM :: DocM s a -> (s -> a) unDocM (DocM f) = f
50
unDocM :: DocM s a -> (s -> a) unDocM (DocM f) = f
50
unDocM (DocM f) = f
19
false
true
0
9
13
42
19
23
null
null
nymacro/http-ece
src/Network/HTTP/ECE.hs
bsd-3-clause
-- | parse encryption params header string parseEncryptionParams :: Parser Params parseEncryptionParams = do let alphaNumeric = inClass "A-Za-z0-9" parameterName = takeWhile1 alphaNumeric parameter = do name <- parameterName let quoted = char '"' *> (pack <$> manyTill anyChar (char '"'...
643
parseEncryptionParams :: Parser Params parseEncryptionParams = do let alphaNumeric = inClass "A-Za-z0-9" parameterName = takeWhile1 alphaNumeric parameter = do name <- parameterName let quoted = char '"' *> (pack <$> manyTill anyChar (char '"')) unquoted = takeWhile1 (/= '...
600
parseEncryptionParams = do let alphaNumeric = inClass "A-Za-z0-9" parameterName = takeWhile1 alphaNumeric parameter = do name <- parameterName let quoted = char '"' *> (pack <$> manyTill anyChar (char '"')) unquoted = takeWhile1 (/= ';') withValue = char '=' *>...
561
true
true
0
21
176
182
89
93
null
null
spechub/Hets
Comorphisms/Hs2HOLCFaux.hs
gpl-2.0
aweLits = mthMonad ++ mthFunctor ++ mthEq ++ ["+", "-", "*"]
60
aweLits = mthMonad ++ mthFunctor ++ mthEq ++ ["+", "-", "*"]
60
aweLits = mthMonad ++ mthFunctor ++ mthEq ++ ["+", "-", "*"]
60
false
false
3
7
10
32
15
17
null
null
lostbean/Hammer
src/Hammer/VoxBox.hs
gpl-3.0
zDir :: VoxelPos zDir = VoxelPos 0 0 1
38
zDir :: VoxelPos zDir = VoxelPos 0 0 1
38
zDir = VoxelPos 0 0 1
21
false
true
0
6
8
27
10
17
null
null
prasmussen/magmod
magmod.hs
mit
generateLayoutHandler :: String -> IO () generateLayoutHandler scope = withModuleInfo (\moduleInfo -> generateLayout moduleInfo scope)
146
generateLayoutHandler :: String -> IO () generateLayoutHandler scope = withModuleInfo (\moduleInfo -> generateLayout moduleInfo scope)
146
generateLayoutHandler scope = withModuleInfo (\moduleInfo -> generateLayout moduleInfo scope)
105
false
true
0
8
26
39
19
20
null
null
konn/hskk
cocoa/AppDelegate.hs
bsd-3-clause
miscDics :: DictConf -> IO [Async Dictionary] miscDics conf = mapM getDic (conf ^. otherDicConfs)
97
miscDics :: DictConf -> IO [Async Dictionary] miscDics conf = mapM getDic (conf ^. otherDicConfs)
97
miscDics conf = mapM getDic (conf ^. otherDicConfs)
51
false
true
0
8
14
39
19
20
null
null
sardonicpresence/glucose
src/Glucose/Error.hs
mit
formatList (a:as) = a <> ", " <> formatList as
46
formatList (a:as) = a <> ", " <> formatList as
46
formatList (a:as) = a <> ", " <> formatList as
46
false
false
0
7
9
27
13
14
null
null
sopvop/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
packageDBParams :: PackageDBStack -> [String] packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB ...
435
packageDBParams :: PackageDBStack -> [String] packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB ...
435
packageDBParams dbs = "--package-db=clear" : map (("--package-db=" ++) . convert) dbs where convert :: PackageDB -> String convert GlobalPackageDB = "global" convert UserPackageDB = "user" convert (SpecificPackageDB path) = path --------------------------------...
389
false
true
0
9
99
85
45
40
null
null
andorp/bead
src/Bead/Domain/Entities.hs
bsd-3-clause
-- Template function for the TestScript with flipped parameters withTestScript t tc f = testScriptCata tc f t
109
withTestScript t tc f = testScriptCata tc f t
45
withTestScript t tc f = testScriptCata tc f t
45
true
false
0
5
17
21
10
11
null
null
ddssff/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
_RoleAnnotD :: Prism' Dec (Name, [Role]) _RoleAnnotD = prism' reviewer remitter where reviewer (x, y) = RoleAnnotD x y remitter (RoleAnnotD x y) = Just (x, y) remitter _ = Nothing #endif -- | -- @ -- _StandaloneDerivD :: 'Prism'' 'Dec' ('Maybe' 'DerivStrategy', 'Cxt', 'Type') -- template-haskell-...
467
_RoleAnnotD :: Prism' Dec (Name, [Role]) _RoleAnnotD = prism' reviewer remitter where reviewer (x, y) = RoleAnnotD x y remitter (RoleAnnotD x y) = Just (x, y) remitter _ = Nothing #endif -- | -- @ -- _StandaloneDerivD :: 'Prism'' 'Dec' ('Maybe' 'DerivStrategy', 'Cxt', 'Type') -- template-haskell-...
467
_RoleAnnotD = prism' reviewer remitter where reviewer (x, y) = RoleAnnotD x y remitter (RoleAnnotD x y) = Just (x, y) remitter _ = Nothing #endif -- | -- @ -- _StandaloneDerivD :: 'Prism'' 'Dec' ('Maybe' 'DerivStrategy', 'Cxt', 'Type') -- template-haskell-2.12+ -- _StandaloneDerivD :: 'Prism'' 'D...
426
false
true
2
8
104
92
51
41
null
null
joelburget/daily-typecheckers
src/Day7.hs
bsd-3-clause
alphaEquivalent2 (Abs2 x1 tm1) (Abs2 x2 tm2) = alphaEquivalent2 (subst2 x1 x2 tm1) tm2
88
alphaEquivalent2 (Abs2 x1 tm1) (Abs2 x2 tm2) = alphaEquivalent2 (subst2 x1 x2 tm1) tm2
88
alphaEquivalent2 (Abs2 x1 tm1) (Abs2 x2 tm2) = alphaEquivalent2 (subst2 x1 x2 tm1) tm2
88
false
false
0
7
15
42
20
22
null
null
anup-2s/project-euler
src/Problem12.hs
bsd-3-clause
p12 :: String p12 = show $ head . atLeastNFactors $ 500
55
p12 :: String p12 = show $ head . atLeastNFactors $ 500
55
p12 = show $ head . atLeastNFactors $ 500
41
false
true
0
7
11
30
13
17
null
null
kyren/hsgb
lib/Gameboy/Instructions.hs
unlicense
encodeInstruction (RLC_R BRegister) = [0xcb, 0x00]
50
encodeInstruction (RLC_R BRegister) = [0xcb, 0x00]
50
encodeInstruction (RLC_R BRegister) = [0xcb, 0x00]
50
false
false
0
6
5
22
11
11
null
null
elliottt/huff
src/Huff/Compile/AST.hs
bsd-3-clause
mkTOr ts = TOr ts
18
mkTOr ts = TOr ts
18
mkTOr ts = TOr ts
18
false
false
1
5
5
16
5
11
null
null
m-arnold/graflog
src/Graflog/Console.hs
bsd-3-clause
-- this function forces stdout into line buffering mode; useful for CloudFormation logs enableStdoutLineBuffering :: MonadIO m => m () enableStdoutLineBuffering = liftIO $ hSetBuffering stdout LineBuffering
206
enableStdoutLineBuffering :: MonadIO m => m () enableStdoutLineBuffering = liftIO $ hSetBuffering stdout LineBuffering
118
enableStdoutLineBuffering = liftIO $ hSetBuffering stdout LineBuffering
71
true
true
0
7
26
33
16
17
null
null
vikraman/ghc
compiler/utils/Panic.hs
bsd-3-clause
sorry x = throwGhcException (Sorry x)
40
sorry x = throwGhcException (Sorry x)
40
sorry x = throwGhcException (Sorry x)
40
false
false
1
7
8
21
8
13
null
null
andorp/grin
grin/src/AbstractInterpretation/Model.hs
bsd-3-clause
litOrConstTagNodeToTypeSet :: Val -> TypeSet litOrConstTagNodeToTypeSet = \case c@(ConstTagNode t ps) -> mempty { _nodes = valToNodeSet c } VarTagNode _ _ -> mempty ValTag _ -> mempty Unit -> mempty Lit l -> typeSet l Var _ -> mempty
246
litOrConstTagNodeToTypeSet :: Val -> TypeSet litOrConstTagNodeToTypeSet = \case c@(ConstTagNode t ps) -> mempty { _nodes = valToNodeSet c } VarTagNode _ _ -> mempty ValTag _ -> mempty Unit -> mempty Lit l -> typeSet l Var _ -> mempty
246
litOrConstTagNodeToTypeSet = \case c@(ConstTagNode t ps) -> mempty { _nodes = valToNodeSet c } VarTagNode _ _ -> mempty ValTag _ -> mempty Unit -> mempty Lit l -> typeSet l Var _ -> mempty
201
false
true
7
7
52
89
45
44
null
null
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss-examples/picture/Boids/KDTree2d.hs
mit
kdtAddPoints ((pt, dat):ps) t = kdtAddPoints ps $ kdtAddPoint t pt dat
79
kdtAddPoints ((pt, dat):ps) t = kdtAddPoints ps $ kdtAddPoint t pt dat
79
kdtAddPoints ((pt, dat):ps) t = kdtAddPoints ps $ kdtAddPoint t pt dat
79
false
false
0
8
20
38
19
19
null
null
azadbolour/boardgame
haskell-server/src/BoardGame/Server/Service/GameJsonSqlPersister.hs
agpl-3.0
migration = migrateAll
22
migration = migrateAll
22
migration = migrateAll
22
false
false
0
4
2
6
3
3
null
null
mitchellwrosen/dohaskell
src/Model/Collection.hs
bsd-3-clause
-- | Get a map of CollectionId to the number of Resources in that Collection fetchCollectionResourceCountsDB :: YesodDB App (Map CollectionId Int) fetchCollectionResourceCountsDB = fetchResourceFieldCountsDB ResCollectionColId
226
fetchCollectionResourceCountsDB :: YesodDB App (Map CollectionId Int) fetchCollectionResourceCountsDB = fetchResourceFieldCountsDB ResCollectionColId
149
fetchCollectionResourceCountsDB = fetchResourceFieldCountsDB ResCollectionColId
79
true
true
0
7
25
28
14
14
null
null
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/M4/CheckTypeStmt.hs
bsd-3-clause
-- | Return a list of interface names paired with type-declaration -- statements, found in interface bodies that declare new types. checkInterface :: Interface -> [(M4Id, Stmt)] checkInterface (InterfaceModule _ ies) = concatMap checkInterfaceElement ies
255
checkInterface :: Interface -> [(M4Id, Stmt)] checkInterface (InterfaceModule _ ies) = concatMap checkInterfaceElement ies
122
checkInterface (InterfaceModule _ ies) = concatMap checkInterfaceElement ies
76
true
true
0
7
35
42
23
19
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT11.hs
gpl-3.0
S x == S y = x == y
19
S x == S y = x == y
19
S x == S y = x == y
19
false
false
0
6
8
22
9
13
null
null
kmate/raw-feldspar-mcs
src/Feldspar/Multicore/Representation.hs
bsd-3-clause
runCoreHaltCMD :: CoreHaltCMD (Param3 Run exp pred) a -> Run a runCoreHaltCMD (HaltCore (CoreRefRun t)) = killThread t
118
runCoreHaltCMD :: CoreHaltCMD (Param3 Run exp pred) a -> Run a runCoreHaltCMD (HaltCore (CoreRefRun t)) = killThread t
118
runCoreHaltCMD (HaltCore (CoreRefRun t)) = killThread t
55
false
true
0
9
17
51
24
27
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_PS_DEFAULT :: Int wxSTC_PS_DEFAULT = 0
44
wxSTC_PS_DEFAULT :: Int wxSTC_PS_DEFAULT = 0
44
wxSTC_PS_DEFAULT = 0
20
false
true
0
4
5
11
6
5
null
null
robertclancy/tapl
lambda/src/Lambda.hs
gpl-2.0
shift :: Integer -> Term -> Term shift m t = shift' m 0 t where shift' :: Integer -> Integer -> Term -> Term shift' n c (Var x) = if x < c then Var x else Var $ x + n shift' n c (App s u) = App (shift' n c s) (shift' n c u) shift' n c (Abs u) = Abs (shif...
336
shift :: Integer -> Term -> Term shift m t = shift' m 0 t where shift' :: Integer -> Integer -> Term -> Term shift' n c (Var x) = if x < c then Var x else Var $ x + n shift' n c (App s u) = App (shift' n c s) (shift' n c u) shift' n c (Abs u) = Abs (shif...
336
shift m t = shift' m 0 t where shift' :: Integer -> Integer -> Term -> Term shift' n c (Var x) = if x < c then Var x else Var $ x + n shift' n c (App s u) = App (shift' n c s) (shift' n c u) shift' n c (Abs u) = Abs (shift' n (succ c) u)
303
false
true
0
11
137
173
86
87
null
null
haroldcarr/juno
z-no-longer-used/src/Hop/Apps/Juno/Repl.hs
bsd-3-clause
promptGreen :: String promptGreen = "\ESC[0;32mresult>> \ESC[0m"
64
promptGreen :: String promptGreen = "\ESC[0;32mresult>> \ESC[0m"
64
promptGreen = "\ESC[0;32mresult>> \ESC[0m"
42
false
true
0
4
6
11
6
5
null
null
AndyShiue/ende
frontend/src/Parsing.hs
lgpl-3.0
-- TODO: Now only a dummy position is being tagged. Fix it. opToFunc :: Operator -> TaggedTerm Position -> TaggedTerm Position -> TaggedTerm Position opToFunc op = let dummyPosition = Position (1, 1) (1, 1) in \l r -> Infix dummyPosition l op r
294
opToFunc :: Operator -> TaggedTerm Position -> TaggedTerm Position -> TaggedTerm Position opToFunc op = let dummyPosition = Position (1, 1) (1, 1) in \l r -> Infix dummyPosition l op r
234
opToFunc op = let dummyPosition = Position (1, 1) (1, 1) in \l r -> Infix dummyPosition l op r
108
true
true
0
10
93
85
41
44
null
null
alephcloud/hs-aws-kinesis-client
Setup.hs
apache-2.0
pkgInfoModuleName (Just cn) = "PkgInfo_" ++ map tr cn where tr '-' = '_' tr c = c
91
pkgInfoModuleName (Just cn) = "PkgInfo_" ++ map tr cn where tr '-' = '_' tr c = c
91
pkgInfoModuleName (Just cn) = "PkgInfo_" ++ map tr cn where tr '-' = '_' tr c = c
91
false
false
0
7
27
43
20
23
null
null
mydaum/cabal
cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.test.hs
bsd-3-clause
-- Test building a profiled library/executable which uses Template Haskell -- (setup has to build the non-profiled version first) main = setupAndCabalTest $ do skipUnless =<< hasProfiledLibraries setup_build ["--enable-library-profiling", "--enable-profiling"]
285
main = setupAndCabalTest $ do skipUnless =<< hasProfiledLibraries setup_build ["--enable-library-profiling", "--enable-profiling"]
155
main = setupAndCabalTest $ do skipUnless =<< hasProfiledLibraries setup_build ["--enable-library-profiling", "--enable-profiling"]
155
true
false
0
9
54
31
16
15
null
null
valderman/selda
selda/src/Database/Selda/Compile.hs
mit
buildResult :: Result r => Proxy r -> [SqlValue] -> Res r buildResult p = runResultReader (toRes p)
99
buildResult :: Result r => Proxy r -> [SqlValue] -> Res r buildResult p = runResultReader (toRes p)
99
buildResult p = runResultReader (toRes p)
41
false
true
0
8
17
47
22
25
null
null
hvr/containers
Data/IntSet/Base.hs
bsd-3-clause
{-------------------------------------------------------------------- @tip@ assures that we never have empty bitmaps within a tree. --------------------------------------------------------------------} tip :: Prefix -> BitMap -> IntSet tip _ 0 = Nil
251
tip :: Prefix -> BitMap -> IntSet tip _ 0 = Nil
47
tip _ 0 = Nil
13
true
true
0
8
26
31
14
17
null
null
conal/reify-core
src/ReifyCore/Reify.hs
bsd-3-clause
reifyLoop :: ReExpr reifyLoop = unReify >>> do (Var (fqVarName -> "Circat.Misc.loop"),tys@[_a,_b,s],[h]) <- callSplitT dict <- simpleDict (lamName "CircuitLoopKon") $* [s] h' <- reifyOf h appsE "loopEP" tys [dict,h'] -- Use in a final pass to generate helpful error messages for non-reified -- synt...
323
reifyLoop :: ReExpr reifyLoop = unReify >>> do (Var (fqVarName -> "Circat.Misc.loop"),tys@[_a,_b,s],[h]) <- callSplitT dict <- simpleDict (lamName "CircuitLoopKon") $* [s] h' <- reifyOf h appsE "loopEP" tys [dict,h'] -- Use in a final pass to generate helpful error messages for non-reified -- synt...
323
reifyLoop = unReify >>> do (Var (fqVarName -> "Circat.Misc.loop"),tys@[_a,_b,s],[h]) <- callSplitT dict <- simpleDict (lamName "CircuitLoopKon") $* [s] h' <- reifyOf h appsE "loopEP" tys [dict,h'] -- Use in a final pass to generate helpful error messages for non-reified -- syntax.
303
false
true
2
12
65
115
58
57
null
null
urbanslug/ghc
testsuite/tests/array/should_run/arr020.hs
bsd-3-clause
writeByteArray :: MutableByteArray s -> Int -> Word32 -> ST s () writeByteArray (MutableByteArray mba#) (I# i#) (W32# w#) = ST $ \s# -> case writeWord32Array# mba# i# w# s# of s'# -> (# s'#, () #)
209
writeByteArray :: MutableByteArray s -> Int -> Word32 -> ST s () writeByteArray (MutableByteArray mba#) (I# i#) (W32# w#) = ST $ \s# -> case writeWord32Array# mba# i# w# s# of s'# -> (# s'#, () #)
209
writeByteArray (MutableByteArray mba#) (I# i#) (W32# w#) = ST $ \s# -> case writeWord32Array# mba# i# w# s# of s'# -> (# s'#, () #)
144
false
true
2
11
49
95
46
49
null
null
adinapoli/api-tools
src/Data/API/Tools/JSON.hs
bsd-3-clause
json_string_p :: Ord a => [T.Text] -> (T.Text->Maybe a) -> Value -> ParserWithErrs a json_string_p xs p (String t) | Just val <- p t = pure val | otherwise = failWith $ UnexpectedEnumVal xs t
227
json_string_p :: Ord a => [T.Text] -> (T.Text->Maybe a) -> Value -> ParserWithErrs a json_string_p xs p (String t) | Just val <- p t = pure val | otherwise = failWith $ UnexpectedEnumVal xs t
227
json_string_p xs p (String t) | Just val <- p t = pure val | otherwise = failWith $ UnexpectedEnumVal xs t
142
false
true
0
10
71
100
46
54
null
null
jabaraster/jabara-util
src/Jabara/Util/Month.hs
mit
monthsToEndOfSchoolYear :: Month -> [Month] monthsToEndOfSchoolYear startMonth = core 0 [] where core :: Integer -> [Month] -> [Month] core offset ms = let m = addMonth offset startMonth in if isMarch m then sort (m:ms) ...
385
monthsToEndOfSchoolYear :: Month -> [Month] monthsToEndOfSchoolYear startMonth = core 0 [] where core :: Integer -> [Month] -> [Month] core offset ms = let m = addMonth offset startMonth in if isMarch m then sort (m:ms) ...
385
monthsToEndOfSchoolYear startMonth = core 0 [] where core :: Integer -> [Month] -> [Month] core offset ms = let m = addMonth offset startMonth in if isMarch m then sort (m:ms) else c...
341
false
true
0
10
177
120
60
60
null
null
ssaavedra/liquidhaskell
tests/pos/RBTree-color.hs
bsd-3-clause
makeRed _ = error "nein"
37
makeRed _ = error "nein"
37
makeRed _ = error "nein"
37
false
false
0
5
17
12
5
7
null
null
quchen/fgl
Data/Graph/Inductive/Query/MaxFlow.hs
bsd-3-clause
-- | Given a successor or predecessor list for node u and given node v, find -- the label corresponding to edge (u,v) and update the flow and residual -- capacity of that edge's label. Then return the updated list. updAdjList::(Num b,Ord b) => [((b,b,b),Node)]->Node->b->Bool->[((b,b,b),Node)] updAdjList s v cf fwd | fw...
856
updAdjList::(Num b,Ord b) => [((b,b,b),Node)]->Node->b->Bool->[((b,b,b),Node)] updAdjList s v cf fwd | fwd == True = ((x,y+cf,z-cf),w):rs | otherwise = ((x,y-cf,z+cf),w):rs where ((x,y,z),w) = head (filter (\(_,w')->v==w') s) rs = fi...
641
updAdjList s v cf fwd | fwd == True = ((x,y+cf,z-cf),w):rs | otherwise = ((x,y-cf,z+cf),w):rs where ((x,y,z),w) = head (filter (\(_,w')->v==w') s) rs = filter (\(_,w')->v/=w') s -- | Update flow and residual capacity along augmentin...
562
true
true
0
12
215
247
143
104
null
null
nishiuramakoto/erasm-plusplus
src/haskell/EncodedInstructionDefinition.hs
gpl-3.0
operandSizeMode :: EncodedInstructionDefinition -> Maybe OperandSize operandSizeMode = opcodeOperandSizeMode . opcode
117
operandSizeMode :: EncodedInstructionDefinition -> Maybe OperandSize operandSizeMode = opcodeOperandSizeMode . opcode
117
operandSizeMode = opcodeOperandSizeMode . opcode
48
false
true
0
6
10
22
11
11
null
null
drmaruyama/Paraiso
Language/Paraiso/Generator/ClarisTrans.hs
bsd-3-clause
paren :: Parenthesis -> Text -> Text paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation ->...
402
paren :: Parenthesis -> Text -> Text paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation ->...
402
paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation -> ("\'","\'") Quotation2 -> ("\"...
365
false
true
2
8
136
165
90
75
null
null
GaloisInc/network-hans
src/Network/Socket/Internal.hs
bsd-3-clause
-- | Throw an 'IOError' corresponding to the current socket error if -- the IO action returns a result of @-1@, but retries in case of an -- interrupted operation. Checks for operations that would block and -- executes an alternative action before retrying in that case. throwSocketErrorIfMinus1RetryMayBlock :: (Eq...
672
throwSocketErrorIfMinus1RetryMayBlock :: (Eq a, Num a) => String -- ^ textual description of the location -> IO b -- ^ action to execute before retrying if an -- immediate retry would block -> IO a -- ^ the 'IO' operation to be executed -> IO a throwSocketErrorIfMinus1RetryMa...
400
throwSocketErrorIfMinus1RetryMayBlock name on_block act = throwErrnoIfMinus1RetryMayBlock name act on_block
111
true
true
0
10
150
73
38
35
null
null
spechub/Hets
Common/SZSOntology.hs
gpl-2.0
szsStopped :: String -> Bool szsStopped = szsCheck nosuccess ["STP"]
68
szsStopped :: String -> Bool szsStopped = szsCheck nosuccess ["STP"]
68
szsStopped = szsCheck nosuccess ["STP"]
39
false
true
0
6
9
23
12
11
null
null
up9cloud/line-api-server
lib/hs/src/Thrift/Protocol/Compact.hs
mit
buildCompactValue (TI32 i) = buildVarint $ i32ToZigZag i
56
buildCompactValue (TI32 i) = buildVarint $ i32ToZigZag i
56
buildCompactValue (TI32 i) = buildVarint $ i32ToZigZag i
56
false
false
0
7
7
22
10
12
null
null
jtojnar/hulk
src/main/Server.hs
bsd-3-clause
main :: IO () main = withSocketsDo $ do _ <- installHandler sigPIPE Ignore Nothing cmdArgs options >>= getConfig . optionsConf >>= start
140
main :: IO () main = withSocketsDo $ do _ <- installHandler sigPIPE Ignore Nothing cmdArgs options >>= getConfig . optionsConf >>= start
140
main = withSocketsDo $ do _ <- installHandler sigPIPE Ignore Nothing cmdArgs options >>= getConfig . optionsConf >>= start
126
false
true
1
11
26
56
24
32
null
null
supki/wybor
src/Wybor.hs
bsd-2-clause
down :: Query a b -> Query a b down = over (matches.traverse) Zipper.right
74
down :: Query a b -> Query a b down = over (matches.traverse) Zipper.right
74
down = over (matches.traverse) Zipper.right
43
false
true
0
7
13
43
19
24
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Overlay.hs
bsd-3-clause
singleFontSetup :: FontSetup singleFontSetup = FontSetup SquareFont SquareFont SquareFont
89
singleFontSetup :: FontSetup singleFontSetup = FontSetup SquareFont SquareFont SquareFont
89
singleFontSetup = FontSetup SquareFont SquareFont SquareFont
60
false
true
0
5
8
18
9
9
null
null
tek/proteome
packages/test/test/Proteome/Test/Project.hs
mit
cil :: Text cil = "cilia"
25
cil :: Text cil = "cilia"
25
cil = "cilia"
13
false
true
0
4
5
11
6
5
null
null