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
kmate/HaRe
old/refactorer/RefacFunDef.hs
bsd-3-clause
{- | Function Definition folding. This folding takes a function definition, looks for duplicate code and replaces it with a call to the function. e.g. @ square x = x * x g x y = x * x + y * y @ will be refactored to: @ square x = x * x g x y = squar...
2,097
subFunctionDef args = do let fileName = args!!0 beginRow = read (args!!1)::Int beginCol = read (args!!2)::Int endRow = read (args!!3)::Int endCol = read (args!!4)::Int AbstractIO.putStrLn "subFunctionDef" (inscps, exps, mod, tokList) <- p...
1,752
subFunctionDef args = do let fileName = args!!0 beginRow = read (args!!1)::Int beginCol = read (args!!2)::Int endRow = read (args!!3)::Int endCol = read (args!!4)::Int AbstractIO.putStrLn "subFunctionDef" (inscps, exps, mod, tokList) <- p...
1,752
true
false
1
14
879
419
231
188
null
null
gcampax/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkTcTransCo co1 co2 = TcTransCo co1 co2
46
mkTcTransCo co1 co2 = TcTransCo co1 co2
46
mkTcTransCo co1 co2 = TcTransCo co1 co2
46
false
false
0
5
13
16
7
9
null
null
mstksg/hledger
hledger/Hledger/Cli/Print.hs
gpl-3.0
printmode = (defCommandMode $ ["print"] ++ aliases) { modeHelp = "show transaction journal entries" `withAliases` aliases ,modeGroupFlags = Group { groupUnnamed = [ let matcharg = "STR" in flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) matcharg ("show the tra...
689
printmode = (defCommandMode $ ["print"] ++ aliases) { modeHelp = "show transaction journal entries" `withAliases` aliases ,modeGroupFlags = Group { groupUnnamed = [ let matcharg = "STR" in flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) matcharg ("show the tra...
689
printmode = (defCommandMode $ ["print"] ++ aliases) { modeHelp = "show transaction journal entries" `withAliases` aliases ,modeGroupFlags = Group { groupUnnamed = [ let matcharg = "STR" in flagReq ["match","m"] (\s opts -> Right $ setopt "match" s opts) matcharg ("show the tra...
689
false
false
2
17
188
170
92
78
null
null
ditto/ditto
src/Ditto/Surf.hs
gpl-3.0
surfMeta :: Meta -> TCM Meta surfMeta (Meta acts ctx _A) = Meta <$> surfActs acts <*> surfTel ctx <*> surfExp _A
112
surfMeta :: Meta -> TCM Meta surfMeta (Meta acts ctx _A) = Meta <$> surfActs acts <*> surfTel ctx <*> surfExp _A
112
surfMeta (Meta acts ctx _A) = Meta <$> surfActs acts <*> surfTel ctx <*> surfExp _A
83
false
true
0
9
21
56
25
31
null
null
twittner/wai-predicates
src/Data/Predicate/Result.hs
mpl-2.0
result :: (f -> a) -> (Double -> t -> a) -> Result f t -> a result f _ (Fail x) = f x
87
result :: (f -> a) -> (Double -> t -> a) -> Result f t -> a result f _ (Fail x) = f x
87
result f _ (Fail x) = f x
27
false
true
0
9
26
62
31
31
null
null
oldmanmike/ghc
testsuite/tests/codeGen/should_run/T9013.hs
bsd-3-clause
carry :: Word carry = case big of W# w -> case plusWord2# w w of (# hi, lo #) -> W# hi
92
carry :: Word carry = case big of W# w -> case plusWord2# w w of (# hi, lo #) -> W# hi
92
carry = case big of W# w -> case plusWord2# w w of (# hi, lo #) -> W# hi
78
false
true
0
11
28
53
24
29
null
null
qwfy/fsquery
src/System/FSQuery/Eval.hs
mit
readOpForSize "<" = \m h -> let (m', h') = unifyFileSize m h in m' < h'
79
readOpForSize "<" = \m h -> let (m', h') = unifyFileSize m h in m' < h'
79
readOpForSize "<" = \m h -> let (m', h') = unifyFileSize m h in m' < h'
79
false
false
0
10
24
43
21
22
null
null
olsner/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
dataConRepStrictness :: DataCon -> [StrictnessMark] -- ^ Give the demands on the arguments of a -- Core constructor application (Con dc args) dataConRepStrictness dc = case dcRep dc of NoDataConRep -> [NotMarkedStrict | _ <- dataConRepArgTys dc] DCR { dcr_stricts ...
336
dataConRepStrictness :: DataCon -> [StrictnessMark] dataConRepStrictness dc = case dcRep dc of NoDataConRep -> [NotMarkedStrict | _ <- dataConRepArgTys dc] DCR { dcr_stricts = strs } -> strs
246
dataConRepStrictness dc = case dcRep dc of NoDataConRep -> [NotMarkedStrict | _ <- dataConRepArgTys dc] DCR { dcr_stricts = strs } -> strs
194
true
true
0
11
100
69
35
34
null
null
mvr/at
src/Math/Topology/SSet/NSimplex.hs
bsd-3-clause
deleteAt :: Int -> [a] -> [a] deleteAt _ [] = []
48
deleteAt :: Int -> [a] -> [a] deleteAt _ [] = []
48
deleteAt _ [] = []
18
false
true
0
9
11
40
19
21
null
null
junjihashimoto/pocket-dns
Main.hs
bsd-3-clause
runCmd (Daemon conf port) = runServer conf port
47
runCmd (Daemon conf port) = runServer conf port
47
runCmd (Daemon conf port) = runServer conf port
47
false
false
0
7
7
22
10
12
null
null
niteria/haddock
haddock-api/src/Haddock/Types.hs
bsd-2-clause
liftErrMsg :: ErrMsgM a -> ErrMsgGhc a liftErrMsg = WriterGhc . return . runWriter
82
liftErrMsg :: ErrMsgM a -> ErrMsgGhc a liftErrMsg = WriterGhc . return . runWriter
82
liftErrMsg = WriterGhc . return . runWriter
43
false
true
0
6
13
29
14
15
null
null
erikd/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | In a streaming response, send a single chunk of data. This function works -- on most datatypes, such as @ByteString@ and @Html@. -- -- Since 1.2.0 sendChunk :: Monad m => ToFlushBuilder a => a -> Producer m (Flush Builder) sendChunk = yield . toFlushBuilder
262
sendChunk :: Monad m => ToFlushBuilder a => a -> Producer m (Flush Builder) sendChunk = yield . toFlushBuilder
110
sendChunk = yield . toFlushBuilder
34
true
true
0
10
46
48
25
23
null
null
Paow/encore
src/back/CodeGen/CCodeNames.hs
bsd-3-clause
localFunctionNameOf :: A.Function -> CCode Name localFunctionNameOf f@A.Function{A.funsource} = localFunctionName $ ID.setSourceFile funsource $ ID.topLevelQName $ A.functionName f
204
localFunctionNameOf :: A.Function -> CCode Name localFunctionNameOf f@A.Function{A.funsource} = localFunctionName $ ID.setSourceFile funsource $ ID.topLevelQName $ A.functionName f
204
localFunctionNameOf f@A.Function{A.funsource} = localFunctionName $ ID.setSourceFile funsource $ ID.topLevelQName $ A.functionName f
156
false
true
0
9
41
60
29
31
null
null
np/frquotes
Text/FrQuotes.hs
bsd-3-clause
closeBr = ") `mappend` " ++ openFrQQ'
39
closeBr = ") `mappend` " ++ openFrQQ'
39
closeBr = ") `mappend` " ++ openFrQQ'
39
false
false
3
5
8
15
5
10
null
null
raventid/coursera_learning
haskell/will_kurt/14_six_sided_die.hs
mit
show S6 = "six"
15
show S6 = "six"
15
show S6 = "six"
15
false
false
0
5
3
9
4
5
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Texturing/Environments.hs
bsd-3-clause
marshalSrc :: Src -> GLint marshalSrc x = fromIntegral $ case x of CurrentUnit -> gl_TEXTURE Previous -> gl_PREVIOUS Crossbar u -> fromIntegral (marshalTextureUnit u) Constant -> gl_CONSTANT PrimaryColor -> gl_PRIMARY_COLOR
238
marshalSrc :: Src -> GLint marshalSrc x = fromIntegral $ case x of CurrentUnit -> gl_TEXTURE Previous -> gl_PREVIOUS Crossbar u -> fromIntegral (marshalTextureUnit u) Constant -> gl_CONSTANT PrimaryColor -> gl_PRIMARY_COLOR
238
marshalSrc x = fromIntegral $ case x of CurrentUnit -> gl_TEXTURE Previous -> gl_PREVIOUS Crossbar u -> fromIntegral (marshalTextureUnit u) Constant -> gl_CONSTANT PrimaryColor -> gl_PRIMARY_COLOR
211
false
true
7
9
45
73
33
40
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/NodeTypes/AggregatedList.hs
mpl-2.0
-- | Indicates whether every visible scope for each scope type (zone, region, -- global) should be included in the response. For new resource types added -- after this field, the flag has no effect as new resource types will -- always include every visible scope for each scope type in response. For -- resource types wh...
645
ntalIncludeAllScopes :: Lens' NodeTypesAggregatedList (Maybe Bool) ntalIncludeAllScopes = lens _ntalIncludeAllScopes (\ s a -> s{_ntalIncludeAllScopes = a})
164
ntalIncludeAllScopes = lens _ntalIncludeAllScopes (\ s a -> s{_ntalIncludeAllScopes = a})
97
true
true
0
9
111
54
31
23
null
null
elginer/Delve
src/VarApp.hs
gpl-3.0
-- apply the uniquification to alternative computations var_alts :: CoreAlternative -> VarAppM VCoreAlternative var_alts ca = do let ( s , ma ) = second var_exec_stmt_fold ca ma >>= return . (,) s
202
var_alts :: CoreAlternative -> VarAppM VCoreAlternative var_alts ca = do let ( s , ma ) = second var_exec_stmt_fold ca ma >>= return . (,) s
146
var_alts ca = do let ( s , ma ) = second var_exec_stmt_fold ca ma >>= return . (,) s
90
true
true
0
11
38
65
30
35
null
null
sonyandy/wart
src/Language/Wart/Type/Graphic.hs
bsd-3-clause
app :: (MonadSupply Int m, MonadUnionFind v m) => ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) -> ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) -> ReaderT (BindingFlag, Binder Kind v) m (v (Node Kind v)) -> ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) app m_f m_a = typ...
336
app :: (MonadSupply Int m, MonadUnionFind v m) => ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) -> ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) -> ReaderT (BindingFlag, Binder Kind v) m (v (Node Kind v)) -> ReaderT (BindingFlag, Binder Type v) m (v (Node Type v)) app m_f m_a = typ...
336
app m_f m_a = type' $ App m_f m_a
33
false
true
0
13
76
184
92
92
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\xF99C' = "\x5217"
33
decomposeChar '\xF99C' = "\x5217"
33
decomposeChar '\xF99C' = "\x5217"
33
false
false
1
5
3
13
4
9
null
null
rfdickerson/numerical-methods
src/NumericalMethods/Simple.hs
mit
member x (T _ a y b) | x < y = member x a | x > y = member x b | otherwise = True
90
member x (T _ a y b) | x < y = member x a | x > y = member x b | otherwise = True
90
member x (T _ a y b) | x < y = member x a | x > y = member x b | otherwise = True
90
false
false
0
8
35
65
29
36
null
null
3noch/covenanteyes-api-hs
src/CovenantEyes/Api/Internal/Time.hs
mit
addTimeOffset :: Nanosec -> UTCTime -> UTCTime addTimeOffset (Nanosec nanosec) = addUTCTime (realToFrac nanosec / nanoFactor)
125
addTimeOffset :: Nanosec -> UTCTime -> UTCTime addTimeOffset (Nanosec nanosec) = addUTCTime (realToFrac nanosec / nanoFactor)
125
addTimeOffset (Nanosec nanosec) = addUTCTime (realToFrac nanosec / nanoFactor)
78
false
true
0
8
15
45
21
24
null
null
gbaz/cabal
cabal-install/Distribution/Client/Dependency/Modular/Tree.hs
bsd-3-clause
innM (GoalChoiceF ts) = liftM (GoalChoice ) (sequence ts)
72
innM (GoalChoiceF ts) = liftM (GoalChoice ) (sequence ts)
72
innM (GoalChoiceF ts) = liftM (GoalChoice ) (sequence ts)
72
false
false
0
7
23
29
14
15
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs
mit
-- | 'freeStyleProjectDescription' Lens freeStyleProjectDescriptionL :: Lens_' FreeStyleProject (Maybe Text) freeStyleProjectDescriptionL f FreeStyleProject{..} = (\freeStyleProjectDescription -> FreeStyleProject { freeStyleProjectDescription, ..} ) <$> f freeStyleProjectDescription
283
freeStyleProjectDescriptionL :: Lens_' FreeStyleProject (Maybe Text) freeStyleProjectDescriptionL f FreeStyleProject{..} = (\freeStyleProjectDescription -> FreeStyleProject { freeStyleProjectDescription, ..} ) <$> f freeStyleProjectDescription
243
freeStyleProjectDescriptionL f FreeStyleProject{..} = (\freeStyleProjectDescription -> FreeStyleProject { freeStyleProjectDescription, ..} ) <$> f freeStyleProjectDescription
174
true
true
0
8
23
57
30
27
null
null
facebookincubator/duckling
Duckling/Time/FR/Rules.hs
bsd-3-clause
ruleDbutDeMatine :: Rule ruleDbutDeMatine = Rule { name = "début de matinée" , pattern = [ regex "le matin (tr(e|è)s )?t(ô|o)t|(tr(e|è)s )?t(ô|o)t le matin|(en |au )?d(é|e)but de (la )?matin(é|e)e" ] , prod = \_ -> Token Time . partOfDay <$> interval TTime.Open (hour False 7) (hour False 9) }
315
ruleDbutDeMatine :: Rule ruleDbutDeMatine = Rule { name = "début de matinée" , pattern = [ regex "le matin (tr(e|è)s )?t(ô|o)t|(tr(e|è)s )?t(ô|o)t le matin|(en |au )?d(é|e)but de (la )?matin(é|e)e" ] , prod = \_ -> Token Time . partOfDay <$> interval TTime.Open (hour False 7) (hour False 9) }
315
ruleDbutDeMatine = Rule { name = "début de matinée" , pattern = [ regex "le matin (tr(e|è)s )?t(ô|o)t|(tr(e|è)s )?t(ô|o)t le matin|(en |au )?d(é|e)but de (la )?matin(é|e)e" ] , prod = \_ -> Token Time . partOfDay <$> interval TTime.Open (hour False 7) (hour False 9) }
290
false
true
0
12
70
88
44
44
null
null
manuel-io/snake
Main.hs
mit
main :: IO () main = do ran <- Random.getStdGen play (InWindow "Snake" (round size + 20, round size + 20) (10, 10)) black 9 (World SUp (initSnake) (20, 20) 0 ran 0) (drawWorld squares) (handleEvent) (updateWorld squares) where initSnake = Snake (10, 10) [(10, 9), (10, 8), (10, 7), (10,...
358
main :: IO () main = do ran <- Random.getStdGen play (InWindow "Snake" (round size + 20, round size + 20) (10, 10)) black 9 (World SUp (initSnake) (20, 20) 0 ran 0) (drawWorld squares) (handleEvent) (updateWorld squares) where initSnake = Snake (10, 10) [(10, 9), (10, 8), (10, 7), (10,...
358
main = do ran <- Random.getStdGen play (InWindow "Snake" (round size + 20, round size + 20) (10, 10)) black 9 (World SUp (initSnake) (20, 20) 0 ran 0) (drawWorld squares) (handleEvent) (updateWorld squares) where initSnake = Snake (10, 10) [(10, 9), (10, 8), (10, 7), (10, 6)] squar...
344
false
true
2
12
93
202
104
98
null
null
onponomarev/ganeti
test/hs/Test/Ganeti/OpCodes.hs
bsd-2-clause
arbitraryPrivateJSObj :: Gen (J.JSObject (Private J.JSValue)) arbitraryPrivateJSObj = constructor <$> (fromNonEmpty <$> genNameNE) <*> (fromNonEmpty <$> genNameNE) where constructor k v = showPrivateJSObject [(k, v)] -- | JSObject of arbitrary secret data.
277
arbitraryPrivateJSObj :: Gen (J.JSObject (Private J.JSValue)) arbitraryPrivateJSObj = constructor <$> (fromNonEmpty <$> genNameNE) <*> (fromNonEmpty <$> genNameNE) where constructor k v = showPrivateJSObject [(k, v)] -- | JSObject of arbitrary secret data.
277
arbitraryPrivateJSObj = constructor <$> (fromNonEmpty <$> genNameNE) <*> (fromNonEmpty <$> genNameNE) where constructor k v = showPrivateJSObject [(k, v)] -- | JSObject of arbitrary secret data.
215
false
true
0
10
52
77
41
36
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Effective date of this order document. odEffectiveDate :: Lens' OrderDocument (Maybe Day) odEffectiveDate = lens _odEffectiveDate (\ s a -> s{_odEffectiveDate = a}) . mapping _Date
199
odEffectiveDate :: Lens' OrderDocument (Maybe Day) odEffectiveDate = lens _odEffectiveDate (\ s a -> s{_odEffectiveDate = a}) . mapping _Date
155
odEffectiveDate = lens _odEffectiveDate (\ s a -> s{_odEffectiveDate = a}) . mapping _Date
104
true
true
2
8
41
59
28
31
null
null
isovector/rpg-gen
src/RPG/Menu.hs
bsd-3-clause
drawMenu :: MenuState -> Prop drawMenu m = group . map (\(i, p) -> move (scaleRel i (rel 0 16)) p) . zip [0..] . map (uncurry drawMenuItem) . map (first (_menuSelected m ==)) . zip [0..] $ _menuItems m
267
drawMenu :: MenuState -> Prop drawMenu m = group . map (\(i, p) -> move (scaleRel i (rel 0 16)) p) . zip [0..] . map (uncurry drawMenuItem) . map (first (_menuSelected m ==)) . zip [0..] $ _menuItems m
267
drawMenu m = group . map (\(i, p) -> move (scaleRel i (rel 0 16)) p) . zip [0..] . map (uncurry drawMenuItem) . map (first (_menuSelected m ==)) . zip [0..] $ _menuItems m
237
false
true
0
18
105
120
60
60
null
null
three/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
-- NUMBERS --------------------------------------------- numAdd = DesignBlock "numAdd" (Function "+" [typeNumber, typeNumber, typeNumber]) [ Value "LEFT" [] ,Value "RIGHT" [TextE "+"] ] (Inline True) colorNumber (Tooltip "Add two numbers")
288
numAdd = DesignBlock "numAdd" (Function "+" [typeNumber, typeNumber, typeNumber]) [ Value "LEFT" [] ,Value "RIGHT" [TextE "+"] ] (Inline True) colorNumber (Tooltip "Add two numbers")
230
numAdd = DesignBlock "numAdd" (Function "+" [typeNumber, typeNumber, typeNumber]) [ Value "LEFT" [] ,Value "RIGHT" [TextE "+"] ] (Inline True) colorNumber (Tooltip "Add two numbers")
230
true
false
0
9
76
73
38
35
null
null
pascal-knodel/haskell-craft
Examples/· Recursion/· Primitive Recursion/Lists/And.hs
mit
and :: [Bool] -> Bool and [] = True
35
and :: [Bool] -> Bool and [] = True
35
and [] = True
13
false
true
0
6
8
27
13
14
null
null
mcmaniac/ghc
compiler/main/HscMain.hs
bsd-3-clause
knownKeyNames :: [Name] -- Put here to avoid loops involving DsMeta, knownKeyNames = -- where templateHaskellNames are defined map getName wiredInThings ++ basicKnownKeyNames #ifdef GHCI ++ templateHaskellNames
248
knownKeyNames :: [Name] knownKeyNames = -- where templateHaskellNames are defined map getName wiredInThings ++ basicKnownKeyNames #ifdef GHCI ++ templateHaskellNames
198
knownKeyNames = -- where templateHaskellNames are defined map getName wiredInThings ++ basicKnownKeyNames #ifdef GHCI ++ templateHaskellNames
174
true
true
4
7
64
40
18
22
null
null
andyarvanitis/Idris-dev
src/Idris/IdeSlave.hs
bsd-3-clause
-- The Boolean in ProofSearch means "search recursively" -- If it's False, that means "refine", i.e. apply the name and fill in any -- arguments which can be done by unification. sexpToCommand (SexpList (SymbolAtom "proof-search" : IntegerAtom line : StringAtom name : rest)) | [] <- rest = Just (ProofSearch True (fro...
801
sexpToCommand (SexpList (SymbolAtom "proof-search" : IntegerAtom line : StringAtom name : rest)) | [] <- rest = Just (ProofSearch True (fromInteger line) name [] Nothing) | [SexpList hintexp] <- rest , Just hints <- getHints hintexp = Just (ProofSearch True (fromInteger line) name hints Nothing) | [SexpList hi...
622
sexpToCommand (SexpList (SymbolAtom "proof-search" : IntegerAtom line : StringAtom name : rest)) | [] <- rest = Just (ProofSearch True (fromInteger line) name [] Nothing) | [SexpList hintexp] <- rest , Just hints <- getHints hintexp = Just (ProofSearch True (fromInteger line) name hints Nothing) | [SexpList hi...
622
true
false
0
12
202
254
121
133
null
null
GaloisInc/galua
galua-rts/src/Galua/Util/SizedVector.hs
mit
size :: SizedVector a -> IO Int size (SizedVector ref) = svCount <$> readIORef ref
82
size :: SizedVector a -> IO Int size (SizedVector ref) = svCount <$> readIORef ref
82
size (SizedVector ref) = svCount <$> readIORef ref
50
false
true
0
6
14
41
18
23
null
null
infotroph/pandoc
src/Text/Pandoc/Readers/Org/Blocks.hs
gpl-2.0
optionLine :: OrgParser () optionLine = try $ do key <- metaKey case key of "link" -> parseLinkFormat >>= uncurry addLinkFormat "options" -> () <$ sepBy spaces exportSetting _ -> mzero
211
optionLine :: OrgParser () optionLine = try $ do key <- metaKey case key of "link" -> parseLinkFormat >>= uncurry addLinkFormat "options" -> () <$ sepBy spaces exportSetting _ -> mzero
211
optionLine = try $ do key <- metaKey case key of "link" -> parseLinkFormat >>= uncurry addLinkFormat "options" -> () <$ sepBy spaces exportSetting _ -> mzero
184
false
true
0
12
57
70
33
37
null
null
scslab/iterIO
Examples/reliable/Target.hs
bsd-3-clause
nI :: (Monad m) => Int -> Iter L.ByteString m Bool nI n = do s <- upToI $ fromIntegral n case n - (fromIntegral $ L.length s) of 0 -> return True n' | n == n' -> return False n' -> nI n'
223
nI :: (Monad m) => Int -> Iter L.ByteString m Bool nI n = do s <- upToI $ fromIntegral n case n - (fromIntegral $ L.length s) of 0 -> return True n' | n == n' -> return False n' -> nI n'
223
nI n = do s <- upToI $ fromIntegral n case n - (fromIntegral $ L.length s) of 0 -> return True n' | n == n' -> return False n' -> nI n'
172
false
true
0
14
81
115
52
63
null
null
oldmanmike/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
constraintKindTyConName :: Name constraintKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Constraint") constraintKindTyConKey constraintKindTyCon
163
constraintKindTyConName :: Name constraintKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Constraint") constraintKindTyConKey constraintKindTyCon
163
constraintKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Constraint") constraintKindTyConKey constraintKindTyCon
131
false
true
0
7
13
34
15
19
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
lfoi :: Pattern Double -> ControlPattern lfoi = lfoint
54
lfoi :: Pattern Double -> ControlPattern lfoi = lfoint
54
lfoi = lfoint
13
false
true
0
7
8
25
10
15
null
null
MichielDerhaeg/stack
src/Stack/Prelude.hs
bsd-3-clause
mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b mapLeft f (Left a1) = Left (f a1)
85
mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b mapLeft f (Left a1) = Left (f a1)
85
mapLeft f (Left a1) = Left (f a1)
33
false
true
0
7
20
56
27
29
null
null
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeMaintenanceStartTime.hs
mpl-2.0
dmstrTimezone :: Lens' DescribeMaintenanceStartTimeResponse (Maybe Text) dmstrTimezone = lens _dmstrTimezone (\s a -> s { _dmstrTimezone = a })
143
dmstrTimezone :: Lens' DescribeMaintenanceStartTimeResponse (Maybe Text) dmstrTimezone = lens _dmstrTimezone (\s a -> s { _dmstrTimezone = a })
143
dmstrTimezone = lens _dmstrTimezone (\s a -> s { _dmstrTimezone = a })
70
false
true
1
9
18
50
24
26
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/BuildPaths.hs
bsd-3-clause
mkProfLibName :: UnitId -> String mkProfLibName lib = "lib" ++ getHSLibraryName lib ++ "_p" <.> "a"
100
mkProfLibName :: UnitId -> String mkProfLibName lib = "lib" ++ getHSLibraryName lib ++ "_p" <.> "a"
100
mkProfLibName lib = "lib" ++ getHSLibraryName lib ++ "_p" <.> "a"
66
false
true
0
8
16
33
16
17
null
null
ghorn/dynobud
dynobud/src/Dyno/DirectCollocation/Robust.hs
lgpl-3.0
-- dynamics residual and outputs errorDynamicsFunction :: forall x z u p r sx sz sw a . (View x, View z, View u, Viewable a) => (J x a -> J x a -> J z a -> J u a -> J p a -> S a -> J sx a -> J sx a -> J sz a -> J sw a -> J r a) -> (S :*: J p :*: J x :*: J (CollPoint x z u) :*: J sx :*: J sx :*: J sz :*: J...
519
errorDynamicsFunction :: forall x z u p r sx sz sw a . (View x, View z, View u, Viewable a) => (J x a -> J x a -> J z a -> J u a -> J p a -> S a -> J sx a -> J sx a -> J sz a -> J sw a -> J r a) -> (S :*: J p :*: J x :*: J (CollPoint x z u) :*: J sx :*: J sx :*: J sz :*: J sw) a -> J r a errorDynamicsFu...
486
errorDynamicsFunction dae (t :*: parm :*: x' :*: collPoint :*: sx' :*: sx :*: sz :*: sw) = r where CollPoint x z u = split collPoint r = dae x' x z u parm t sx' sx sz sw
181
true
true
1
20
167
306
149
157
null
null
pparkkin/eta
compiler/ETA/TypeCheck/TcSimplify.hs
bsd-3-clause
solveWanteds :: WantedConstraints -> TcS WantedConstraints -- so that the inert set doesn't mindlessly propagate. -- NB: wc_simples may be wanted /or/ derived now solveWanteds wanteds = do { traceTcS "solveWanteds {" (ppr wanteds) -- Try the simple bit, including insolubles. Solving insolubles a --...
1,178
solveWanteds :: WantedConstraints -> TcS WantedConstraints solveWanteds wanteds = do { traceTcS "solveWanteds {" (ppr wanteds) -- Try the simple bit, including insolubles. Solving insolubles a -- second time round is a bit of a waste; but the code is simple -- and the program is wrong anyw...
1,074
solveWanteds wanteds = do { traceTcS "solveWanteds {" (ppr wanteds) -- Try the simple bit, including insolubles. Solving insolubles a -- second time round is a bit of a waste; but the code is simple -- and the program is wrong anyway, and we don't run the danger -- of adding Deriv...
1,015
true
true
0
13
316
155
77
78
null
null
cohei/stock-value-prediction
Main.hs
mit
randomClassifier :: MonadRandom m => m Classifier randomClassifier = liftM const getRandom
90
randomClassifier :: MonadRandom m => m Classifier randomClassifier = liftM const getRandom
90
randomClassifier = liftM const getRandom
40
false
true
0
6
11
26
12
14
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a341 = []
9
a341 = []
9
a341 = []
9
false
false
1
6
2
12
4
8
null
null
phischu/haskell-declarations
src/haskell-declarations.hs
bsd-3-clause
fixBoolOpts :: BoolOptions -> BoolOptions fixBoolOpts boolopts = boolopts { lang = False }
96
fixBoolOpts :: BoolOptions -> BoolOptions fixBoolOpts boolopts = boolopts { lang = False }
96
fixBoolOpts boolopts = boolopts { lang = False }
54
false
true
0
7
19
35
16
19
null
null
styx/gtc
Gt/Core.hs
gpl-3.0
jresp_to_resp :: String -> Resp jresp_to_resp unparsed_json = foldr fill_resp br obj_list where obj_list = fromJSObject $ from_ok unparsed_json (decode unparsed_json :: Result (JSObject JSValue)) br = blank_resp
225
jresp_to_resp :: String -> Resp jresp_to_resp unparsed_json = foldr fill_resp br obj_list where obj_list = fromJSObject $ from_ok unparsed_json (decode unparsed_json :: Result (JSObject JSValue)) br = blank_resp
225
jresp_to_resp unparsed_json = foldr fill_resp br obj_list where obj_list = fromJSObject $ from_ok unparsed_json (decode unparsed_json :: Result (JSObject JSValue)) br = blank_resp
193
false
true
1
10
41
66
32
34
null
null
JPMoresmau/leksah
src/IDE/OSX.hs
gpl-2.0
updateMenu :: Application -> UIManager -> IDEM () updateMenu app uiManager = do ideR <- ask mbMenu <- nullToNothing $ uIManagerGetWidget uiManager "/ui/menubar" >>= unsafeCastTo MenuShell case mbMenu of Just menu -> do widgetHide menu applicationSetMenuBar app menu ...
1,244
updateMenu :: Application -> UIManager -> IDEM () updateMenu app uiManager = do ideR <- ask mbMenu <- nullToNothing $ uIManagerGetWidget uiManager "/ui/menubar" >>= unsafeCastTo MenuShell case mbMenu of Just menu -> do widgetHide menu applicationSetMenuBar app menu ...
1,244
updateMenu app uiManager = do ideR <- ask mbMenu <- nullToNothing $ uIManagerGetWidget uiManager "/ui/menubar" >>= unsafeCastTo MenuShell case mbMenu of Just menu -> do widgetHide menu applicationSetMenuBar app menu Nothing -> return () mbQuit <- nullToNoth...
1,194
false
true
0
12
329
314
136
178
null
null
twittner/swagger
src/Data/Swagger/Build/Api.hs
mpl-2.0
int64' :: DataType int64' = int64 id
36
int64' :: DataType int64' = int64 id
36
int64' = int64 id
17
false
true
0
5
6
14
7
7
null
null
snoyberg/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
mkErrDoc :: DynFlags -> SrcSpan -> PrintUnqualified -> ErrDoc -> ErrMsg mkErrDoc dflags = mk_err_msg dflags SevError
116
mkErrDoc :: DynFlags -> SrcSpan -> PrintUnqualified -> ErrDoc -> ErrMsg mkErrDoc dflags = mk_err_msg dflags SevError
116
mkErrDoc dflags = mk_err_msg dflags SevError
44
false
true
0
8
16
35
17
18
null
null
gnn/Hets
Common/IRI.hs
gpl-2.0
ipathAbs :: IRIParser st String ipathAbs = char '/' <:> option "" ipathRootLess
79
ipathAbs :: IRIParser st String ipathAbs = char '/' <:> option "" ipathRootLess
79
ipathAbs = char '/' <:> option "" ipathRootLess
47
false
true
0
6
12
28
13
15
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\xF96E' = "\x8449"
33
decomposeChar '\xF96E' = "\x8449"
33
decomposeChar '\xF96E' = "\x8449"
33
false
false
1
5
3
13
4
9
null
null
Helium4Haskell/helium
src/Helium/CodeGeneration/DerivingEq.hs
gpl-3.0
dataDictionary _ _ _ _ = error "pattern match failure in CodeGeneration.Deriving.dataDictionary"
96
dataDictionary _ _ _ _ = error "pattern match failure in CodeGeneration.Deriving.dataDictionary"
96
dataDictionary _ _ _ _ = error "pattern match failure in CodeGeneration.Deriving.dataDictionary"
96
false
false
0
5
11
18
8
10
null
null
HaskellForCats/HaskellForCats
30MinHaskell/3_1_QuickCheck.hs
mit
squares_prop x y = square (x +y) == x * x + 2 * x * y + y * y
61
squares_prop x y = square (x +y) == x * x + 2 * x * y + y * y
61
squares_prop x y = square (x +y) == x * x + 2 * x * y + y * y
61
false
false
0
14
20
49
24
25
null
null
rimmington/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
installCommand :: CommandUI InstallFlags installCommand = CommandUI { commandName = "install" , commandSynopsis = "Copy the files into the install locations. Run register." , commandDescription = Just $ \_ -> wrapText $ "Unlike the copy command, install calls the register command." ...
1,751
installCommand :: CommandUI InstallFlags installCommand = CommandUI { commandName = "install" , commandSynopsis = "Copy the files into the install locations. Run register." , commandDescription = Just $ \_ -> wrapText $ "Unlike the copy command, install calls the register command." ...
1,751
installCommand = CommandUI { commandName = "install" , commandSynopsis = "Copy the files into the install locations. Run register." , commandDescription = Just $ \_ -> wrapText $ "Unlike the copy command, install calls the register command." ++ "If you want to install into a loca...
1,710
false
true
0
16
489
336
193
143
null
null
LukeHoersten/prometheus
src/System/Metrics/Prometheus/Encode/Text/MetricId.hs
bsd-3-clause
textValue :: RealFloat f => f -> Text textValue x | isInfinite x && x > 0 = "+Inf" | isInfinite x && x < 0 = "-Inf" | isNaN x = "NaN" | otherwise = toStrict . toLazyText $ formatRealFloat Generic Nothing x
241
textValue :: RealFloat f => f -> Text textValue x | isInfinite x && x > 0 = "+Inf" | isInfinite x && x < 0 = "-Inf" | isNaN x = "NaN" | otherwise = toStrict . toLazyText $ formatRealFloat Generic Nothing x
241
textValue x | isInfinite x && x > 0 = "+Inf" | isInfinite x && x < 0 = "-Inf" | isNaN x = "NaN" | otherwise = toStrict . toLazyText $ formatRealFloat Generic Nothing x
203
false
true
0
10
79
98
44
54
null
null
rueshyna/gogol
gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs
mpl-2.0
-- | A list of keys that were not looked up due to resource constraints. The -- order of results in this field is undefined and has no relation to the -- order of the keys in the input. lrDeferred :: Lens' LookupResponse [Key] lrDeferred = lens _lrDeferred (\ s a -> s{_lrDeferred = a}) . _Default . _Coerc...
321
lrDeferred :: Lens' LookupResponse [Key] lrDeferred = lens _lrDeferred (\ s a -> s{_lrDeferred = a}) . _Default . _Coerce
135
lrDeferred = lens _lrDeferred (\ s a -> s{_lrDeferred = a}) . _Default . _Coerce
94
true
true
1
10
72
57
30
27
null
null
ekarayel/HTF
Test/Framework/BlackBoxTest.hs
lgpl-2.1
{- | A default value for the 'Diff' datatype that simple resorts to the @diff@ commandline utility. -} defaultDiff :: Diff defaultDiff expectFile real = case expectFile of Nothing -> return Nothing Just expect -> do mexe <- findExecutable "diff" let exe = case mexe of ...
2,619
defaultDiff :: Diff defaultDiff expectFile real = case expectFile of Nothing -> return Nothing Just expect -> do mexe <- findExecutable "diff" let exe = case mexe of Just p -> p Nothing -> error ("diff command not in path") ...
2,516
defaultDiff expectFile real = case expectFile of Nothing -> return Nothing Just expect -> do mexe <- findExecutable "diff" let exe = case mexe of Just p -> p Nothing -> error ("diff command not in path") (out, err, exi...
2,496
true
true
1
19
641
208
100
108
null
null
xmonad/xmonad-contrib
XMonad/Util/NamedScratchpad.hs
bsd-3-clause
allNamedScratchpadAction :: NamedScratchpads -> String -> X () allNamedScratchpadAction = someNamedScratchpadAction mapM_ runApplication
186
allNamedScratchpadAction :: NamedScratchpads -> String -> X () allNamedScratchpadAction = someNamedScratchpadAction mapM_ runApplication
186
allNamedScratchpadAction = someNamedScratchpadAction mapM_ runApplication
73
false
true
0
8
62
29
14
15
null
null
peterokagey/haskellOEIS
src/IntegerTriangles/A338201.hs
apache-2.0
a338201_list :: [Int] a338201_list = 0 : firstDifferences a338202_list
70
a338201_list :: [Int] a338201_list = 0 : firstDifferences a338202_list
70
a338201_list = 0 : firstDifferences a338202_list
48
false
true
2
7
8
28
12
16
null
null
yliu120/K3
src/Language/K3/Utils/Pretty/Syntax.hs
apache-2.0
decl' (details -> (DGenerator mp, cs, _)) = do msp <- mpDeclaration mp csps <- mapM decl cs return . vsep $ msp : csps
129
decl' (details -> (DGenerator mp, cs, _)) = do msp <- mpDeclaration mp csps <- mapM decl cs return . vsep $ msp : csps
129
decl' (details -> (DGenerator mp, cs, _)) = do msp <- mpDeclaration mp csps <- mapM decl cs return . vsep $ msp : csps
129
false
false
0
9
35
65
31
34
null
null
apyrgio/ganeti
test/hs/Test/Ganeti/OpCodes.hs
bsd-2-clause
-- | Small helper to check for a failed JSON deserialisation isJsonError :: J.Result a -> Bool isJsonError (J.Error _) = True
125
isJsonError :: J.Result a -> Bool isJsonError (J.Error _) = True
64
isJsonError (J.Error _) = True
30
true
true
0
8
21
32
16
16
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/Data/Sequence.hs
bsd-3-clause
-- Splitting -- | /O(log(min(i,n-i)))/. The first @i@ elements of a sequence. -- If @i@ is negative, @'take' i s@ yields the empty sequence. -- If the sequence contains fewer than @i@ elements, the whole sequence -- is returned. take :: Int -> Seq a -> Seq a take i = fst . splitAt i
305
take :: Int -> Seq a -> Seq a take i = fst . splitAt i
75
take i = fst . splitAt i
34
true
true
1
8
76
45
22
23
null
null
Mathnerd314/lamdu
src/Lamdu/CodeEdit/Settings.hs
gpl-3.0
defaultInfoMode :: InfoMode defaultInfoMode = None
50
defaultInfoMode :: InfoMode defaultInfoMode = None
50
defaultInfoMode = None
22
false
true
0
4
5
11
6
5
null
null
julienschmaltz/madl
src/Madl/Islands.hs
mit
maybeAddTrans :: Maybe (ComponentID, (AutomatonTransition, Int)) -> Island a -> Island a maybeAddTrans (Just p) = addTrans p
124
maybeAddTrans :: Maybe (ComponentID, (AutomatonTransition, Int)) -> Island a -> Island a maybeAddTrans (Just p) = addTrans p
124
maybeAddTrans (Just p) = addTrans p
35
false
true
0
8
17
56
27
29
null
null
kojiromike/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCExport n) f = return f { ibc_exports = n : ibc_exports f }
68
ibc i (IBCExport n) f = return f { ibc_exports = n : ibc_exports f }
68
ibc i (IBCExport n) f = return f { ibc_exports = n : ibc_exports f }
68
false
false
1
9
15
43
18
25
null
null
madjestic/b1
src/B1/Program/Chart/PriceLines.hs
bsd-3-clause
-- x, y, and 3 for color numLines = 10
39
numLines = 10
13
numLines = 10
13
true
false
1
5
10
11
4
7
null
null
bitemyapp/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isTauTyCon :: TyCon -> Bool -- Returns False for type synonyms whose expansion is a polytype isTauTyCon tc | Just (_, rhs) <- synTyConDefn_maybe tc = isTauTy rhs | otherwise = True
213
isTauTyCon :: TyCon -> Bool isTauTyCon tc | Just (_, rhs) <- synTyConDefn_maybe tc = isTauTy rhs | otherwise = True
148
isTauTyCon tc | Just (_, rhs) <- synTyConDefn_maybe tc = isTauTy rhs | otherwise = True
120
true
true
1
10
64
57
26
31
null
null
jdreaver/iris
experiments/btree.hs
mit
union :: Event a -> Event b -> Event () union e1 e2 = unionWith (\_ _ -> ()) (void e1) (void e2)
96
union :: Event a -> Event b -> Event () union e1 e2 = unionWith (\_ _ -> ()) (void e1) (void e2)
96
union e1 e2 = unionWith (\_ _ -> ()) (void e1) (void e2)
56
false
true
0
8
22
66
32
34
null
null
kim/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
oOwner :: Lens' Object Owner oOwner = lens _oOwner (\s a -> s { _oOwner = a })
78
oOwner :: Lens' Object Owner oOwner = lens _oOwner (\s a -> s { _oOwner = a })
78
oOwner = lens _oOwner (\s a -> s { _oOwner = a })
49
false
true
0
9
17
39
21
18
null
null
gcampax/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
assignMem_I64Code :: CmmExpr -> CmmExpr -> NatM InstrBlock assignMem_I64Code addrTree valueTree = do (hi_addr, lo_addr, addr_code) <- getI64Amodes addrTree ChildCode64 vcode rlo <- iselExpr64 valueTree let rhi = getHiVRegFromLo rlo -- Big-endian store ...
471
assignMem_I64Code :: CmmExpr -> CmmExpr -> NatM InstrBlock assignMem_I64Code addrTree valueTree = do (hi_addr, lo_addr, addr_code) <- getI64Amodes addrTree ChildCode64 vcode rlo <- iselExpr64 valueTree let rhi = getHiVRegFromLo rlo -- Big-endian store ...
471
assignMem_I64Code addrTree valueTree = do (hi_addr, lo_addr, addr_code) <- getI64Amodes addrTree ChildCode64 vcode rlo <- iselExpr64 valueTree let rhi = getHiVRegFromLo rlo -- Big-endian store mov_hi = ST II32 rhi hi_addr mov_lo = ...
412
false
true
0
11
149
125
63
62
null
null
EleDiaz/StoryTellerChat
app/Main.hs
bsd-3-clause
main :: IO () main = do token <- readFile "telegram.token" telegramBotServer . strip $ pack token
101
main :: IO () main = do token <- readFile "telegram.token" telegramBotServer . strip $ pack token
101
main = do token <- readFile "telegram.token" telegramBotServer . strip $ pack token
87
false
true
0
8
20
40
18
22
null
null
glguy/irc-core
src/Client/State/EditBox/Content.hs
isc
delete :: Content -> Content delete c = let Line n s = view line c in case splitAt n s of (preS, _:postS) -> set text (preS ++ postS) c _ -> case view below c of [] -> c b:bs -> set below bs . set text (s ++ b) ...
408
delete :: Content -> Content delete c = let Line n s = view line c in case splitAt n s of (preS, _:postS) -> set text (preS ++ postS) c _ -> case view below c of [] -> c b:bs -> set below bs . set text (s ++ b) ...
408
delete c = let Line n s = view line c in case splitAt n s of (preS, _:postS) -> set text (preS ++ postS) c _ -> case view below c of [] -> c b:bs -> set below bs . set text (s ++ b) ...
379
false
true
0
17
203
138
67
71
null
null
bitemyapp/morfette
src/GramLab/Morfette/BeamSearchChain.hs
bsd-2-clause
toModelFun :: FeatureSpec -> (M.Model Label Int String Double) -> Model toModelFun fs m = \ z -> M.distribution m (features fs z)
134
toModelFun :: FeatureSpec -> (M.Model Label Int String Double) -> Model toModelFun fs m = \ z -> M.distribution m (features fs z)
134
toModelFun fs m = \ z -> M.distribution m (features fs z)
62
false
true
0
9
27
58
29
29
null
null
gergoerdi/tinymicro-mos6502-kansas-lava
lava/TinyMicro/Board/MOS6502.hs
gpl-2.0
mos6502 :: (Clock clk) => CPUSocketIn clk -> CPUSocketOut clk mos6502 = fromCPU . fst . MOS6502.cpu . toCPU where toCPU :: (Clock clk) => CPUSocketIn clk -> MOS6502.CPUIn clk toCPU CPUSocketIn{..} = MOS6502.CPUIn{..} where cpuMemR = csMemR cpuNMI = high cpuIRQ = high cpuW...
511
mos6502 :: (Clock clk) => CPUSocketIn clk -> CPUSocketOut clk mos6502 = fromCPU . fst . MOS6502.cpu . toCPU where toCPU :: (Clock clk) => CPUSocketIn clk -> MOS6502.CPUIn clk toCPU CPUSocketIn{..} = MOS6502.CPUIn{..} where cpuMemR = csMemR cpuNMI = high cpuIRQ = high cpuW...
511
mos6502 = fromCPU . fst . MOS6502.cpu . toCPU where toCPU :: (Clock clk) => CPUSocketIn clk -> MOS6502.CPUIn clk toCPU CPUSocketIn{..} = MOS6502.CPUIn{..} where cpuMemR = csMemR cpuNMI = high cpuIRQ = high cpuWait = low fromCPU :: (Clock clk) => MOS6502.CPUOut clk ->...
449
false
true
0
8
146
175
91
84
null
null
synsem/texhs
src/Text/Doc/Filter/MultiFile.hs
gpl-3.0
extractAnchorsFromInline Pointer{} = []
39
extractAnchorsFromInline Pointer{} = []
39
extractAnchorsFromInline Pointer{} = []
39
false
false
0
6
3
15
7
8
null
null
ezyang/ghc
compiler/simplStg/StgStats.hs
bsd-3-clause
statExpr (StgLam {}) = panic "statExpr StgLam"
46
statExpr (StgLam {}) = panic "statExpr StgLam"
46
statExpr (StgLam {}) = panic "statExpr StgLam"
46
false
false
0
7
6
19
9
10
null
null
ghcjs/haddock-internal
vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString.hs
bsd-2-clause
maybeResult _ = Nothing
34
maybeResult _ = Nothing
34
maybeResult _ = Nothing
34
false
false
0
5
14
9
4
5
null
null
adituv/qbscript
src/Compiler/QbScript/AST.hs
bsd-3-clause
negLit (Xor x y) = Xor (negLit x) (negLit y)
44
negLit (Xor x y) = Xor (negLit x) (negLit y)
44
negLit (Xor x y) = Xor (negLit x) (negLit y)
44
false
false
0
7
9
34
16
18
null
null
brendanhay/gogol
gogol-cloudfunctions/gen/Network/Google/Resource/CloudFunctions/Projects/Locations/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pllUploadType :: Lens' ProjectsLocationsList (Maybe Text) pllUploadType = lens _pllUploadType (\ s a -> s{_pllUploadType = a})
205
pllUploadType :: Lens' ProjectsLocationsList (Maybe Text) pllUploadType = lens _pllUploadType (\ s a -> s{_pllUploadType = a})
134
pllUploadType = lens _pllUploadType (\ s a -> s{_pllUploadType = a})
76
true
true
1
9
34
52
25
27
null
null
dagit/mattermost-api
test/Tests/Util.hs
bsd-3-clause
createAccount :: UsersCreate -> TestM User createAccount account = do session <- getSession newUser <- liftIO $ mmUsersCreateWithSession session account print_ $ "account created for " <> (T.unpack $ usersCreateUsername account) return newUser
251
createAccount :: UsersCreate -> TestM User createAccount account = do session <- getSession newUser <- liftIO $ mmUsersCreateWithSession session account print_ $ "account created for " <> (T.unpack $ usersCreateUsername account) return newUser
251
createAccount account = do session <- getSession newUser <- liftIO $ mmUsersCreateWithSession session account print_ $ "account created for " <> (T.unpack $ usersCreateUsername account) return newUser
208
false
true
0
11
40
78
34
44
null
null
davmre/matrizer
src/Matrizer/Analysis.hs
gpl-2.0
updateBinaryProps MCholSolve props1 props2 _ _ = updateBinaryClosedProps [] props1 props2
89
updateBinaryProps MCholSolve props1 props2 _ _ = updateBinaryClosedProps [] props1 props2
89
updateBinaryProps MCholSolve props1 props2 _ _ = updateBinaryClosedProps [] props1 props2
89
false
false
0
6
10
26
12
14
null
null
keera-studios/hsQt
Qtc/Enums/Core/QAbstractFileEngine.hs
bsd-2-clause
eFileInfoAll :: FileFlag eFileInfoAll = ieFileFlag $ 268435455
64
eFileInfoAll :: FileFlag eFileInfoAll = ieFileFlag $ 268435455
64
eFileInfoAll = ieFileFlag $ 268435455
39
false
true
0
6
9
18
8
10
null
null
Mathnerd314/lamdu
src/Lamdu/Data/Expression/Load.hs
gpl-3.0
irefOfClosure :: MonadA m => PropertyClosure (Tag m) -> ExprI (Tag m) irefOfClosure = Property.value . propertyOfClosure
120
irefOfClosure :: MonadA m => PropertyClosure (Tag m) -> ExprI (Tag m) irefOfClosure = Property.value . propertyOfClosure
120
irefOfClosure = Property.value . propertyOfClosure
50
false
true
0
9
16
46
22
24
null
null
plietar/super-user-spark
test/Parser/Test.hs
mit
test_delim = parseItselfs delim $ [ ";" , "\n" , "\r" , "\n\r" , "\r\n" , "\n\r \t \n\t \n" ]
140
test_delim = parseItselfs delim $ [ ";" , "\n" , "\r" , "\n\r" , "\r\n" , "\n\r \t \n\t \n" ]
140
test_delim = parseItselfs delim $ [ ";" , "\n" , "\r" , "\n\r" , "\r\n" , "\n\r \t \n\t \n" ]
140
false
false
1
7
67
35
18
17
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFrom_6.hs
mit
toEnum2 MyTrue vy = EQ
22
toEnum2 MyTrue vy = EQ
22
toEnum2 MyTrue vy = EQ
22
false
false
1
5
4
16
5
11
null
null
TomMD/friday
src/Vision/Image/Transform.hs
lgpl-3.0
-- ^ Does a double linear interpolation over the four -- surrounding points (slow). -- | Maps the content of the image\'s rectangle in a new image. crop :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => Rect -> i1 -> i2 crop !(Rect rx ry rw rh) !img = fromFunction (...
396
crop :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => Rect -> i1 -> i2 crop !(Rect rx ry rw rh) !img = fromFunction (Z :. rh :. rw) $ \(Z :. y :. x) -> img `index` ix2 (ry + y) (rx + x)
225
crop !(Rect rx ry rw rh) !img = fromFunction (Z :. rh :. rw) $ \(Z :. y :. x) -> img `index` ix2 (ry + y) (rx + x)
126
true
true
0
10
113
129
67
62
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxFONTENCODING_CP437 :: Int wxFONTENCODING_CP437 = 20
53
wxFONTENCODING_CP437 :: Int wxFONTENCODING_CP437 = 20
53
wxFONTENCODING_CP437 = 20
25
false
true
0
4
5
11
6
5
null
null
thielema/optparse-applicative
Options/Applicative/Builder.hs
bsd-3-clause
-- | Disable parsing of regular options after arguments noIntersperse :: InfoMod a noIntersperse = InfoMod $ \p -> p { infoIntersperse = False }
144
noIntersperse :: InfoMod a noIntersperse = InfoMod $ \p -> p { infoIntersperse = False }
88
noIntersperse = InfoMod $ \p -> p { infoIntersperse = False }
61
true
true
2
7
24
42
20
22
null
null
nyirog/cis194
lec06.hs
unlicense
atCoord :: Coord -> Char -> Picture atCoord (C x y) c f = go where go :: DrawFun go x' y' | x == x' && y == y' = c | otherwise = f x' y'
158
atCoord :: Coord -> Char -> Picture atCoord (C x y) c f = go where go :: DrawFun go x' y' | x == x' && y == y' = c | otherwise = f x' y'
158
atCoord (C x y) c f = go where go :: DrawFun go x' y' | x == x' && y == y' = c | otherwise = f x' y'
122
false
true
0
10
59
97
43
54
null
null
karamellpelle/grid
source/OpenGL/ES2/Values.hs
gpl-3.0
gl_FRONT :: GLenum gl_FRONT = 0x0404
59
gl_FRONT :: GLenum gl_FRONT = 0x0404
59
gl_FRONT = 0x0404
40
false
true
0
4
28
11
6
5
null
null
sgillespie/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
mkConstr_RDR = varQual_RDR gENERICS (fsLit "mkConstr")
57
mkConstr_RDR = varQual_RDR gENERICS (fsLit "mkConstr")
57
mkConstr_RDR = varQual_RDR gENERICS (fsLit "mkConstr")
57
false
false
0
7
8
17
8
9
null
null
sgord512/Utilities
Util/Data.hs
mit
differences (x:y:xs) = (y - x) : differences (y:xs)
51
differences (x:y:xs) = (y - x) : differences (y:xs)
51
differences (x:y:xs) = (y - x) : differences (y:xs)
51
false
false
0
8
8
41
21
20
null
null
nek0/yammat
Handler/Avatar.hs
agpl-3.0
updateAvatar :: AvatarId -> AvatarMod -> Handler () updateAvatar aId (AvatarMod ident Nothing) = runDB $ update aId [AvatarIdent =. ident]
140
updateAvatar :: AvatarId -> AvatarMod -> Handler () updateAvatar aId (AvatarMod ident Nothing) = runDB $ update aId [AvatarIdent =. ident]
140
updateAvatar aId (AvatarMod ident Nothing) = runDB $ update aId [AvatarIdent =. ident]
88
false
true
2
8
22
61
27
34
null
null
codedmart/wai-middleware-static
Network/Wai/Middleware/Static.hs
bsd-3-clause
(<|>) :: Policy -> Policy -> Policy p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
107
(<|>) :: Policy -> Policy -> Policy p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
107
p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
71
false
true
0
10
21
62
31
31
null
null
markuspf/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSExt ITNative ITBig) [x] = v ++ "idris_castIntBig(vm, " ++ creg x ++ ")"
81
doOp v (LSExt ITNative ITBig) [x] = v ++ "idris_castIntBig(vm, " ++ creg x ++ ")"
81
doOp v (LSExt ITNative ITBig) [x] = v ++ "idris_castIntBig(vm, " ++ creg x ++ ")"
81
false
false
1
10
15
44
19
25
null
null
mgeorgoulopoulos/TetrisHaskellWeekend
Playfield.hs
mit
-- This one will create a 3-tuple of the cell and its coordinates (x,y,cell) -- It's going to be more convenient for the rendering module to just use these 3-tuples instead of manually unfolding the well coordCells :: Well -> [(Int, Int, Cell)] coordCells w = concat (map extractCells (numberRows w)) where ex...
485
coordCells :: Well -> [(Int, Int, Cell)] coordCells w = concat (map extractCells (numberRows w)) where extractCells (y, cs) = map extractCell (numberCells cs) where extractCell (x, c) = (x, y, c) -- Renders a piece in the Well
278
coordCells w = concat (map extractCells (numberRows w)) where extractCells (y, cs) = map extractCell (numberCells cs) where extractCell (x, c) = (x, y, c) -- Renders a piece in the Well
237
true
true
0
9
129
102
57
45
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter_14_my_note.hs
mit
assoc (Add e1 e2) = Add (assoc e1) (assoc e2)
57
assoc (Add e1 e2) = Add (assoc e1) (assoc e2)
57
assoc (Add e1 e2) = Add (assoc e1) (assoc e2)
57
false
false
0
7
21
35
16
19
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Builder/Prim.hs
mit
primUnfoldrBounded :: BoundedPrim b -> (a -> Maybe (b, a)) -> a -> Builder primUnfoldrBounded w f x0 = builder $ fillWith x0 where fillWith x k !(BufferRange op0 ope0) = go (f x) op0 where go !Nothing !op = do let !br' = BufferRange op ope0 ...
1,002
primUnfoldrBounded :: BoundedPrim b -> (a -> Maybe (b, a)) -> a -> Builder primUnfoldrBounded w f x0 = builder $ fillWith x0 where fillWith x k !(BufferRange op0 ope0) = go (f x) op0 where go !Nothing !op = do let !br' = BufferRange op ope0 ...
1,002
primUnfoldrBounded w f x0 = builder $ fillWith x0 where fillWith x k !(BufferRange op0 ope0) = go (f x) op0 where go !Nothing !op = do let !br' = BufferRange op ope0 k br' go !(Just (y, x')) !op | op `plusPtr` b...
927
false
true
4
11
342
291
134
157
null
null
freizl/hoauth2
hoauth2-example/src/IDP/Douban.hs
bsd-3-clause
doubanKey :: OAuth2 doubanKey = def { oauth2AuthorizeEndpoint = [uri|https://www.douban.com/service/auth2/auth|], oauth2TokenEndpoint = [uri|https://www.douban.com/service/auth2/token|] }
203
doubanKey :: OAuth2 doubanKey = def { oauth2AuthorizeEndpoint = [uri|https://www.douban.com/service/auth2/auth|], oauth2TokenEndpoint = [uri|https://www.douban.com/service/auth2/token|] }
203
doubanKey = def { oauth2AuthorizeEndpoint = [uri|https://www.douban.com/service/auth2/auth|], oauth2TokenEndpoint = [uri|https://www.douban.com/service/auth2/token|] }
183
false
true
0
7
29
37
24
13
null
null