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
CulpaBS/wbBach
src/Futhark/CodeGen/Backends/GenericC.hs
bsd-3-clause
envAllocate :: CompilerEnv op s -> Allocate op s envAllocate = opsAllocate . envOperations
90
envAllocate :: CompilerEnv op s -> Allocate op s envAllocate = opsAllocate . envOperations
90
envAllocate = opsAllocate . envOperations
41
false
true
0
6
13
29
14
15
null
null
ItsLastDay/academic_university_2016-2018
subjects/Haskell/sandbox/parser_applicative.hs
gpl-3.0
satisfy pred = Parser f where f (x:xs) | pred x = Just (xs, x) f _ = Nothing
84
satisfy pred = Parser f where f (x:xs) | pred x = Just (xs, x) f _ = Nothing
84
satisfy pred = Parser f where f (x:xs) | pred x = Just (xs, x) f _ = Nothing
84
false
false
0
10
26
55
26
29
null
null
Melvar/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
getErasureInfo :: IState -> Name -> [Int] getErasureInfo ist n = case lookupCtxtExact n (idris_optimisation ist) of Just (Optimise inacc detagg) -> map fst inacc Nothing -> []
195
getErasureInfo :: IState -> Name -> [Int] getErasureInfo ist n = case lookupCtxtExact n (idris_optimisation ist) of Just (Optimise inacc detagg) -> map fst inacc Nothing -> []
195
getErasureInfo ist n = case lookupCtxtExact n (idris_optimisation ist) of Just (Optimise inacc detagg) -> map fst inacc Nothing -> []
153
false
true
0
10
47
78
36
42
null
null
Ginto8/Lambda
src/Lambda.hs
bsd-3-clause
bind :: Lambda -> BoundLambda bind = go [] where go :: [String] -> Lambda -> BoundLambda go scope (Ap f x) = BAp (go scope f) (go scope x) go scope (Lam x fx) = BLam x $ go (x:scope) fx go scope (Name x) = maybe (BFreeVar x) BBoundVar $ findIndex (==x) sc...
323
bind :: Lambda -> BoundLambda bind = go [] where go :: [String] -> Lambda -> BoundLambda go scope (Ap f x) = BAp (go scope f) (go scope x) go scope (Lam x fx) = BLam x $ go (x:scope) fx go scope (Name x) = maybe (BFreeVar x) BBoundVar $ findIndex (==x) sc...
323
bind = go [] where go :: [String] -> Lambda -> BoundLambda go scope (Ap f x) = BAp (go scope f) (go scope x) go scope (Lam x fx) = BLam x $ go (x:scope) fx go scope (Name x) = maybe (BFreeVar x) BBoundVar $ findIndex (==x) scope
293
false
true
0
10
119
154
77
77
null
null
xkollar/handy-haskell
other/js-2014-10/main.hs
gpl-3.0
expandRage :: (Int, Int) -> [Int] expandRage = uncurry enumFromTo
65
expandRage :: (Int, Int) -> [Int] expandRage = uncurry enumFromTo
65
expandRage = uncurry enumFromTo
31
false
true
0
8
9
34
16
18
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/gcd_1.hs
mit
primEqInt (Neg (Succ x)) (Neg (Succ y)) = primEqNat x y
55
primEqInt (Neg (Succ x)) (Neg (Succ y)) = primEqNat x y
55
primEqInt (Neg (Succ x)) (Neg (Succ y)) = primEqNat x y
55
false
false
0
8
10
42
19
23
null
null
NightRa/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (ReflectionFailed msg err) = text "When attempting to perform error reflection, the following internal error occurred:" <> indented (pprintErr' i err) <> text ("This is probably a bug. Please consider reporting it at " ++ bugaddr)
249
pprintErr' i (ReflectionFailed msg err) = text "When attempting to perform error reflection, the following internal error occurred:" <> indented (pprintErr' i err) <> text ("This is probably a bug. Please consider reporting it at " ++ bugaddr)
249
pprintErr' i (ReflectionFailed msg err) = text "When attempting to perform error reflection, the following internal error occurred:" <> indented (pprintErr' i err) <> text ("This is probably a bug. Please consider reporting it at " ++ bugaddr)
249
false
false
0
9
43
51
24
27
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_LEX_PERL :: Int wxSTC_LEX_PERL = 6
40
wxSTC_LEX_PERL :: Int wxSTC_LEX_PERL = 6
40
wxSTC_LEX_PERL = 6
18
false
true
0
6
5
18
7
11
null
null
jprider63/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Return a 403 permission denied page. permissionDenied :: MonadHandler m => Text -> m a permissionDenied = hcError . PermissionDenied
137
permissionDenied :: MonadHandler m => Text -> m a permissionDenied = hcError . PermissionDenied
95
permissionDenied = hcError . PermissionDenied
45
true
true
0
7
21
30
15
15
null
null
spechub/Hets
CommonLogic/Sublogic.hs
gpl-2.0
slAppl :: Set.Set NAME -> CommonLogicSL -> TERM -> [TERM_SEQ] -> CommonLogicSL slAppl prds cs t tseq = comp_list $ (if isNameTerm t then folsl else impsl) : sl_term prds cs t : map (sl_termSeq prds cs) tseq
210
slAppl :: Set.Set NAME -> CommonLogicSL -> TERM -> [TERM_SEQ] -> CommonLogicSL slAppl prds cs t tseq = comp_list $ (if isNameTerm t then folsl else impsl) : sl_term prds cs t : map (sl_termSeq prds cs) tseq
210
slAppl prds cs t tseq = comp_list $ (if isNameTerm t then folsl else impsl) : sl_term prds cs t : map (sl_termSeq prds cs) tseq
131
false
true
6
10
41
100
46
54
null
null
begriffs/postgrest
src/PostgREST/Parsers.hs
mit
pColumns :: Parser [FieldName] pColumns = pFieldName `sepBy1` lexeme (char ',')
79
pColumns :: Parser [FieldName] pColumns = pFieldName `sepBy1` lexeme (char ',')
79
pColumns = pFieldName `sepBy1` lexeme (char ',')
48
false
true
0
7
10
41
19
22
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'Set.toDescList' s_toDescList = Set.toDescList
50
s_toDescList = Set.toDescList
29
s_toDescList = Set.toDescList
29
true
false
0
5
4
9
5
4
null
null
mariefarrell/Hets
Comorphisms/KnownProvers.hs
gpl-2.0
-- | a map of known prover names implemanting a GUI interface knownProversGUI :: Result KnownProversMap knownProversGUI = knownProversWithKind ProveGUI
151
knownProversGUI :: Result KnownProversMap knownProversGUI = knownProversWithKind ProveGUI
89
knownProversGUI = knownProversWithKind ProveGUI
47
true
true
0
6
19
23
10
13
null
null
UWNetworksLab/arrakis
hake/RuleDefs.hs
mit
------------------------------------------------------------------------- ------------------------------------------------------------------------- -- -- Hake macros (hacros?): each of these evaluates to HRule, i.e. a -- list of templates for Makefile rules -- ------------------------------------------------------...
734
compileCFile :: Options -> String -> HRule compileCFile opts src = Rules [ Rule (cCompiler opts "src" src (objectFilePath opts src)), Rule (makecToAssembler opts "src" src (objectFilePath opts src)), makeDependObj opts "src" src ]
268
compileCFile opts src = Rules [ Rule (cCompiler opts "src" src (objectFilePath opts src)), Rule (makecToAssembler opts "src" src (objectFilePath opts src)), makeDependObj opts "src" src ]
225
true
true
0
11
123
100
55
45
null
null
yesodweb/persistent
persistent/test/Database/Persist/TH/MigrationOnlySpec.hs
mit
spec :: Spec spec = describe "MigrationOnlySpec" $ do describe "HasMigrationOnly" $ do let edef = entityDef $ Proxy @HasMigrationOnly describe "getEntityFields" $ do it "has one field" $ do length (getEntityFields edef) `sho...
1,016
spec :: Spec spec = describe "MigrationOnlySpec" $ do describe "HasMigrationOnly" $ do let edef = entityDef $ Proxy @HasMigrationOnly describe "getEntityFields" $ do it "has one field" $ do length (getEntityFields edef) `sho...
1,016
spec = describe "MigrationOnlySpec" $ do describe "HasMigrationOnly" $ do let edef = entityDef $ Proxy @HasMigrationOnly describe "getEntityFields" $ do it "has one field" $ do length (getEntityFields edef) `shouldBe` 1 ...
1,003
false
true
0
22
405
239
107
132
null
null
bj4rtmar/sdl2
src/SDL/Raw/Event.hs
bsd-3-clause
flushEvent :: MonadIO m => Word32 -> m () flushEvent v1 = liftIO $ flushEvent' v1
81
flushEvent :: MonadIO m => Word32 -> m () flushEvent v1 = liftIO $ flushEvent' v1
81
flushEvent v1 = liftIO $ flushEvent' v1
39
false
true
0
8
15
37
17
20
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Input/InputConstants.hs
mit
scancodeQ :: Int scancodeQ = fromIntegral $ [C.pure| int {SCANCODE_Q} |]
72
scancodeQ :: Int scancodeQ = fromIntegral $ [C.pure| int {SCANCODE_Q} |]
72
scancodeQ = fromIntegral $ [C.pure| int {SCANCODE_Q} |]
55
false
true
0
6
10
21
13
8
null
null
tetigi/hlol
src/HLol/Simulation/PaperTrade.hs
agpl-3.0
evalLoss :: Bet -> Return evalLoss (Bet Lay _ odds front) = (front / odds) + front
83
evalLoss :: Bet -> Return evalLoss (Bet Lay _ odds front) = (front / odds) + front
83
evalLoss (Bet Lay _ odds front) = (front / odds) + front
57
false
true
0
7
17
41
21
20
null
null
ulricha/dsh
src/Database/DSH/VSL/Opt/Rewrite/Redundant.hs
bsd-3-clause
redundantRulesBottomUp :: VSLRuleSet TExpr TExpr BottomUpProps redundantRulesBottomUp = [ pullProjectMaterialize , distLiftNestJoin , alignCartProdRight ]
229
redundantRulesBottomUp :: VSLRuleSet TExpr TExpr BottomUpProps redundantRulesBottomUp = [ pullProjectMaterialize , distLiftNestJoin , alignCartProdRight ]
229
redundantRulesBottomUp = [ pullProjectMaterialize , distLiftNestJoin , alignCartProdRight ]
166
false
true
0
5
89
27
15
12
null
null
spetz911/progames
example_tga/example1.hs
mit
-- | Geometry data is a list of four 2D vertices. vertexBufferData :: [GLfloat] vertexBufferData = [-1, -1, 1, -1, -1, 1, 1, 1]
127
vertexBufferData :: [GLfloat] vertexBufferData = [-1, -1, 1, -1, -1, 1, 1, 1]
77
vertexBufferData = [-1, -1, 1, -1, -1, 1, 1, 1]
47
true
true
0
6
23
47
29
18
null
null
jyrimatti/alava
src-lib/HtmlPrint.hs
mit
error (ExpectedFunctionType _ trm typ) = toHtml $ unlines ["Expected a function type for:" ," " <> printETerm trm ,"but instead was:" ," " <> printETerm typ ]
170
error (ExpectedFunctionType _ trm typ) = toHtml $ unlines ["Expected a function type for:" ," " <> printETerm trm ,"but instead was:" ," " <> printETerm typ ]
170
error (ExpectedFunctionType _ trm typ) = toHtml $ unlines ["Expected a function type for:" ," " <> printETerm trm ,"but instead was:" ," " <> printETerm typ ]
170
false
false
0
7
39
53
26
27
null
null
vikraman/ghc
libraries/base/GHC/StaticPtr.hs
bsd-3-clause
-- | 'StaticPtrInfo' of the given 'StaticPtr'. staticPtrInfo :: StaticPtr a -> StaticPtrInfo staticPtrInfo (StaticPtr _ _ n _) = n
130
staticPtrInfo :: StaticPtr a -> StaticPtrInfo staticPtrInfo (StaticPtr _ _ n _) = n
83
staticPtrInfo (StaticPtr _ _ n _) = n
37
true
true
0
7
20
34
17
17
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GenerateSignupURL.hs
mpl-2.0
-- | Creates a value of 'EnterprisesGenerateSignupURL' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'egsuXgafv' -- -- * 'egsuUploadProtocol' -- -- * 'egsuCallbackURL' -- -- * 'egsuAccessToken' -- -- * 'egsuUploadType' -- -- * 'egsuC...
653
enterprisesGenerateSignupURL :: EnterprisesGenerateSignupURL enterprisesGenerateSignupURL = EnterprisesGenerateSignupURL' { _egsuXgafv = Nothing , _egsuUploadProtocol = Nothing , _egsuCallbackURL = Nothing , _egsuAccessToken = Nothing , _egsuUploadType = Nothing , _egsuCallback = Nothing ...
324
enterprisesGenerateSignupURL = EnterprisesGenerateSignupURL' { _egsuXgafv = Nothing , _egsuUploadProtocol = Nothing , _egsuCallbackURL = Nothing , _egsuAccessToken = Nothing , _egsuUploadType = Nothing , _egsuCallback = Nothing }
259
true
true
1
7
118
71
47
24
null
null
frankhucek/Todo
app/Main.hs
bsd-3-clause
removeItem (x:_) = do case readMaybe x :: Maybe Int of Nothing -> removeItem [] Just itemNum -> removeFromFile itemNum
165
removeItem (x:_) = do case readMaybe x :: Maybe Int of Nothing -> removeItem [] Just itemNum -> removeFromFile itemNum
165
removeItem (x:_) = do case readMaybe x :: Maybe Int of Nothing -> removeItem [] Just itemNum -> removeFromFile itemNum
165
false
false
0
11
66
56
25
31
null
null
snoyberg/ghc
compiler/types/Type.hs
bsd-3-clause
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
false
false
0
5
20
17
7
10
null
null
stappit/fit-parser
library/WordParsers.hs
gpl-3.0
combine :: Bits a => Int -> Arch -> a -> a -> a combine offset arch w1 w2 = case arch of BigEndian -> (w1 `shiftL` offset) `xor` w2 _ -> (w2 `shiftL` offset) `xor` w1
178
combine :: Bits a => Int -> Arch -> a -> a -> a combine offset arch w1 w2 = case arch of BigEndian -> (w1 `shiftL` offset) `xor` w2 _ -> (w2 `shiftL` offset) `xor` w1
178
combine offset arch w1 w2 = case arch of BigEndian -> (w1 `shiftL` offset) `xor` w2 _ -> (w2 `shiftL` offset) `xor` w1
130
false
true
0
10
48
89
49
40
null
null
li-zhirui/EoplLangs
src/LetLang/Evaluator.hs
bsd-3-clause
evalBinOpExpr :: BinOp -> Expression -> Expression -> Environment -> EvaluateResult evalBinOpExpr op expr1 expr2 env = do v1 <- valueOf expr1 env v2 <- valueOf expr2 env numToNum v1 v2 <|> numToBool v1 v2 <|> boolToBool v1 v2 where findOpFrom = tryFindOp op unpackN = unpackNum $ "binary o...
1,087
evalBinOpExpr :: BinOp -> Expression -> Expression -> Environment -> EvaluateResult evalBinOpExpr op expr1 expr2 env = do v1 <- valueOf expr1 env v2 <- valueOf expr2 env numToNum v1 v2 <|> numToBool v1 v2 <|> boolToBool v1 v2 where findOpFrom = tryFindOp op unpackN = unpackNum $ "binary o...
1,087
evalBinOpExpr op expr1 expr2 env = do v1 <- valueOf expr1 env v2 <- valueOf expr2 env numToNum v1 v2 <|> numToBool v1 v2 <|> boolToBool v1 v2 where findOpFrom = tryFindOp op unpackN = unpackNum $ "binary operation " `mappend` show op unpackB = unpackBool $ "binary operation " `mappend` show op ...
989
false
true
30
10
287
317
157
160
null
null
RobinKrom/BtcExchanges
src/Data/Btce.hs
bsd-3-clause
readBtcePairs "usd_rur" = UsdRur
32
readBtcePairs "usd_rur" = UsdRur
32
readBtcePairs "usd_rur" = UsdRur
32
false
false
0
5
3
9
4
5
null
null
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Types.hs
bsd-3-clause
readyPackageKey :: Compiler -> ReadyPackage -> PackageKey readyPackageKey comp (ReadyPackage pkg _ _ deps) = mkPackageKey (packageKeySupported comp) (packageId pkg) (map packageKey deps) []
210
readyPackageKey :: Compiler -> ReadyPackage -> PackageKey readyPackageKey comp (ReadyPackage pkg _ _ deps) = mkPackageKey (packageKeySupported comp) (packageId pkg) (map packageKey deps) []
210
readyPackageKey comp (ReadyPackage pkg _ _ deps) = mkPackageKey (packageKeySupported comp) (packageId pkg) (map packageKey deps) []
152
false
true
0
7
44
67
33
34
null
null
plow-technologies/cabal
cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
bsd-3-clause
simplifyVar (S qsn) = S qsn
33
simplifyVar (S qsn) = S qsn
33
simplifyVar (S qsn) = S qsn
33
false
false
0
6
11
19
8
11
null
null
brendanhay/gogol
gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs
mpl-2.0
-- | The status of the blog. bStatus :: Lens' Blog (Maybe BlogStatus) bStatus = lens _bStatus (\ s a -> s{_bStatus = a})
120
bStatus :: Lens' Blog (Maybe BlogStatus) bStatus = lens _bStatus (\ s a -> s{_bStatus = a})
91
bStatus = lens _bStatus (\ s a -> s{_bStatus = a})
50
true
true
2
9
23
55
25
30
null
null
hesselink/stack
src/Path/IO.hs
bsd-3-clause
-- | Does the given directory exist? dirExists :: MonadIO m => Path b Dir -> m Bool dirExists = liftIO . doesDirectoryExist . toFilePath
140
dirExists :: MonadIO m => Path b Dir -> m Bool dirExists = liftIO . doesDirectoryExist . toFilePath
103
dirExists = liftIO . doesDirectoryExist . toFilePath
56
true
true
0
7
28
39
19
20
null
null
amccausl/Swish
Swish/HaskellRDF/RDFProofContext.hs
lgpl-2.1
-- Define ruleset for RDFS inference rulesetRDFS = makeRuleset scopeRDFS axiomsRDFS rulesRDFS
97
rulesetRDFS = makeRuleset scopeRDFS axiomsRDFS rulesRDFS
56
rulesetRDFS = makeRuleset scopeRDFS axiomsRDFS rulesRDFS
56
true
false
0
5
15
14
7
7
null
null
niklasbroberg/flowlocks-framework
src/Security/InfoFlow/Policy/FlowLocks/Actor.hs
bsd-3-clause
allMayEq _ _ = False
20
allMayEq _ _ = False
20
allMayEq _ _ = False
20
false
false
0
5
4
11
5
6
null
null
lukexi/bindings-Oculus
test/case1/Main.hs
apache-2.0
genColorFrameBuffer :: TextureObject -> GLsizei -> GLsizei -> IO FramebufferObject genColorFrameBuffer tex width height = do traceIO $ "tex size = " ++ (show (width,height)) !fbo <- genObjectName :: IO FramebufferObject bindFramebuffer Framebuffer $= fbo !rbo <- genObjectName :: IO RenderbufferObject bindRe...
782
genColorFrameBuffer :: TextureObject -> GLsizei -> GLsizei -> IO FramebufferObject genColorFrameBuffer tex width height = do traceIO $ "tex size = " ++ (show (width,height)) !fbo <- genObjectName :: IO FramebufferObject bindFramebuffer Framebuffer $= fbo !rbo <- genObjectName :: IO RenderbufferObject bindRe...
782
genColorFrameBuffer tex width height = do traceIO $ "tex size = " ++ (show (width,height)) !fbo <- genObjectName :: IO FramebufferObject bindFramebuffer Framebuffer $= fbo !rbo <- genObjectName :: IO RenderbufferObject bindRenderbuffer Renderbuffer $= rbo renderbufferStorage Renderbuffer DepthComponent' ...
699
false
true
0
10
134
194
87
107
null
null
darnuria/Yasc
Lisp.hs
mit
trapError :: (Show e, MonadError e m) => m String -> m String trapError action = catchError action (return . show)
114
trapError :: (Show e, MonadError e m) => m String -> m String trapError action = catchError action (return . show)
114
trapError action = catchError action (return . show)
52
false
true
0
7
20
53
26
27
null
null
kawamuray/ganeti
test/hs/Test/Ganeti/JQueue.hs
gpl-2.0
case_JobStatusDef :: Assertion case_JobStatusDef = do ej <- emptyJob assertEqual "for job status" JOB_STATUS_SUCCESS $ calcJobStatus ej -- | Test some job status properties.
178
case_JobStatusDef :: Assertion case_JobStatusDef = do ej <- emptyJob assertEqual "for job status" JOB_STATUS_SUCCESS $ calcJobStatus ej -- | Test some job status properties.
178
case_JobStatusDef = do ej <- emptyJob assertEqual "for job status" JOB_STATUS_SUCCESS $ calcJobStatus ej -- | Test some job status properties.
147
false
true
0
8
28
34
16
18
null
null
edsko/hackage-server
Distribution/Server/Features/Votes.hs
bsd-3-clause
initVotesFeature :: ServerEnv -> IO ( CoreFeature -> UserFeature -> IO VotesFeature) initVotesFeature env@ServerEnv{serverStateDir} = do dbVotesState <- votesStateComponent serverStateDir updateVotes <- newHook return $ \coref@CoreFeature{...
536
initVotesFeature :: ServerEnv -> IO ( CoreFeature -> UserFeature -> IO VotesFeature) initVotesFeature env@ServerEnv{serverStateDir} = do dbVotesState <- votesStateComponent serverStateDir updateVotes <- newHook return $ \coref@CoreFeature{...
536
initVotesFeature env@ServerEnv{serverStateDir} = do dbVotesState <- votesStateComponent serverStateDir updateVotes <- newHook return $ \coref@CoreFeature{..} userf@UserFeature{..} -> do let feature = votesFeature env dbVotesState coref userf updateVotes ret...
388
false
true
3
15
175
125
59
66
null
null
diku-dk/futhark
src/Futhark/Optimise/Simplify/Engine.hs
isc
protectIf :: MonadBuilder m => Protect m -> (Exp (Rep m) -> Bool) -> SubExp -> Stm (Rep m) -> m () protectIf _ _ taken (Let pat aux (If cond taken_body untaken_body (IfDec if_ts IfFallback))) = do cond' <- letSubExp "protect_cond_conj" $ BasicOp $ BinOp LogAnd taken cond auxing aux . letBind pat $ I...
376
protectIf :: MonadBuilder m => Protect m -> (Exp (Rep m) -> Bool) -> SubExp -> Stm (Rep m) -> m () protectIf _ _ taken (Let pat aux (If cond taken_body untaken_body (IfDec if_ts IfFallback))) = do cond' <- letSubExp "protect_cond_conj" $ BasicOp $ BinOp LogAnd taken cond auxing aux . letBind pat $ I...
376
protectIf _ _ taken (Let pat aux (If cond taken_body untaken_body (IfDec if_ts IfFallback))) = do cond' <- letSubExp "protect_cond_conj" $ BasicOp $ BinOp LogAnd taken cond auxing aux . letBind pat $ If cond' taken_body untaken_body $ IfDec if_ts IfFallback
265
false
true
0
17
82
165
76
89
null
null
edsko/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
selectNeededSubset :: PackageIndex InstalledPackage -> PackageIndex SourcePackage -> Set PackageName -> (PackageIndex InstalledPackage ,PackageIndex SourcePackage) selectNeededSubset installedPkgIndex sourcePkgIndex = select mempty mempty ...
2,481
selectNeededSubset :: PackageIndex InstalledPackage -> PackageIndex SourcePackage -> Set PackageName -> (PackageIndex InstalledPackage ,PackageIndex SourcePackage) selectNeededSubset installedPkgIndex sourcePkgIndex = select mempty mempty ...
2,481
selectNeededSubset installedPkgIndex sourcePkgIndex = select mempty mempty where select :: PackageIndex InstalledPackage -> PackageIndex SourcePackage -> Set PackageName -> (PackageIndex InstalledPackage ,PackageIndex SourcePackage) select installedPkgIndex' sour...
2,238
false
true
8
13
842
371
184
187
null
null
keithodulaigh/Hets
Common/Result.hs
gpl-2.0
-- | change the diag kind of a diagnosis updDiagKind :: (DiagKind -> DiagKind) -> Diagnosis -> Diagnosis updDiagKind f d = d { diagKind = f $ diagKind d }
154
updDiagKind :: (DiagKind -> DiagKind) -> Diagnosis -> Diagnosis updDiagKind f d = d { diagKind = f $ diagKind d }
113
updDiagKind f d = d { diagKind = f $ diagKind d }
49
true
true
0
9
30
53
26
27
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
fMinorS b = makeScale MinorS df1 b
35
dfMinorS b = makeScale MinorS df1 b
35
dfMinorS b = makeScale MinorS df1 b
35
false
false
0
5
7
16
7
9
null
null
dillonhuff/DifferenceLogic
src/DifferenceLogic/Solver.hs
bsd-3-clause
-- |Predicate '>=' geq = Geq
28
geq = Geq
9
geq = Geq
9
true
false
0
4
5
7
4
3
null
null
txkaduo/weixin-mp-sdk
WeiXin/PublicPlatform/Acid.hs
mit
wxppAcidLookupCachedUnionID :: WxppOpenID -> WxppAppID -> Query WxppAcidState (Maybe (Maybe WxppUnionID, UTCTime)) wxppAcidLookupCachedUnionID open_id app_id = asks $ fmap ((endUserQueryResultUnionID . _unTimeTag) &&& _ttTime). Map.lookup (open_id, app_id) . _wxppAcidStateCachedUserInfo
319
wxppAcidLookupCachedUnionID :: WxppOpenID -> WxppAppID -> Query WxppAcidState (Maybe (Maybe WxppUnionID, UTCTime)) wxppAcidLookupCachedUnionID open_id app_id = asks $ fmap ((endUserQueryResultUnionID . _unTimeTag) &&& _ttTime). Map.lookup (open_id, app_id) . _wxppAcidStateCachedUserInfo
319
wxppAcidLookupCachedUnionID open_id app_id = asks $ fmap ((endUserQueryResultUnionID . _unTimeTag) &&& _ttTime). Map.lookup (open_id, app_id) . _wxppAcidStateCachedUserInfo
200
false
true
0
12
60
84
43
41
null
null
rgrinberg/wai
warp/Network/Wai/Handler/Warp/HTTP2/Types.hs
mit
search :: StreamTable -> M.Key -> IO (Maybe Stream) search strmtbl k = M.lookup k <$> reaperRead strmtbl
104
search :: StreamTable -> M.Key -> IO (Maybe Stream) search strmtbl k = M.lookup k <$> reaperRead strmtbl
104
search strmtbl k = M.lookup k <$> reaperRead strmtbl
52
false
true
0
9
17
47
22
25
null
null
cutsea110/aop
src/DualityOfSorts.hs
bsd-3-clause
fromSList (In (SCons x xs)) = x:fromSList xs
44
fromSList (In (SCons x xs)) = x:fromSList xs
44
fromSList (In (SCons x xs)) = x:fromSList xs
44
false
false
0
9
7
30
14
16
null
null
brunjlar/neural
src/Data/Utils/Pipes.hs
mit
-- | Converts a stream of 'ByteString's into a stream of 'Word8's. -- toWord8 :: Monad m => Pipe ByteString Word8 m () toWord8 = forever $ await >>= each . unpack
162
toWord8 :: Monad m => Pipe ByteString Word8 m () toWord8 = forever $ await >>= each . unpack
92
toWord8 = forever $ await >>= each . unpack
43
true
true
0
7
31
43
22
21
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/URLMaps/Update.hs
mpl-2.0
-- | Name of the UrlMap resource to update. umuURLMap :: Lens' URLMapsUpdate Text umuURLMap = lens _umuURLMap (\ s a -> s{_umuURLMap = a})
140
umuURLMap :: Lens' URLMapsUpdate Text umuURLMap = lens _umuURLMap (\ s a -> s{_umuURLMap = a})
96
umuURLMap = lens _umuURLMap (\ s a -> s{_umuURLMap = a})
58
true
true
0
9
26
42
22
20
null
null
sebastian-philipp/r-tree
test/RTreeProperties.hs
mit
t_2 = singleton t_mbb2 "b"
26
t_2 = singleton t_mbb2 "b"
26
t_2 = singleton t_mbb2 "b"
26
false
false
1
5
4
14
5
9
null
null
rukokarasu/squigly-trace
src/Color.hs
mit
white :: RGB white = rgb 1 1 1
30
white :: RGB white = rgb 1 1 1
30
white = rgb 1 1 1
17
false
true
0
5
8
18
9
9
null
null
jozefg/pcf
src/Language/Pcf.hs
mit
typeCheck env (V a) = MaybeT . return $ M.lookup a env
54
typeCheck env (V a) = MaybeT . return $ M.lookup a env
54
typeCheck env (V a) = MaybeT . return $ M.lookup a env
54
false
false
0
7
11
32
15
17
null
null
romanb/amazonka
amazonka-sts/gen/Network/AWS/STS/Types.hs
mpl-2.0
-- | The ARN that specifies the federated user that is associated with the -- credentials. For more information about ARNs and how to use them in policies, -- see Identifiers for IAM Entities in /Using IAM/. fuArn :: Lens' FederatedUser Text fuArn = lens _fuArn (\s a -> s { _fuArn = a })
288
fuArn :: Lens' FederatedUser Text fuArn = lens _fuArn (\s a -> s { _fuArn = a })
80
fuArn = lens _fuArn (\s a -> s { _fuArn = a })
46
true
true
0
9
54
49
25
24
null
null
gnn/Hets
TPTP/Pretty.hs
gpl-2.0
-- <general_terms> ::= <general_term> | <general_term>,<general_terms> printGeneral_terms :: General_terms -> Doc printGeneral_terms = sepByCommas . map pretty
166
printGeneral_terms :: General_terms -> Doc printGeneral_terms = sepByCommas . map pretty
88
printGeneral_terms = sepByCommas . map pretty
45
true
true
0
6
23
23
12
11
null
null
neothemachine/monadiccp
src/Control/CP/FD/FD.hs
bsd-3-clause
addBoolVar :: FDSolver s => EGVarId -> FDBoolSpecType s -> (FDBoolSpec s, Maybe EGBoolPar) -> FDInstance s () addBoolVar id typ (spec@(rs,_)) = do -- debug ("addBoolVar id="++(show id)++" typ="++(show typ)++" spec="++(show spec)) $ return () s <- get case (Map.lookup id $ fdsBoolVars s) of Just t | not (Set.nu...
840
addBoolVar :: FDSolver s => EGVarId -> FDBoolSpecType s -> (FDBoolSpec s, Maybe EGBoolPar) -> FDInstance s () addBoolVar id typ (spec@(rs,_)) = do -- debug ("addBoolVar id="++(show id)++" typ="++(show typ)++" spec="++(show spec)) $ return () s <- get case (Map.lookup id $ fdsBoolVars s) of Just t | not (Set.nu...
840
addBoolVar id typ (spec@(rs,_)) = do -- debug ("addBoolVar id="++(show id)++" typ="++(show typ)++" spec="++(show spec)) $ return () s <- get case (Map.lookup id $ fdsBoolVars s) of Just t | not (Set.null $ fdspBoolTypes t) -> case (fdspBoolSpec t Nothing) of Just x -> fdEqualBool rs x Nothing -> ca...
730
false
true
0
18
207
316
151
165
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Coverage.hs
bsd-3-clause
setState :: (TickTransState -> TickTransState) -> TM () setState f = TM $ \ _ st -> ((), noFVs, f st)
101
setState :: (TickTransState -> TickTransState) -> TM () setState f = TM $ \ _ st -> ((), noFVs, f st)
101
setState f = TM $ \ _ st -> ((), noFVs, f st)
45
false
true
0
8
20
55
29
26
null
null
shayan-najd/HsParser
OutputableInstances.hs
gpl-3.0
pprCmdArg :: (OutputableBndr id) => HsCmdTop id -> SDoc pprCmdArg (HsCmdTop cmd@(L _ (HsCmdArrForm _ Nothing []))) = ppr_lcmd cmd
131
pprCmdArg :: (OutputableBndr id) => HsCmdTop id -> SDoc pprCmdArg (HsCmdTop cmd@(L _ (HsCmdArrForm _ Nothing []))) = ppr_lcmd cmd
131
pprCmdArg (HsCmdTop cmd@(L _ (HsCmdArrForm _ Nothing []))) = ppr_lcmd cmd
75
false
true
0
12
21
67
32
35
null
null
drhodes/jade2hdl
jade-decode/src/Jade/Decode/Sig.hs
bsd-3-clause
hex :: Parser Integer hex = do string "0" n <- TPN.hexadecimal return n
89
hex :: Parser Integer hex = do string "0" n <- TPN.hexadecimal return n
89
hex = do string "0" n <- TPN.hexadecimal return n
67
false
true
1
9
31
39
15
24
null
null
tismith/tlisp
write-yourself-a-scheme/listings/listing3.3.hs
mit
parseNumber :: Parser LispVal parseNumber = liftM (Number . read) $ many1 digit
79
parseNumber :: Parser LispVal parseNumber = liftM (Number . read) $ many1 digit
79
parseNumber = liftM (Number . read) $ many1 digit
49
false
true
0
8
12
31
15
16
null
null
jfischoff/minimal-resource-protocol
src/MRP/QuasiQuoter.hs
bsd-3-clause
typenames :: [String] typenames = ["ResourceEnv", "Resource", "ByteString", "CreateInput", "CreateOutput", "DeleteInput", "DeleteOutput", "GetInput", "GetOutput", "PutInput", "PutOutput", "RunInput", "RunOutput"]
222
typenames :: [String] typenames = ["ResourceEnv", "Resource", "ByteString", "CreateInput", "CreateOutput", "DeleteInput", "DeleteOutput", "GetInput", "GetOutput", "PutInput", "PutOutput", "RunInput", "RunOutput"]
222
typenames = ["ResourceEnv", "Resource", "ByteString", "CreateInput", "CreateOutput", "DeleteInput", "DeleteOutput", "GetInput", "GetOutput", "PutInput", "PutOutput", "RunInput", "RunOutput"]
200
false
true
0
7
27
60
35
25
null
null
RAFIRAF/HASKELL
baby.hs
mit
filterf :: (Foldable t) => (a->Bool)->t a ->[a] filterf p = foldr (\x acc -> if (p x) then x:acc else acc) []
111
filterf :: (Foldable t) => (a->Bool)->t a ->[a] filterf p = foldr (\x acc -> if (p x) then x:acc else acc) []
111
filterf p = foldr (\x acc -> if (p x) then x:acc else acc) []
62
false
true
0
10
24
85
43
42
null
null
beni55/ghcjs
test/pkg/base/Numeric/num008.hs
mit
main = do let dbls = map (shEFloat (Just 7)) doubles ++ map (shEFloat (Just 0)) doubles ++ map (shEFloat Nothing) doubles ++ map (shFFloat (Just 7)) doubles ++ map (shFFloat (Just 0)) doubles ++ map (shFFloat Nothing) doubles ++ map (s...
998
main = do let dbls = map (shEFloat (Just 7)) doubles ++ map (shEFloat (Just 0)) doubles ++ map (shEFloat Nothing) doubles ++ map (shFFloat (Just 7)) doubles ++ map (shFFloat (Just 0)) doubles ++ map (shFFloat Nothing) doubles ++ map (s...
998
main = do let dbls = map (shEFloat (Just 7)) doubles ++ map (shEFloat (Just 0)) doubles ++ map (shEFloat Nothing) doubles ++ map (shFFloat (Just 7)) doubles ++ map (shFFloat (Just 0)) doubles ++ map (shFFloat Nothing) doubles ++ map (s...
998
false
false
0
22
363
217
104
113
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Coverage.hs
bsd-3-clause
addTickHsExpr e@(HsTcBracketOut {}) = return e
47
addTickHsExpr e@(HsTcBracketOut {}) = return e
47
addTickHsExpr e@(HsTcBracketOut {}) = return e
47
false
false
0
8
6
22
11
11
null
null
fmapfmapfmap/amazonka
amazonka-swf/test/Test/AWS/Gen/SWF.hs
mpl-2.0
testGetWorkflowExecutionHistory :: GetWorkflowExecutionHistory -> TestTree testGetWorkflowExecutionHistory = req "GetWorkflowExecutionHistory" "fixture/GetWorkflowExecutionHistory.yaml"
193
testGetWorkflowExecutionHistory :: GetWorkflowExecutionHistory -> TestTree testGetWorkflowExecutionHistory = req "GetWorkflowExecutionHistory" "fixture/GetWorkflowExecutionHistory.yaml"
193
testGetWorkflowExecutionHistory = req "GetWorkflowExecutionHistory" "fixture/GetWorkflowExecutionHistory.yaml"
118
false
true
0
5
17
21
10
11
null
null
TomMD/ghc
compiler/types/Type.hs
bsd-3-clause
zipTyEnv :: [TyVar] -> [Type] -> TvSubstEnv zipTyEnv tyvars tys | debugIsOn && (length tyvars /= length tys) = pprTrace "zipTyEnv" (ppr tyvars $$ ppr tys) emptyVarEnv | otherwise = zip_ty_env tyvars tys emptyVarEnv
222
zipTyEnv :: [TyVar] -> [Type] -> TvSubstEnv zipTyEnv tyvars tys | debugIsOn && (length tyvars /= length tys) = pprTrace "zipTyEnv" (ppr tyvars $$ ppr tys) emptyVarEnv | otherwise = zip_ty_env tyvars tys emptyVarEnv
222
zipTyEnv tyvars tys | debugIsOn && (length tyvars /= length tys) = pprTrace "zipTyEnv" (ppr tyvars $$ ppr tys) emptyVarEnv | otherwise = zip_ty_env tyvars tys emptyVarEnv
178
false
true
0
11
41
98
44
54
null
null
DanielSchuessler/hstri
QuadCoordinates.hs
gpl-3.0
unrestrictedQCGen :: (Num r, Eq r, Arbitrary r) => Triangulation -> Gen (QuadCoordinates r) unrestrictedQCGen tr = sparse_gen (tINormalQuads tr)
146
unrestrictedQCGen :: (Num r, Eq r, Arbitrary r) => Triangulation -> Gen (QuadCoordinates r) unrestrictedQCGen tr = sparse_gen (tINormalQuads tr)
146
unrestrictedQCGen tr = sparse_gen (tINormalQuads tr)
52
false
true
0
9
21
60
29
31
null
null
isomorphism/csound-expression
src/Csound/IO.hs
bsd-3-clause
render :: Sigs a => Options -> SE a -> IO String render = renderOutBy
69
render :: Sigs a => Options -> SE a -> IO String render = renderOutBy
69
render = renderOutBy
20
false
true
0
8
14
32
15
17
null
null
ak1211/tractor
src/BackOffice/TechnicalIndicators.hs
agpl-3.0
sma :: Int -> [Double] -> [Double] sma period = mean period . rolling period
76
sma :: Int -> [Double] -> [Double] sma period = mean period . rolling period
76
sma period = mean period . rolling period
41
false
true
0
7
14
38
19
19
null
null
fcostantini/PlEb
src/Misc.hs
gpl-3.0
trim :: String -> String trim = filter (/= ' ')
47
trim :: String -> String trim = filter (/= ' ')
47
trim = filter (/= ' ')
22
false
true
0
6
10
22
12
10
null
null
agocorona/MFlow
Demos/LongTask.hs
bsd-3-clause
longTask task showresult timeout= do tv <- liftIO $ newEmptyMVar r <- do th <- liftIO $ forkIO $ task >>= putMVar tv setSessionData th `compensate` do mth <- getSessionData case mth of Nothing -> return() Just th -> liftIO $ killThrea...
806
longTask task showresult timeout= do tv <- liftIO $ newEmptyMVar r <- do th <- liftIO $ forkIO $ task >>= putMVar tv setSessionData th `compensate` do mth <- getSessionData case mth of Nothing -> return() Just th -> liftIO $ killThrea...
806
longTask task showresult timeout= do tv <- liftIO $ newEmptyMVar r <- do th <- liftIO $ forkIO $ task >>= putMVar tv setSessionData th `compensate` do mth <- getSessionData case mth of Nothing -> return() Just th -> liftIO $ killThrea...
806
false
false
0
23
349
236
105
131
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
-- | A `null' size is not a legal size (width and height are -1) and can be used for some -- wxWidgets functions to select a default size. sizeNull :: (Num a) => Size2D a sizeNull = Size (-1) (-1)
198
sizeNull :: (Num a) => Size2D a sizeNull = Size (-1) (-1)
59
sizeNull = Size (-1) (-1)
27
true
true
0
7
42
46
23
23
null
null
jeffreyrosenbluth/stackage
Stackage/Prelude.hs
mit
simpleParse :: (MonadThrow m, DT.Text a, Typeable a) => Text -> m a simpleParse orig = withTypeRep $ \rep -> case DT.simpleParse str of Nothing -> throwM (ParseFailedException rep (pack str)) Just v -> return v where str = unpack orig withTypeRep :: Typeable a => (TypeRep -> m a) -> m a ...
463
simpleParse :: (MonadThrow m, DT.Text a, Typeable a) => Text -> m a simpleParse orig = withTypeRep $ \rep -> case DT.simpleParse str of Nothing -> throwM (ParseFailedException rep (pack str)) Just v -> return v where str = unpack orig withTypeRep :: Typeable a => (TypeRep -> m a) -> m a ...
463
simpleParse orig = withTypeRep $ \rep -> case DT.simpleParse str of Nothing -> throwM (ParseFailedException rep (pack str)) Just v -> return v where str = unpack orig withTypeRep :: Typeable a => (TypeRep -> m a) -> m a withTypeRep f = res where res = f (typeOf ...
395
false
true
4
13
149
212
95
117
null
null
TiloWiklund/pinot
src/Databricks.hs
bsd-3-clause
toByteString :: DBNotebook -> B.ByteString toByteString = encode
64
toByteString :: DBNotebook -> B.ByteString toByteString = encode
64
toByteString = encode
21
false
true
0
8
7
24
10
14
null
null
rvion/ride
jetpack/src/Data/Text/Lazy/AsLt.hs
bsd-3-clause
-- lt_words :: Text -> [Text] lt_words = I.words
48
lt_words = I.words
18
lt_words = I.words
18
true
false
0
5
8
9
5
4
null
null
daleooo/barrelfish
tools/flounder/THCBackend.hs
mit
msg_argstruct ifname m@(Message _ n args _) = let tn = msg_argstruct_name ifname n in C.StructDecl tn (concat [ BC.msg_argdecl BC.RX ifname a | a <- args ])
170
msg_argstruct ifname m@(Message _ n args _) = let tn = msg_argstruct_name ifname n in C.StructDecl tn (concat [ BC.msg_argdecl BC.RX ifname a | a <- args ])
170
msg_argstruct ifname m@(Message _ n args _) = let tn = msg_argstruct_name ifname n in C.StructDecl tn (concat [ BC.msg_argdecl BC.RX ifname a | a <- args ])
170
false
false
1
10
41
85
37
48
null
null
konn/hint-forked
src/Hint/Configuration.hs
bsd-3-clause
installedModulesInScope :: MonadInterpreter m => Option m Bool installedModulesInScope = Option setter getter where getter = fromConf all_mods_in_scope setter b = do onConf $ \c -> c{all_mods_in_scope = b} when ( ghcVersion >= 610 ) $ setGhcOption $ "-f"...
704
installedModulesInScope :: MonadInterpreter m => Option m Bool installedModulesInScope = Option setter getter where getter = fromConf all_mods_in_scope setter b = do onConf $ \c -> c{all_mods_in_scope = b} when ( ghcVersion >= 610 ) $ setGhcOption $ "-f"...
704
installedModulesInScope = Option setter getter where getter = fromConf all_mods_in_scope setter b = do onConf $ \c -> c{all_mods_in_scope = b} when ( ghcVersion >= 610 ) $ setGhcOption $ "-f" ++ ...
641
false
true
1
14
263
114
57
57
null
null
arnizamani/DLvalidity
Types.hs
gpl-2.0
exists' = "∃"
13
exists' = "∃"
13
exists' = "∃"
13
false
false
1
5
2
10
3
7
null
null
kawu/data-named
src/Text/Named/Enamex.hs
bsd-2-clause
pWord :: Parser T.Text pWord = unEscape <$> scan False special where special False c = case c == ' ' || c == '<' || c == '>' of True -> Nothing False -> if c == '\\' then Just True else Just False special True _ = Just False -- | TODO: Use lazy text bui...
367
pWord :: Parser T.Text pWord = unEscape <$> scan False special where special False c = case c == ' ' || c == '<' || c == '>' of True -> Nothing False -> if c == '\\' then Just True else Just False special True _ = Just False -- | TODO: Use lazy text bui...
367
pWord = unEscape <$> scan False special where special False c = case c == ' ' || c == '<' || c == '>' of True -> Nothing False -> if c == '\\' then Just True else Just False special True _ = Just False -- | TODO: Use lazy text builder to avoid slowness ...
344
false
true
0
10
131
106
52
54
null
null
DiegoNolan/Asciify
Asciify.hs
mit
aSToA (Light, Blank, Light, Blank) = '('
40
aSToA (Light, Blank, Light, Blank) = '('
40
aSToA (Light, Blank, Light, Blank) = '('
40
false
false
0
5
6
22
12
10
null
null
NightRa/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
defaultOpts = IOption { opt_logLevel = 0 , opt_typecase = False , opt_typeintype = False , opt_coverage = True , opt_showimp = False , opt_errContext = False , opt_repl = Tr...
1,146
defaultOpts = IOption { opt_logLevel = 0 , opt_typecase = False , opt_typeintype = False , opt_coverage = True , opt_showimp = False , opt_errContext = False , opt_repl = Tr...
1,146
defaultOpts = IOption { opt_logLevel = 0 , opt_typecase = False , opt_typeintype = False , opt_coverage = True , opt_showimp = False , opt_errContext = False , opt_repl = Tr...
1,146
false
false
0
7
681
164
105
59
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/SUNX/constant_data.txt SUNX_constant_data> extension supported? glGetSUNXConstantData :: MonadIO m => m Bool glGetSUNXConstantData = getExtensions >>= (return . member "GL_SUNX_constant_data")
243
glGetSUNXConstantData :: MonadIO m => m Bool glGetSUNXConstantData = getExtensions >>= (return . member "GL_SUNX_constant_data")
128
glGetSUNXConstantData = getExtensions >>= (return . member "GL_SUNX_constant_data")
83
true
true
0
8
22
36
18
18
null
null
ulikoehler/ProjectEuler
Euler9.hs
apache-2.0
main = do let nums = [1..500] let triplets = filter isPythagoreanTriplet $ cartTripleProd nums let tripletOfInterest = head $ filter ((== 1000) . tripletSum) $ triplets print $ tripletProd tripletOfInterest
222
main = do let nums = [1..500] let triplets = filter isPythagoreanTriplet $ cartTripleProd nums let tripletOfInterest = head $ filter ((== 1000) . tripletSum) $ triplets print $ tripletProd tripletOfInterest
222
main = do let nums = [1..500] let triplets = filter isPythagoreanTriplet $ cartTripleProd nums let tripletOfInterest = head $ filter ((== 1000) . tripletSum) $ triplets print $ tripletProd tripletOfInterest
222
false
false
0
15
46
80
38
42
null
null
davdar/quals
src/Lang/Lam/Syntax.hs
bsd-3-clause
lam :: String -> Exp -> Exp lam x = Fix . Lam (Name x)
54
lam :: String -> Exp -> Exp lam x = Fix . Lam (Name x)
54
lam x = Fix . Lam (Name x)
26
false
true
0
8
14
35
17
18
null
null
mbelicki/valdemar
src/Emitter.hs
gpl-3.0
generateSingleDef :: S.Expression S.Type -> CG.ModuleBuilder () generateSingleDef (S.FunDeclExpr (S.FunDecl name args retType) body ty) = do let funArgs = transformFuncArgs args let blocks = CG.createBlocks $ CG.executeGenerator $ do entry <- CG.addBlock CG.entryBlockName ...
954
generateSingleDef :: S.Expression S.Type -> CG.ModuleBuilder () generateSingleDef (S.FunDeclExpr (S.FunDecl name args retType) body ty) = do let funArgs = transformFuncArgs args let blocks = CG.createBlocks $ CG.executeGenerator $ do entry <- CG.addBlock CG.entryBlockName ...
954
generateSingleDef (S.FunDeclExpr (S.FunDecl name args retType) body ty) = do let funArgs = transformFuncArgs args let blocks = CG.createBlocks $ CG.executeGenerator $ do entry <- CG.addBlock CG.entryBlockName CG.setBlock entry -- allocate all variable...
890
false
true
0
20
363
247
114
133
null
null
cmahon/smartbit
src/Smartbit/Types.hs
bsd-3-clause
sortByAddress = SortBy :: SortBy Address'
41
sortByAddress = SortBy :: SortBy Address'
41
sortByAddress = SortBy :: SortBy Address'
41
false
false
2
5
5
18
6
12
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Channels/Update.hs
mpl-2.0
-- | Multipart request metadata. chaPayload :: Lens' ChannelsUpdate Channel chaPayload = lens _chaPayload (\ s a -> s{_chaPayload = a})
137
chaPayload :: Lens' ChannelsUpdate Channel chaPayload = lens _chaPayload (\ s a -> s{_chaPayload = a})
104
chaPayload = lens _chaPayload (\ s a -> s{_chaPayload = a})
61
true
true
0
9
22
42
22
20
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bitOp v op ty args = v ++ "idris_b" ++ show (nativeTyWidth ty) ++ op ++ "(vm, " ++ intercalate ", " (map creg args) ++ ")"
122
bitOp v op ty args = v ++ "idris_b" ++ show (nativeTyWidth ty) ++ op ++ "(vm, " ++ intercalate ", " (map creg args) ++ ")"
122
bitOp v op ty args = v ++ "idris_b" ++ show (nativeTyWidth ty) ++ op ++ "(vm, " ++ intercalate ", " (map creg args) ++ ")"
122
false
false
3
12
26
69
29
40
null
null
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdCreative.hs
bsd-3-clause
link r = r `Rec.get` Link
25
link r = r `Rec.get` Link
25
link r = r `Rec.get` Link
25
false
false
1
6
5
21
9
12
null
null
advancedtelematic/quickcheck-state-machine-model
test/CircularBuffer.hs
bsd-3-clause
mock (Model m) (Get buffer) = case lookup buffer m of Nothing -> error "mock: get" Just spec -> case specContents spec of [] -> error "mock: get 2" (i : _) -> pure (GetR i)
191
mock (Model m) (Get buffer) = case lookup buffer m of Nothing -> error "mock: get" Just spec -> case specContents spec of [] -> error "mock: get 2" (i : _) -> pure (GetR i)
191
mock (Model m) (Get buffer) = case lookup buffer m of Nothing -> error "mock: get" Just spec -> case specContents spec of [] -> error "mock: get 2" (i : _) -> pure (GetR i)
191
false
false
0
13
54
90
42
48
null
null
GaloisInc/saw-script
rme/src/Data/RME/Base.hs
bsd-3-clause
mux b x y = xor (conj b (xor x y)) y
36
mux b x y = xor (conj b (xor x y)) y
36
mux b x y = xor (conj b (xor x y)) y
36
false
false
1
8
11
41
16
25
null
null
clarissalittler/pi-calculus
PureLam.hs
mit
-- this isn't proper eta because we'd need freshness then, this is just a test of something small etaExp :: Lam -> Lam etaExp f = Abs "z" (App f (Var "z"))
155
etaExp :: Lam -> Lam etaExp f = Abs "z" (App f (Var "z"))
57
etaExp f = Abs "z" (App f (Var "z"))
36
true
true
0
9
31
43
20
23
null
null
emc2/proglang-util
Control/Monad/Lexer.hs
bsd-3-clause
unpackLexerT (LexerT pm) = pm
29
unpackLexerT (LexerT pm) = pm
29
unpackLexerT (LexerT pm) = pm
29
false
false
0
7
4
15
7
8
null
null
ml9951/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
-- first :: forall b c d. a b c -> a (b,d) (c,d) do_first :: DsCmdEnv -> Type -> Type -> Type -> CoreExpr -> CoreExpr do_first ids b_ty c_ty d_ty f = mkApps (first_id ids) [Type b_ty, Type c_ty, Type d_ty, f]
210
do_first :: DsCmdEnv -> Type -> Type -> Type -> CoreExpr -> CoreExpr do_first ids b_ty c_ty d_ty f = mkApps (first_id ids) [Type b_ty, Type c_ty, Type d_ty, f]
161
do_first ids b_ty c_ty d_ty f = mkApps (first_id ids) [Type b_ty, Type c_ty, Type d_ty, f]
92
true
true
0
9
45
75
38
37
null
null
bitemyapp/checkers
src/Test/QuickCheck/Checkers.hs
bsd-3-clause
meq5 :: ( Model a b, Model a1 b1, Model a2 b2, Model a3 b3 , Model a4 b4, Model a5 b5, EqProp b) => (a1 -> a2 -> a3 -> a4 -> a5 -> a) -> (b1 -> b2 -> b3 -> b4 -> b5 -> b) -> a1 -> a2 -> a3 -> a4 -> a5 -> Property meq a b = model a =-= b
281
meq5 :: ( Model a b, Model a1 b1, Model a2 b2, Model a3 b3 , Model a4 b4, Model a5 b5, EqProp b) => (a1 -> a2 -> a3 -> a4 -> a5 -> a) -> (b1 -> b2 -> b3 -> b4 -> b5 -> b) -> a1 -> a2 -> a3 -> a4 -> a5 -> Property meq a b = model a =-= b
280
meq a b = model a =-= b
41
false
true
0
13
112
154
78
76
null
null
JohnLato/iteratee
bench/BenchBase.hs
bsd-3-clause
streambench = makeGroup "stream" (streamBenches :: [BD [Int] () [Int] Identity])
80
streambench = makeGroup "stream" (streamBenches :: [BD [Int] () [Int] Identity])
80
streambench = makeGroup "stream" (streamBenches :: [BD [Int] () [Int] Identity])
80
false
false
1
8
10
41
20
21
null
null
mikegehard/haskellBookExercises
chapter9/PoemLines.hs
mit
firstSen = "Tyger Tyger, burning bright\n"
42
firstSen = "Tyger Tyger, burning bright\n"
42
firstSen = "Tyger Tyger, burning bright\n"
42
false
false
1
5
5
10
3
7
null
null
RoboticsHS/rosmsg
src/Robotics/ROS/Msg/Parser.hs
bsd-3-clause
rosmsg :: Parser MsgDefinition rosmsg = rights <$> many' (eitherP junk field) where field = choice [constantParser, variableParser] junk = choice [comment, endOfLine]
177
rosmsg :: Parser MsgDefinition rosmsg = rights <$> many' (eitherP junk field) where field = choice [constantParser, variableParser] junk = choice [comment, endOfLine]
177
rosmsg = rights <$> many' (eitherP junk field) where field = choice [constantParser, variableParser] junk = choice [comment, endOfLine]
146
false
true
4
6
33
72
32
40
null
null
codecurve/FieldML-Haskell-01
test/FieldML/CoreTest.hs
bsd-2-clause
-- Topology, connectivity using Quotient: Circle topology from unit line circleConnectionMap = Restriction FieldML.Library01.unitLineSegment (Lambdify (Modulus (GeneralVariable "theta" Reals) (RealConstant 1.0) ))
224
circleConnectionMap = Restriction FieldML.Library01.unitLineSegment (Lambdify (Modulus (GeneralVariable "theta" Reals) (RealConstant 1.0) ))
146
circleConnectionMap = Restriction FieldML.Library01.unitLineSegment (Lambdify (Modulus (GeneralVariable "theta" Reals) (RealConstant 1.0) ))
146
true
false
0
10
32
44
22
22
null
null
sdiehl/ghc
compiler/utils/UniqFM.hs
bsd-3-clause
-- Note (M.union y x), with arguments flipped -- M.union is left-biased, plusUFM should be right-biased. plusUFM_C :: (elt -> elt -> elt) -> UniqFM elt -> UniqFM elt -> UniqFM elt plusUFM_C f (UFM x) (UFM y) = UFM (M.unionWith f x y)
239
plusUFM_C :: (elt -> elt -> elt) -> UniqFM elt -> UniqFM elt -> UniqFM elt plusUFM_C f (UFM x) (UFM y) = UFM (M.unionWith f x y)
128
plusUFM_C f (UFM x) (UFM y) = UFM (M.unionWith f x y)
53
true
true
0
8
49
79
39
40
null
null
ezyang/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
phaseInputExt (Cpp _) = "lpp"
41
phaseInputExt (Cpp _) = "lpp"
41
phaseInputExt (Cpp _) = "lpp"
41
false
false
0
7
16
15
7
8
null
null
DavidAlphaFox/darcs
harness/Darcs/Test/Email.hs
gpl-2.0
-- Check that header the second and later lines of a header start with a space emailHeaderLinesStart :: Test emailHeaderLinesStart = testProperty "Checking for spaces at start of folded email header lines" $ \field value -> let headerLines = bsLines (formatHeader cleanField value) cleanField = clea...
405
emailHeaderLinesStart :: Test emailHeaderLinesStart = testProperty "Checking for spaces at start of folded email header lines" $ \field value -> let headerLines = bsLines (formatHeader cleanField value) cleanField = cleanFieldString field in all (\l -> B.null l || B.head l == 32) (tail header...
326
emailHeaderLinesStart = testProperty "Checking for spaces at start of folded email header lines" $ \field value -> let headerLines = bsLines (formatHeader cleanField value) cleanField = cleanFieldString field in all (\l -> B.null l || B.head l == 32) (tail headerLines)
296
true
true
0
13
86
100
47
53
null
null