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
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The reason for the most recent state transition. i1StateReason :: Lens' Instance (Maybe StateReason) i1StateReason = lens _i1StateReason (\s a -> s { _i1StateReason = a })
176
i1StateReason :: Lens' Instance (Maybe StateReason) i1StateReason = lens _i1StateReason (\s a -> s { _i1StateReason = a })
122
i1StateReason = lens _i1StateReason (\s a -> s { _i1StateReason = a })
70
true
true
0
9
28
46
25
21
null
null
eklinkhammer/haskell-vision
src/FeatureDetection/HarrisCorners.hs
mit
tensorImage :: (Array U DIM2 Double, Array U DIM2 Double) -> (Array D DIM3 Double) tensorImage (dx, dy) = let (Z :. height :. width) = extent dx in blurRGB $ fromFunction (Z :. height :. width :. 3) f where f (Z :. j :. i :. k) = case k of 0 -> dx2 ...
555
tensorImage :: (Array U DIM2 Double, Array U DIM2 Double) -> (Array D DIM3 Double) tensorImage (dx, dy) = let (Z :. height :. width) = extent dx in blurRGB $ fromFunction (Z :. height :. width :. 3) f where f (Z :. j :. i :. k) = case k of 0 -> dx2 ...
555
tensorImage (dx, dy) = let (Z :. height :. width) = extent dx in blurRGB $ fromFunction (Z :. height :. width :. 3) f where f (Z :. j :. i :. k) = case k of 0 -> dx2 1 -> dxdy 2 -> dy2 where dy2...
472
false
true
0
15
262
221
114
107
null
null
markflorisson/hpack
testrepo/bytestring-0.10.4.1/Data/ByteString.hs
bsd-3-clause
-- | /O(n)/, where /n/ is the length of the result. The 'unfoldr' -- function is analogous to the List \'unfoldr\'. 'unfoldr' builds a -- ByteString from a seed value. The function takes the element and -- returns 'Nothing' if it is done producing the ByteString or returns -- 'Just' @(a,b)@, in which case, @a@ i...
776
unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString unfoldr f = concat . unfoldChunk 32 64 where unfoldChunk n n' x = case unfoldrN n f x of (s, Nothing) -> s : [] (s, Just x') -> s : unfoldChunk n' (n+n') x'
247
unfoldr f = concat . unfoldChunk 32 64 where unfoldChunk n n' x = case unfoldrN n f x of (s, Nothing) -> s : [] (s, Just x') -> s : unfoldChunk n' (n+n') x'
193
true
true
2
11
199
148
76
72
null
null
Thell/pandoc
src/Text/Pandoc.hs
gpl-2.0
mkStringReader :: (ReaderOptions -> String -> (Either PandocError Pandoc)) -> Reader mkStringReader r = StringReader (\o s -> return $ r o s)
141
mkStringReader :: (ReaderOptions -> String -> (Either PandocError Pandoc)) -> Reader mkStringReader r = StringReader (\o s -> return $ r o s)
141
mkStringReader r = StringReader (\o s -> return $ r o s)
56
false
true
0
10
22
59
30
29
null
null
bos/statistics
dense-linear-algebra/src/Statistics/Matrix/Mutable.hs
bsd-2-clause
replicate :: Int -> Int -> Double -> ST s (MMatrix s) replicate r c k = MMatrix r c <$> M.replicate (r*c) k
107
replicate :: Int -> Int -> Double -> ST s (MMatrix s) replicate r c k = MMatrix r c <$> M.replicate (r*c) k
107
replicate r c k = MMatrix r c <$> M.replicate (r*c) k
53
false
true
0
10
23
64
31
33
null
null
sharkspeed/dororis
languages/haskell/LYHGG/6-higher-order-functions/0-curried-functions.hs
bsd-2-clause
compareWithHundred :: (Num a, Ord a) => a -> Ordering {-compareWithHundred x = compare 100 x-} compareWithHundred = compare 100
127
compareWithHundred :: (Num a, Ord a) => a -> Ordering compareWithHundred = compare 100
86
compareWithHundred = compare 100
32
true
true
0
6
19
34
18
16
null
null
literate-unitb/literate-unitb
src/Code/Synthesis.hs
mit
-- L.map ((zall $ cond:wait) `zimplies`) $ -- M.elems (guards $ events m ! evt) precondition (Wait pre _) = pre
162
precondition (Wait pre _) = pre
38
precondition (Wait pre _) = pre
38
true
false
0
7
71
19
10
9
null
null
technogeeky/cyclotomic
src/Data/Complex/Cyclotomic.hs
gpl-3.0
-- | Cosine function with argument in degrees. cosDeg d = let n = d / 360 nm = abs (numerator n) dn = denominator n a = e dn^nm in (a + conj a) / 2
210
cosDeg d = let n = d / 360 nm = abs (numerator n) dn = denominator n a = e dn^nm in (a + conj a) / 2
163
cosDeg d = let n = d / 360 nm = abs (numerator n) dn = denominator n a = e dn^nm in (a + conj a) / 2
163
true
false
1
11
99
77
36
41
null
null
Matt-Renfro/haskell
H-99/Problem9.hs
mit
pack' :: Eq a => [a] -> [[a]] pack' [] = []
44
pack' :: Eq a => [a] -> [[a]] pack' [] = []
43
pack' [] = []
13
false
true
0
10
12
44
21
23
null
null
lucasbraun/mt-rewrite
app/TPCHSchema.hs
bsd-3-clause
generateLineitemTable :: MtSpecificTable generateLineitemTable = mtSpecificTableFromList [("L_orderkey" , MtSpecific) ,("L_partkey" , MtComparable) ,("L_suppkey" , MtComparable) ,("L_linenumber" , MtComparable) ,("L_quantity" , MtComparable) ,("L_extendedprice" , MtConve...
777
generateLineitemTable :: MtSpecificTable generateLineitemTable = mtSpecificTableFromList [("L_orderkey" , MtSpecific) ,("L_partkey" , MtComparable) ,("L_suppkey" , MtComparable) ,("L_linenumber" , MtComparable) ,("L_quantity" , MtComparable) ,("L_extendedprice" , MtConve...
777
generateLineitemTable = mtSpecificTableFromList [("L_orderkey" , MtSpecific) ,("L_partkey" , MtComparable) ,("L_suppkey" , MtComparable) ,("L_linenumber" , MtComparable) ,("L_quantity" , MtComparable) ,("L_extendedprice" , MtConvertible "currencyToUniversal" "currencyFro...
736
false
true
0
7
190
163
105
58
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Logs/List.hs
mpl-2.0
-- | Creates a value of 'BillingAccountsLogsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ballParent' -- -- * 'ballXgafv' -- -- * 'ballUploadProtocol' -- -- * 'ballAccessToken' -- -- * 'ballUploadType' -- -- * 'ballPageToken' ...
837
billingAccountsLogsList :: Text -- ^ 'ballParent' -> BillingAccountsLogsList billingAccountsLogsList pBallParent_ = BillingAccountsLogsList' { _ballParent = pBallParent_ , _ballXgafv = Nothing , _ballUploadProtocol = Nothing , _ballAccessToken = Nothing , _ballUploadType = Nothing , _b...
443
billingAccountsLogsList pBallParent_ = BillingAccountsLogsList' { _ballParent = pBallParent_ , _ballXgafv = Nothing , _ballUploadProtocol = Nothing , _ballAccessToken = Nothing , _ballUploadType = Nothing , _ballPageToken = Nothing , _ballPageSize = Nothing , _ballResourceNames = Nothi...
358
true
true
0
7
164
105
70
35
null
null
madjestic/b1
src/B1/Program/Chart/SymbolEntry.hs
bsd-3-clause
newSymbolEntryOutput :: Symbol -> Dirty -> Maybe Symbol -> SymbolEntryOutput newSymbolEntryOutput newSymbol newIsDirty maybeSymbol = SymbolEntryOutput { outputState = SymbolEntryState { pendingSymbol = newSymbol } , isDirty = newIsDirty , maybeEnteredSymbol = maybeSymbol }
281
newSymbolEntryOutput :: Symbol -> Dirty -> Maybe Symbol -> SymbolEntryOutput newSymbolEntryOutput newSymbol newIsDirty maybeSymbol = SymbolEntryOutput { outputState = SymbolEntryState { pendingSymbol = newSymbol } , isDirty = newIsDirty , maybeEnteredSymbol = maybeSymbol }
281
newSymbolEntryOutput newSymbol newIsDirty maybeSymbol = SymbolEntryOutput { outputState = SymbolEntryState { pendingSymbol = newSymbol } , isDirty = newIsDirty , maybeEnteredSymbol = maybeSymbol }
204
false
true
0
9
41
65
35
30
null
null
bennofs/hcltest
src/Test/HClTest/Monad.hs
bsd-3-clause
-- | Run an IO action, and fail if that action returns false. The first argument -- is a description of the IO action which will be used for the trace messages. testIO :: String -> IO Bool -> HClTest Trace () testIO desc action = testStep ("Test :: " ++ desc) $ do success <- liftIO action unless success $ failTest ...
532
testIO :: String -> IO Bool -> HClTest Trace () testIO desc action = testStep ("Test :: " ++ desc) $ do success <- liftIO action unless success $ failTest "Failed" -- | A single test step. The first argument is a description of the step. The test step -- can produce trace messages of type 'String'. Those will be c...
371
testIO desc action = testStep ("Test :: " ++ desc) $ do success <- liftIO action unless success $ failTest "Failed" -- | A single test step. The first argument is a description of the step. The test step -- can produce trace messages of type 'String'. Those will be collected an exactly one -- 'Trace' will be emitt...
323
true
true
0
9
105
76
37
39
null
null
dec9ue/jhc_copygc
src/Doc/DocLike.hs
gpl-2.0
dot = char '.'
26
dot = char '.'
26
dot = char '.'
26
false
false
0
5
15
9
4
5
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
staticPtrInfoDataConKey :: Unique staticPtrInfoDataConKey = mkPreludeDataConUnique 34
101
staticPtrInfoDataConKey :: Unique staticPtrInfoDataConKey = mkPreludeDataConUnique 34
101
staticPtrInfoDataConKey = mkPreludeDataConUnique 34
67
false
true
1
5
22
17
7
10
null
null
acowley/language-c
src/Language/C/Analysis/NameSpaceMap.hs
bsd-3-clause
-- | Add local definition -- -- @(ns',oldDef) = defLocal ns ident def@ adds the local definition -- @ident := def@ to the innermost local scope, if there is a local scope, -- and to the global scope otherwise. -- It returns the modified name space @ns'@ and the old binding of -- the identifier @oldDef@, whic...
478
defLocal :: (Ord k) => NameSpaceMap k a -> k -> a -> (NameSpaceMap k a, Maybe a) defLocal ns@(NsMap _ []) ident def = defGlobal ns ident def
140
defLocal ns@(NsMap _ []) ident def = defGlobal ns ident def
59
true
true
1
10
98
92
47
45
null
null
Javran/krampoj
src/Language/Scheme/Krampoj/Parser.hs
mit
radixR R8 = ciString "#o"
26
radixR R8 = ciString "#o"
26
radixR R8 = ciString "#o"
26
false
false
0
5
5
12
5
7
null
null
plow-technologies/shakespeare-dynamic
ghcjs-shakespeare-dynamic/src/Shakespeare/Dynamic/Render.hs
mit
renderDom' :: DOMNode -- ^ Container ov the vdom -> VNode -- ^ Initial VDom -> Consumer (VDA.VNodeAdapter, IO ()) IO () -- ^ Consumer to push VDom to with a finalizer renderDom' container initial = do (vna, f) <- await newNode <- liftIO $ toVNode vn...
468
renderDom' :: DOMNode -- ^ Container ov the vdom -> VNode -- ^ Initial VDom -> Consumer (VDA.VNodeAdapter, IO ()) IO () renderDom' container initial = do (vna, f) <- await newNode <- liftIO $ toVNode vna let pa = diff initial newNode _ <- liftIO...
421
renderDom' container initial = do (vna, f) <- await newNode <- liftIO $ toVNode vna let pa = diff initial newNode _ <- liftIO $ do redraw container pa f renderDom' container newNode -- | Redraw the dom using a patch
234
true
true
0
12
158
126
59
67
null
null
gregoryck/biocalc
ParTest.hs
mit
-- what of list monad listFromKey k times = take k $ repeat times
65
listFromKey k times = take k $ repeat times
43
listFromKey k times = take k $ repeat times
43
true
false
0
6
13
22
10
12
null
null
nevrenato/Hets_Fork
ConstraintCASL/Formula.hs
gpl-2.0
equivalent :: String equivalent = "-||-"
40
equivalent :: String equivalent = "-||-"
40
equivalent = "-||-"
19
false
true
0
6
5
18
7
11
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/chapter2/src/SugarScape/Simulation.hs
gpl-3.0
simulationStep :: SimulationState g -> (SimulationState g, SimStepOut) simulationStep ss = (ss', (t, env', out)) where sf = simSf ss absState = simAbsState ss env = simEnv ss g = simRng ss steps = simSteps ss sfReader = unMSF sf () sfAbsState = runRea...
667
simulationStep :: SimulationState g -> (SimulationState g, SimStepOut) simulationStep ss = (ss', (t, env', out)) where sf = simSf ss absState = simAbsState ss env = simEnv ss g = simRng ss steps = simSteps ss sfReader = unMSF sf () sfAbsState = runRea...
667
simulationStep ss = (ss', (t, env', out)) where sf = simSf ss absState = simAbsState ss env = simEnv ss g = simRng ss steps = simSteps ss sfReader = unMSF sf () sfAbsState = runReaderT sfReader sugarScapeTimeDelta sfEnvState = runStateT sfAbsState absState s...
581
false
true
0
8
203
213
114
99
null
null
tbarnetlamb/hyphen
hyphen/lowlevel_src/HsType.hs
gpl-2.0
mkHsType :: Either TyCon (Var, Kind) -> [HsType] -> HsType mkHsType head = either (error . T.unpack . getErrMsg) id . mkHsTypeSafe head
135
mkHsType :: Either TyCon (Var, Kind) -> [HsType] -> HsType mkHsType head = either (error . T.unpack . getErrMsg) id . mkHsTypeSafe head
135
mkHsType head = either (error . T.unpack . getErrMsg) id . mkHsTypeSafe head
76
false
true
0
10
22
66
32
34
null
null
DarrenMowat/blackbox
src/ListUtils.hs
unlicense
trimToken :: Tok -> [Tok] -> [Tok] trimToken t = trim (==t)
59
trimToken :: Tok -> [Tok] -> [Tok] trimToken t = trim (==t)
59
trimToken t = trim (==t)
24
false
true
0
7
11
35
19
16
null
null
kawu/crf-chain1
src/Data/CRF/Chain1/Dataset/External.hs
bsd-2-clause
-- | Construct the probability distribution. mkDist :: Ord a => [(a, Double)] -> Dist a mkDist = Dist . normalize . M.fromListWith (+) where normalize dist = let z = sum (M.elems dist) in fmap (/z) dist -- | A WordL is a labeled word, i.e. a word with probability distribution -- defined over...
328
mkDist :: Ord a => [(a, Double)] -> Dist a mkDist = Dist . normalize . M.fromListWith (+) where normalize dist = let z = sum (M.elems dist) in fmap (/z) dist -- | A WordL is a labeled word, i.e. a word with probability distribution -- defined over labels.
283
mkDist = Dist . normalize . M.fromListWith (+) where normalize dist = let z = sum (M.elems dist) in fmap (/z) dist -- | A WordL is a labeled word, i.e. a word with probability distribution -- defined over labels.
240
true
true
0
12
83
93
49
44
null
null
amccausl/Swish
Swish/HaskellUtils/LookupMap.hs
lgpl-2.1
mapTranslateKeys :: (LookupEntryClass a1 k1 v, LookupEntryClass a2 k2 v) => (k1 -> k2) -> LookupMap a1 -> LookupMap a2 mapTranslateKeys f (LookupMap es) = LookupMap $ map (kmap f) es
193
mapTranslateKeys :: (LookupEntryClass a1 k1 v, LookupEntryClass a2 k2 v) => (k1 -> k2) -> LookupMap a1 -> LookupMap a2 mapTranslateKeys f (LookupMap es) = LookupMap $ map (kmap f) es
192
mapTranslateKeys f (LookupMap es) = LookupMap $ map (kmap f) es
68
false
true
2
11
41
87
41
46
null
null
prl-tokyo/bigul-configuration-adaptation
Transformations/src/BiFlux/DTD/TypeDef.hs
mit
mkTypeable modname (DataDef _ n atts _) = mkTypeable' modname n $$ mkTypeableAtts False n atts modname
102
mkTypeable modname (DataDef _ n atts _) = mkTypeable' modname n $$ mkTypeableAtts False n atts modname
102
mkTypeable modname (DataDef _ n atts _) = mkTypeable' modname n $$ mkTypeableAtts False n atts modname
102
false
false
0
7
16
41
19
22
null
null
konn/lxc-dummy
src/System/LXC/Internal/Container.hs
bsd-3-clause
getKeys :: String -- ^ Key prefix. -> LXC [String] -- ^ List of keys. getKeys kp = concatMap lines . maybeToList <$> getItemFn p'lxc_container'get_keys kp
170
getKeys :: String -- ^ Key prefix. -> LXC [String] getKeys kp = concatMap lines . maybeToList <$> getItemFn p'lxc_container'get_keys kp
150
getKeys kp = concatMap lines . maybeToList <$> getItemFn p'lxc_container'get_keys kp
84
true
true
0
7
41
42
21
21
null
null
keera-studios/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
withQStyleOptionToolBarResult :: IO (Ptr (TQStyleOptionToolBar a)) -> IO (QStyleOptionToolBar a) withQStyleOptionToolBarResult f = withObjectResult qtc_QStyleOptionToolBar_getFinalizer f
188
withQStyleOptionToolBarResult :: IO (Ptr (TQStyleOptionToolBar a)) -> IO (QStyleOptionToolBar a) withQStyleOptionToolBarResult f = withObjectResult qtc_QStyleOptionToolBar_getFinalizer f
188
withQStyleOptionToolBarResult f = withObjectResult qtc_QStyleOptionToolBar_getFinalizer f
91
false
true
0
10
17
47
22
25
null
null
diku-dk/futhark
src/Futhark/Optimise/Simplify/Engine.hs
isc
notWorthHoisting :: ASTRep rep => BlockPred rep notWorthHoisting _ _ (Let pat _ e) = not (safeExp e) && any ((> 0) . arrayRank) (patTypes pat)
144
notWorthHoisting :: ASTRep rep => BlockPred rep notWorthHoisting _ _ (Let pat _ e) = not (safeExp e) && any ((> 0) . arrayRank) (patTypes pat)
144
notWorthHoisting _ _ (Let pat _ e) = not (safeExp e) && any ((> 0) . arrayRank) (patTypes pat)
96
false
true
0
9
27
73
36
37
null
null
skullzzz/behave
src/Main.hs
mit
s2 = selectorNode [s, s1]
32
s2 = selectorNode [s, s1]
32
s2 = selectorNode [s, s1]
32
false
false
0
6
11
15
8
7
null
null
manugunther/sat
Sat/GUI/EntryFormula.hs
gpl-3.0
finame :: Lens' FormulaItem String finame = lens fiName (\fi str -> fi {fiName = str})
86
finame :: Lens' FormulaItem String finame = lens fiName (\fi str -> fi {fiName = str})
86
finame = lens fiName (\fi str -> fi {fiName = str})
51
false
true
1
9
15
44
21
23
null
null
sw17ch/gator
src/Language/Gator/Ops.hs
bsd-3-clause
connectWithIn :: (MonadState Logic m, Out a) => (b -> InName) -> a -> b -> m () connectWithIn inN a b = do (joints) $ (modify $ js) where js = M.insertWith (flip (++)) (out a) [(inN b)]
201
connectWithIn :: (MonadState Logic m, Out a) => (b -> InName) -> a -> b -> m () connectWithIn inN a b = do (joints) $ (modify $ js) where js = M.insertWith (flip (++)) (out a) [(inN b)]
201
connectWithIn inN a b = do (joints) $ (modify $ js) where js = M.insertWith (flip (++)) (out a) [(inN b)]
121
false
true
1
10
54
124
61
63
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Input/ADL1/Lexer.hs
gpl-3.0
--TODO: Test if we should increase line number and reset the column number mainLexer p (c:s) | isSpace c = let (spc,next) = span isSpace s in mainLexer (foldl updatePos p (c:spc)) next
218
mainLexer p (c:s) | isSpace c = let (spc,next) = span isSpace s in mainLexer (foldl updatePos p (c:spc)) next
142
mainLexer p (c:s) | isSpace c = let (spc,next) = span isSpace s in mainLexer (foldl updatePos p (c:spc)) next
142
true
false
0
12
66
75
35
40
null
null
meiersi/scyther-proof
src/Logic/FOL/Sorted/SPASS.hs
gpl-3.0
-- | MOVE funId :: Fun -> Id funId (Fun (i,_) _) = i
52
funId :: Fun -> Id funId (Fun (i,_) _) = i
42
funId (Fun (i,_) _) = i
23
true
true
0
8
13
33
18
15
null
null
ksaveljev/hake-2
src/Render/Fast/FastRenderAPI.hs
bsd-3-clause
particleTexture :: B.ByteString particleTexture = B.pack [ 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 ...
1,726
particleTexture :: B.ByteString particleTexture = B.pack [ 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 ...
1,726
particleTexture = B.pack [ 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 0, 255, 255, 255, 0 , 255, 255, 255, 255, 255, 255,...
1,694
false
true
0
6
754
786
521
265
null
null
brendanhay/gogol
gogol-vision/gen/Network/Google/Vision/Types/Product.hs
mpl-2.0
-- | Confidence of the OCR results on the page. Range [0, 1]. goo1Confidence :: Lens' GoogleCloudVisionV1p4beta1Page (Maybe Double) goo1Confidence = lens _goo1Confidence (\ s a -> s{_goo1Confidence = a}) . mapping _Coerce
235
goo1Confidence :: Lens' GoogleCloudVisionV1p4beta1Page (Maybe Double) goo1Confidence = lens _goo1Confidence (\ s a -> s{_goo1Confidence = a}) . mapping _Coerce
173
goo1Confidence = lens _goo1Confidence (\ s a -> s{_goo1Confidence = a}) . mapping _Coerce
103
true
true
2
8
46
59
28
31
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/maximum_4.hs
mit
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
false
false
0
7
5
17
8
9
null
null
pcapriotti-test/optparse-applicative
Options/Applicative/Builder.hs
bsd-3-clause
-- | Specify a short program description as a 'Text.PrettyPrint.ANSI.Leijen.Doc' -- value. progDescDoc :: Maybe Doc -> InfoMod a progDescDoc doc = InfoMod $ \i -> i { infoProgDesc = Chunk doc }
193
progDescDoc :: Maybe Doc -> InfoMod a progDescDoc doc = InfoMod $ \i -> i { infoProgDesc = Chunk doc }
102
progDescDoc doc = InfoMod $ \i -> i { infoProgDesc = Chunk doc }
64
true
true
2
9
32
52
25
27
null
null
spacekitteh/compdata
benchmark/Param/DataTypes/Transform.hs
bsd-3-clause
transSugar :: (Difunctor f, TransSugar f) => Term f -> PExpr transSugar = cata transSugarAlg
92
transSugar :: (Difunctor f, TransSugar f) => Term f -> PExpr transSugar = cata transSugarAlg
92
transSugar = cata transSugarAlg
31
false
true
0
8
14
43
19
24
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
-- LaTeX-style math: see `org-latex-regexps` for details -- | Chars allowed after an inline ($...$) math statement mathPostChars :: [Char] mathPostChars = "\t\n \"'),-.:;?"
173
mathPostChars :: [Char] mathPostChars = "\t\n \"'),-.:;?"
57
mathPostChars = "\t\n \"'),-.:;?"
33
true
true
0
5
24
16
10
6
null
null
morae/SortNet
SortNet.hs
gpl-2.0
maxSamples = [ fromList [x,y] --> fromList [ max x y ] | x <- [0..10], y <- [0..10] ]
94
maxSamples = [ fromList [x,y] --> fromList [ max x y ] | x <- [0..10], y <- [0..10] ]
94
maxSamples = [ fromList [x,y] --> fromList [ max x y ] | x <- [0..10], y <- [0..10] ]
94
false
false
0
9
28
59
31
28
null
null
seereason/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
-- | Given an excluded package and the reason it was excluded, produce a human -- readable explanation. -- showExclusionReason :: PackageId -> ExclusionReason -> String showExclusionReason pkgid (SelectedOther pkgid') = display pkgid ++ " was excluded because " ++ display pkgid' ++ " was selected instead"
310
showExclusionReason :: PackageId -> ExclusionReason -> String showExclusionReason pkgid (SelectedOther pkgid') = display pkgid ++ " was excluded because " ++ display pkgid' ++ " was selected instead"
203
showExclusionReason pkgid (SelectedOther pkgid') = display pkgid ++ " was excluded because " ++ display pkgid' ++ " was selected instead"
141
true
true
4
7
50
58
27
31
null
null
haskell-distributed/distributed-process-execution
src/Control/Distributed/Process/Execution/Mailbox.hs
bsd-3-clause
matching :: Closure (Message -> Process FilterResult) -> Message -> Process FilterResult matching predicate msg = do pred' <- unClosure predicate :: Process (Message -> Process FilterResult) res <- handleMessage msg pred' case res of Nothing -> return Skip Just fr -> return fr -------...
555
matching :: Closure (Message -> Process FilterResult) -> Message -> Process FilterResult matching predicate msg = do pred' <- unClosure predicate :: Process (Message -> Process FilterResult) res <- handleMessage msg pred' case res of Nothing -> return Skip Just fr -> return fr -------...
555
matching predicate msg = do pred' <- unClosure predicate :: Process (Message -> Process FilterResult) res <- handleMessage msg pred' case res of Nothing -> return Skip Just fr -> return fr -------------------------------------------------------------------------------- -- Process Definition/State & API...
448
false
true
2
12
122
101
48
53
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/IO/Process.hs
mit
toMarkedAbstractLetterMarkKindPairs :: WordSurface b [Marked.Unit a [Concrete.Mark]] -> WordSurface b [Marked.Unit a ([(Concrete.Mark, Mark.Kind)])] toMarkedAbstractLetterMarkKindPairs = dupApply' (wordSurfaceLens . traverse . Marked.marks . traverse) Mark.toKind
267
toMarkedAbstractLetterMarkKindPairs :: WordSurface b [Marked.Unit a [Concrete.Mark]] -> WordSurface b [Marked.Unit a ([(Concrete.Mark, Mark.Kind)])] toMarkedAbstractLetterMarkKindPairs = dupApply' (wordSurfaceLens . traverse . Marked.marks . traverse) Mark.toKind
267
toMarkedAbstractLetterMarkKindPairs = dupApply' (wordSurfaceLens . traverse . Marked.marks . traverse) Mark.toKind
114
false
true
0
13
28
95
48
47
null
null
green-haskell/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
plusCS :: CoreStats -> CoreStats -> CoreStats plusCS (CS { cs_tm = p1, cs_ty = q1, cs_co = r1 }) (CS { cs_tm = p2, cs_ty = q2, cs_co = r2 }) = CS { cs_tm = p1+p2, cs_ty = q1+q2, cs_co = r1+r2 }
202
plusCS :: CoreStats -> CoreStats -> CoreStats plusCS (CS { cs_tm = p1, cs_ty = q1, cs_co = r1 }) (CS { cs_tm = p2, cs_ty = q2, cs_co = r2 }) = CS { cs_tm = p1+p2, cs_ty = q1+q2, cs_co = r1+r2 }
202
plusCS (CS { cs_tm = p1, cs_ty = q1, cs_co = r1 }) (CS { cs_tm = p2, cs_ty = q2, cs_co = r2 }) = CS { cs_tm = p1+p2, cs_ty = q1+q2, cs_co = r1+r2 }
156
false
true
0
8
53
112
63
49
null
null
8l/asif
src/Language/FOmega/Syntax.hs
mit
diff a b = throwError (a,b)
47
diff a b = throwError (a,b)
47
diff a b = throwError (a,b)
47
false
false
0
6
25
20
10
10
null
null
yjwen/hada
src/TopoGraph.hs
lgpl-3.0
isTopoFirst a (Overlay left right) = isTopoFirst a left && isTopoFirst a right
79
isTopoFirst a (Overlay left right) = isTopoFirst a left && isTopoFirst a right
79
isTopoFirst a (Overlay left right) = isTopoFirst a left && isTopoFirst a right
79
false
false
0
7
13
33
15
18
null
null
goshakkk/hadis
src/Hadis/Ext/Error.hs
mit
maybeToResult e _ Nothing = throwError e
41
maybeToResult e _ Nothing = throwError e
41
maybeToResult e _ Nothing = throwError e
41
false
false
0
5
7
16
7
9
null
null
RAFIRAF/HASKELL
nwd3.hs
mit
nwd3 :: Integer -> Integer -> Integer nwd3 0 y = abs y
54
nwd3 :: Integer -> Integer -> Integer nwd3 0 y = abs y
54
nwd3 0 y = abs y
16
false
true
0
6
12
27
13
14
null
null
possiblywrong/generic-data
Data/discsort.hs
bsd-3-clause
srtdiscNat :: Int -> ([v] -> v -> [v]) -> [(Int, v)] -> [[v]] srtdiscNat (n :: Int) update xs = map reverse (elems (accumArray update [] (0, n-1) xs))
150
srtdiscNat :: Int -> ([v] -> v -> [v]) -> [(Int, v)] -> [[v]] srtdiscNat (n :: Int) update xs = map reverse (elems (accumArray update [] (0, n-1) xs))
150
srtdiscNat (n :: Int) update xs = map reverse (elems (accumArray update [] (0, n-1) xs))
88
false
true
0
11
29
108
58
50
null
null
ivanperez-keera/SpaceInvaders
src/WorldGeometry.hs
bsd-3-clause
worldXMax = 500.0
17
worldXMax = 500.0
17
worldXMax = 500.0
17
false
false
0
4
2
6
3
3
null
null
abakst/liquidhaskell
tests/neg/testRec.hs
bsd-3-clause
map f (x:xs) = f x : map f (x:xs)
33
map f (x:xs) = f x : map f (x:xs)
33
map f (x:xs) = f x : map f (x:xs)
33
false
false
0
8
9
38
18
20
null
null
venkat24/codeworld
codeworld-base/src/Internal/CodeWorld.hs
apache-2.0
simulationOf :: ([Number] -> world, (world, Number) -> world, world -> Picture) -> Program simulationOf (initial, step, draw) = do rs <- chooseRandoms CW.simulationOf (initial rs) (\dt w -> step (w, fromDouble dt)) (toCWPic ....
350
simulationOf :: ([Number] -> world, (world, Number) -> world, world -> Picture) -> Program simulationOf (initial, step, draw) = do rs <- chooseRandoms CW.simulationOf (initial rs) (\dt w -> step (w, fromDouble dt)) (toCWPic ....
350
simulationOf (initial, step, draw) = do rs <- chooseRandoms CW.simulationOf (initial rs) (\dt w -> step (w, fromDouble dt)) (toCWPic . draw) `catch` reportError
212
false
true
0
13
136
117
64
53
null
null
GaloisInc/halvm-ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprSkolInfo BracketSkol = text "a Template Haskell bracket"
65
pprSkolInfo BracketSkol = text "a Template Haskell bracket"
65
pprSkolInfo BracketSkol = text "a Template Haskell bracket"
65
false
false
1
5
13
15
5
10
null
null
edsko/cabal
cabal-install/Distribution/Client/SetupWrapper.hs
bsd-3-clause
buildTypeAction Custom = error "buildTypeAction Custom"
69
buildTypeAction Custom = error "buildTypeAction Custom"
69
buildTypeAction Custom = error "buildTypeAction Custom"
69
false
false
0
5
19
12
5
7
null
null
ppetr/marray-sort
src-test/Test.hs
bsd-3-clause
printUsage :: IO () printUsage = do putStrLn "Usage: sort <filename>"
85
printUsage :: IO () printUsage = do putStrLn "Usage: sort <filename>"
85
printUsage = do putStrLn "Usage: sort <filename>"
65
false
true
0
8
26
28
11
17
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmLayout.hs
bsd-3-clause
mkVirtHeapOffsets :: DynFlags -> Bool -- True <=> is a thunk -> [(PrimRep,a)] -- Things to make offsets for -> (WordOff, -- _Total_ number of words allocated WordOff, -- Number of words allocated for *pointers* [(NonVoid a, ByteOff)]) -- Things wi...
1,550
mkVirtHeapOffsets :: DynFlags -> Bool -- True <=> is a thunk -> [(PrimRep,a)] -- Things to make offsets for -> (WordOff, -- _Total_ number of words allocated WordOff, -- Number of words allocated for *pointers* [(NonVoid a, ByteOff)]) mkVirtHeapOff...
1,174
mkVirtHeapOffsets dflags is_thunk things = ( bytesToWordsRoundUp dflags tot_bytes , bytesToWordsRoundUp dflags bytes_of_ptrs , ptrs_w_offsets ++ non_ptrs_w_offsets ) where hdr_words | is_thunk = thunkHdrSize dflags | otherwise = fixedHdrSizeW dflags hdr_bytes = wordsToBytes dfla...
867
true
true
3
13
368
279
151
128
null
null
MaxGabriel/yesod
yesod-core/Yesod/Core/Handler.hs
mit
sendRawResponse :: (MonadHandler m, MonadBaseControl IO m) => (Source IO S8.ByteString -> Sink S8.ByteString IO () -> m ()) -> m a sendRawResponse raw = control $ \runInIO -> liftIO $ throwIO $ HCWai $ flip W.responseRaw fallback $ \src sink -> runInIO (raw (src' src) (CL.mapM_ s...
711
sendRawResponse :: (MonadHandler m, MonadBaseControl IO m) => (Source IO S8.ByteString -> Sink S8.ByteString IO () -> m ()) -> m a sendRawResponse raw = control $ \runInIO -> liftIO $ throwIO $ HCWai $ flip W.responseRaw fallback $ \src sink -> runInIO (raw (src' src) (CL.mapM_ s...
711
sendRawResponse raw = control $ \runInIO -> liftIO $ throwIO $ HCWai $ flip W.responseRaw fallback $ \src sink -> runInIO (raw (src' src) (CL.mapM_ sink)) >> return () where fallback = W.responseLBS H.status500 [("Content-Type", "text/plain")] "sendRawResponse: backend does not support raw respons...
548
false
true
2
12
199
227
110
117
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
confdReqqIp :: String confdReqqIp = ConstantUtils.confdReqqIp
61
confdReqqIp :: String confdReqqIp = ConstantUtils.confdReqqIp
61
confdReqqIp = ConstantUtils.confdReqqIp
39
false
true
0
6
5
20
8
12
null
null
tsahyt/indexed-set
src/Data/Set/Indexed.hs
lgpl-3.0
-- | /O(1)/. Safely try to cast a set of some cardinality to a set of some exact -- given cardinality. If the given set does not match the given cardinality, -- 'Nothing' is returned. exactCardinality :: forall n m a. KnownNat n => Proxy n -> Set m a -> Maybe (Set n a) exactCardinality n (ISet s) = do SomeNat ...
432
exactCardinality :: forall n m a. KnownNat n => Proxy n -> Set m a -> Maybe (Set n a) exactCardinality n (ISet s) = do SomeNat (Proxy :: Proxy k) <- someNatVal (fromIntegral (S.size s)) Refl <- sameNat n (Proxy @k) return (ISet s)
248
exactCardinality n (ISet s) = do SomeNat (Proxy :: Proxy k) <- someNatVal (fromIntegral (S.size s)) Refl <- sameNat n (Proxy @k) return (ISet s)
157
true
true
0
13
97
135
65
70
null
null
input-output-hk/cardano-sl
client/src/Pos/Client/Txp/History.hs
apache-2.0
deriveAddrHistoryBlk :: [Address] -> (MainBlock -> Maybe Timestamp) -> Map TxId TxHistoryEntry -> Block -> UtxoM (Map TxId TxHistoryEntry) deriveAddrHistoryBlk _ _ hist (Left _) = pure hist
209
deriveAddrHistoryBlk :: [Address] -> (MainBlock -> Maybe Timestamp) -> Map TxId TxHistoryEntry -> Block -> UtxoM (Map TxId TxHistoryEntry) deriveAddrHistoryBlk _ _ hist (Left _) = pure hist
209
deriveAddrHistoryBlk _ _ hist (Left _) = pure hist
50
false
true
0
12
47
78
37
41
null
null
aelyasov/Haslog
src/Eu/Fittest/Logging/Daikon/DaikonConverter.hs
bsd-3-clause
convertArray_ xREFmap varpath a = theArray ++ [mkArrayElemsTypes varpath elemsTypes] where elemsTypes = getArrayElemsTypes xREFmap a elems = Multiple [Val1 . vVal $ x | x <- getArrayElems xREFmap a] belems = Multiple [bval__ . vVal $ x | x <- getArrayElems xREFmap a] varpath_ = str__arra...
1,175
convertArray_ xREFmap varpath a = theArray ++ [mkArrayElemsTypes varpath elemsTypes] where elemsTypes = getArrayElemsTypes xREFmap a elems = Multiple [Val1 . vVal $ x | x <- getArrayElems xREFmap a] belems = Multiple [bval__ . vVal $ x | x <- getArrayElems xREFmap a] varpath_ = str__arra...
1,175
convertArray_ xREFmap varpath a = theArray ++ [mkArrayElemsTypes varpath elemsTypes] where elemsTypes = getArrayElemsTypes xREFmap a elems = Multiple [Val1 . vVal $ x | x <- getArrayElems xREFmap a] belems = Multiple [bval__ . vVal $ x | x <- getArrayElems xREFmap a] varpath_ = str__arra...
1,175
false
false
0
14
306
305
167
138
null
null
cullina/Extractor
src/FiniteVectorSpace.hs
bsd-3-clause
allReducedVectors max length = map (0:) $ allVectors max (length - 1)
75
allReducedVectors max length = map (0:) $ allVectors max (length - 1)
75
allReducedVectors max length = map (0:) $ allVectors max (length - 1)
75
false
false
2
7
17
36
17
19
null
null
k-bx/ghcjs
test/ghc/numeric/t3676.hs
mit
f2r = realToFrac :: Float -> Rational
37
f2r = realToFrac :: Float -> Rational
37
f2r = realToFrac :: Float -> Rational
37
false
false
2
4
6
17
8
9
null
null
tylerkahn/dcpu16-haskell
DCPU16/Emulator.hs
mit
currentWord :: DCPUState -> Word16 currentWord cpu = (!!) (mem cpu) $ fromIntegral (pc cpu)
91
currentWord :: DCPUState -> Word16 currentWord cpu = (!!) (mem cpu) $ fromIntegral (pc cpu)
91
currentWord cpu = (!!) (mem cpu) $ fromIntegral (pc cpu)
56
false
true
0
8
14
47
22
25
null
null
suhailshergill/liboleg
Text/PrintScan.hs
bsd-3-clause
ints FInt inp f = ints (FPP showread) inp f
43
ints FInt inp f = ints (FPP showread) inp f
43
ints FInt inp f = ints (FPP showread) inp f
43
false
false
0
7
9
26
12
14
null
null
ml9951/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
initialSubGoalDepth :: SubGoalDepth initialSubGoalDepth = SubGoalDepth 0
72
initialSubGoalDepth :: SubGoalDepth initialSubGoalDepth = SubGoalDepth 0
72
initialSubGoalDepth = SubGoalDepth 0
36
false
true
0
5
6
14
7
7
null
null
iljakuklic/eel-proto
src/Backend/CodeGen.hs
bsd-3-clause
-- | Run code generator codegen gen = fst $ runState (gen >> getCode) (CodeGenState llVarNull M.empty P.empty [])
113
codegen gen = fst $ runState (gen >> getCode) (CodeGenState llVarNull M.empty P.empty [])
89
codegen gen = fst $ runState (gen >> getCode) (CodeGenState llVarNull M.empty P.empty [])
89
true
false
0
9
18
44
22
22
null
null
rootzlevel/hledger-add
tests/ConfigParserSpec.hs
bsd-3-clause
optionNameTests :: Spec optionNameTests = do it "allows dashes in option names" $ do let parser = (\x -> defaultData { someInt = x }) <$> option "test-name" 10 "" parseConfig "" "test-name = 10" parser `shouldBe` Right defaultData { someInt = 10 } it "allows underscores in option names" $ do let parser...
875
optionNameTests :: Spec optionNameTests = do it "allows dashes in option names" $ do let parser = (\x -> defaultData { someInt = x }) <$> option "test-name" 10 "" parseConfig "" "test-name = 10" parser `shouldBe` Right defaultData { someInt = 10 } it "allows underscores in option names" $ do let parser...
875
optionNameTests = do it "allows dashes in option names" $ do let parser = (\x -> defaultData { someInt = x }) <$> option "test-name" 10 "" parseConfig "" "test-name = 10" parser `shouldBe` Right defaultData { someInt = 10 } it "allows underscores in option names" $ do let parser = (\x -> defaultData { ...
851
false
true
0
17
193
288
143
145
null
null
Noeda/rwpas
src/RWPAS/Level/Type.hs
mit
couldPotentiallyGoThroughPortal _ DUp = False
45
couldPotentiallyGoThroughPortal _ DUp = False
45
couldPotentiallyGoThroughPortal _ DUp = False
45
false
false
0
5
4
11
5
6
null
null
josuf107/Fizzckle
src/Fizz.hs
gpl-3.0
doFizz (AccountReport t) = do journal <- loadJournal let spent = totalSpent . filter (spendCategory t . snd) $ journal let earned = totalEarned . filter (earnCategory t . snd) $ journal return $ "Remaining balance: " ++ (showDollars $ earned - spent)
266
doFizz (AccountReport t) = do journal <- loadJournal let spent = totalSpent . filter (spendCategory t . snd) $ journal let earned = totalEarned . filter (earnCategory t . snd) $ journal return $ "Remaining balance: " ++ (showDollars $ earned - spent)
266
doFizz (AccountReport t) = do journal <- loadJournal let spent = totalSpent . filter (spendCategory t . snd) $ journal let earned = totalEarned . filter (earnCategory t . snd) $ journal return $ "Remaining balance: " ++ (showDollars $ earned - spent)
266
false
false
0
15
58
104
49
55
null
null
23Skidoo/ghc-parmake
src/GHC/ParMake/BuildPlan.hs
bsd-3-clause
depends :: Target -> [TargetId] depends = targetDeps
52
depends :: Target -> [TargetId] depends = targetDeps
52
depends = targetDeps
20
false
true
0
8
7
25
11
14
null
null
NorfairKing/super-user-spark
src/SuperUserSpark/Check/Internal.hs
mit
impossible :: CheckResult -> Bool impossible (Impossible _) = True
66
impossible :: CheckResult -> Bool impossible (Impossible _) = True
66
impossible (Impossible _) = True
32
false
true
0
7
9
24
12
12
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Sequence.hs
bsd-3-clause
appendTree4 xs a b c d Empty = xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d
89
appendTree4 xs a b c d Empty = xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d
89
appendTree4 xs a b c d Empty = xs `snocTree` a `snocTree` b `snocTree` c `snocTree` d
89
false
false
0
8
20
43
25
18
null
null
robdockins/orlin
src/Orlin/Units.hs
bsd-2-clause
unitMul :: Unit -> Unit -> Unit unitMul UnitZero _ = UnitZero
61
unitMul :: Unit -> Unit -> Unit unitMul UnitZero _ = UnitZero
61
unitMul UnitZero _ = UnitZero
29
false
true
0
6
11
24
12
12
null
null
vincenthz/hs-cryptohash
Tests/KAT.hs
bsd-3-clause
katTests :: [TestTree] katTests = map makeTestAlg results
57
katTests :: [TestTree] katTests = map makeTestAlg results
57
katTests = map makeTestAlg results
34
false
true
0
7
7
27
11
16
null
null
andorp/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
notifications = View . Notifications
46
notifications = View . Notifications
46
notifications = View . Notifications
46
false
false
0
5
14
10
5
5
null
null
fmapfmapfmap/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/GetDomainDetail.hs
mpl-2.0
-- | Provides details about the domain registrant. -- -- Type: Complex -- -- Children: 'FirstName', 'MiddleName', 'LastName', 'ContactType', -- 'OrganizationName', 'AddressLine1', 'AddressLine2', 'City', 'State', -- 'CountryCode', 'ZipCode', 'PhoneNumber', 'Email', 'Fax', 'ExtraParams' gddrsRegistrantContact :: Lens' G...
465
gddrsRegistrantContact :: Lens' GetDomainDetailResponse ContactDetail gddrsRegistrantContact = lens _gddrsRegistrantContact (\ s a -> s{_gddrsRegistrantContact = a}) . _Sensitive
178
gddrsRegistrantContact = lens _gddrsRegistrantContact (\ s a -> s{_gddrsRegistrantContact = a}) . _Sensitive
108
true
true
0
10
49
50
30
20
null
null
rueshyna/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
bfcAddtional :: Lens' BasicFilterCriteria (HashMap Text FilterCriteria) bfcAddtional = lens _bfcAddtional (\ s a -> s{_bfcAddtional = a}) . _Coerce
155
bfcAddtional :: Lens' BasicFilterCriteria (HashMap Text FilterCriteria) bfcAddtional = lens _bfcAddtional (\ s a -> s{_bfcAddtional = a}) . _Coerce
155
bfcAddtional = lens _bfcAddtional (\ s a -> s{_bfcAddtional = a}) . _Coerce
83
false
true
2
9
27
57
27
30
null
null
dhess/gpio
src/System/GPIO/Linux/Sysfs/Mock.hs
bsd-3-clause
doesDirectoryExist :: (MockM m) => FilePath -> SysfsMockT m Bool doesDirectoryExist path = either (const False) (const True) . Internal.cd path <$> getZipper
159
doesDirectoryExist :: (MockM m) => FilePath -> SysfsMockT m Bool doesDirectoryExist path = either (const False) (const True) . Internal.cd path <$> getZipper
159
doesDirectoryExist path = either (const False) (const True) . Internal.cd path <$> getZipper
94
false
true
1
8
24
69
31
38
null
null
kmate/HaRe
old/testing/unfoldAsPatterns/M2_TokOut.hs
bsd-3-clause
buildtree (x:xs) = do res1 <- buildtree xs res <- insert x res1 return res
137
buildtree (x:xs) = do res1 <- buildtree xs res <- insert x res1 return res
137
buildtree (x:xs) = do res1 <- buildtree xs res <- insert x res1 return res
137
false
false
0
8
77
44
19
25
null
null
recursion-ninja/megaparsec
Text/Megaparsec/Error.hs
bsd-2-clause
charPretty' '\DC2' = pure "device control two"
46
charPretty' '\DC2' = pure "device control two"
46
charPretty' '\DC2' = pure "device control two"
46
false
false
1
5
6
16
5
11
null
null
bitemyapp/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlLitPat :: HsLit -> LPat id nlLitPat l = noLoc (LitPat l)
58
nlLitPat :: HsLit -> LPat id nlLitPat l = noLoc (LitPat l)
58
nlLitPat l = noLoc (LitPat l)
29
false
true
0
7
11
34
15
19
null
null
shlevy/ghc
compiler/types/Coercion.hs
bsd-3-clause
-- | Slowly checks if the coercion is reflexive. Don't call this in a loop, -- as it walks over the entire coercion. isReflexiveCo :: Coercion -> Bool isReflexiveCo = isJust . isReflexiveCo_maybe
195
isReflexiveCo :: Coercion -> Bool isReflexiveCo = isJust . isReflexiveCo_maybe
78
isReflexiveCo = isJust . isReflexiveCo_maybe
44
true
true
1
7
32
29
13
16
null
null
hguenther/smtlib2
extras/composite/Language/SMTLib2/Composite/Domains.hs
gpl-3.0
lowerBound (BitVecRange _ []) = Nothing
39
lowerBound (BitVecRange _ []) = Nothing
39
lowerBound (BitVecRange _ []) = Nothing
39
false
false
0
7
5
20
9
11
null
null
Mokosha/Lambency
lib/Lambency/Transform.hs
mit
transformPoint :: Transform -> Vec3f -> Vec3f transformPoint Identity = id
74
transformPoint :: Transform -> Vec3f -> Vec3f transformPoint Identity = id
74
transformPoint Identity = id
28
false
true
0
6
10
22
11
11
null
null
michaxm/haskell-hdfs-thrift-client
src-gen-thrift/ThriftHadoopFileSystem.hs
bsd-3-clause
from_ListStatus_args :: ListStatus_args -> T.ThriftVal from_ListStatus_args record = T.TStruct $ Map.fromList $ M.catMaybes [ (\_v258 -> P.Just (1, ("path",from_Pathname _v258))) $ listStatus_args_path record ]
214
from_ListStatus_args :: ListStatus_args -> T.ThriftVal from_ListStatus_args record = T.TStruct $ Map.fromList $ M.catMaybes [ (\_v258 -> P.Just (1, ("path",from_Pathname _v258))) $ listStatus_args_path record ]
214
from_ListStatus_args record = T.TStruct $ Map.fromList $ M.catMaybes [ (\_v258 -> P.Just (1, ("path",from_Pathname _v258))) $ listStatus_args_path record ]
159
false
true
0
12
27
75
39
36
null
null
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Interactive.hs
mit
applyEventSetters :: Rec EventSetter ts -> Rec RequiredWidget ts -> IO () -> IO () applyEventSetters RNil RNil _ = return ()
124
applyEventSetters :: Rec EventSetter ts -> Rec RequiredWidget ts -> IO () -> IO () applyEventSetters RNil RNil _ = return ()
124
applyEventSetters RNil RNil _ = return ()
41
false
true
0
9
21
55
25
30
null
null
Concomitant/LambdaHack
Game/LambdaHack/Client/UI/WidgetClient.hs
bsd-3-clause
displayMore :: MonadClientUI m => ColorMode -> Msg -> m Bool displayMore dm prompt = do slides <- promptToSlideshow $ prompt <+> moreMsg -- Two frames drawn total (unless 'prompt' very long). getInitConfirms dm [] $ slides <> toSlideshow Nothing [[]] -- | Print a yes/no question and return the player's answer. U...
391
displayMore :: MonadClientUI m => ColorMode -> Msg -> m Bool displayMore dm prompt = do slides <- promptToSlideshow $ prompt <+> moreMsg -- Two frames drawn total (unless 'prompt' very long). getInitConfirms dm [] $ slides <> toSlideshow Nothing [[]] -- | Print a yes/no question and return the player's answer. U...
391
displayMore dm prompt = do slides <- promptToSlideshow $ prompt <+> moreMsg -- Two frames drawn total (unless 'prompt' very long). getInitConfirms dm [] $ slides <> toSlideshow Nothing [[]] -- | Print a yes/no question and return the player's answer. Use black -- and white colours to turn player's attention to t...
330
false
true
0
10
71
80
39
41
null
null
hbrouwer/pdrt-sandbox
src/Data/PDRS/Merge.hs
apache-2.0
pdrsDisjoin :: PDRS -> PDRS -> PDRS pdrsDisjoin p p' = pdrsAlphaConvert p (zip ops nps) (zip ors nrs) where ops = pdrsPVars p `intersect` pdrsPVars p' nps = newPVars ops (pdrsPVars p `union` pdrsPVars p') ors = pdrsVariables p `intersect` pdrsVariables p' nrs = newPDRSRefs ors (pdrsVariables p...
346
pdrsDisjoin :: PDRS -> PDRS -> PDRS pdrsDisjoin p p' = pdrsAlphaConvert p (zip ops nps) (zip ors nrs) where ops = pdrsPVars p `intersect` pdrsPVars p' nps = newPVars ops (pdrsPVars p `union` pdrsPVars p') ors = pdrsVariables p `intersect` pdrsVariables p' nrs = newPDRSRefs ors (pdrsVariables p...
346
pdrsDisjoin p p' = pdrsAlphaConvert p (zip ops nps) (zip ors nrs) where ops = pdrsPVars p `intersect` pdrsPVars p' nps = newPVars ops (pdrsPVars p `union` pdrsPVars p') ors = pdrsVariables p `intersect` pdrsVariables p' nrs = newPDRSRefs ors (pdrsVariables p `union` pdrsVariables p')
310
false
true
3
10
77
134
68
66
null
null
techtangents/Newtyper
Control/Newtyper.hs
bsd-3-clause
unpackF :: (Functor f, Newtype n o) => (a -> f n) -> a -> f o unpackF = (unpack ^<-)
94
unpackF :: (Functor f, Newtype n o) => (a -> f n) -> a -> f o unpackF = (unpack ^<-)
94
unpackF = (unpack ^<-)
24
false
true
0
10
30
55
28
27
null
null
kosmikus/records-sop
src/Generics/SOP/Record.hs
bsd-3-clause
-- | Convert an n-ary product into the corresponding record -- representation. This is a no-op, and more efficiently -- implented using 'unsafeToRecord_NP'. It is included here -- to demonstrate that it actually is type-correct and also -- to make it more obvious that it is indeed a no-op. -- _toRecord_NP :: (ValidReco...
386
_toRecord_NP :: (ValidRecordCode r xs) => NP I xs -> Record r _toRecord_NP Nil = Nil
92
_toRecord_NP Nil = Nil
30
true
true
0
7
73
43
24
19
null
null
mikehat/blaze-all
benchmarks/BenchmarkUtils.hs
bsd-3-clause
img :: Html -- ^ Resulting HTML. img = Leaf "img" "<img" ">"
61
img :: Html img = Leaf "img" "<img" ">"
39
img = Leaf "img" "<img" ">"
27
true
true
0
6
13
25
11
14
null
null
CommBank/codetroll
src/Codetroll/Git.hs
apache-2.0
-- Returns true if the working directory contains changes (that remove or modify files). gitModifiedWorkingDir_ :: FilePath -> Sh Bool gitModifiedWorkingDir_ path = do changes <- gitStatus_ path onlyModifies <- return $ let isModified Modified = True isModified Deleted = True ...
659
gitModifiedWorkingDir_ :: FilePath -> Sh Bool gitModifiedWorkingDir_ path = do changes <- gitStatus_ path onlyModifies <- return $ let isModified Modified = True isModified Deleted = True isModified Renamed = True isModifie...
570
gitModifiedWorkingDir_ path = do changes <- gitStatus_ path onlyModifies <- return $ let isModified Modified = True isModified Deleted = True isModified Renamed = True isModified WorkTreeChangedButNotIndex = True ...
524
true
true
0
15
227
130
63
67
null
null
spinda/liquidhaskell
tests/gsoc15/unknown/pos/RBTree-height.hs
bsd-3-clause
lbalS k l (Node B y a b) = let t = rbal k l (Node R y a b) in t
76
lbalS k l (Node B y a b) = let t = rbal k l (Node R y a b) in t
76
lbalS k l (Node B y a b) = let t = rbal k l (Node R y a b) in t
76
false
false
0
11
34
56
26
30
null
null
rhennigan/code
haskell/pcdSimplification/src/Main.hs
gpl-2.0
emove :: [String] -> IO () remove [fileName, numberString] = do handle <- openFile fileName ReadMode (tempName, tempHandle) <- openTempFile "." "temp" contents <- hGetContents handle let number = read numberString todoTasks = lines contents newTodoItems = delete (tod...
505
remove :: [String] -> IO () remove [fileName, numberString] = do handle <- openFile fileName ReadMode (tempName, tempHandle) <- openTempFile "." "temp" contents <- hGetContents handle let number = read numberString todoTasks = lines contents newTodoItems = delete (todoT...
503
remove [fileName, numberString] = do handle <- openFile fileName ReadMode (tempName, tempHandle) <- openTempFile "." "temp" contents <- hGetContents handle let number = read numberString todoTasks = lines contents newTodoItems = delete (todoTasks !! number) todoTasks ...
475
false
true
0
13
143
153
68
85
null
null
RefactoringTools/HaRe
old/refactorer/RefacEvalMon.hs
bsd-3-clause
findImportsHiddenLists = applyTU (full_tdTU (constTU [] `adhocTU` inImport)) where inImport (HsImportDecl loc modName qual _ (Just (True, h))::HsImportDeclP) = return ((map (\(Var x) -> (pNTtoName x))) h) inImport _ = return []
245
findImportsHiddenLists = applyTU (full_tdTU (constTU [] `adhocTU` inImport)) where inImport (HsImportDecl loc modName qual _ (Just (True, h))::HsImportDeclP) = return ((map (\(Var x) -> (pNTtoName x))) h) inImport _ = return []
245
findImportsHiddenLists = applyTU (full_tdTU (constTU [] `adhocTU` inImport)) where inImport (HsImportDecl loc modName qual _ (Just (True, h))::HsImportDeclP) = return ((map (\(Var x) -> (pNTtoName x))) h) inImport _ = return []
245
false
false
1
13
49
123
60
63
null
null
cordawyn/rdf4h
src/Data/RDF/Types.hs
bsd-3-clause
typedL :: T.Text -> T.Text -> LValue typedL val dtype = TypedL (canonicalize dtype val) dtype
93
typedL :: T.Text -> T.Text -> LValue typedL val dtype = TypedL (canonicalize dtype val) dtype
93
typedL val dtype = TypedL (canonicalize dtype val) dtype
56
false
true
0
7
15
41
20
21
null
null
mstksg/ghc-typelits-natnormalise
src/GHC/TypeLits/Normalise/SOP.hs
bsd-2-clause
reduceExp s = s
15
reduceExp s = s
15
reduceExp s = s
15
false
false
1
5
3
13
4
9
null
null
apoorvingle/h-reversi
src/Game/Disc.hs
mit
-- | Swaps the turn swap :: Disc -> Disc swap White = Black
59
swap :: Disc -> Disc swap White = Black
39
swap White = Black
18
true
true
0
5
13
19
10
9
null
null