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
fpco/ghcjs-from-typescript
src/Main.hs
bsd-3-clause
renderParamType _ x = notSupported x
36
renderParamType _ x = notSupported x
36
renderParamType _ x = notSupported x
36
false
false
1
5
5
15
6
9
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/ShippingSettings/Update.hs
mpl-2.0
-- | The ID of the account for which to get\/update shipping settings. ssuAccountId :: Lens' ShippingSettingsUpdate Word64 ssuAccountId = lens _ssuAccountId (\ s a -> s{_ssuAccountId = a}) . _Coerce
206
ssuAccountId :: Lens' ShippingSettingsUpdate Word64 ssuAccountId = lens _ssuAccountId (\ s a -> s{_ssuAccountId = a}) . _Coerce
135
ssuAccountId = lens _ssuAccountId (\ s a -> s{_ssuAccountId = a}) . _Coerce
83
true
true
1
9
38
48
24
24
null
null
jgm/citeproc
src/Citeproc/Types.hs
bsd-2-clause
rawDateOld :: Text -> Maybe Date rawDateOld raw = do let months = ["jan","feb","mar","apr","may","jun","jul","aug", "sep","oct","nov","dec"] let seasons = ["spr","sum","fal","win"] let ranges = T.split (=='-') raw let readTextMonth t = do let key = T.toLower $ T.take 3 t cas...
1,306
rawDateOld :: Text -> Maybe Date rawDateOld raw = do let months = ["jan","feb","mar","apr","may","jun","jul","aug", "sep","oct","nov","dec"] let seasons = ["spr","sum","fal","win"] let ranges = T.split (=='-') raw let readTextMonth t = do let key = T.toLower $ T.take 3 t cas...
1,306
rawDateOld raw = do let months = ["jan","feb","mar","apr","may","jun","jul","aug", "sep","oct","nov","dec"] let seasons = ["spr","sum","fal","win"] let ranges = T.split (=='-') raw let readTextMonth t = do let key = T.toLower $ T.take 3 t case elemIndex key months of ...
1,273
false
true
0
20
541
499
248
251
null
null
NicolasDP/maild
Network/SMTP/Parser.hs
bsd-3-clause
parseLF :: Parser Char parseLF = char '\n'
42
parseLF :: Parser Char parseLF = char '\n'
42
parseLF = char '\n'
19
false
true
0
6
7
23
9
14
null
null
a143753/AOJ
0566.hs
apache-2.0
rnk :: Int -> [(Int,Int)] -> [(Int,Int,Int)] rnk _ [] = []
58
rnk :: Int -> [(Int,Int)] -> [(Int,Int,Int)] rnk _ [] = []
58
rnk _ [] = []
13
false
true
0
8
11
49
28
21
null
null
romanb/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/DescribeBatchPredictions.hs
mpl-2.0
-- | The number of pages of information to include in the result. The range of -- acceptable values is 1 through 100. The default value is 100. dbpLimit :: Lens' DescribeBatchPredictions (Maybe Natural) dbpLimit = lens _dbpLimit (\s a -> s { _dbpLimit = a }) . mapping _Nat
273
dbpLimit :: Lens' DescribeBatchPredictions (Maybe Natural) dbpLimit = lens _dbpLimit (\s a -> s { _dbpLimit = a }) . mapping _Nat
129
dbpLimit = lens _dbpLimit (\s a -> s { _dbpLimit = a }) . mapping _Nat
70
true
true
1
10
49
57
29
28
null
null
oldmanmike/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a foldEvBindMap k z bs = foldDVarEnv k z (ev_bind_varenv bs)
117
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a foldEvBindMap k z bs = foldDVarEnv k z (ev_bind_varenv bs)
117
foldEvBindMap k z bs = foldDVarEnv k z (ev_bind_varenv bs)
58
false
true
0
8
22
54
27
27
null
null
jleakakos/haskell-code-test
src/ChocolateShop.hs
bsd-3-clause
purchaseChocolate :: Cash -> Price -> ChocolateType -> Map ChocolateType Int purchaseChocolate cash price chocolateType = insert chocolateType total emptyBasket where total = cash `div` price
193
purchaseChocolate :: Cash -> Price -> ChocolateType -> Map ChocolateType Int purchaseChocolate cash price chocolateType = insert chocolateType total emptyBasket where total = cash `div` price
193
purchaseChocolate cash price chocolateType = insert chocolateType total emptyBasket where total = cash `div` price
116
false
true
1
9
27
66
30
36
null
null
nevrenato/HetsAlloy
OWL2/XML.hs
gpl-2.0
mkNodeID :: IRI -> IRI mkNodeID qn = let lp = localPart qn in case lp of '_' : ':' : r -> qn {namePrefix = "_", localPart = r} _ -> qn {namePrefix = "_"} -- | gets the content of an element with name Import
231
mkNodeID :: IRI -> IRI mkNodeID qn = let lp = localPart qn in case lp of '_' : ':' : r -> qn {namePrefix = "_", localPart = r} _ -> qn {namePrefix = "_"} -- | gets the content of an element with name Import
231
mkNodeID qn = let lp = localPart qn in case lp of '_' : ':' : r -> qn {namePrefix = "_", localPart = r} _ -> qn {namePrefix = "_"} -- | gets the content of an element with name Import
208
false
true
0
12
71
85
43
42
null
null
Shimuuar/banana-tcltk
UI/TclTk/Builder.hs
bsd-3-clause
---------------------------------------------------------------- -- Run transformer ---------------------------------------------------------------- -- | Execute tcl builder runTclBuilderT :: Monad m => TclBuilderT t p m a -> Dispatch -> Event t () -> m (a, [...
696
runTclBuilderT :: Monad m => TclBuilderT t p m a -> Dispatch -> Event t () -> m (a, [Tcl p]) runTclBuilderT (TclBuilderT m) d e = flip evalStateT st $ runWriterT $ runReaderT m param where st = TclState { counter = 0 } param ...
521
runTclBuilderT (TclBuilderT m) d e = flip evalStateT st $ runWriterT $ runReaderT m param where st = TclState { counter = 0 } param = TclParam { currentPack = PackTop , tkPath = [] , tclDispatch = d , tclInitEvt = e } -- | Execute GUI builder....
368
true
true
5
12
225
150
79
71
null
null
koulakis/FiletreeAnalyser
test/Spec.hs
bsd-3-clause
file5 = combine dir5 "some_spec_file.rb"
40
file5 = combine dir5 "some_spec_file.rb"
40
file5 = combine dir5 "some_spec_file.rb"
40
false
false
0
5
4
11
5
6
null
null
dcreager/cabal
Distribution/ParseUtils.hs
bsd-3-clause
ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs' fs''' <- ifelse fs return (Section n s a fs'' : fs''')
179
ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs' fs''' <- ifelse fs return (Section n s a fs'' : fs''')
179
ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs' fs''' <- ifelse fs return (Section n s a fs'' : fs''')
179
false
false
0
10
94
67
30
37
null
null
jhance/gba-hs
src/Game/GBA/Memory/Action.hs
mit
readOnly16 :: VirtualAddress -> GBA s Word16 -> MemoryReadMap s readOnly16 addr act = M.singleton addr $ MemoryReadAction Nothing (Just act) Nothing
148
readOnly16 :: VirtualAddress -> GBA s Word16 -> MemoryReadMap s readOnly16 addr act = M.singleton addr $ MemoryReadAction Nothing (Just act) Nothing
148
readOnly16 addr act = M.singleton addr $ MemoryReadAction Nothing (Just act) Nothing
84
false
true
0
8
21
58
26
32
null
null
olorin/nagios-perfdata
src/Data/Nagios/Perfdata/Metric.hs
bsd-3-clause
uomParser :: Parser UOM uomParser = liftM uomFromString . option "" $ many (satisfy uomChar) where uomChar = inClass "A-Za-z%"
132
uomParser :: Parser UOM uomParser = liftM uomFromString . option "" $ many (satisfy uomChar) where uomChar = inClass "A-Za-z%"
132
uomParser = liftM uomFromString . option "" $ many (satisfy uomChar) where uomChar = inClass "A-Za-z%"
108
false
true
0
8
25
48
22
26
null
null
kowey/GenI
src/NLP/GenI/Simple/SimpleBuilder.hs
gpl-2.0
missingSem :: SimpleItem -> SimpleState Sem missingSem item = do s <- get let bmap = semBitMap s inputSem = tsem s itemSem = siSemantics item return $ bitVectorToSem bmap $ inputSem `xor` itemSem -- | Arbitrarily selects and removes an element from the agenda and -- returns it.
314
missingSem :: SimpleItem -> SimpleState Sem missingSem item = do s <- get let bmap = semBitMap s inputSem = tsem s itemSem = siSemantics item return $ bitVectorToSem bmap $ inputSem `xor` itemSem -- | Arbitrarily selects and removes an element from the agenda and -- returns it.
314
missingSem item = do s <- get let bmap = semBitMap s inputSem = tsem s itemSem = siSemantics item return $ bitVectorToSem bmap $ inputSem `xor` itemSem -- | Arbitrarily selects and removes an element from the agenda and -- returns it.
270
false
true
0
10
84
83
39
44
null
null
steveshogren/haskell-katas
src/GameOfLife.hs
bsd-3-clause
xor False True = True
21
xor False True = True
21
xor False True = True
21
false
false
1
5
4
16
5
11
null
null
lgeorget/ogma
server/src/Ogma/Server.hs
mit
readerToExcept :: OgmaConfig -> OgmaM :~> ExceptT ServantErr IO readerToExcept cfg = Nat $ \x -> runReaderT x cfg
143
readerToExcept :: OgmaConfig -> OgmaM :~> ExceptT ServantErr IO readerToExcept cfg = Nat $ \x -> runReaderT x cfg
143
readerToExcept cfg = Nat $ \x -> runReaderT x cfg
49
false
true
0
7
48
41
20
21
null
null
urbit/urbit
pkg/hs/urbit-noun/lib/Urbit/Noun/Tree.hs
mit
mapToHoonMap :: forall k v. (ToNoun k, ToNoun v, Ord k, Ord v) => Map k v -> HoonMap k v mapToHoonMap = HoonMap . foldr put E . fmap (view nounVal) . mapToList where put :: NounVal (k, v) -> HoonTree (k, v) -> HoonTree (k, v) put kv@(pq -> (b, c)) = \case E -> N kv E E N...
1,038
mapToHoonMap :: forall k v. (ToNoun k, ToNoun v, Ord k, Ord v) => Map k v -> HoonMap k v mapToHoonMap = HoonMap . foldr put E . fmap (view nounVal) . mapToList where put :: NounVal (k, v) -> HoonTree (k, v) -> HoonTree (k, v) put kv@(pq -> (b, c)) = \case E -> N kv E E N...
1,038
mapToHoonMap = HoonMap . foldr put E . fmap (view nounVal) . mapToList where put :: NounVal (k, v) -> HoonTree (k, v) -> HoonTree (k, v) put kv@(pq -> (b, c)) = \case E -> N kv E E Node a | kv == n a -> Node a Node a | b == p (n a) -> N kv (l a) (r...
949
false
true
2
16
487
638
307
331
null
null
manyoo/reflex-dom
src-ghc/Reflex/Dom/Xhr/Foreign.hs
bsd-3-clause
xmlHttpRequestSetWithCredentials :: XMLHttpRequest -> Bool -> IO () xmlHttpRequestSetWithCredentials xhr b = do let c = xhrContext xhr b' <- jsvaluemakeboolean c b o <- toJSObject c [xhrValue xhr, b'] script <- jsstringcreatewithutf8cstring "this[0].withCredentials = this[1]" _ <- jsevaluatescript c script o ...
349
xmlHttpRequestSetWithCredentials :: XMLHttpRequest -> Bool -> IO () xmlHttpRequestSetWithCredentials xhr b = do let c = xhrContext xhr b' <- jsvaluemakeboolean c b o <- toJSObject c [xhrValue xhr, b'] script <- jsstringcreatewithutf8cstring "this[0].withCredentials = this[1]" _ <- jsevaluatescript c script o ...
349
xmlHttpRequestSetWithCredentials xhr b = do let c = xhrContext xhr b' <- jsvaluemakeboolean c b o <- toJSObject c [xhrValue xhr, b'] script <- jsstringcreatewithutf8cstring "this[0].withCredentials = this[1]" _ <- jsevaluatescript c script o nullPtr 1 nullPtr return ()
281
false
true
0
10
58
112
50
62
null
null
FranklinChen/Idris-dev
src/Idris/Output.hs
bsd-3-clause
prettyDocumentedIst :: IState -> (Name, PTerm, Maybe (Docstring DocTerm)) -> Doc OutputAnnotation prettyDocumentedIst ist (name, ty, docs) = prettyName True True [] name <+> colon <+> align (prettyIst ist ty) <$> fromMaybe empty (fmap (\d -> renderDocstring (r...
436
prettyDocumentedIst :: IState -> (Name, PTerm, Maybe (Docstring DocTerm)) -> Doc OutputAnnotation prettyDocumentedIst ist (name, ty, docs) = prettyName True True [] name <+> colon <+> align (prettyIst ist ty) <$> fromMaybe empty (fmap (\d -> renderDocstring (r...
436
prettyDocumentedIst ist (name, ty, docs) = prettyName True True [] name <+> colon <+> align (prettyIst ist ty) <$> fromMaybe empty (fmap (\d -> renderDocstring (renderDocTerm ppTm norm) d <> line) docs) where ppTm = pprintDelab ist norm = normaliseAll (tt_ctxt ist) []
298
false
true
1
14
124
157
78
79
null
null
Airtnp/Freshman_Simple_Haskell_Lib
Intro/hello-world.hs
mit
(!!!) :: [a] -> Int -> Maybe a -- section infix -> simple a !!! b = totaln a b
78
(!!!) :: [a] -> Int -> Maybe a a !!! b = totaln a b
51
a !!! b = totaln a b
20
true
true
0
9
19
44
21
23
null
null
jwiegley/ghc-release
libraries/containers/Data/Set/Base.hs
gpl-3.0
null (Bin {}) = False
21
null (Bin {}) = False
21
null (Bin {}) = False
21
false
false
0
6
4
17
8
9
null
null
JacquesCarette/literate-scientific-software
code/drasil-database/Database/Drasil/ChunkDB.hs
bsd-2-clause
collectUnits :: Quantity c => ChunkDB -> [c] -> [UnitDefn] collectUnits m = map (unitWrapper . flip unitLookup (m ^. unitTable)) . concatMap getUnits . mapMaybe (getUnitLup m)
176
collectUnits :: Quantity c => ChunkDB -> [c] -> [UnitDefn] collectUnits m = map (unitWrapper . flip unitLookup (m ^. unitTable)) . concatMap getUnits . mapMaybe (getUnitLup m)
176
collectUnits m = map (unitWrapper . flip unitLookup (m ^. unitTable)) . concatMap getUnits . mapMaybe (getUnitLup m)
117
false
true
1
10
28
78
38
40
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
gHC_FLOAT = mkBaseModule (fsLit "GHC.Float")
50
gHC_FLOAT = mkBaseModule (fsLit "GHC.Float")
50
gHC_FLOAT = mkBaseModule (fsLit "GHC.Float")
50
false
false
1
7
10
18
7
11
null
null
izgzhen/region
src/Rust/Pretty.hs
mit
sepWith (x:xs) s = x <> s <> sepWith xs s
41
sepWith (x:xs) s = x <> s <> sepWith xs s
41
sepWith (x:xs) s = x <> s <> sepWith xs s
41
false
false
0
7
10
31
15
16
null
null
alokpndy/haskell-learn
src/extensions/gadt&typeclass.hs
mit
defaultConfig' :: [Option] -> Config defaultConfig' options = MakeConfig (["-Wall"] ++ options)
95
defaultConfig' :: [Option] -> Config defaultConfig' options = MakeConfig (["-Wall"] ++ options)
95
defaultConfig' options = MakeConfig (["-Wall"] ++ options)
58
false
true
0
8
11
34
18
16
null
null
phischu/fragnix
builtins/base/Text.Printf.hs
bsd-3-clause
formatRealFloat :: RealFloat a => a -> FieldFormatter formatRealFloat x ufmt = let c = fmtChar $ vFmt 'g' ufmt prec = fmtPrecision ufmt alt = fmtAlternate ufmt in case c of 'e' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'E' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'f' -> (adjus...
624
formatRealFloat :: RealFloat a => a -> FieldFormatter formatRealFloat x ufmt = let c = fmtChar $ vFmt 'g' ufmt prec = fmtPrecision ufmt alt = fmtAlternate ufmt in case c of 'e' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'E' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'f' -> (adjus...
624
formatRealFloat x ufmt = let c = fmtChar $ vFmt 'g' ufmt prec = fmtPrecision ufmt alt = fmtAlternate ufmt in case c of 'e' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'E' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'f' -> (adjustSigned ufmt (dfmt c prec alt x) ++) 'F' -> (adju...
570
false
true
0
13
166
240
122
118
null
null
mtlstats/mtlstats
src/Mtlstats/Prompt/EditPlayer.hs
gpl-3.0
-- | Prompt to edit a player's number editPlayerNumPrompt :: Action () -- ^ The action to be performed upon completion -> Prompt editPlayerNumPrompt = editNum "Player number: " EPMenu (pNumber .~)
204
editPlayerNumPrompt :: Action () -- ^ The action to be performed upon completion -> Prompt editPlayerNumPrompt = editNum "Player number: " EPMenu (pNumber .~)
166
editPlayerNumPrompt = editNum "Player number: " EPMenu (pNumber .~)
69
true
true
0
8
39
42
19
23
null
null
cunger/mule
src/Projection.hs
gpl-3.0
scope "some" relation = relation
37
scope "some" relation = relation
37
scope "some" relation = relation
37
false
false
0
5
9
11
5
6
null
null
lordi/haskell-terminal
src/Hsterm/Hsterm.hs
gpl-2.0
numRows = 24
12
numRows = 24
12
numRows = 24
12
false
false
1
5
2
10
3
7
null
null
gsdlab/clafer
src/Language/ClaferT.hs
mit
-- Same line minusPos (Pos l c) (Pos m _) = Pos (l - m + 1) c
61
minusPos (Pos l c) (Pos m _) = Pos (l - m + 1) c
48
minusPos (Pos l c) (Pos m _) = Pos (l - m + 1) c
48
true
false
0
8
17
46
22
24
null
null
yihuang/cabal-install
Distribution/Client/HttpUtils.hs
bsd-3-clause
-- |Get the local proxy settings proxy :: Verbosity -> IO Proxy proxy verbosity = do mstr <- proxyString case mstr of Nothing -> return NoProxy Just str -> case parseHttpProxy str of Nothing -> do warn verbosity $ "invalid http proxy uri: " ++ show str warn verbosity $ "proxy uri ...
969
proxy :: Verbosity -> IO Proxy proxy verbosity = do mstr <- proxyString case mstr of Nothing -> return NoProxy Just str -> case parseHttpProxy str of Nothing -> do warn verbosity $ "invalid http proxy uri: " ++ show str warn verbosity $ "proxy uri must be http with a hostname" ...
934
proxy verbosity = do mstr <- proxyString case mstr of Nothing -> return NoProxy Just str -> case parseHttpProxy str of Nothing -> do warn verbosity $ "invalid http proxy uri: " ++ show str warn verbosity $ "proxy uri must be http with a hostname" warn verbosity $ "ignoring h...
903
true
true
0
17
220
131
62
69
null
null
DanielSchuessler/hstri
StandardCoordinates/Dense.hs
gpl-3.0
sd_zeroSet :: (Eq a1, Num a1, VG.Vector v a1, BitVector w) => StandardDense v a1 -> w sd_zeroSet (sd_toVector -> v) = v `seq` foldl' (\r i -> if VG.unsafeIndex v i == 0 then bvSetBit r i else r) (bvEmpty n) [0..n-1] where ...
336
sd_zeroSet :: (Eq a1, Num a1, VG.Vector v a1, BitVector w) => StandardDense v a1 -> w sd_zeroSet (sd_toVector -> v) = v `seq` foldl' (\r i -> if VG.unsafeIndex v i == 0 then bvSetBit r i else r) (bvEmpty n) [0..n-1] where ...
336
sd_zeroSet (sd_toVector -> v) = v `seq` foldl' (\r i -> if VG.unsafeIndex v i == 0 then bvSetBit r i else r) (bvEmpty n) [0..n-1] where n = VG.length v
248
false
true
0
12
146
142
72
70
null
null
csstaub/xmonad
XMonad/Core.hs
bsd-3-clause
-- | -- And now, unwrap a given, unknown 'Message' type, performing a (dynamic) -- type check on the result. -- fromMessage :: Message m => SomeMessage -> Maybe m fromMessage (SomeMessage m) = cast m
199
fromMessage :: Message m => SomeMessage -> Maybe m fromMessage (SomeMessage m) = cast m
87
fromMessage (SomeMessage m) = cast m
36
true
true
0
7
35
45
22
23
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
aRROW = mkBaseModule (fsLit "Control.Arrow")
54
false
false
0
7
14
15
7
8
null
null
foreverbell/unlimited-plt-toys
tapl/fullsimple/Evaluator.hs
bsd-3-clause
evaluate1 _ t1@(TermFix (TermAbs _ _ t2)) = Just $ termSubstituteTop t2 t1
74
evaluate1 _ t1@(TermFix (TermAbs _ _ t2)) = Just $ termSubstituteTop t2 t1
74
evaluate1 _ t1@(TermFix (TermAbs _ _ t2)) = Just $ termSubstituteTop t2 t1
74
false
false
0
10
12
42
20
22
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
-- effects game physics surfSky = 0x4 :: Int
50
surfSky = 0x4 :: Int
25
surfSky = 0x4 :: Int
25
true
false
0
4
14
10
6
4
null
null
wetneb/yanker
src/TypeHierarchy.hs
gpl-3.0
-- Given a list of skeletons and a list of types -- filter the types with the skeletons (each type is paired with -- the first skeleton it meets) dispatchTypes :: (a -> LambekFun) -> [LambekSkel] -> [a] -> ([[a]],[a]) dispatchTypes getType skels types = reverseOutput $ foldl addTypeToAccu (initSlots,[]) types where...
887
dispatchTypes :: (a -> LambekFun) -> [LambekSkel] -> [a] -> ([[a]],[a]) dispatchTypes getType skels types = reverseOutput $ foldl addTypeToAccu (initSlots,[]) types where initSlots = map (\x -> (x,[])) skels addTypeToAccu (slots,noMatch) tp = case findMatching slots tp of Just newSlots -> (new...
741
dispatchTypes getType skels types = reverseOutput $ foldl addTypeToAccu (initSlots,[]) types where initSlots = map (\x -> (x,[])) skels addTypeToAccu (slots,noMatch) tp = case findMatching slots tp of Just newSlots -> (newSlots,noMatch) Nothing -> (slots,tp:noMatch) findMatching []...
669
true
true
0
10
208
306
167
139
null
null
spechub/Hets
DFOL/Sign.hs
gpl-2.0
printSig (Sign ds) = vcat $ map printSigDecl $ compactDecls ds
62
printSig (Sign ds) = vcat $ map printSigDecl $ compactDecls ds
62
printSig (Sign ds) = vcat $ map printSigDecl $ compactDecls ds
62
false
false
2
6
10
31
13
18
null
null
monsanto/hie
Hie/Language/Haskell/Exts/Annotated/Build.hs
gpl-3.0
-- | The empty list pattern. peList :: l -> Pat l peList l = PList l []
71
peList :: l -> Pat l peList l = PList l []
42
peList l = PList l []
21
true
true
0
6
17
29
14
15
null
null
pmiddend/sneakybeaky
src/SneakyBeaky/NewMain.hs
gpl-3.0
simpleExample :: PointInt -> Bool simpleExample (V2 x y) | abs x > 6 || abs y > 6 = True | abs y == 2 && x > -2 && x < 2 = True | otherwise = False
193
simpleExample :: PointInt -> Bool simpleExample (V2 x y) | abs x > 6 || abs y > 6 = True | abs y == 2 && x > -2 && x < 2 = True | otherwise = False
193
simpleExample (V2 x y) | abs x > 6 || abs y > 6 = True | abs y == 2 && x > -2 && x < 2 = True | otherwise = False
159
false
true
0
13
85
93
43
50
null
null
daleooo/barrelfish
hake/RuleDefs.hs
mit
-- manually add dependencies for now (it would be better if each library -- defined each own dependencies locally, but that does not seem to be an -- easy thing to do currently libposixcompat_deps = LibDeps [ LibDep "posixcompat", liblwip_deps, libvfs_deps_all, LibDep "term_server" ]
320
libposixcompat_deps = LibDeps [ LibDep "posixcompat", liblwip_deps, libvfs_deps_all, LibDep "term_server" ]
143
libposixcompat_deps = LibDeps [ LibDep "posixcompat", liblwip_deps, libvfs_deps_all, LibDep "term_server" ]
143
true
false
0
7
79
30
17
13
null
null
GaloisInc/halvm-ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
coercibleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "MkCoercible") coercibleDataConKey coercibleDataCon
123
coercibleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "MkCoercible") coercibleDataConKey coercibleDataCon
123
coercibleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "MkCoercible") coercibleDataConKey coercibleDataCon
123
false
false
0
7
8
23
11
12
null
null
lpsmith/ftp-monitor
src/Segment.hs
agpl-3.0
insert :: Connection -> Segment -> IO () insert conn Segment{..} = do DB.execute conn [sql| INSERT INTO segment VALUES (?,?,?,?,?,?) |] (hash, sequence_number, segment_hash, offset, length)
204
insert :: Connection -> Segment -> IO () insert conn Segment{..} = do DB.execute conn [sql| INSERT INTO segment VALUES (?,?,?,?,?,?) |] (hash, sequence_number, segment_hash, offset, length)
204
insert conn Segment{..} = do DB.execute conn [sql| INSERT INTO segment VALUES (?,?,?,?,?,?) |] (hash, sequence_number, segment_hash, offset, length)
163
false
true
0
8
41
66
36
30
null
null
bitemyapp/perdure
exe-src/Database/Perdure/TestPersistent.hs
apache-2.0
-- | Some regular values for TestTree of growing complexity. generateTestTree :: (Persistent a, Num a, Ix a) => Int -> TestTree a generateTestTree n = if n==0 then Leaf 0 else Node (range (0, fromIntegral n)) $ ref <$> generateTestTree <$> range (0, n - 1)
267
generateTestTree :: (Persistent a, Num a, Ix a) => Int -> TestTree a generateTestTree n = if n==0 then Leaf 0 else Node (range (0, fromIntegral n)) $ ref <$> generateTestTree <$> range (0, n - 1)
204
generateTestTree n = if n==0 then Leaf 0 else Node (range (0, fromIntegral n)) $ ref <$> generateTestTree <$> range (0, n - 1)
135
true
true
0
11
57
104
53
51
null
null
cutsea110/aop
src/Take.hs
bsd-3-clause
toNat :: Int -> Nat toNat = unfoldn phi where phi n = if n <= 0 then Nothing else Just (n-1)
92
toNat :: Int -> Nat toNat = unfoldn phi where phi n = if n <= 0 then Nothing else Just (n-1)
92
toNat = unfoldn phi where phi n = if n <= 0 then Nothing else Just (n-1)
72
false
true
0
8
21
56
27
29
null
null
k-bx/timeoutbug
src/Main.hs
mit
main :: IO () main = do mgr <- HTTPClient.newManager HTTPClient.defaultManagerSettings quickHttpServe (site mgr)
116
main :: IO () main = do mgr <- HTTPClient.newManager HTTPClient.defaultManagerSettings quickHttpServe (site mgr)
116
main = do mgr <- HTTPClient.newManager HTTPClient.defaultManagerSettings quickHttpServe (site mgr)
102
false
true
0
9
17
42
19
23
null
null
anttisalonen/cgen
src/HeaderParser.hs
bsd-3-clause
capitalize (x:xs) = toUpper x : xs
34
capitalize (x:xs) = toUpper x : xs
34
capitalize (x:xs) = toUpper x : xs
34
false
false
0
7
6
23
11
12
null
null
isovector/iwmag
src/Math.hs
bsd-3-clause
lineBetween :: V2 -> V2 -> Line lineBetween a b = Line a $ b - a
64
lineBetween :: V2 -> V2 -> Line lineBetween a b = Line a $ b - a
64
lineBetween a b = Line a $ b - a
32
false
true
0
7
16
35
17
18
null
null
jamshidh/ethereum-vm
src/Blockchain/Data/Wire.hs
bsd-3-clause
numberToTerminationReason 0x0c = OtherSubprotocolReason
55
numberToTerminationReason 0x0c = OtherSubprotocolReason
55
numberToTerminationReason 0x0c = OtherSubprotocolReason
55
false
false
0
5
3
9
4
5
null
null
maxigit/sql-fragment-mysql-simple
executables/DumpSchema.hs
bsd-3-clause
camelCase :: String -> String camelCase [] = []
47
camelCase :: String -> String camelCase [] = []
47
camelCase [] = []
17
false
true
0
8
8
28
12
16
null
null
green-haskell/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
singleCt :: Ct -> Cts singleCt = unitBag
40
singleCt :: Ct -> Cts singleCt = unitBag
40
singleCt = unitBag
18
false
true
0
5
7
15
8
7
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Markdown.hs
gpl-2.0
regex_'28'5cs'7c'5e'29'5b'5c'2a'5f'5d'7b2'7d'5b'5e'5cs'5d'7b1'7d'5b'5e'5c'2a'5f'5d'2b'5b'5c'2a'5f'5d'7b2'7d'28'5cs'7c'5c'2e'7c'2c'7c'3b'7c'3a'7c'5c'2d'7c'5c'3f'7c'24'29 = compileRegex True "(\\s|^)[\\*_]{2}[^\\s]{1}[^\\*_]+[\\*_]{2}(\\s|\\.|,|;|:|\\-|\\?|$)"
258
regex_'28'5cs'7c'5e'29'5b'5c'2a'5f'5d'7b2'7d'5b'5e'5cs'5d'7b1'7d'5b'5e'5c'2a'5f'5d'2b'5b'5c'2a'5f'5d'7b2'7d'28'5cs'7c'5c'2e'7c'2c'7c'3b'7c'3a'7c'5c'2d'7c'5c'3f'7c'24'29 = compileRegex True "(\\s|^)[\\*_]{2}[^\\s]{1}[^\\*_]+[\\*_]{2}(\\s|\\.|,|;|:|\\-|\\?|$)"
258
regex_'28'5cs'7c'5e'29'5b'5c'2a'5f'5d'7b2'7d'5b'5e'5cs'5d'7b1'7d'5b'5e'5c'2a'5f'5d'2b'5b'5c'2a'5f'5d'7b2'7d'28'5cs'7c'5c'2e'7c'2c'7c'3b'7c'3a'7c'5c'2d'7c'5c'3f'7c'24'29 = compileRegex True "(\\s|^)[\\*_]{2}[^\\s]{1}[^\\*_]+[\\*_]{2}(\\s|\\.|,|;|:|\\-|\\?|$)"
258
false
false
0
5
4
11
5
6
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/GetIAMPolicy.hs
mpl-2.0
-- | Creates a value of 'ProjectsTopicsGetIAMPolicy' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ptgipOptionsRequestedPolicyVersion' -- -- * 'ptgipXgafv' -- -- * 'ptgipUploadProtocol' -- -- * 'ptgipAccessToken' -- -- * 'ptgipUploa...
803
projectsTopicsGetIAMPolicy :: Text -- ^ 'ptgipResource' -> ProjectsTopicsGetIAMPolicy projectsTopicsGetIAMPolicy pPtgipResource_ = ProjectsTopicsGetIAMPolicy' { _ptgipOptionsRequestedPolicyVersion = Nothing , _ptgipXgafv = Nothing , _ptgipUploadProtocol = Nothing , _ptgipAccessToken = Nothing ...
428
projectsTopicsGetIAMPolicy pPtgipResource_ = ProjectsTopicsGetIAMPolicy' { _ptgipOptionsRequestedPolicyVersion = Nothing , _ptgipXgafv = Nothing , _ptgipUploadProtocol = Nothing , _ptgipAccessToken = Nothing , _ptgipUploadType = Nothing , _ptgipResource = pPtgipResource_ , _ptgipCallback =...
334
true
true
0
7
140
89
58
31
null
null
HIPERFIT/futhark
src/Futhark/IR/Prop/Reshape.hs
isc
-- | @reshapeIndex to_dims from_dims is@ transforms the index list -- @is@ (which is into an array of shape @from_dims@) into an index -- list @is'@, which is into an array of shape @to_dims@. @is@ must -- have the same length as @from_dims@, and @is'@ will have the same -- length as @to_dims@. reshapeIndex :: Integ...
463
reshapeIndex :: IntegralExp num => [num] -> [num] -> [num] -> [num] reshapeIndex to_dims from_dims is = unflattenIndex to_dims $ flattenIndex from_dims is
166
reshapeIndex to_dims from_dims is = unflattenIndex to_dims $ flattenIndex from_dims is
88
true
true
0
9
88
66
36
30
null
null
kawamuray/ganeti
src/Ganeti/Constants.hs
gpl-2.0
nrMcandidate :: String nrMcandidate = Types.nodeRoleToRaw NRCandidate
69
nrMcandidate :: String nrMcandidate = Types.nodeRoleToRaw NRCandidate
69
nrMcandidate = Types.nodeRoleToRaw NRCandidate
46
false
true
0
6
6
16
8
8
null
null
brendanhay/gogol
gogol-iam/gen/Network/Google/IAM/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Permission' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'perStage' -- -- * 'perPrimaryPermission' -- -- * 'perOnlyInPredefinedRoles' -- -- * 'perCustomRolesSupportLevel' -- -- * 'perName' -- -- * 'perTitle'...
697
permission :: Permission permission = Permission' { _perStage = Nothing , _perPrimaryPermission = Nothing , _perOnlyInPredefinedRoles = Nothing , _perCustomRolesSupportLevel = Nothing , _perName = Nothing , _perTitle = Nothing , _perAPIdisabled = Nothing , _perDescription = Nothing...
326
permission = Permission' { _perStage = Nothing , _perPrimaryPermission = Nothing , _perOnlyInPredefinedRoles = Nothing , _perCustomRolesSupportLevel = Nothing , _perName = Nothing , _perTitle = Nothing , _perAPIdisabled = Nothing , _perDescription = Nothing }
297
true
true
0
7
142
90
60
30
null
null
nshimaza/cisco-spark-api
webex-teams-api/src/Network/WebexTeams/Internal.hs
mit
-- '=' -- | Matches to less-than character. lessThan :: Parser Word8 lessThan = word8 0x3c
91
lessThan :: Parser Word8 lessThan = word8 0x3c
46
lessThan = word8 0x3c
21
true
true
0
5
16
19
10
9
null
null
shlevy/ghc
compiler/types/OptCoercion.hs
bsd-3-clause
------------- -- destruct a CoherenceCo isCohLeft_maybe :: Coercion -> Maybe (Coercion, Coercion) isCohLeft_maybe (CoherenceCo co1 co2) = Just (co1, co2)
153
isCohLeft_maybe :: Coercion -> Maybe (Coercion, Coercion) isCohLeft_maybe (CoherenceCo co1 co2) = Just (co1, co2)
113
isCohLeft_maybe (CoherenceCo co1 co2) = Just (co1, co2)
55
true
true
0
7
19
46
25
21
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GLU/Matrix.hs
bsd-3-clause
unProject4 :: Matrix m => Vertex4 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GLclampd -> GLclampd -> IO (Vertex4 GLdouble) unProject4 (Vertex4 objX objY objZ clipW) model proj viewPort near far = withColumnMajor model $ \modelBuf -> withColumnMajor proj $ \projBuf -> withViewpor...
435
unProject4 :: Matrix m => Vertex4 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GLclampd -> GLclampd -> IO (Vertex4 GLdouble) unProject4 (Vertex4 objX objY objZ clipW) model proj viewPort near far = withColumnMajor model $ \modelBuf -> withColumnMajor proj $ \projBuf -> withViewpor...
435
unProject4 (Vertex4 objX objY objZ clipW) model proj viewPort near far = withColumnMajor model $ \modelBuf -> withColumnMajor proj $ \projBuf -> withViewport viewPort $ \viewBuf -> getVertex4 $ gluUnProject4 objX objY objZ clipW modelBuf projBuf viewBuf near far
280
false
true
2
15
95
156
74
82
null
null
truls/almique
src/Language/PySMEIL/Typing.hs
gpl-3.0
sign :: DType -> Signedness sign (IntType _) = IsSigned
57
sign :: DType -> Signedness sign (IntType _) = IsSigned
57
sign (IntType _) = IsSigned
29
false
true
0
7
11
24
12
12
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_90 (HappyTerminal (T_type happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
135
happyReduction_90 (HappyTerminal (T_type happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
135
happyReduction_90 (HappyTerminal (T_type happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
135
false
false
0
9
44
32
15
17
null
null
hanshoglund/comb
comb2.hs
bsd-3-clause
lift = Lift "f"
18
lift = Lift "f"
18
lift = Lift "f"
18
false
false
1
5
6
13
4
9
null
null
jjwchoy/hotdb
src/HotDB/Core/Commit.hs
mit
emptyCommitId :: Text emptyCommitId = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
80
emptyCommitId :: Text emptyCommitId = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
80
emptyCommitId = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
58
false
true
0
6
5
18
7
11
null
null
tvh/llvm-general-quote
src/LLVM/General/Quote/SSA.hs
bsd-3-clause
typeOfConstant C.ExtractValue{..} = extractTypes indices' (typeOfConstant aggregate) where extractTypes [] t = t extractTypes (n:ns) t = case t of StructureType{..} -> extractTypes ns (elementTypes !! fromIntegral n) ArrayType{..} -> extractTypes ns elementType _ -> error "typ...
374
typeOfConstant C.ExtractValue{..} = extractTypes indices' (typeOfConstant aggregate) where extractTypes [] t = t extractTypes (n:ns) t = case t of StructureType{..} -> extractTypes ns (elementTypes !! fromIntegral n) ArrayType{..} -> extractTypes ns elementType _ -> error "typ...
374
typeOfConstant C.ExtractValue{..} = extractTypes indices' (typeOfConstant aggregate) where extractTypes [] t = t extractTypes (n:ns) t = case t of StructureType{..} -> extractTypes ns (elementTypes !! fromIntegral n) ArrayType{..} -> extractTypes ns elementType _ -> error "typ...
374
false
false
3
8
84
119
56
63
null
null
RefactoringTools/HaRe
test/testdata/TypeUtils/TypeSigs.hs
bsd-3-clause
sq z = z^2
10
sq z = z^2
10
sq z = z^2
10
false
false
0
5
3
13
6
7
null
null
nevrenato/Hets_Fork
OMDoc/OMDocInterface.hs
gpl-2.0
getIdsForPresentation (CSy s) = [symbolId s]
44
getIdsForPresentation (CSy s) = [symbolId s]
44
getIdsForPresentation (CSy s) = [symbolId s]
44
false
false
0
7
5
21
10
11
null
null
olorin/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/Types/Product.hs
mpl-2.0
-- | Creates a value of 'RedshiftDatabase' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rdDatabaseName' -- -- * 'rdClusterIdentifier' redshiftDatabase :: Text -- ^ 'rdDatabaseName' -> Text -- ^ 'rdClusterIdentifier' -> ...
506
redshiftDatabase :: Text -- ^ 'rdDatabaseName' -> Text -- ^ 'rdClusterIdentifier' -> RedshiftDatabase redshiftDatabase pDatabaseName_ pClusterIdentifier_ = RedshiftDatabase' { _rdDatabaseName = pDatabaseName_ , _rdClusterIdentifier = pClusterIdentifier_ }
283
redshiftDatabase pDatabaseName_ pClusterIdentifier_ = RedshiftDatabase' { _rdDatabaseName = pDatabaseName_ , _rdClusterIdentifier = pClusterIdentifier_ }
169
true
true
0
6
92
47
30
17
null
null
brodyberg/LearnHaskell
CaesarCypher.hsproj/Transmitter.hs
mit
transmit :: String -> String transmit = decode . channel . encode
65
transmit :: String -> String transmit = decode . channel . encode
65
transmit = decode . channel . encode
36
false
true
1
7
11
30
13
17
null
null
geraldus/lambdacms
lambdacms-core/LambdaCms/Core/Message.hs
mit
russianMessage AccountAlreadyActivated = "Эта учётная запись уже активирована"
86
russianMessage AccountAlreadyActivated = "Эта учётная запись уже активирована"
86
russianMessage AccountAlreadyActivated = "Эта учётная запись уже активирована"
86
false
false
0
5
15
9
4
5
null
null
azure-satellite/scheme-parser
src/Parser.hs
bsd-3-clause
extractNum _ = 0
16
extractNum _ = 0
16
extractNum _ = 0
16
false
false
0
4
3
10
4
6
null
null
HIPERFIT/futhark
src/Futhark/Pass/ExplicitAllocations.hs
isc
allocInExp :: (Allocable fromrep torep inner) => Exp fromrep -> AllocM fromrep torep (Exp torep) allocInExp (DoLoop merge form (Body () bodystms bodyres)) = allocInMergeParams merge $ \merge' mk_loop_val -> do form' <- allocInLoopForm form localScope (scopeOf form') $ do body' <- buildBody...
544
allocInExp :: (Allocable fromrep torep inner) => Exp fromrep -> AllocM fromrep torep (Exp torep) allocInExp (DoLoop merge form (Body () bodystms bodyres)) = allocInMergeParams merge $ \merge' mk_loop_val -> do form' <- allocInLoopForm form localScope (scopeOf form') $ do body' <- buildBody...
544
allocInExp (DoLoop merge form (Body () bodystms bodyres)) = allocInMergeParams merge $ \merge' mk_loop_val -> do form' <- allocInLoopForm form localScope (scopeOf form') $ do body' <- buildBody_ . allocInStms bodystms $ do (val_ses, valres') <- mk_loop_val $ map resSubExp bodyres ...
441
false
true
0
19
128
193
90
103
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
confdReqfieldMnodePip :: Int confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip
94
confdReqfieldMnodePip :: Int confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip
94
confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip
65
false
true
0
6
6
22
9
13
null
null
d16-processor/Haskell-C-
src/Tree.hs
mit
const_subexpr_simplification tree = return tree
47
const_subexpr_simplification tree = return tree
47
const_subexpr_simplification tree = return tree
47
false
false
0
5
4
12
5
7
null
null
rahulmutt/ghcvm
compiler/Eta/Core/CoreSyn.hs
bsd-3-clause
isCompulsoryUnfolding :: Unfolding -> Bool isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True
117
isCompulsoryUnfolding :: Unfolding -> Bool isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True
117
isCompulsoryUnfolding (CoreUnfolding { uf_src = InlineCompulsory }) = True
74
false
true
0
9
13
30
16
14
null
null
ZjMNZHgG5jMXw/smallcaps
src/smallcaps/Text/SmallCaps/ConfigParser.hs
bsd-3-clause
iListConstNone :: Parser (LaTeXElement -> Maybe Text) iListConstNone = do _ <- lex $ char '/' return $ const Nothing -- ** List item parser
146
iListConstNone :: Parser (LaTeXElement -> Maybe Text) iListConstNone = do _ <- lex $ char '/' return $ const Nothing -- ** List item parser
146
iListConstNone = do _ <- lex $ char '/' return $ const Nothing -- ** List item parser
92
false
true
1
10
31
53
23
30
null
null
GaloisInc/mistral
src/Mistral/ModuleSystem/Prelude.hs
bsd-3-clause
preludeSyns :: Map.Map Name TySyn preludeSyns = Map.fromList [ syn "Action" ["a"] $ \ [a] -> -- type Action a = Stmts Open a tstmts openCon a , syn "Transition" [] $ \ [] -> -- type Transition = Stmts Closed State tstmts closedCon stateCon ] where syn str ps f = (name, TySyn { synN...
590
preludeSyns :: Map.Map Name TySyn preludeSyns = Map.fromList [ syn "Action" ["a"] $ \ [a] -> -- type Action a = Stmts Open a tstmts openCon a , syn "Transition" [] $ \ [] -> -- type Transition = Stmts Closed State tstmts closedCon stateCon ] where syn str ps f = (name, TySyn { synN...
590
preludeSyns = Map.fromList [ syn "Action" ["a"] $ \ [a] -> -- type Action a = Stmts Open a tstmts openCon a , syn "Transition" [] $ \ [] -> -- type Transition = Stmts Closed State tstmts closedCon stateCon ] where syn str ps f = (name, TySyn { synName = name, synType = schema }) ...
556
false
true
0
9
173
216
115
101
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/List.hs
bsd-3-clause
init (x:xs) = x : init xs
38
init (x:xs) = x : init xs
38
init (x:xs) = x : init xs
38
false
false
0
6
19
24
11
13
null
null
nevrenato/Hets_Fork
Common/Lib/Pretty.hs
gpl-2.0
punctuate _ [] = []
23
punctuate _ [] = []
23
punctuate _ [] = []
23
false
false
0
6
8
15
7
8
null
null
sgord512/Algebra
Algebra/Base.hs
mit
-- | Inverse of 'mergeMonomials' splitPolynomial :: Polynomial -> [Monomial] splitPolynomial = map tc2m . Map.assocs . (\(P m) -> m)
132
splitPolynomial :: Polynomial -> [Monomial] splitPolynomial = map tc2m . Map.assocs . (\(P m) -> m)
99
splitPolynomial = map tc2m . Map.assocs . (\(P m) -> m)
55
true
true
0
10
20
53
26
27
null
null
shapr/adventofcode2016
src/Eighteen/Main.hs
bsd-3-clause
inflate input = "." <> input <> "."
35
inflate input = "." <> input <> "."
35
inflate input = "." <> input <> "."
35
false
false
3
5
7
21
8
13
null
null
amccausl/RDF4H
src/Text/RDF/RDF4H/NTriplesSerializer.hs
bsd-3-clause
writeTriple :: Handle -> Triple -> IO () writeTriple h (Triple s p o) = writeNode h s >> hPutChar h ' ' >> writeNode h p >> hPutChar h ' ' >> writeNode h o >> hPutStrLn h " ."
181
writeTriple :: Handle -> Triple -> IO () writeTriple h (Triple s p o) = writeNode h s >> hPutChar h ' ' >> writeNode h p >> hPutChar h ' ' >> writeNode h o >> hPutStrLn h " ."
181
writeTriple h (Triple s p o) = writeNode h s >> hPutChar h ' ' >> writeNode h p >> hPutChar h ' ' >> writeNode h o >> hPutStrLn h " ."
140
false
true
0
10
46
89
41
48
null
null
kojiromike/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
process fn (Load _ _) = iPrintError "Command ':load' is currently unsupported"
78
process fn (Load _ _) = iPrintError "Command ':load' is currently unsupported"
78
process fn (Load _ _) = iPrintError "Command ':load' is currently unsupported"
78
false
false
0
7
11
22
10
12
null
null
thoughtpolice/binary-serialise-cbor
bench/Real/Load.hs
bsd-3-clause
nonEmpty (LowerBound l lb, UpperBound u ub) = (l < u) || (l == u && lb == InclusiveBound && ub == InclusiveBound)
115
nonEmpty (LowerBound l lb, UpperBound u ub) = (l < u) || (l == u && lb == InclusiveBound && ub == InclusiveBound)
115
nonEmpty (LowerBound l lb, UpperBound u ub) = (l < u) || (l == u && lb == InclusiveBound && ub == InclusiveBound)
115
false
false
0
11
24
59
30
29
null
null
leksah/yi
src/library/Yi/Keymap/Vim/NormalMap.hs
gpl-2.0
cutCharE :: Direction -> EOLStickiness -> Int -> EditorM () cutCharE dir stickiness count = do r <- withCurrentBuffer $ do p0 <- pointB (if dir == Forward then moveXorEol else moveXorSol) count p1 <- pointB let region = mkRegion p0 p1 rope <- readRegionB region delete...
500
cutCharE :: Direction -> EOLStickiness -> Int -> EditorM () cutCharE dir stickiness count = do r <- withCurrentBuffer $ do p0 <- pointB (if dir == Forward then moveXorEol else moveXorSol) count p1 <- pointB let region = mkRegion p0 p1 rope <- readRegionB region delete...
500
cutCharE dir stickiness count = do r <- withCurrentBuffer $ do p0 <- pointB (if dir == Forward then moveXorEol else moveXorSol) count p1 <- pointB let region = mkRegion p0 p1 rope <- readRegionB region deleteRegionB $ mkRegion p0 p1 when (stickiness == NonStic...
440
false
true
0
15
142
165
73
92
null
null
sordina/Deadpan-DDP
test/client/Todos.hs
mit
go :: Show a => Either a Params -> IO () go (Left err ) = print err
70
go :: Show a => Either a Params -> IO () go (Left err ) = print err
70
go (Left err ) = print err
29
false
true
0
8
20
48
21
27
null
null
paulkeene/FP101x
chapter03/Exercises.hs
bsd-3-clause
-- Doesn't work; non-exhaustive pattern match safetailC :: [a] -> [a] safetailC (_ : xs) | null xs = [] -- this will never be true | otherwise = tail xs
156
safetailC :: [a] -> [a] safetailC (_ : xs) | null xs = [] -- this will never be true | otherwise = tail xs
110
safetailC (_ : xs) | null xs = [] -- this will never be true | otherwise = tail xs
86
true
true
1
8
34
54
28
26
null
null
neothemachine/monadiccp
src/Data/Expr/Data.hs
bsd-3-clause
compareExpr _ (Div _ _) _ = LT
30
compareExpr _ (Div _ _) _ = LT
30
compareExpr _ (Div _ _) _ = LT
30
false
false
1
6
7
24
10
14
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Tools/Wellformedness.hs
gpl-3.0
-- | Pretty-print a comma, separated list of 'LVar's. prettyVarList :: Document d => [LVar] -> d prettyVarList = fsep . punctuate comma . map prettyLVar
152
prettyVarList :: Document d => [LVar] -> d prettyVarList = fsep . punctuate comma . map prettyLVar
98
prettyVarList = fsep . punctuate comma . map prettyLVar
55
true
true
0
7
25
40
20
20
null
null
shlevy/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
-- effectively sets to noOccInfo lookupDetails :: UsageDetails -> Id -> OccInfo lookupDetails ud id = case lookupVarEnv (ud_env ud) id of Just occ -> doZapping ud id occ Nothing -> IAmDead
204
lookupDetails :: UsageDetails -> Id -> OccInfo lookupDetails ud id = case lookupVarEnv (ud_env ud) id of Just occ -> doZapping ud id occ Nothing -> IAmDead
170
lookupDetails ud id = case lookupVarEnv (ud_env ud) id of Just occ -> doZapping ud id occ Nothing -> IAmDead
123
true
true
0
8
47
62
30
32
null
null
brendanhay/gogol
gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs
mpl-2.0
-- | The score of the audit, can be null. larvScore :: Lens' LighthouseAuditResultV5 (Maybe JSONValue) larvScore = lens _larvScore (\ s a -> s{_larvScore = a})
161
larvScore :: Lens' LighthouseAuditResultV5 (Maybe JSONValue) larvScore = lens _larvScore (\ s a -> s{_larvScore = a})
119
larvScore = lens _larvScore (\ s a -> s{_larvScore = a})
58
true
true
1
9
28
52
25
27
null
null
lamdu/lamdu
src/Lamdu/Data/Db/Init.hs
gpl-3.0
newBranch :: Monad m => Text -> Version m -> T m (Branch m) newBranch name ver = do branch <- Branch.new ver setName branch name pure branch
168
newBranch :: Monad m => Text -> Version m -> T m (Branch m) newBranch name ver = do branch <- Branch.new ver setName branch name pure branch
168
newBranch name ver = do branch <- Branch.new ver setName branch name pure branch
108
false
true
0
11
55
76
32
44
null
null
capitanbatata/sandbox
scrapping-expressions-boilerplate/src/ScrapMyBoilerplate.hs
gpl-3.0
boss1 = Boss "Karel" Bad (Salary 30) [emp2, emp3]
49
boss1 = Boss "Karel" Bad (Salary 30) [emp2, emp3]
49
boss1 = Boss "Karel" Bad (Salary 30) [emp2, emp3]
49
false
false
0
7
8
27
14
13
null
null
brendanhay/gogol
gogol-cloudtasks/gen/Network/Google/CloudTasks/Types/Product.hs
mpl-2.0
-- | Output only. The status of the task\'s first attempt. Only dispatch_time -- will be set. The other Attempt information is not retained by Cloud -- Tasks. tFirstAttempt :: Lens' Task (Maybe Attempt) tFirstAttempt = lens _tFirstAttempt (\ s a -> s{_tFirstAttempt = a})
279
tFirstAttempt :: Lens' Task (Maybe Attempt) tFirstAttempt = lens _tFirstAttempt (\ s a -> s{_tFirstAttempt = a})
120
tFirstAttempt = lens _tFirstAttempt (\ s a -> s{_tFirstAttempt = a})
76
true
true
1
9
52
54
27
27
null
null
PiotrJustyna/roller
Roller/Parse.hs
gpl-2.0
constantTerm :: RE Char DiceExpression constantTerm = constructConstantTerm <$> naturalNumber
93
constantTerm :: RE Char DiceExpression constantTerm = constructConstantTerm <$> naturalNumber
93
constantTerm = constructConstantTerm <$> naturalNumber
54
false
true
0
5
9
20
10
10
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/ActorUI.hs
bsd-3-clause
tryFindHeroK :: ActorDictUI -> FactionId -> Int -> State -> Maybe (ActorId, Actor) tryFindHeroK d fid k s = let c | k == 0 = '@' | k > 0 && k < 10 = Char.intToDigit k | otherwise = ' ' -- no hero with such symbol in tryFindActor s (\aid body -> maybe False ((== c)...
377
tryFindHeroK :: ActorDictUI -> FactionId -> Int -> State -> Maybe (ActorId, Actor) tryFindHeroK d fid k s = let c | k == 0 = '@' | k > 0 && k < 10 = Char.intToDigit k | otherwise = ' ' -- no hero with such symbol in tryFindActor s (\aid body -> maybe False ((== c)...
377
tryFindHeroK d fid k s = let c | k == 0 = '@' | k > 0 && k < 10 = Char.intToDigit k | otherwise = ' ' -- no hero with such symbol in tryFindActor s (\aid body -> maybe False ((== c) . bsymbol) (EM.lookup aid d) && bfid body == fid)
281
false
true
0
15
131
156
77
79
null
null
ahihi/dew
Main.hs
cc0-1.0
lcV :: [Char] lcV = "v\xFF56"
29
lcV :: [Char] lcV = "v\xFF56"
29
lcV = "v\xFF56"
15
false
true
0
5
5
14
8
6
null
null
psibi/yesod
yesod-core/test/YesodCoreTest/Links.hs
mit
getTextR :: Text -> Handler Html getTextR foo = defaultLayout $ toWidget [hamlet|%#{foo}%|]
91
getTextR :: Text -> Handler Html getTextR foo = defaultLayout $ toWidget [hamlet|%#{foo}%|]
91
getTextR foo = defaultLayout $ toWidget [hamlet|%#{foo}%|]
58
false
true
0
6
12
32
17
15
null
null
esengie/fpl-exploration-tool
src/specLang/SortCheck/Sort.hs
bsd-3-clause
checkTmSort :: Sort -> Term -> SortCheckM () checkTmSort tmSort tm = let sName = getSortName tmSort in checkEqSorts sName tmName $ "Left of : is not a term, but " ++ show sName ++ "\n in " ++ show tm
234
checkTmSort :: Sort -> Term -> SortCheckM () checkTmSort tmSort tm = let sName = getSortName tmSort in checkEqSorts sName tmName $ "Left of : is not a term, but " ++ show sName ++ "\n in " ++ show tm
234
checkTmSort tmSort tm = let sName = getSortName tmSort in checkEqSorts sName tmName $ "Left of : is not a term, but " ++ show sName ++ "\n in " ++ show tm
189
false
true
0
11
75
70
32
38
null
null
RoboNickBot/interactive-tree-demos
src/Heap.hs
bsd-2-clause
modValidate _ s = return s
26
modValidate _ s = return s
26
modValidate _ s = return s
26
false
false
0
5
5
14
6
8
null
null