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
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateCacheCluster.hs
mpl-2.0
-- | The name of a snapshot from which to restore data into the new node group. -- The snapshot status changes to 'restoring' while the new node group is being -- created. -- -- Note: This parameter is only valid if the 'Engine' parameter is 'redis'. cccSnapshotName :: Lens' CreateCacheCluster (Maybe Text) cccSnapshotName = lens _cccSnapshotName (\s a -> s { _cccSnapshotName = a })
384
cccSnapshotName :: Lens' CreateCacheCluster (Maybe Text) cccSnapshotName = lens _cccSnapshotName (\s a -> s { _cccSnapshotName = a })
133
cccSnapshotName = lens _cccSnapshotName (\s a -> s { _cccSnapshotName = a })
76
true
true
1
9
65
55
29
26
null
null
sdiehl/ghc
compiler/stranal/DmdAnal.hs
bsd-3-clause
addLazyFVs :: DmdType -> DmdEnv -> DmdType addLazyFVs dmd_ty lazy_fvs = dmd_ty `bothDmdType` mkBothDmdArg lazy_fvs
116
addLazyFVs :: DmdType -> DmdEnv -> DmdType addLazyFVs dmd_ty lazy_fvs = dmd_ty `bothDmdType` mkBothDmdArg lazy_fvs
116
addLazyFVs dmd_ty lazy_fvs = dmd_ty `bothDmdType` mkBothDmdArg lazy_fvs
73
false
true
0
6
16
33
17
16
null
null
kavigupta/Infsabot
Infsabot/MoveConflictResolution/Tests.hs
gpl-3.0
finalLocsToList :: FinalLocs -> [(Int, Int)] finalLocsToList (FinalLocs x y) = tl x ++ tl y where tl Nothing = [] tl (Just l) = [l]
143
finalLocsToList :: FinalLocs -> [(Int, Int)] finalLocsToList (FinalLocs x y) = tl x ++ tl y where tl Nothing = [] tl (Just l) = [l]
143
finalLocsToList (FinalLocs x y) = tl x ++ tl y where tl Nothing = [] tl (Just l) = [l]
98
false
true
1
7
37
84
39
45
null
null
mcschroeder/yelp
Web/Yelp/Monad.hs
bsd-3-clause
-- | Get the 'H.Manager'. getManager :: Monad m => YelpT m H.Manager getManager = yManager `liftM` Y ask
104
getManager :: Monad m => YelpT m H.Manager getManager = yManager `liftM` Y ask
78
getManager = yManager `liftM` Y ask
35
true
true
0
8
18
43
20
23
null
null
yu-i9/HaSC
src/HaSC/Prim/Environment.hs
mit
makeFuncInfo :: Identifier -> DeclType -> [(DeclType, Identifier)] -> Kind -> ObjInfo makeFuncInfo nm ty args kind = ObjInfo nm kind funTy global_lev where funTy = CFun (convType ty) (map (convType . fst) args)
214
makeFuncInfo :: Identifier -> DeclType -> [(DeclType, Identifier)] -> Kind -> ObjInfo makeFuncInfo nm ty args kind = ObjInfo nm kind funTy global_lev where funTy = CFun (convType ty) (map (convType . fst) args)
214
makeFuncInfo nm ty args kind = ObjInfo nm kind funTy global_lev where funTy = CFun (convType ty) (map (convType . fst) args)
128
false
true
0
11
37
87
45
42
null
null
ptitfred/slidecoding
src/Slidecoding/Indexer.hs
gpl-3.0
writeIndexJson :: FilePath -> Description -> IO () writeIndexJson dir description = writeJSON file (D' description) where file = dir </> m' <.> "json" Description (Module _ m') _ = description
202
writeIndexJson :: FilePath -> Description -> IO () writeIndexJson dir description = writeJSON file (D' description) where file = dir </> m' <.> "json" Description (Module _ m') _ = description
202
writeIndexJson dir description = writeJSON file (D' description) where file = dir </> m' <.> "json" Description (Module _ m') _ = description
151
false
true
4
8
40
83
37
46
null
null
rgleichman/glance
app/Icons.hs
gpl-3.0
lambdaPortAngles :: Floating n => Bool -> Port -> [Angle n] lambdaPortAngles embedded (Port x) = fmap (@@ turn) $ case x of -- 0 == lambda return value Icon 0 -> if embedded then [1/4, 3/4] else [3/8, 1/2, 5/8] -- 1 == value port --1 -> [1/8, 7/8, 0] 1 -> [0] _ -> [1/4, 3/4]
301
lambdaPortAngles :: Floating n => Bool -> Port -> [Angle n] lambdaPortAngles embedded (Port x) = fmap (@@ turn) $ case x of -- 0 == lambda return value Icon 0 -> if embedded then [1/4, 3/4] else [3/8, 1/2, 5/8] -- 1 == value port --1 -> [1/8, 7/8, 0] 1 -> [0] _ -> [1/4, 3/4]
301
lambdaPortAngles embedded (Port x) = fmap (@@ turn) $ case x of -- 0 == lambda return value Icon 0 -> if embedded then [1/4, 3/4] else [3/8, 1/2, 5/8] -- 1 == value port --1 -> [1/8, 7/8, 0] 1 -> [0] _ -> [1/4, 3/4]
241
false
true
0
11
83
145
77
68
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/PrettyPrint.hs
bsd-3-clause
ppRefArgs ss = text "\\" <> hsep (ppRefSym <$> ss ++ [vv Nothing]) <+> text "->"
80
ppRefArgs ss = text "\\" <> hsep (ppRefSym <$> ss ++ [vv Nothing]) <+> text "->"
80
ppRefArgs ss = text "\\" <> hsep (ppRefSym <$> ss ++ [vv Nothing]) <+> text "->"
80
false
false
0
11
15
43
20
23
null
null
kawu/data-morphosyntax
Text/Morphosyntax/Plain.hs
bsd-2-clause
buildSpace NewLine = "newline"
31
buildSpace NewLine = "newline"
31
buildSpace NewLine = "newline"
31
false
false
0
4
4
10
4
6
null
null
olorin/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/Types/Product.hs
mpl-2.0
-- | Creates a value of 'RDSDataSpec' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rdsdsDataSchemaURI' -- -- * 'rdsdsDataSchema' -- -- * 'rdsdsDataRearrangement' -- -- * 'rdsdsDatabaseInformation' -- -- * 'rdsdsSelectSqlQuery' -- -- * 'rdsdsDatabaseCredentials' -- -- * 'rdsdsS3StagingLocation' -- -- * 'rdsdsResourceRole' -- -- * 'rdsdsServiceRole' -- -- * 'rdsdsSubnetId' -- -- * 'rdsdsSecurityGroupIds' rdsDataSpec :: RDSDatabase -- ^ 'rdsdsDatabaseInformation' -> Text -- ^ 'rdsdsSelectSqlQuery' -> RDSDatabaseCredentials -- ^ 'rdsdsDatabaseCredentials' -> Text -- ^ 'rdsdsS3StagingLocation' -> Text -- ^ 'rdsdsResourceRole' -> Text -- ^ 'rdsdsServiceRole' -> Text -- ^ 'rdsdsSubnetId' -> RDSDataSpec rdsDataSpec pDatabaseInformation_ pSelectSqlQuery_ pDatabaseCredentials_ pS3StagingLocation_ pResourceRole_ pServiceRole_ pSubnetId_ = RDSDataSpec' { _rdsdsDataSchemaURI = Nothing , _rdsdsDataSchema = Nothing , _rdsdsDataRearrangement = Nothing , _rdsdsDatabaseInformation = pDatabaseInformation_ , _rdsdsSelectSqlQuery = pSelectSqlQuery_ , _rdsdsDatabaseCredentials = pDatabaseCredentials_ , _rdsdsS3StagingLocation = pS3StagingLocation_ , _rdsdsResourceRole = pResourceRole_ , _rdsdsServiceRole = pServiceRole_ , _rdsdsSubnetId = pSubnetId_ , _rdsdsSecurityGroupIds = mempty }
1,456
rdsDataSpec :: RDSDatabase -- ^ 'rdsdsDatabaseInformation' -> Text -- ^ 'rdsdsSelectSqlQuery' -> RDSDatabaseCredentials -- ^ 'rdsdsDatabaseCredentials' -> Text -- ^ 'rdsdsS3StagingLocation' -> Text -- ^ 'rdsdsResourceRole' -> Text -- ^ 'rdsdsServiceRole' -> Text -- ^ 'rdsdsSubnetId' -> RDSDataSpec rdsDataSpec pDatabaseInformation_ pSelectSqlQuery_ pDatabaseCredentials_ pS3StagingLocation_ pResourceRole_ pServiceRole_ pSubnetId_ = RDSDataSpec' { _rdsdsDataSchemaURI = Nothing , _rdsdsDataSchema = Nothing , _rdsdsDataRearrangement = Nothing , _rdsdsDatabaseInformation = pDatabaseInformation_ , _rdsdsSelectSqlQuery = pSelectSqlQuery_ , _rdsdsDatabaseCredentials = pDatabaseCredentials_ , _rdsdsS3StagingLocation = pS3StagingLocation_ , _rdsdsResourceRole = pResourceRole_ , _rdsdsServiceRole = pServiceRole_ , _rdsdsSubnetId = pSubnetId_ , _rdsdsSecurityGroupIds = mempty }
961
rdsDataSpec pDatabaseInformation_ pSelectSqlQuery_ pDatabaseCredentials_ pS3StagingLocation_ pResourceRole_ pServiceRole_ pSubnetId_ = RDSDataSpec' { _rdsdsDataSchemaURI = Nothing , _rdsdsDataSchema = Nothing , _rdsdsDataRearrangement = Nothing , _rdsdsDatabaseInformation = pDatabaseInformation_ , _rdsdsSelectSqlQuery = pSelectSqlQuery_ , _rdsdsDatabaseCredentials = pDatabaseCredentials_ , _rdsdsS3StagingLocation = pS3StagingLocation_ , _rdsdsResourceRole = pResourceRole_ , _rdsdsServiceRole = pServiceRole_ , _rdsdsSubnetId = pSubnetId_ , _rdsdsSecurityGroupIds = mempty }
630
true
true
0
11
250
154
104
50
null
null
brodyberg/Notes
FindingSuccessAndFailure/validation-book/lib/Main_Original.hs
mit
cleanWhitespace' :: String -> Either String String cleanWhitespace' "" = Left "Empty string"
92
cleanWhitespace' :: String -> Either String String cleanWhitespace' "" = Left "Empty string"
92
cleanWhitespace' "" = Left "Empty string"
41
false
true
0
7
12
30
13
17
null
null
andreagenso/java2scala
src/J2s/Ast/Semantic.hs
apache-2.0
sem_ForUpdate_NilForUpdate = NilForUpdate
41
sem_ForUpdate_NilForUpdate = NilForUpdate
41
sem_ForUpdate_NilForUpdate = NilForUpdate
41
false
false
0
4
2
6
3
3
null
null
juodaspaulius/clafer
src/Language/Clafer/Intermediate/TypeSystem.hs
mit
intersection _ TInteger TReal = return $ Just TReal
79
intersection _ TInteger TReal = return $ Just TReal
79
intersection _ TInteger TReal = return $ Just TReal
79
false
false
3
5
36
20
8
12
null
null
sdiehl/ghc
hadrian/src/Settings/Default.hs
bsd-3-clause
-- | Packages that are built only for the testsuite. testsuitePackages :: Action [Package] testsuitePackages = do return $ [ checkApiAnnotations , checkPpr , ghci , ghcCompact , ghcPkg , hpcBin , hsc2hs , iserv , runGhc , unlit ] ++ [ timeout | windowsHost ] -- | Default build ways for library packages: -- * We always build 'vanilla' way. -- * We build 'profiling' way when stage > Stage0. -- * We build 'dynamic' way when stage > Stage0 and the platform supports it.
620
testsuitePackages :: Action [Package] testsuitePackages = do return $ [ checkApiAnnotations , checkPpr , ghci , ghcCompact , ghcPkg , hpcBin , hsc2hs , iserv , runGhc , unlit ] ++ [ timeout | windowsHost ] -- | Default build ways for library packages: -- * We always build 'vanilla' way. -- * We build 'profiling' way when stage > Stage0. -- * We build 'dynamic' way when stage > Stage0 and the platform supports it.
567
testsuitePackages = do return $ [ checkApiAnnotations , checkPpr , ghci , ghcCompact , ghcPkg , hpcBin , hsc2hs , iserv , runGhc , unlit ] ++ [ timeout | windowsHost ] -- | Default build ways for library packages: -- * We always build 'vanilla' way. -- * We build 'profiling' way when stage > Stage0. -- * We build 'dynamic' way when stage > Stage0 and the platform supports it.
529
true
true
0
9
236
70
43
27
null
null
msakai/ptq
src/Parser.hs
lgpl-2.1
he_n :: [Case] -> Parser (P T) he_n cs = do g <- mplus (if Subject `elem` cs then msum [ token "he" >> return Masculine , token "she" >> return Feminine , token "it" >> return Neuter ] else mzero) (if Object `elem` cs then msum [ token "him" >> return Masculine , token "her" >> return Feminine , token "it" >> return Neuter ] else mzero) xs <- getF10State ys <- askS3 let ns = [(n,g') | (n, g', _, _) <- xs] ++ ys msum [ return (He n) | (n,g') <- ns, g==g' ] -- FIXME: 全ての組み合わせを網羅している?
736
he_n :: [Case] -> Parser (P T) he_n cs = do g <- mplus (if Subject `elem` cs then msum [ token "he" >> return Masculine , token "she" >> return Feminine , token "it" >> return Neuter ] else mzero) (if Object `elem` cs then msum [ token "him" >> return Masculine , token "her" >> return Feminine , token "it" >> return Neuter ] else mzero) xs <- getF10State ys <- askS3 let ns = [(n,g') | (n, g', _, _) <- xs] ++ ys msum [ return (He n) | (n,g') <- ns, g==g' ] -- FIXME: 全ての組み合わせを網羅している?
736
he_n cs = do g <- mplus (if Subject `elem` cs then msum [ token "he" >> return Masculine , token "she" >> return Feminine , token "it" >> return Neuter ] else mzero) (if Object `elem` cs then msum [ token "him" >> return Masculine , token "her" >> return Feminine , token "it" >> return Neuter ] else mzero) xs <- getF10State ys <- askS3 let ns = [(n,g') | (n, g', _, _) <- xs] ++ ys msum [ return (He n) | (n,g') <- ns, g==g' ] -- FIXME: 全ての組み合わせを網羅している?
705
false
true
0
15
350
261
132
129
null
null
apriori/daak
lib/DAAK/Algorithms/Gamo/Criteria.hs
mit
-- | The accumulated density of a packing defined as relative usage of the -- 3D-boundingbox volume. accDensity :: Packing -> Double accDensity (EmptyPacking _) = 0
164
accDensity :: Packing -> Double accDensity (EmptyPacking _) = 0
63
accDensity (EmptyPacking _) = 0
31
true
true
0
6
26
30
15
15
null
null
narurien/ganeti-ceph
src/Ganeti/HTools/Cluster.hs
gpl-2.0
-- | Tries to allocate an instance on one given node. allocateOnSingle :: Node.List -> Instance.Instance -> Ndx -> OpResult Node.AllocElement allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instMatchesPolicy inst (Node.iPolicy p) (Node.exclStorage p) new_p <- Node.addPri p inst let new_nl = Container.add new_pdx new_p nl new_score = compCV new_nl return (new_nl, new_inst, [new_p], new_score) -- | Tries to allocate an instance on a given pair of nodes.
601
allocateOnSingle :: Node.List -> Instance.Instance -> Ndx -> OpResult Node.AllocElement allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instMatchesPolicy inst (Node.iPolicy p) (Node.exclStorage p) new_p <- Node.addPri p inst let new_nl = Container.add new_pdx new_p nl new_score = compCV new_nl return (new_nl, new_inst, [new_p], new_score) -- | Tries to allocate an instance on a given pair of nodes.
547
allocateOnSingle nl inst new_pdx = let p = Container.find new_pdx nl new_inst = Instance.setBoth inst new_pdx Node.noSecondary in do Instance.instMatchesPolicy inst (Node.iPolicy p) (Node.exclStorage p) new_p <- Node.addPri p inst let new_nl = Container.add new_pdx new_p nl new_score = compCV new_nl return (new_nl, new_inst, [new_p], new_score) -- | Tries to allocate an instance on a given pair of nodes.
442
true
true
0
14
131
169
81
88
null
null
ihc/futhark
src/Futhark/Optimise/Simplifier/Lore.hs
isc
mkWiseExpAttr :: (Attributes lore, CanBeWise (Op lore)) => Pattern (Wise lore) -> ExpAttr lore -> Exp (Wise lore) -> ExpAttr (Wise lore) mkWiseExpAttr pat explore e = (ExpWisdom (Names' $ consumedInPattern pat <> consumedInExp e) (Names' $ freeIn pat <> freeIn explore <> freeInExp e), explore)
338
mkWiseExpAttr :: (Attributes lore, CanBeWise (Op lore)) => Pattern (Wise lore) -> ExpAttr lore -> Exp (Wise lore) -> ExpAttr (Wise lore) mkWiseExpAttr pat explore e = (ExpWisdom (Names' $ consumedInPattern pat <> consumedInExp e) (Names' $ freeIn pat <> freeIn explore <> freeInExp e), explore)
338
mkWiseExpAttr pat explore e = (ExpWisdom (Names' $ consumedInPattern pat <> consumedInExp e) (Names' $ freeIn pat <> freeIn explore <> freeInExp e), explore)
170
false
true
0
12
89
138
65
73
null
null
GRACeFUL-project/haskelzinc
src/Interfaces/MZPrinter.hs
bsd-3-clause
printType (Range e1 e2) = printParensExpr (opPrec (Op $ stringToIdent "..")) e1 <+> text ".." <+> printParensExpr (opPrec (Op $ stringToIdent "..")) e2
208
printType (Range e1 e2) = printParensExpr (opPrec (Op $ stringToIdent "..")) e1 <+> text ".." <+> printParensExpr (opPrec (Op $ stringToIdent "..")) e2
208
printType (Range e1 e2) = printParensExpr (opPrec (Op $ stringToIdent "..")) e1 <+> text ".." <+> printParensExpr (opPrec (Op $ stringToIdent "..")) e2
208
false
false
0
12
79
70
33
37
null
null
jparyani/capnproto-boostpython
compiler/src/BoostPythonGenerator.hs
bsd-2-clause
cxxTypeString (BuiltinType BuiltinInt32) = " ::int32_t"
55
cxxTypeString (BuiltinType BuiltinInt32) = " ::int32_t"
55
cxxTypeString (BuiltinType BuiltinInt32) = " ::int32_t"
55
false
false
0
6
5
16
7
9
null
null
sethfowler/pygmalion
src/Pygmalion/Database/IO.hs
bsd-3-clause
closeDB :: DBHandle -> IO () closeDB h = do closeStatement (beginTransactionStmt h) closeStatement (endTransactionStmt h) closeStatement (updateInclusionStmt h) closeStatement (resetInclusionsStmt h) closeStatement (getDirectInclusionsStmt h) closeStatement (getDirectInclusionHashesStmt h) closeStatement (getDirectIncludersStmt h) closeStatement (getDirectIncluderHashesStmt h) closeStatement (updateSourceFileStmt h) closeStatement (getCommandInfoStmt h) closeStatement (getSimilarCommandInfoStmt h) closeStatement (updateDefStmt h) closeStatement (resetDefsStmt h) closeStatement (getDefStmt h) closeStatement (updateOverrideStmt h) closeStatement (resetOverridesStmt h) closeStatement (getOverridedStmt h) closeStatement (getOverridersStmt h) closeStatement (getMembersStmt h) closeStatement (getCallersStmt h) closeStatement (getCalleesStmt h) closeStatement (updateReferenceStmt h) closeStatement (resetReferencesStmt h) closeStatement (getDeclReferencedStmt h) closeStatement (getDeclsReferencedInFileStmt h) closeStatement (getReferencedStmt h) closeStatement (getReferencesStmt h) closeStatement (updateFileStmt h) closeStatement (getLastMTimeStmt h) closeStatement (insertPathStmt h) closeStatement (insertCommandStmt h) closeStatement (insertArgsStmt h) close (conn h)
1,346
closeDB :: DBHandle -> IO () closeDB h = do closeStatement (beginTransactionStmt h) closeStatement (endTransactionStmt h) closeStatement (updateInclusionStmt h) closeStatement (resetInclusionsStmt h) closeStatement (getDirectInclusionsStmt h) closeStatement (getDirectInclusionHashesStmt h) closeStatement (getDirectIncludersStmt h) closeStatement (getDirectIncluderHashesStmt h) closeStatement (updateSourceFileStmt h) closeStatement (getCommandInfoStmt h) closeStatement (getSimilarCommandInfoStmt h) closeStatement (updateDefStmt h) closeStatement (resetDefsStmt h) closeStatement (getDefStmt h) closeStatement (updateOverrideStmt h) closeStatement (resetOverridesStmt h) closeStatement (getOverridedStmt h) closeStatement (getOverridersStmt h) closeStatement (getMembersStmt h) closeStatement (getCallersStmt h) closeStatement (getCalleesStmt h) closeStatement (updateReferenceStmt h) closeStatement (resetReferencesStmt h) closeStatement (getDeclReferencedStmt h) closeStatement (getDeclsReferencedInFileStmt h) closeStatement (getReferencedStmt h) closeStatement (getReferencesStmt h) closeStatement (updateFileStmt h) closeStatement (getLastMTimeStmt h) closeStatement (insertPathStmt h) closeStatement (insertCommandStmt h) closeStatement (insertArgsStmt h) close (conn h)
1,346
closeDB h = do closeStatement (beginTransactionStmt h) closeStatement (endTransactionStmt h) closeStatement (updateInclusionStmt h) closeStatement (resetInclusionsStmt h) closeStatement (getDirectInclusionsStmt h) closeStatement (getDirectInclusionHashesStmt h) closeStatement (getDirectIncludersStmt h) closeStatement (getDirectIncluderHashesStmt h) closeStatement (updateSourceFileStmt h) closeStatement (getCommandInfoStmt h) closeStatement (getSimilarCommandInfoStmt h) closeStatement (updateDefStmt h) closeStatement (resetDefsStmt h) closeStatement (getDefStmt h) closeStatement (updateOverrideStmt h) closeStatement (resetOverridesStmt h) closeStatement (getOverridedStmt h) closeStatement (getOverridersStmt h) closeStatement (getMembersStmt h) closeStatement (getCallersStmt h) closeStatement (getCalleesStmt h) closeStatement (updateReferenceStmt h) closeStatement (resetReferencesStmt h) closeStatement (getDeclReferencedStmt h) closeStatement (getDeclsReferencedInFileStmt h) closeStatement (getReferencedStmt h) closeStatement (getReferencesStmt h) closeStatement (updateFileStmt h) closeStatement (getLastMTimeStmt h) closeStatement (insertPathStmt h) closeStatement (insertCommandStmt h) closeStatement (insertArgsStmt h) close (conn h)
1,317
false
true
0
9
174
419
176
243
null
null
RichardBarrell/snippets
PermutationsCombinations.hs
isc
-- binary logarithm of number of possible states that a system can be in (i.e. entropy of that system in bits): -- + when there are `n` particles, -- + and `n - sum eLevels` of them are in the ground state -- + and [eLevels !! 0] are in state 1, [eLevels !! 1] are in state 2, and so on. -- -- At least I am almost sure that's what this calculates, anyway. -- bCombineEnergies n eLevels = (lCombineEnergies n eLevels) / (log 2)
431
bCombineEnergies n eLevels = (lCombineEnergies n eLevels) / (log 2)
67
bCombineEnergies n eLevels = (lCombineEnergies n eLevels) / (log 2)
67
true
false
0
7
89
36
21
15
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-06-upenn/cis194/src/HW02_HC_LogAnalysis.hs
unlicense
i8 = insert (testData !! 7) i7
30
i8 = insert (testData !! 7) i7
30
i8 = insert (testData !! 7) i7
30
false
false
0
7
6
18
9
9
null
null
shlevy/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
tcTyConAppTyCon_maybe _ = Nothing
35
tcTyConAppTyCon_maybe _ = Nothing
35
tcTyConAppTyCon_maybe _ = Nothing
35
false
false
0
5
5
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/UpdateConfigurationTemplate.hs
mpl-2.0
-- | Creates a value of 'UpdateConfigurationTemplate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'uctOptionsToRemove' -- -- * 'uctOptionSettings' -- -- * 'uctDescription' -- -- * 'uctApplicationName' -- -- * 'uctTemplateName' updateConfigurationTemplate :: Text -- ^ 'uctApplicationName' -> Text -- ^ 'uctTemplateName' -> UpdateConfigurationTemplate updateConfigurationTemplate pApplicationName_ pTemplateName_ = UpdateConfigurationTemplate' { _uctOptionsToRemove = Nothing , _uctOptionSettings = Nothing , _uctDescription = Nothing , _uctApplicationName = pApplicationName_ , _uctTemplateName = pTemplateName_ }
742
updateConfigurationTemplate :: Text -- ^ 'uctApplicationName' -> Text -- ^ 'uctTemplateName' -> UpdateConfigurationTemplate updateConfigurationTemplate pApplicationName_ pTemplateName_ = UpdateConfigurationTemplate' { _uctOptionsToRemove = Nothing , _uctOptionSettings = Nothing , _uctDescription = Nothing , _uctApplicationName = pApplicationName_ , _uctTemplateName = pTemplateName_ }
426
updateConfigurationTemplate pApplicationName_ pTemplateName_ = UpdateConfigurationTemplate' { _uctOptionsToRemove = Nothing , _uctOptionSettings = Nothing , _uctDescription = Nothing , _uctApplicationName = pApplicationName_ , _uctTemplateName = pTemplateName_ }
290
true
true
0
8
128
80
50
30
null
null
goshakkk/hadis
src/Hadis/Types.hs
mit
isSetVal :: Value -> Bool isSetVal x = valType x == "set"
57
isSetVal :: Value -> Bool isSetVal x = valType x == "set"
57
isSetVal x = valType x == "set"
31
false
true
0
6
11
25
12
13
null
null
ivanperez-keera/Yampa
yampa/tests/TestsWFG.hs
bsd-3-clause
wfg_inp4 = deltaEncode 1.0 $ [Just 0.0, Nothing, Just 1.0, Just 2.0, Just 3.0, Just 4.0, Nothing, Nothing, Nothing, Just 3.0, Just 2.0, Nothing, Just 1.0, Just 0.0, Just 1.0, Just 2.0, Just 3.0, Nothing, Nothing, Just 4.0] ++ repeat Nothing
270
wfg_inp4 = deltaEncode 1.0 $ [Just 0.0, Nothing, Just 1.0, Just 2.0, Just 3.0, Just 4.0, Nothing, Nothing, Nothing, Just 3.0, Just 2.0, Nothing, Just 1.0, Just 0.0, Just 1.0, Just 2.0, Just 3.0, Nothing, Nothing, Just 4.0] ++ repeat Nothing
270
wfg_inp4 = deltaEncode 1.0 $ [Just 0.0, Nothing, Just 1.0, Just 2.0, Just 3.0, Just 4.0, Nothing, Nothing, Nothing, Just 3.0, Just 2.0, Nothing, Just 1.0, Just 0.0, Just 1.0, Just 2.0, Just 3.0, Nothing, Nothing, Just 4.0] ++ repeat Nothing
270
false
false
2
7
70
120
62
58
null
null
ojw/relaxation
src/Main.hs
mit
initialState :: StdGen -> Assets -> [Cloud] -> GameState initialState gen assets clouds = GameState (KeyboardState False 1000000) (BreathState 30 Exhale 0 0) initialCamera initialBird assets 0 (-200,-100) gen clouds Splash
222
initialState :: StdGen -> Assets -> [Cloud] -> GameState initialState gen assets clouds = GameState (KeyboardState False 1000000) (BreathState 30 Exhale 0 0) initialCamera initialBird assets 0 (-200,-100) gen clouds Splash
222
initialState gen assets clouds = GameState (KeyboardState False 1000000) (BreathState 30 Exhale 0 0) initialCamera initialBird assets 0 (-200,-100) gen clouds Splash
165
false
true
0
9
30
89
44
45
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Trace.hs
bsd-3-clause
-- | Trace a process sysTrace :: MonadIO m => TraceRequest -> ProcessID -> Ptr () -> Ptr () -> FlowT '[ErrorCode] m Int64 sysTrace req (ProcessID pid) addr dat = checkErrorCode =<< liftIO (syscall_ptrace (fromEnum req) pid addr dat)
235
sysTrace :: MonadIO m => TraceRequest -> ProcessID -> Ptr () -> Ptr () -> FlowT '[ErrorCode] m Int64 sysTrace req (ProcessID pid) addr dat = checkErrorCode =<< liftIO (syscall_ptrace (fromEnum req) pid addr dat)
214
sysTrace req (ProcessID pid) addr dat = checkErrorCode =<< liftIO (syscall_ptrace (fromEnum req) pid addr dat)
113
true
true
0
12
42
97
47
50
null
null
bttr/psqueues
tests/Data/PSQ/Class/Tests.hs
bsd-3-clause
test_equality :: forall psq. (PSQ psq, TestKey (Key psq), Eq (psq Int Char)) => Tagged psq Assertion test_equality = Tagged $ do -- Mostly to get 100% coverage assert $ e /= s assert $ s /= e where e = empty :: psq Int Char s = singleton 3 100 'a' :: psq Int Char
327
test_equality :: forall psq. (PSQ psq, TestKey (Key psq), Eq (psq Int Char)) => Tagged psq Assertion test_equality = Tagged $ do -- Mostly to get 100% coverage assert $ e /= s assert $ s /= e where e = empty :: psq Int Char s = singleton 3 100 'a' :: psq Int Char
327
test_equality = Tagged $ do -- Mostly to get 100% coverage assert $ e /= s assert $ s /= e where e = empty :: psq Int Char s = singleton 3 100 'a' :: psq Int Char
198
false
true
5
10
119
133
61
72
null
null
jean-edouard/manager
xenmgr/Vm/Queries.hs
gpl-2.0
getVmKernel uuid = readConfigPropertyDef uuid vmKernel ""
57
getVmKernel uuid = readConfigPropertyDef uuid vmKernel ""
57
getVmKernel uuid = readConfigPropertyDef uuid vmKernel ""
57
false
false
0
5
6
16
7
9
null
null
AM636E/Statistics
src/Stats.hs
bsd-3-clause
text' (x, y) string = translate x y . scale 0.03 0.03 . color black $ text string
104
text' (x, y) string = translate x y . scale 0.03 0.03 . color black $ text string
104
text' (x, y) string = translate x y . scale 0.03 0.03 . color black $ text string
104
false
false
0
8
40
45
21
24
null
null
tjakway/ghcjvm
compiler/main/Annotations.hs
bsd-3-clause
getAnnTargetName_maybe :: AnnTarget name -> Maybe name getAnnTargetName_maybe (NamedTarget nm) = Just nm
104
getAnnTargetName_maybe :: AnnTarget name -> Maybe name getAnnTargetName_maybe (NamedTarget nm) = Just nm
104
getAnnTargetName_maybe (NamedTarget nm) = Just nm
49
false
true
0
7
12
33
15
18
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/ImpGen.hs
isc
defCompileBasicOp (Pat [pe]) (Copy src) = copyDWIM (patElemName pe) [] (Var src) []
85
defCompileBasicOp (Pat [pe]) (Copy src) = copyDWIM (patElemName pe) [] (Var src) []
85
defCompileBasicOp (Pat [pe]) (Copy src) = copyDWIM (patElemName pe) [] (Var src) []
85
false
false
0
8
14
51
25
26
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_SPANISH_ECUADOR :: Int wxLANGUAGE_SPANISH_ECUADOR = 182
66
wxLANGUAGE_SPANISH_ECUADOR :: Int wxLANGUAGE_SPANISH_ECUADOR = 182
66
wxLANGUAGE_SPANISH_ECUADOR = 182
32
false
true
0
6
5
18
7
11
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
lamE :: [PatQ] -> ExpQ -> ExpQ lamE ps e = do ps' <- sequence ps e' <- e return (LamE ps' e') -- | Single-arg lambda
147
lamE :: [PatQ] -> ExpQ -> ExpQ lamE ps e = do ps' <- sequence ps e' <- e return (LamE ps' e') -- | Single-arg lambda
147
lamE ps e = do ps' <- sequence ps e' <- e return (LamE ps' e') -- | Single-arg lambda
116
false
true
0
10
57
65
29
36
null
null
jff/TeLLer
src/Printer.hs
gpl-3.0
showsTermOp prec op d (l, r) = showParen (d > prec) $ showsTerm (prec+1) l . showString op . showsTerm prec r
116
showsTermOp prec op d (l, r) = showParen (d > prec) $ showsTerm (prec+1) l . showString op . showsTerm prec r
116
showsTermOp prec op d (l, r) = showParen (d > prec) $ showsTerm (prec+1) l . showString op . showsTerm prec r
116
false
false
0
10
28
63
31
32
null
null
tippenein/shifts
src/Seeds.hs
mit
engineers = [bmo, cgj, ash]
27
engineers = [bmo, cgj, ash]
27
engineers = [bmo, cgj, ash]
27
false
false
0
5
4
15
9
6
null
null
svenssonjoel/GCDObsidian
Obsidian/GCDObsidian/CodeGen/SyncAnalysis.hs
bsd-3-clause
getSourceIndices _ = error "getSourceIndices: Can only handle a very simple case so far"
88
getSourceIndices _ = error "getSourceIndices: Can only handle a very simple case so far"
88
getSourceIndices _ = error "getSourceIndices: Can only handle a very simple case so far"
88
false
false
0
4
13
13
5
8
null
null
AmpersandTarski/ampersand
src/Ampersand/Input/ADL1/Parser.hs
gpl-3.0
--- IncludeStatement ::= 'INCLUDE' String pIncludeStatement :: AmpParser Include pIncludeStatement = Include <$> currPos <* pKey "INCLUDE" <*> pString <*> (pBrackets (pString `sepBy` pComma) <|> return [])
256
pIncludeStatement :: AmpParser Include pIncludeStatement = Include <$> currPos <* pKey "INCLUDE" <*> pString <*> (pBrackets (pString `sepBy` pComma) <|> return [])
214
pIncludeStatement = Include <$> currPos <* pKey "INCLUDE" <*> pString <*> (pBrackets (pString `sepBy` pComma) <|> return [])
175
true
true
11
10
77
71
35
36
null
null
siddhanathan/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isCNonCanonical :: Ct -> Bool isCNonCanonical (CNonCanonical {}) = True
71
isCNonCanonical :: Ct -> Bool isCNonCanonical (CNonCanonical {}) = True
71
isCNonCanonical (CNonCanonical {}) = True
41
false
true
0
7
9
25
13
12
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Master.hs
mpl-2.0
-- | Multipart request metadata. pzcmPayload :: Lens' ProjectsZonesClustersMaster UpdateMasterRequest pzcmPayload = lens _pzcmPayload (\ s a -> s{_pzcmPayload = a})
166
pzcmPayload :: Lens' ProjectsZonesClustersMaster UpdateMasterRequest pzcmPayload = lens _pzcmPayload (\ s a -> s{_pzcmPayload = a})
133
pzcmPayload = lens _pzcmPayload (\ s a -> s{_pzcmPayload = a})
64
true
true
1
9
22
46
22
24
null
null
monky-hs/monky
Monky/Disk/Btrfs.hs
lgpl-3.0
getBtrfsHandle :: String -- ^The UUID of the file system to monitor -> IO (Maybe (BtrfsHandle, [Dev])) getBtrfsHandle fs = do e <- doesDirectoryExist (fsBasePath ++ fs) if e then do h <- getBtrfsHandle' fs devs <- getFSDevices fs return $ Just (h, devs) else return Nothing
307
getBtrfsHandle :: String -- ^The UUID of the file system to monitor -> IO (Maybe (BtrfsHandle, [Dev])) getBtrfsHandle fs = do e <- doesDirectoryExist (fsBasePath ++ fs) if e then do h <- getBtrfsHandle' fs devs <- getFSDevices fs return $ Just (h, devs) else return Nothing
307
getBtrfsHandle fs = do e <- doesDirectoryExist (fsBasePath ++ fs) if e then do h <- getBtrfsHandle' fs devs <- getFSDevices fs return $ Just (h, devs) else return Nothing
200
false
true
0
13
80
109
52
57
null
null
SandeepTuniki/99-Haskell-Problems
.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_haskell_problems.hs
bsd-3-clause
libdir = "/home/sandeep/projects/haskell-problems/.stack-work/install/x86_64-linux/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/haskell-problems-0.1.0.0-1yCgbPHcbQAFdj1zFBjiGm"
179
libdir = "/home/sandeep/projects/haskell-problems/.stack-work/install/x86_64-linux/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/haskell-problems-0.1.0.0-1yCgbPHcbQAFdj1zFBjiGm"
179
libdir = "/home/sandeep/projects/haskell-problems/.stack-work/install/x86_64-linux/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/haskell-problems-0.1.0.0-1yCgbPHcbQAFdj1zFBjiGm"
179
false
false
0
4
6
6
3
3
null
null
MarkX95/TinyHask
Utils.hs
bsd-3-clause
hNull = 0
9
hNull = 0
9
hNull = 0
9
false
false
0
4
2
6
3
3
null
null
vluukkal/aspreify
testaspparse.hs
mit
tshoworhide5 = TestCase $ assertEqual "showorhide 5" (GHide [Arity (Const "pos") "3"]) (wrapparser showorhide "" "#hide pos/3.")
128
tshoworhide5 = TestCase $ assertEqual "showorhide 5" (GHide [Arity (Const "pos") "3"]) (wrapparser showorhide "" "#hide pos/3.")
128
tshoworhide5 = TestCase $ assertEqual "showorhide 5" (GHide [Arity (Const "pos") "3"]) (wrapparser showorhide "" "#hide pos/3.")
128
false
false
0
12
16
47
23
24
null
null
yairchu/ad
src/Numeric/AD/Mode/Chain.hs
bsd-3-clause
-- | The 'grad'' function calculates the result and gradient of a non-scalar-to-scalar function with reverse-mode AD in a single pass. -- -- >>> grad' (\[x,y,z] -> x*y+z) [1,2,3] -- (5,[2,1,1]) grad' :: (Traversable f, Num a) => (forall s. Mode s => f (AD s a) -> AD s a) -> f a -> (a, f a) grad' f as = reifyTape (snd bds) $ \p -> let r = f (fmap vary vs) in (primal r, unbind vs $! partialArrayOf p bds $! r) where (vs, bds) = bind as
441
grad' :: (Traversable f, Num a) => (forall s. Mode s => f (AD s a) -> AD s a) -> f a -> (a, f a) grad' f as = reifyTape (snd bds) $ \p -> let r = f (fmap vary vs) in (primal r, unbind vs $! partialArrayOf p bds $! r) where (vs, bds) = bind as
247
grad' f as = reifyTape (snd bds) $ \p -> let r = f (fmap vary vs) in (primal r, unbind vs $! partialArrayOf p bds $! r) where (vs, bds) = bind as
150
true
true
0
14
96
178
88
90
null
null
kmate/HaRe
old/testing/merging/Recursive1AST.hs
bsd-3-clause
g _ [] = ([], [])
17
g _ [] = ([], [])
17
g _ [] = ([], [])
17
false
false
0
7
5
27
13
14
null
null
SamuelSchlesinger/Exploration
Exploration/Algebra/Associative/Definition.hs
mit
(+) :: Ring r => r -> r -> r (+) = (&)
38
(+) :: Ring r => r -> r -> r (+) = (&)
38
(+) = (&)
9
false
true
0
9
12
39
20
19
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Protocol.hs
bsd-3-clause
packageRemoteBinding (NewRemoteRefW16E e) = packageRemoteBinding' EXPR_WORD16 e
80
packageRemoteBinding (NewRemoteRefW16E e) = packageRemoteBinding' EXPR_WORD16 e
80
packageRemoteBinding (NewRemoteRefW16E e) = packageRemoteBinding' EXPR_WORD16 e
80
false
false
0
7
7
20
9
11
null
null
bravit/Idris-dev
src/IRTS/System.hs
bsd-3-clause
getCC :: IO String getCC = fromMaybe "gcc" <$> lookupEnv "IDRIS_CC"
67
getCC :: IO String getCC = fromMaybe "gcc" <$> lookupEnv "IDRIS_CC"
67
getCC = fromMaybe "gcc" <$> lookupEnv "IDRIS_CC"
48
false
true
0
6
10
24
11
13
null
null
fredmorcos/attic
projects/hscoreutils/Yes.hs
isc
main :: IO () main = liftM unwords getArgs >>= forever . putStrLn
65
main :: IO () main = liftM unwords getArgs >>= forever . putStrLn
65
main = liftM unwords getArgs >>= forever . putStrLn
51
false
true
1
7
12
33
14
19
null
null
facebookincubator/duckling
Duckling/Numeral/HE/Rules.hs
bsd-3-clause
ruleCompositeTens :: Rule ruleCompositeTens = Rule { name = "integer 21..99" , pattern = [ oneOf [ 20, 30..90 ] , numberBetween 1 10 ] , prod = \tokens -> case tokens of (Token Numeral NumeralData{TNumeral.value = tens}: Token Numeral NumeralData{TNumeral.value = units}: _) -> double $ tens + units _ -> Nothing }
360
ruleCompositeTens :: Rule ruleCompositeTens = Rule { name = "integer 21..99" , pattern = [ oneOf [ 20, 30..90 ] , numberBetween 1 10 ] , prod = \tokens -> case tokens of (Token Numeral NumeralData{TNumeral.value = tens}: Token Numeral NumeralData{TNumeral.value = units}: _) -> double $ tens + units _ -> Nothing }
360
ruleCompositeTens = Rule { name = "integer 21..99" , pattern = [ oneOf [ 20, 30..90 ] , numberBetween 1 10 ] , prod = \tokens -> case tokens of (Token Numeral NumeralData{TNumeral.value = tens}: Token Numeral NumeralData{TNumeral.value = units}: _) -> double $ tens + units _ -> Nothing }
334
false
true
0
18
99
129
69
60
null
null
codemac/yi-editor
src/Shim/ProjectContent.hs
gpl-2.0
findModules :: FilePath -- ^source directory location -> [ModuleName] -- ^module names -> IO ([(ModuleName,FilePath)],[ModuleName]) -- ^found modules and unknown modules findModules location [] = return ([],[])
295
findModules :: FilePath -- ^source directory location -> [ModuleName] -- ^module names -> IO ([(ModuleName,FilePath)],[ModuleName]) findModules location [] = return ([],[])
256
findModules location [] = return ([],[])
48
true
true
0
10
111
66
38
28
null
null
diogob/spyglass
src/Pasta/Types.hs
bsd-3-clause
neWithCommas :: TextShow a => NonEmpty a -> T.Text neWithCommas = withCommas . toList
85
neWithCommas :: TextShow a => NonEmpty a -> T.Text neWithCommas = withCommas . toList
85
neWithCommas = withCommas . toList
34
false
true
0
7
13
31
15
16
null
null
naoto-ogawa/h-xproto-mysql
src/Example/Example13.hs
mit
find_06 :: PF.Find find_06 = find_base `setCriteria'` " id = ?" `setArgs` [scalar (3 :: Int)]
122
find_06 :: PF.Find find_06 = find_base `setCriteria'` " id = ?" `setArgs` [scalar (3 :: Int)]
122
find_06 = find_base `setCriteria'` " id = ?" `setArgs` [scalar (3 :: Int)]
103
false
true
0
8
44
37
22
15
null
null
Xophmeister/tapestry
Encode.hs
mit
htmlTag :: String -> [(String, String)] -> String -> String htmlTag selector attributes innerHTML = concat [ "<", selector, serialise attributes, ">", innerHTML, "</", selector, ">"]
188
htmlTag :: String -> [(String, String)] -> String -> String htmlTag selector attributes innerHTML = concat [ "<", selector, serialise attributes, ">", innerHTML, "</", selector, ">"]
188
htmlTag selector attributes innerHTML = concat [ "<", selector, serialise attributes, ">", innerHTML, "</", selector, ">"]
128
false
true
0
9
31
74
40
34
null
null
sdiehl/ghc
compiler/types/Coercion.hs
bsd-3-clause
coercionRole :: Coercion -> Role coercionRole = go where go (Refl _) = Nominal go (GRefl r _ _) = r go (TyConAppCo r _ _) = r go (AppCo co1 _) = go co1 go (ForAllCo _ _ co) = go co go (FunCo r _ _) = r go (CoVarCo cv) = coVarRole cv go (HoleCo h) = coVarRole (coHoleCoVar h) go (AxiomInstCo ax _ _) = coAxiomRole ax go (UnivCo _ r _ _) = r go (SymCo co) = go co go (TransCo co1 _co2) = go co1 go (NthCo r _d _co) = r go (LRCo {}) = Nominal go (InstCo co _) = go co go (KindCo {}) = Nominal go (SubCo _) = Representational go (AxiomRuleCo ax _) = coaxrRole ax {- Note [Nested InstCos] ~~~~~~~~~~~~~~~~~~~~~ In #5631 we found that 70% of the entire compilation time was being spent in coercionKind! The reason was that we had (g @ ty1 @ ty2 .. @ ty100) -- The "@s" are InstCos where g :: forall a1 a2 .. a100. phi If we deal with the InstCos one at a time, we'll do this: 1. Find the kind of (g @ ty1 .. @ ty99) : forall a100. phi' 2. Substitute phi'[ ty100/a100 ], a single tyvar->type subst But this is a *quadratic* algorithm, and the blew up #5631. So it's very important to do the substitution simultaneously; cf Type.piResultTys (which in fact we call here). -} -- | Makes a coercion type from two types: the types whose equality -- is proven by the relevant 'Coercion'
1,371
coercionRole :: Coercion -> Role coercionRole = go where go (Refl _) = Nominal go (GRefl r _ _) = r go (TyConAppCo r _ _) = r go (AppCo co1 _) = go co1 go (ForAllCo _ _ co) = go co go (FunCo r _ _) = r go (CoVarCo cv) = coVarRole cv go (HoleCo h) = coVarRole (coHoleCoVar h) go (AxiomInstCo ax _ _) = coAxiomRole ax go (UnivCo _ r _ _) = r go (SymCo co) = go co go (TransCo co1 _co2) = go co1 go (NthCo r _d _co) = r go (LRCo {}) = Nominal go (InstCo co _) = go co go (KindCo {}) = Nominal go (SubCo _) = Representational go (AxiomRuleCo ax _) = coaxrRole ax {- Note [Nested InstCos] ~~~~~~~~~~~~~~~~~~~~~ In #5631 we found that 70% of the entire compilation time was being spent in coercionKind! The reason was that we had (g @ ty1 @ ty2 .. @ ty100) -- The "@s" are InstCos where g :: forall a1 a2 .. a100. phi If we deal with the InstCos one at a time, we'll do this: 1. Find the kind of (g @ ty1 .. @ ty99) : forall a100. phi' 2. Substitute phi'[ ty100/a100 ], a single tyvar->type subst But this is a *quadratic* algorithm, and the blew up #5631. So it's very important to do the substitution simultaneously; cf Type.piResultTys (which in fact we call here). -} -- | Makes a coercion type from two types: the types whose equality -- is proven by the relevant 'Coercion'
1,371
coercionRole = go where go (Refl _) = Nominal go (GRefl r _ _) = r go (TyConAppCo r _ _) = r go (AppCo co1 _) = go co1 go (ForAllCo _ _ co) = go co go (FunCo r _ _) = r go (CoVarCo cv) = coVarRole cv go (HoleCo h) = coVarRole (coHoleCoVar h) go (AxiomInstCo ax _ _) = coAxiomRole ax go (UnivCo _ r _ _) = r go (SymCo co) = go co go (TransCo co1 _co2) = go co1 go (NthCo r _d _co) = r go (LRCo {}) = Nominal go (InstCo co _) = go co go (KindCo {}) = Nominal go (SubCo _) = Representational go (AxiomRuleCo ax _) = coaxrRole ax {- Note [Nested InstCos] ~~~~~~~~~~~~~~~~~~~~~ In #5631 we found that 70% of the entire compilation time was being spent in coercionKind! The reason was that we had (g @ ty1 @ ty2 .. @ ty100) -- The "@s" are InstCos where g :: forall a1 a2 .. a100. phi If we deal with the InstCos one at a time, we'll do this: 1. Find the kind of (g @ ty1 .. @ ty99) : forall a100. phi' 2. Substitute phi'[ ty100/a100 ], a single tyvar->type subst But this is a *quadratic* algorithm, and the blew up #5631. So it's very important to do the substitution simultaneously; cf Type.piResultTys (which in fact we call here). -} -- | Makes a coercion type from two types: the types whose equality -- is proven by the relevant 'Coercion'
1,338
false
true
0
7
360
370
172
198
null
null
dmjio/aeson
src/Data/Aeson.hs
bsd-3-clause
-- | Efficiently serialize a JSON value as a lazy 'L.ByteString' and write it to a file. encodeFile :: (ToJSON a) => FilePath -> a -> IO () encodeFile fp = L.writeFile fp . encode
179
encodeFile :: (ToJSON a) => FilePath -> a -> IO () encodeFile fp = L.writeFile fp . encode
90
encodeFile fp = L.writeFile fp . encode
39
true
true
0
10
34
51
24
27
null
null
DanielSchuessler/hstri
bin/layering.hs
gpl-3.0
imm3 = GTetE reso (unitToStd3 >>> (\(Tup4 (a,b,c,d)) -> let r0 = sumV [ p_before *^ liftVec3 (coords v) | (p_before,v) <- zip [a,b,c,d] [ p_before (1./vA), p_before (1./vB) , p_before (1./vC), p_before (2./vD) ] ] in r0 ^+^ tup3Z ^* heightFunction(c*d) ))
503
imm3 = GTetE reso (unitToStd3 >>> (\(Tup4 (a,b,c,d)) -> let r0 = sumV [ p_before *^ liftVec3 (coords v) | (p_before,v) <- zip [a,b,c,d] [ p_before (1./vA), p_before (1./vB) , p_before (1./vC), p_before (2./vD) ] ] in r0 ^+^ tup3Z ^* heightFunction(c*d) ))
503
imm3 = GTetE reso (unitToStd3 >>> (\(Tup4 (a,b,c,d)) -> let r0 = sumV [ p_before *^ liftVec3 (coords v) | (p_before,v) <- zip [a,b,c,d] [ p_before (1./vA), p_before (1./vB) , p_before (1./vC), p_before (2./vD) ] ] in r0 ^+^ tup3Z ^* heightFunction(c*d) ))
503
false
false
0
22
290
175
94
81
null
null
nevrenato/HetsAlloy
OMDoc/OMDocInterface.hs
gpl-2.0
getIdsForPresentation (CSy s) = [symbolId s]
44
getIdsForPresentation (CSy s) = [symbolId s]
44
getIdsForPresentation (CSy s) = [symbolId s]
44
false
false
0
7
5
21
10
11
null
null
Martoon-00/toy-compiler
launch/Main.hs
bsd-3-clause
launch :: [String] -> IO () launch [mode, inputFile] = do progBare <- either parseError identity . parseData <$> T.readFile inputFile let prog = L.linkLib L.stdLib progBare case mode of "-i" -> interact $ L.execute prog "-s" -> interact $ SM.execute $ either error identity (L.toIntermediate prog) "-o" -> do let insts = X86.compile $ either error identity $ L.toIntermediate prog outputPath = inputFile & filename %~ view basename runtimePath <- fromMaybe "./runtime" <$> lookupEnv "RC_RUNTIME" X86.produceBinary runtimePath outputPath insts `whenLeftM` \err -> error $ "Compilation error: " <> err other -> error $ sformat ("Unrecognised mode: "%string) other where parseError err = error $ "Parse error: " <> err
838
launch :: [String] -> IO () launch [mode, inputFile] = do progBare <- either parseError identity . parseData <$> T.readFile inputFile let prog = L.linkLib L.stdLib progBare case mode of "-i" -> interact $ L.execute prog "-s" -> interact $ SM.execute $ either error identity (L.toIntermediate prog) "-o" -> do let insts = X86.compile $ either error identity $ L.toIntermediate prog outputPath = inputFile & filename %~ view basename runtimePath <- fromMaybe "./runtime" <$> lookupEnv "RC_RUNTIME" X86.produceBinary runtimePath outputPath insts `whenLeftM` \err -> error $ "Compilation error: " <> err other -> error $ sformat ("Unrecognised mode: "%string) other where parseError err = error $ "Parse error: " <> err
838
launch [mode, inputFile] = do progBare <- either parseError identity . parseData <$> T.readFile inputFile let prog = L.linkLib L.stdLib progBare case mode of "-i" -> interact $ L.execute prog "-s" -> interact $ SM.execute $ either error identity (L.toIntermediate prog) "-o" -> do let insts = X86.compile $ either error identity $ L.toIntermediate prog outputPath = inputFile & filename %~ view basename runtimePath <- fromMaybe "./runtime" <$> lookupEnv "RC_RUNTIME" X86.produceBinary runtimePath outputPath insts `whenLeftM` \err -> error $ "Compilation error: " <> err other -> error $ sformat ("Unrecognised mode: "%string) other where parseError err = error $ "Parse error: " <> err
810
false
true
0
17
232
267
128
139
null
null
tonymorris/xsd
src/Text/XML/XSD.hs
bsd-3-clause
boolean :: Text -> Either String Bool boolean t | t == "true" || t == "1" = Right True | t == "false" || t == "0" = Right False | otherwise = Left $ "invalid boolean '" ++ unpack t ++ "'"
193
boolean :: Text -> Either String Bool boolean t | t == "true" || t == "1" = Right True | t == "false" || t == "0" = Right False | otherwise = Left $ "invalid boolean '" ++ unpack t ++ "'"
193
boolean t | t == "true" || t == "1" = Right True | t == "false" || t == "0" = Right False | otherwise = Left $ "invalid boolean '" ++ unpack t ++ "'"
155
false
true
2
10
49
102
45
57
null
null
tidalcycles/tidal-midi
Sound/Tidal/MIDI/VolcaFM.hs
gpl-3.0
(carattack, carattack_p) = pF "carattack" (Just 0)
50
(carattack, carattack_p) = pF "carattack" (Just 0)
50
(carattack, carattack_p) = pF "carattack" (Just 0)
50
false
false
0
7
6
24
12
12
null
null
mit-plv/riscv-semantics
src/Spec/Decode.hs
bsd-3-clause
supportsF RV64IF = True
23
supportsF RV64IF = True
23
supportsF RV64IF = True
23
false
false
1
5
3
13
4
9
null
null
Zomega/thesis
Wurm/RimlessWheel/calc.hs
mit
g :: Double g = 9.8
19
g :: Double g = 9.8
19
g = 9.8
7
false
true
0
6
5
18
7
11
null
null
shnarazk/mios
MultiConflict/utils/numbers.hs
gpl-3.0
options ::[OptDescr (Opt -> Opt)] options = [ Option ['t'] ["threshold"] (ReqArg (\v c -> c { threshold = read v }) "0.0") "threshold for p1" , Option [] ["UF250"] (NoArg (\c -> c { threshold = 12109075.01 })) "threshold for UF250; 12109075.01 (7.083)" , Option [] ["38bits"] (NoArg (\c -> c { threshold = 191761341.00 })) "threshold for 38bits; 191761341.00 (8.283)" , Option [] ["44bits"] (NoArg (\c -> c { threshold = 5204447789.00 })) "threshold for 44bits; 5204447789.00 (9.716)" , Option ['1'] ["p1"] (ReqArg (\v c -> c { p1 = read v }) "\"(0,10)\"") "range of p1" , Option ['2'] ["p2"] (ReqArg (\v c -> c { p2 = read v }) "\"(0,10)\"") "range of p2" , Option ['3'] ["p3"] (ReqArg (\v c -> c { p3 = read v }) "\"(0,10)\"") "range of p3" , Option ['4'] ["p4"] (ReqArg (\v c -> c { p4 = read v }) "\"(0,10)\"") "range of p4" , Option ['m'] ["message"] (ReqArg (\v c -> c { message = undecodeNewline v }) "\"\"") "extra message embeded into output" , Option ['h'] ["help"] (NoArg (\c -> c { help = True })) "display help message" ]
1,100
options ::[OptDescr (Opt -> Opt)] options = [ Option ['t'] ["threshold"] (ReqArg (\v c -> c { threshold = read v }) "0.0") "threshold for p1" , Option [] ["UF250"] (NoArg (\c -> c { threshold = 12109075.01 })) "threshold for UF250; 12109075.01 (7.083)" , Option [] ["38bits"] (NoArg (\c -> c { threshold = 191761341.00 })) "threshold for 38bits; 191761341.00 (8.283)" , Option [] ["44bits"] (NoArg (\c -> c { threshold = 5204447789.00 })) "threshold for 44bits; 5204447789.00 (9.716)" , Option ['1'] ["p1"] (ReqArg (\v c -> c { p1 = read v }) "\"(0,10)\"") "range of p1" , Option ['2'] ["p2"] (ReqArg (\v c -> c { p2 = read v }) "\"(0,10)\"") "range of p2" , Option ['3'] ["p3"] (ReqArg (\v c -> c { p3 = read v }) "\"(0,10)\"") "range of p3" , Option ['4'] ["p4"] (ReqArg (\v c -> c { p4 = read v }) "\"(0,10)\"") "range of p4" , Option ['m'] ["message"] (ReqArg (\v c -> c { message = undecodeNewline v }) "\"\"") "extra message embeded into output" , Option ['h'] ["help"] (NoArg (\c -> c { help = True })) "display help message" ]
1,100
options = [ Option ['t'] ["threshold"] (ReqArg (\v c -> c { threshold = read v }) "0.0") "threshold for p1" , Option [] ["UF250"] (NoArg (\c -> c { threshold = 12109075.01 })) "threshold for UF250; 12109075.01 (7.083)" , Option [] ["38bits"] (NoArg (\c -> c { threshold = 191761341.00 })) "threshold for 38bits; 191761341.00 (8.283)" , Option [] ["44bits"] (NoArg (\c -> c { threshold = 5204447789.00 })) "threshold for 44bits; 5204447789.00 (9.716)" , Option ['1'] ["p1"] (ReqArg (\v c -> c { p1 = read v }) "\"(0,10)\"") "range of p1" , Option ['2'] ["p2"] (ReqArg (\v c -> c { p2 = read v }) "\"(0,10)\"") "range of p2" , Option ['3'] ["p3"] (ReqArg (\v c -> c { p3 = read v }) "\"(0,10)\"") "range of p3" , Option ['4'] ["p4"] (ReqArg (\v c -> c { p4 = read v }) "\"(0,10)\"") "range of p4" , Option ['m'] ["message"] (ReqArg (\v c -> c { message = undecodeNewline v }) "\"\"") "extra message embeded into output" , Option ['h'] ["help"] (NoArg (\c -> c { help = True })) "display help message" ]
1,066
false
true
0
13
259
463
258
205
null
null
EarlGray/hasm
src/Language/HAsm/Parse.hs
mit
asmimm = do char '$' try readIntegerLit <|> (ImmS <$> symbol) <?> "integer or symbol in immediate value"
108
asmimm = do char '$' try readIntegerLit <|> (ImmS <$> symbol) <?> "integer or symbol in immediate value"
108
asmimm = do char '$' try readIntegerLit <|> (ImmS <$> symbol) <?> "integer or symbol in immediate value"
108
false
false
0
10
21
33
15
18
null
null
thkoch2001/gitit2
Network/Gitit2/Handler/Upload.hs
gpl-2.0
uploadForm :: HasGitit master => Maybe Upload -> Html -> MForm (HandlerT master IO) (FormResult Upload, WidgetT master IO ()) uploadForm mbupload = renderDivs $ Upload <$> fileAFormReq (fieldSettingsLabel MsgFileToUpload){ fsId = Just "file" } <*> areq pageField (fieldSettingsLabel MsgWikiName){ fsId = Just "wikiname" } (uploadWikiname <$> mbupload) <*> areq commentField (fieldSettingsLabel MsgChangeDescription) (uploadDescription <$> mbupload) <*> areq checkBoxField (fieldSettingsLabel MsgOverwrite) (uploadOverwrite <$> mbupload) where commentField = check validateNonempty textField validateNonempty y | T.null y = Left MsgValueRequired | otherwise = Right y pageField = check validatePage textField validatePage x = case fromPathMultiPiece (T.splitOn "/" x) of Just (_ :: Page) -> Right x Nothing -> Left MsgInvalidPageName
1,068
uploadForm :: HasGitit master => Maybe Upload -> Html -> MForm (HandlerT master IO) (FormResult Upload, WidgetT master IO ()) uploadForm mbupload = renderDivs $ Upload <$> fileAFormReq (fieldSettingsLabel MsgFileToUpload){ fsId = Just "file" } <*> areq pageField (fieldSettingsLabel MsgWikiName){ fsId = Just "wikiname" } (uploadWikiname <$> mbupload) <*> areq commentField (fieldSettingsLabel MsgChangeDescription) (uploadDescription <$> mbupload) <*> areq checkBoxField (fieldSettingsLabel MsgOverwrite) (uploadOverwrite <$> mbupload) where commentField = check validateNonempty textField validateNonempty y | T.null y = Left MsgValueRequired | otherwise = Right y pageField = check validatePage textField validatePage x = case fromPathMultiPiece (T.splitOn "/" x) of Just (_ :: Page) -> Right x Nothing -> Left MsgInvalidPageName
1,068
uploadForm mbupload = renderDivs $ Upload <$> fileAFormReq (fieldSettingsLabel MsgFileToUpload){ fsId = Just "file" } <*> areq pageField (fieldSettingsLabel MsgWikiName){ fsId = Just "wikiname" } (uploadWikiname <$> mbupload) <*> areq commentField (fieldSettingsLabel MsgChangeDescription) (uploadDescription <$> mbupload) <*> areq checkBoxField (fieldSettingsLabel MsgOverwrite) (uploadOverwrite <$> mbupload) where commentField = check validateNonempty textField validateNonempty y | T.null y = Left MsgValueRequired | otherwise = Right y pageField = check validatePage textField validatePage x = case fromPathMultiPiece (T.splitOn "/" x) of Just (_ :: Page) -> Right x Nothing -> Left MsgInvalidPageName
909
false
true
15
12
343
310
144
166
null
null
brendanhay/gogol
gogol-chat/gen/Network/Google/Chat/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GoogleAppsCardV1CardHeader' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gacvchImageAltText' -- -- * 'gacvchSubtitle' -- -- * 'gacvchImageURL' -- -- * 'gacvchImageType' -- -- * 'gacvchTitle' googleAppsCardV1CardHeader :: GoogleAppsCardV1CardHeader googleAppsCardV1CardHeader = GoogleAppsCardV1CardHeader' { _gacvchImageAltText = Nothing , _gacvchSubtitle = Nothing , _gacvchImageURL = Nothing , _gacvchImageType = Nothing , _gacvchTitle = Nothing }
592
googleAppsCardV1CardHeader :: GoogleAppsCardV1CardHeader googleAppsCardV1CardHeader = GoogleAppsCardV1CardHeader' { _gacvchImageAltText = Nothing , _gacvchSubtitle = Nothing , _gacvchImageURL = Nothing , _gacvchImageType = Nothing , _gacvchTitle = Nothing }
287
googleAppsCardV1CardHeader = GoogleAppsCardV1CardHeader' { _gacvchImageAltText = Nothing , _gacvchSubtitle = Nothing , _gacvchImageURL = Nothing , _gacvchImageType = Nothing , _gacvchTitle = Nothing }
226
true
true
1
7
106
63
41
22
null
null
ellis/OnTopOfThings
old-20150308/src/Args.hs
gpl-3.0
updM = optionsAddParamM
23
updM = optionsAddParamM
23
updM = optionsAddParamM
23
false
false
1
5
2
10
3
7
null
null
Fuuzetsu/cabal2nix
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
bsd-3-clause
libNixName "Xpm" = return "libXpm"
65
libNixName "Xpm" = return "libXpm"
65
libNixName "Xpm" = return "libXpm"
65
false
false
0
5
35
12
5
7
null
null
kairuku/stack
src/Stack/GhcPkg.hs
bsd-3-clause
getCabalPkgVer :: (MonadThrow m, MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m Version getCabalPkgVer menv wc = findGhcPkgVersion menv wc [] -- global DB cabalPackageName >>= maybe (throwM $ Couldn'tFindPkgId cabalPackageName) return
346
getCabalPkgVer :: (MonadThrow m, MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m Version getCabalPkgVer menv wc = findGhcPkgVersion menv wc [] -- global DB cabalPackageName >>= maybe (throwM $ Couldn'tFindPkgId cabalPackageName) return
346
getCabalPkgVer menv wc = findGhcPkgVersion menv wc [] -- global DB cabalPackageName >>= maybe (throwM $ Couldn'tFindPkgId cabalPackageName) return
190
false
true
2
9
97
103
48
55
null
null
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/Desugar/Generic/Type.hs
bsd-3-clause
desugarTyParen e = noDesugaring e
33
desugarTyParen e = noDesugaring e
33
desugarTyParen e = noDesugaring e
33
false
false
0
5
4
12
5
7
null
null
svenkeidel/hsynth
src/Data/Stream.hs
bsd-3-clause
(!!) :: Stream a -> Int -> a Cons a _ !! 0 = a
46
(!!) :: Stream a -> Int -> a Cons a _ !! 0 = a
46
Cons a _ !! 0 = a
17
false
true
0
6
14
35
17
18
null
null
markuspf/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
processModuleDocs :: Archive -> Idris () processModuleDocs ar = do ds <- getEntry [] "ibc_moduledocs" ar mapM_ (\ (n, d) -> updateIState (\i -> i { idris_moduledocs = addDef n d (idris_moduledocs i) })) ds
226
processModuleDocs :: Archive -> Idris () processModuleDocs ar = do ds <- getEntry [] "ibc_moduledocs" ar mapM_ (\ (n, d) -> updateIState (\i -> i { idris_moduledocs = addDef n d (idris_moduledocs i) })) ds
226
processModuleDocs ar = do ds <- getEntry [] "ibc_moduledocs" ar mapM_ (\ (n, d) -> updateIState (\i -> i { idris_moduledocs = addDef n d (idris_moduledocs i) })) ds
185
false
true
0
17
55
93
47
46
null
null
formrre/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
-- | Swaps the focused window with the first window. Useful for -- layouts such as 'HPairOneStack', for which the first window is the -- largest. swapWinWithFirstE :: EditorM () swapWinWithFirstE = windowsA %= swapFocus (fromJust . PL.moveTo 0)
244
swapWinWithFirstE :: EditorM () swapWinWithFirstE = windowsA %= swapFocus (fromJust . PL.moveTo 0)
98
swapWinWithFirstE = windowsA %= swapFocus (fromJust . PL.moveTo 0)
66
true
true
0
10
38
38
20
18
null
null
phischu/fragnix
builtins/base/GHC.Arr.hs
bsd-3-clause
assocs :: Ix i => Array i e -> [(i, e)] assocs arr@(Array l u _ _) = [(i, arr ! i) | i <- range (l,u)]
106
assocs :: Ix i => Array i e -> [(i, e)] assocs arr@(Array l u _ _) = [(i, arr ! i) | i <- range (l,u)]
106
assocs arr@(Array l u _ _) = [(i, arr ! i) | i <- range (l,u)]
66
false
true
1
10
30
91
46
45
null
null
CloudI/CloudI
src/tests/http_req/haskell/Main.hs
mit
task :: Int -> IO () task threadIndex = do let prerr = SysIO.hPutStrLn SysIO.stderr prout = putStrLn apiValue <- CloudI.api threadIndex () Nothing case apiValue of Left err -> prerr err Right api0 -> do let suffix = Char8.pack "haskell.xml/get" countValue0 <- CloudI.subscribeCount api0 suffix case countValue0 of Left err -> prerr err Right (0, api1) -> do subscribeValue <- CloudI.subscribe api1 suffix request_ case subscribeValue of Left err -> prerr err Right api2 -> do countValue1 <- CloudI.subscribeCount api2 suffix case countValue1 of Left err -> prerr err Right (1, api3) -> do pollValue <- CloudI.poll api3 (-1) case pollValue of Left err -> prerr err Right (_, _) -> prout "terminate http_req haskell" Right (_, _) -> prerr "subscribe_count /= 1" Right (_, _) -> prerr "subscribe_count /= 0"
1,556
task :: Int -> IO () task threadIndex = do let prerr = SysIO.hPutStrLn SysIO.stderr prout = putStrLn apiValue <- CloudI.api threadIndex () Nothing case apiValue of Left err -> prerr err Right api0 -> do let suffix = Char8.pack "haskell.xml/get" countValue0 <- CloudI.subscribeCount api0 suffix case countValue0 of Left err -> prerr err Right (0, api1) -> do subscribeValue <- CloudI.subscribe api1 suffix request_ case subscribeValue of Left err -> prerr err Right api2 -> do countValue1 <- CloudI.subscribeCount api2 suffix case countValue1 of Left err -> prerr err Right (1, api3) -> do pollValue <- CloudI.poll api3 (-1) case pollValue of Left err -> prerr err Right (_, _) -> prout "terminate http_req haskell" Right (_, _) -> prerr "subscribe_count /= 1" Right (_, _) -> prerr "subscribe_count /= 0"
1,556
task threadIndex = do let prerr = SysIO.hPutStrLn SysIO.stderr prout = putStrLn apiValue <- CloudI.api threadIndex () Nothing case apiValue of Left err -> prerr err Right api0 -> do let suffix = Char8.pack "haskell.xml/get" countValue0 <- CloudI.subscribeCount api0 suffix case countValue0 of Left err -> prerr err Right (0, api1) -> do subscribeValue <- CloudI.subscribe api1 suffix request_ case subscribeValue of Left err -> prerr err Right api2 -> do countValue1 <- CloudI.subscribeCount api2 suffix case countValue1 of Left err -> prerr err Right (1, api3) -> do pollValue <- CloudI.poll api3 (-1) case pollValue of Left err -> prerr err Right (_, _) -> prout "terminate http_req haskell" Right (_, _) -> prerr "subscribe_count /= 1" Right (_, _) -> prerr "subscribe_count /= 0"
1,535
false
true
0
31
883
336
154
182
null
null
worksap-ate/aws-sdk
test/EC2Tests/VolumeTests.hs
bsd-3-clause
region :: Text region = "ap-northeast-1"
40
region :: Text region = "ap-northeast-1"
40
region = "ap-northeast-1"
25
false
true
0
6
5
18
7
11
null
null
seereason/HJScript
src/HJScript/Objects/Math.hs
bsd-3-clause
cos :: Num t => Exp t -> JFloat cos = callMathMeth "cos"
57
cos :: Num t => Exp t -> JFloat cos = callMathMeth "cos"
57
cos = callMathMeth "cos"
24
false
true
0
8
13
35
14
21
null
null
rightfold/snek
src/SNEK/Check.hs
bsd-3-clause
checkVE (LetVE n v b) = do v' <- checkVE v let vT = veT v' b' <- local (eVSs %~ Map.insert n (VS vT)) $ checkVE b return $ LetVE n v' b'
144
checkVE (LetVE n v b) = do v' <- checkVE v let vT = veT v' b' <- local (eVSs %~ Map.insert n (VS vT)) $ checkVE b return $ LetVE n v' b'
144
checkVE (LetVE n v b) = do v' <- checkVE v let vT = veT v' b' <- local (eVSs %~ Map.insert n (VS vT)) $ checkVE b return $ LetVE n v' b'
144
false
false
0
14
41
93
41
52
null
null
snoyberg/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
noMethodBindingErrorName = err_nm "noMethodBindingError" noMethodBindingErrorIdKey nO_METHOD_BINDING_ERROR_ID
147
noMethodBindingErrorName = err_nm "noMethodBindingError" noMethodBindingErrorIdKey nO_METHOD_BINDING_ERROR_ID
147
noMethodBindingErrorName = err_nm "noMethodBindingError" noMethodBindingErrorIdKey nO_METHOD_BINDING_ERROR_ID
147
false
false
0
5
43
13
6
7
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/WBTree.hs
bsd-3-clause
deleteMax Leaf = Leaf
34
deleteMax Leaf = Leaf
34
deleteMax Leaf = Leaf
34
false
false
0
5
16
9
4
5
null
null
koterpillar/labyrinth
testsuite/TestLabyrinth/Move/ChoosePosition.hs
mit
test_outside = do assertMoveUpdates' l0 (ChoosePosition $ Pos (-1) (-1)) (MoveRes [InvalidMove]) $ do return ()
159
test_outside = do assertMoveUpdates' l0 (ChoosePosition $ Pos (-1) (-1)) (MoveRes [InvalidMove]) $ do return ()
159
test_outside = do assertMoveUpdates' l0 (ChoosePosition $ Pos (-1) (-1)) (MoveRes [InvalidMove]) $ do return ()
159
false
false
0
13
63
59
29
30
null
null
oden-lang/oden
src/Oden/Parser.hs
mit
nameBinding :: Parser NameBinding nameBinding = NameBinding <$> currentSourceInfo <*> identifier
96
nameBinding :: Parser NameBinding nameBinding = NameBinding <$> currentSourceInfo <*> identifier
96
nameBinding = NameBinding <$> currentSourceInfo <*> identifier
62
false
true
2
6
10
28
12
16
null
null
uwap/Idris-dev
src/Idris/ParseHelpers.hs
bsd-3-clause
initsEndAt :: (a -> Bool) -> [a] -> [[a]] initsEndAt p [] = []
62
initsEndAt :: (a -> Bool) -> [a] -> [[a]] initsEndAt p [] = []
62
initsEndAt p [] = []
20
false
true
0
10
13
50
25
25
null
null
haroldcarr/juno
src/Juno/Monitoring/EkgMonitor.hs
bsd-3-clause
-- | Return a new distribution associated with the given name and -- server. Multiple calls to 'getDistribution' with the same arguments -- will result in an 'error'. getDistribution :: T.Text -- ^ Distribution name -> Server -- ^ Server that will serve the distribution -> IO Distribution.Distribution getDistribution name server = Metrics.createDistribution name (serverMetricStore server)
429
getDistribution :: T.Text -- ^ Distribution name -> Server -- ^ Server that will serve the distribution -> IO Distribution.Distribution getDistribution name server = Metrics.createDistribution name (serverMetricStore server)
262
getDistribution name server = Metrics.createDistribution name (serverMetricStore server)
92
true
true
0
8
93
49
26
23
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Transforms/Simplify.hs
bsd-3-clause
isBoundLikePred _ = False
33
isBoundLikePred _ = False
33
isBoundLikePred _ = False
33
false
false
0
4
11
10
4
6
null
null
purebred-mua/purebred
src/Purebred/UI/ComposeEditor/Main.hs
agpl-3.0
widgetValue ComposeCc = view (asCompose . cCc . editEditorL . E.editContentsL . to currentLine)
95
widgetValue ComposeCc = view (asCompose . cCc . editEditorL . E.editContentsL . to currentLine)
95
widgetValue ComposeCc = view (asCompose . cCc . editEditorL . E.editContentsL . to currentLine)
95
false
false
0
10
13
37
17
20
null
null
acowley/ghc
compiler/main/HscTypes.hs
bsd-3-clause
mkIfaceWarnCache (WarnAll t) = \_ -> Just t
43
mkIfaceWarnCache (WarnAll t) = \_ -> Just t
43
mkIfaceWarnCache (WarnAll t) = \_ -> Just t
43
false
false
0
7
7
23
11
12
null
null
xmonad/xmonad-contrib
XMonad/Prompt.hs
bsd-3-clause
-- | Set @True@ to leave the current event loop, i.e. submaps. setModeDone :: Bool -> XP () setModeDone b = modify $ \s -> s { modeDone = b }
141
setModeDone :: Bool -> XP () setModeDone b = modify $ \s -> s { modeDone = b }
78
setModeDone b = modify $ \s -> s { modeDone = b }
49
true
true
0
8
30
41
22
19
null
null
bergmark/snaplet-fay
example/snaplets/fay/src/Index.hs
bsd-3-clause
loginOnload :: Fay () loginOnload = formOnload "#viewLoginForm" requestLoginHtml
80
loginOnload :: Fay () loginOnload = formOnload "#viewLoginForm" requestLoginHtml
80
loginOnload = formOnload "#viewLoginForm" requestLoginHtml
58
false
true
0
6
8
21
10
11
null
null
tom-lpsd/tokyocabinet-haskell
Database/TokyoCabinet/List.hs
bsd-3-clause
pop :: (Storable a) => List a -> IO (Maybe a) pop tcls = withForeignPtr (unTCList tcls) $ \p -> alloca $ \sizbuf -> do vbuf <- c_tclistpop p sizbuf flip maybePeek vbuf $ \vp -> do siz <- peek sizbuf peekPtrLen (vp, fromIntegral siz)
291
pop :: (Storable a) => List a -> IO (Maybe a) pop tcls = withForeignPtr (unTCList tcls) $ \p -> alloca $ \sizbuf -> do vbuf <- c_tclistpop p sizbuf flip maybePeek vbuf $ \vp -> do siz <- peek sizbuf peekPtrLen (vp, fromIntegral siz)
291
pop tcls = withForeignPtr (unTCList tcls) $ \p -> alloca $ \sizbuf -> do vbuf <- c_tclistpop p sizbuf flip maybePeek vbuf $ \vp -> do siz <- peek sizbuf peekPtrLen (vp, fromIntegral siz)
245
false
true
2
15
103
126
58
68
null
null
djoyner/zigbee-znet25
src/Network/Protocol/ZigBee/ZNet25/Frame.hs
bsd-3-clause
commandName :: String -> CommandName commandName s | length s == 2 = CommandName s | otherwise = error "CommandName must be two characters in length"
157
commandName :: String -> CommandName commandName s | length s == 2 = CommandName s | otherwise = error "CommandName must be two characters in length"
157
commandName s | length s == 2 = CommandName s | otherwise = error "CommandName must be two characters in length"
120
false
true
1
9
33
44
20
24
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\xF9EF' = "\x7498"
33
decomposeChar '\xF9EF' = "\x7498"
33
decomposeChar '\xF9EF' = "\x7498"
33
false
false
0
5
3
9
4
5
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1SelfSubjectRulesReviewStatus' Lens v1SelfSubjectRulesReviewStatusL :: Lens_' V1SelfSubjectRulesReview (Maybe V1SubjectRulesReviewStatus) v1SelfSubjectRulesReviewStatusL f V1SelfSubjectRulesReview{..} = (\v1SelfSubjectRulesReviewStatus -> V1SelfSubjectRulesReview { v1SelfSubjectRulesReviewStatus, ..} ) <$> f v1SelfSubjectRulesReviewStatus
347
v1SelfSubjectRulesReviewStatusL :: Lens_' V1SelfSubjectRulesReview (Maybe V1SubjectRulesReviewStatus) v1SelfSubjectRulesReviewStatusL f V1SelfSubjectRulesReview{..} = (\v1SelfSubjectRulesReviewStatus -> V1SelfSubjectRulesReview { v1SelfSubjectRulesReviewStatus, ..} ) <$> f v1SelfSubjectRulesReviewStatus
304
v1SelfSubjectRulesReviewStatusL f V1SelfSubjectRulesReview{..} = (\v1SelfSubjectRulesReviewStatus -> V1SelfSubjectRulesReview { v1SelfSubjectRulesReviewStatus, ..} ) <$> f v1SelfSubjectRulesReviewStatus
202
true
true
0
8
23
57
30
27
null
null
sdiehl/ghc
testsuite/tests/array/should_run/arr016.hs
bsd-3-clause
quickCheck = check quick
26
quickCheck = check quick
26
quickCheck = check quick
26
false
false
0
5
5
9
4
5
null
null
cgroza/HsRegex
HsRegex.hs
gpl-3.0
-- for extracting strings from index tuple extractMatches :: T.Text -> [(Int, Int)] -> [T.Text] extractMatches str = fmap (`subRange` str)
138
extractMatches :: T.Text -> [(Int, Int)] -> [T.Text] extractMatches str = fmap (`subRange` str)
95
extractMatches str = fmap (`subRange` str)
42
true
true
0
10
20
54
29
25
null
null
goshakkk/lisley
src/Lisley/Types.hs
mit
showError (ArgumentError msg exprs) = msg ++ ": " ++ unwordsCol exprs
69
showError (ArgumentError msg exprs) = msg ++ ": " ++ unwordsCol exprs
69
showError (ArgumentError msg exprs) = msg ++ ": " ++ unwordsCol exprs
69
false
false
0
7
11
28
13
15
null
null