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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jacekszymanski/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxID_ITALIC :: Int
wxID_ITALIC = 5127
| 37
|
wxID_ITALIC :: Int
wxID_ITALIC = 5127
| 37
|
wxID_ITALIC = 5127
| 18
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
khibino/haskell-hdbc-tool.201303
|
src/Database/HDBC/RecordJoin.hs
|
bsd-3-clause
|
leftPrimaryKey :: PrimaryKey a -> PrimaryKey (a, b)
leftPrimaryKey pa = definePrimaryKey (index pa)
| 99
|
leftPrimaryKey :: PrimaryKey a -> PrimaryKey (a, b)
leftPrimaryKey pa = definePrimaryKey (index pa)
| 99
|
leftPrimaryKey pa = definePrimaryKey (index pa)
| 47
| false
| true
| 0
| 7
| 13
| 39
| 19
| 20
| null | null |
jstolarek/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
deprecatedForExtension :: String -> TurnOnFlag -> DynP ()
deprecatedForExtension lang turn_on
= deprecate ("use -X" ++ flag ++ " or pragma {-# LANGUAGE " ++ flag ++ " #-} instead")
where
flag | turn_on = lang
| otherwise = "No"++lang
| 262
|
deprecatedForExtension :: String -> TurnOnFlag -> DynP ()
deprecatedForExtension lang turn_on
= deprecate ("use -X" ++ flag ++ " or pragma {-# LANGUAGE " ++ flag ++ " #-} instead")
where
flag | turn_on = lang
| otherwise = "No"++lang
| 262
|
deprecatedForExtension lang turn_on
= deprecate ("use -X" ++ flag ++ " or pragma {-# LANGUAGE " ++ flag ++ " #-} instead")
where
flag | turn_on = lang
| otherwise = "No"++lang
| 204
| false
| true
| 0
| 10
| 68
| 78
| 37
| 41
| null | null |
snoyberg/ghc
|
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
|
bsd-3-clause
|
mkNameG_tc = mkNameG TcClsName
| 30
|
mkNameG_tc = mkNameG TcClsName
| 30
|
mkNameG_tc = mkNameG TcClsName
| 30
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
NorfairKing/the-notes
|
src/Statistics/Main.hs
|
gpl-2.0
|
biasDefinition :: Note
biasDefinition = de $ do
lab biasDefinitionLabel
lab unbiasedDefinitionLabel
s ["Let", m pest_, "be a", pointEstimator]
s ["We define the", bias', m $ bs par_ pest_, "of", m pest_, "as follows"]
ma $ bs par_ pest_ === evm par_ pest_ - par_
s ["A", pointEstimator, "is called", unbiased', "if its", bias, "is zero", ", that is, if its", expectedValue, "is", m par_]
| 411
|
biasDefinition :: Note
biasDefinition = de $ do
lab biasDefinitionLabel
lab unbiasedDefinitionLabel
s ["Let", m pest_, "be a", pointEstimator]
s ["We define the", bias', m $ bs par_ pest_, "of", m pest_, "as follows"]
ma $ bs par_ pest_ === evm par_ pest_ - par_
s ["A", pointEstimator, "is called", unbiased', "if its", bias, "is zero", ", that is, if its", expectedValue, "is", m par_]
| 411
|
biasDefinition = de $ do
lab biasDefinitionLabel
lab unbiasedDefinitionLabel
s ["Let", m pest_, "be a", pointEstimator]
s ["We define the", bias', m $ bs par_ pest_, "of", m pest_, "as follows"]
ma $ bs par_ pest_ === evm par_ pest_ - par_
s ["A", pointEstimator, "is called", unbiased', "if its", bias, "is zero", ", that is, if its", expectedValue, "is", m par_]
| 388
| false
| true
| 0
| 11
| 88
| 151
| 78
| 73
| null | null |
tmielcza/demiurge
|
src/Inference.hs
|
apache-2.0
|
infer (premices `Imply` (lhs `Xor` rhs)) goal =
infer (premices `Imply` ((lhs `Or` rhs) `And` Not (lhs `And` rhs))) goal
| 121
|
infer (premices `Imply` (lhs `Xor` rhs)) goal =
infer (premices `Imply` ((lhs `Or` rhs) `And` Not (lhs `And` rhs))) goal
| 121
|
infer (premices `Imply` (lhs `Xor` rhs)) goal =
infer (premices `Imply` ((lhs `Or` rhs) `And` Not (lhs `And` rhs))) goal
| 121
| false
| false
| 1
| 12
| 20
| 78
| 44
| 34
| null | null |
nurpax/aeson
|
Data/Aeson/Types/Instances.hs
|
bsd-3-clause
|
-- | @withArray expected f value@ applies @f@ to the 'Array' when @value@ is an @Array@
-- and fails using @'typeMismatch' expected@ otherwise.
withArray :: String -> (Array -> Parser a) -> Value -> Parser a
withArray _ f (Array arr) = f arr
| 250
|
withArray :: String -> (Array -> Parser a) -> Value -> Parser a
withArray _ f (Array arr) = f arr
| 104
|
withArray _ f (Array arr) = f arr
| 40
| true
| true
| 0
| 9
| 52
| 54
| 27
| 27
| null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
primOpInfo FloatSinhOp = mkMonadic (fsLit "sinhFloat#") floatPrimTy
| 67
|
primOpInfo FloatSinhOp = mkMonadic (fsLit "sinhFloat#") floatPrimTy
| 67
|
primOpInfo FloatSinhOp = mkMonadic (fsLit "sinhFloat#") floatPrimTy
| 67
| false
| false
| 0
| 7
| 6
| 20
| 9
| 11
| null | null |
beni55/hermit
|
src/HERMIT/Dictionary/Common.hs
|
bsd-2-clause
|
callNameT :: MonadCatch m => HermitName -> Transform c m CoreExpr (CoreExpr, [CoreExpr])
callNameT nm = prefixFailMsg ("callNameT failed: not a call to '" ++ show nm ++ ".")
$ callPredT (const . cmpHN2Var nm)
| 221
|
callNameT :: MonadCatch m => HermitName -> Transform c m CoreExpr (CoreExpr, [CoreExpr])
callNameT nm = prefixFailMsg ("callNameT failed: not a call to '" ++ show nm ++ ".")
$ callPredT (const . cmpHN2Var nm)
| 221
|
callNameT nm = prefixFailMsg ("callNameT failed: not a call to '" ++ show nm ++ ".")
$ callPredT (const . cmpHN2Var nm)
| 132
| false
| true
| 2
| 10
| 47
| 82
| 39
| 43
| null | null |
ucsd-progsys/liquidhaskell-blog
|
blog.hs
|
mit
|
makeTemplates =
match "templates/*" $ compile templateCompiler
| 64
|
makeTemplates =
match "templates/*" $ compile templateCompiler
| 64
|
makeTemplates =
match "templates/*" $ compile templateCompiler
| 64
| false
| false
| 0
| 6
| 8
| 16
| 7
| 9
| null | null |
frontrowed/stratosphere
|
library-gen/Stratosphere/ResourceProperties/ApiGatewayMethodIntegration.hs
|
mit
|
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration.html#cfn-apigateway-method-integration-timeoutinmillis
agmiTimeoutInMillis :: Lens' ApiGatewayMethodIntegration (Maybe (Val Integer))
agmiTimeoutInMillis = lens _apiGatewayMethodIntegrationTimeoutInMillis (\s a -> s { _apiGatewayMethodIntegrationTimeoutInMillis = a })
| 381
|
agmiTimeoutInMillis :: Lens' ApiGatewayMethodIntegration (Maybe (Val Integer))
agmiTimeoutInMillis = lens _apiGatewayMethodIntegrationTimeoutInMillis (\s a -> s { _apiGatewayMethodIntegrationTimeoutInMillis = a })
| 213
|
agmiTimeoutInMillis = lens _apiGatewayMethodIntegrationTimeoutInMillis (\s a -> s { _apiGatewayMethodIntegrationTimeoutInMillis = a })
| 134
| true
| true
| 0
| 9
| 22
| 52
| 28
| 24
| null | null |
GaloisInc/saw-script
|
src/SAWScript/Prover/MRSolver/Term.hs
|
bsd-3-clause
|
compFunComp f CompFunReturn = f
| 31
|
compFunComp f CompFunReturn = f
| 31
|
compFunComp f CompFunReturn = f
| 31
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
nushio3/ghc
|
compiler/basicTypes/RdrName.hs
|
bsd-3-clause
|
rdrNameOcc :: RdrName -> OccName
rdrNameOcc (Qual _ occ) = occ
| 62
|
rdrNameOcc :: RdrName -> OccName
rdrNameOcc (Qual _ occ) = occ
| 62
|
rdrNameOcc (Qual _ occ) = occ
| 29
| false
| true
| 0
| 7
| 10
| 26
| 13
| 13
| null | null |
quixoftic/wwdcc
|
src/Main.hs
|
bsd-3-clause
|
parseEmail :: String -> Either ParseError C.Email
parseEmail str = parseEmail' $ split "," str
where
parseEmail' :: [String] -> Either ParseError C.Email
parseEmail' (x:y:[]) = Right $ C.Email (T.pack x) (T.pack y)
parseEmail' _ = Left $ ErrorMsg "Email format is from@example.com,to@example.com"
| 310
|
parseEmail :: String -> Either ParseError C.Email
parseEmail str = parseEmail' $ split "," str
where
parseEmail' :: [String] -> Either ParseError C.Email
parseEmail' (x:y:[]) = Right $ C.Email (T.pack x) (T.pack y)
parseEmail' _ = Left $ ErrorMsg "Email format is from@example.com,to@example.com"
| 310
|
parseEmail str = parseEmail' $ split "," str
where
parseEmail' :: [String] -> Either ParseError C.Email
parseEmail' (x:y:[]) = Right $ C.Email (T.pack x) (T.pack y)
parseEmail' _ = Left $ ErrorMsg "Email format is from@example.com,to@example.com"
| 260
| false
| true
| 3
| 10
| 56
| 118
| 58
| 60
| null | null |
Teaspot-Studio/Urho3D-Haskell
|
src/Graphics/Urho3D/Graphics/Drawable.hs
|
mit
|
drawableGetOctant :: (Parent Drawable a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Drawable or ascentor
-> m (Ptr Octant)
drawableGetOctant p = liftIO $ do
let ptr = parentPointer p
[C.exp| Octant* { $(Drawable* ptr)->GetOctant() } |]
-- | Return current zone.
| 272
|
drawableGetOctant :: (Parent Drawable a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Drawable or ascentor
-> m (Ptr Octant)
drawableGetOctant p = liftIO $ do
let ptr = parentPointer p
[C.exp| Octant* { $(Drawable* ptr)->GetOctant() } |]
-- | Return current zone.
| 272
|
drawableGetOctant p = liftIO $ do
let ptr = parentPointer p
[C.exp| Octant* { $(Drawable* ptr)->GetOctant() } |]
-- | Return current zone.
| 143
| false
| true
| 0
| 11
| 54
| 80
| 41
| 39
| null | null |
lukexi/ghc-7.8-arm64
|
compiler/cmm/PprC.hs
|
bsd-3-clause
|
pprLit :: CmmLit -> SDoc
pprLit lit = case lit of
CmmInt i rep -> pprHexVal i rep
CmmFloat f w -> parens (machRep_F_CType w) <> str
where d = fromRational f :: Double
str | isInfinite d && d < 0 = ptext (sLit "-INFINITY")
| isInfinite d = ptext (sLit "INFINITY")
| isNaN d = ptext (sLit "NAN")
| otherwise = text (show d)
-- these constants come from <math.h>
-- see #1861
CmmVec {} -> panic "PprC printing vector literal"
CmmBlock bid -> mkW_ <> pprCLabelAddr (infoTblLbl bid)
CmmHighStackMark -> panic "PprC printing high stack mark"
CmmLabel clbl -> mkW_ <> pprCLabelAddr clbl
CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i
CmmLabelDiffOff clbl1 _ i
-- WARNING:
-- * the lit must occur in the info table clbl2
-- * clbl1 must be an SRT, a slow entry point or a large bitmap
-> mkW_ <> pprCLabelAddr clbl1 <> char '+' <> int i
where
pprCLabelAddr lbl = char '&' <> ppr lbl
| 1,146
|
pprLit :: CmmLit -> SDoc
pprLit lit = case lit of
CmmInt i rep -> pprHexVal i rep
CmmFloat f w -> parens (machRep_F_CType w) <> str
where d = fromRational f :: Double
str | isInfinite d && d < 0 = ptext (sLit "-INFINITY")
| isInfinite d = ptext (sLit "INFINITY")
| isNaN d = ptext (sLit "NAN")
| otherwise = text (show d)
-- these constants come from <math.h>
-- see #1861
CmmVec {} -> panic "PprC printing vector literal"
CmmBlock bid -> mkW_ <> pprCLabelAddr (infoTblLbl bid)
CmmHighStackMark -> panic "PprC printing high stack mark"
CmmLabel clbl -> mkW_ <> pprCLabelAddr clbl
CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i
CmmLabelDiffOff clbl1 _ i
-- WARNING:
-- * the lit must occur in the info table clbl2
-- * clbl1 must be an SRT, a slow entry point or a large bitmap
-> mkW_ <> pprCLabelAddr clbl1 <> char '+' <> int i
where
pprCLabelAddr lbl = char '&' <> ppr lbl
| 1,146
|
pprLit lit = case lit of
CmmInt i rep -> pprHexVal i rep
CmmFloat f w -> parens (machRep_F_CType w) <> str
where d = fromRational f :: Double
str | isInfinite d && d < 0 = ptext (sLit "-INFINITY")
| isInfinite d = ptext (sLit "INFINITY")
| isNaN d = ptext (sLit "NAN")
| otherwise = text (show d)
-- these constants come from <math.h>
-- see #1861
CmmVec {} -> panic "PprC printing vector literal"
CmmBlock bid -> mkW_ <> pprCLabelAddr (infoTblLbl bid)
CmmHighStackMark -> panic "PprC printing high stack mark"
CmmLabel clbl -> mkW_ <> pprCLabelAddr clbl
CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i
CmmLabelDiffOff clbl1 _ i
-- WARNING:
-- * the lit must occur in the info table clbl2
-- * clbl1 must be an SRT, a slow entry point or a large bitmap
-> mkW_ <> pprCLabelAddr clbl1 <> char '+' <> int i
where
pprCLabelAddr lbl = char '&' <> ppr lbl
| 1,121
| false
| true
| 13
| 11
| 420
| 269
| 128
| 141
| null | null |
mvv/data-dword
|
tests/Tests.hs
|
bsd-3-clause
|
withUnary ∷ Iso α τ ⇒ τ → (τ → τ) → α → α
withUnary _ f = toArbitrary . f . fromArbitrary
| 89
|
withUnary ∷ Iso α τ ⇒ τ → (τ → τ) → α → α
withUnary _ f = toArbitrary . f . fromArbitrary
| 89
|
withUnary _ f = toArbitrary . f . fromArbitrary
| 47
| false
| true
| 0
| 9
| 23
| 52
| 26
| 26
| null | null |
energyflowanalysis/efa-2.1
|
src/EFA/Reference/Base.hs
|
bsd-3-clause
|
diffCommons :: Ref (Map.Map String Data) -> Map.Map String Data -> String
diffCommons (Ref rm) m =
List.intercalate "\n" $
zipWith f (Map.toList rm) (Map.elems m)
where f (label,x) y = diff label (Ref x) y
| 211
|
diffCommons :: Ref (Map.Map String Data) -> Map.Map String Data -> String
diffCommons (Ref rm) m =
List.intercalate "\n" $
zipWith f (Map.toList rm) (Map.elems m)
where f (label,x) y = diff label (Ref x) y
| 211
|
diffCommons (Ref rm) m =
List.intercalate "\n" $
zipWith f (Map.toList rm) (Map.elems m)
where f (label,x) y = diff label (Ref x) y
| 137
| false
| true
| 0
| 9
| 41
| 114
| 55
| 59
| null | null |
FranklinChen/hugs98-plus-Sep2006
|
packages/base/Data/IntMap.hs
|
bsd-3-clause
|
intersection t Nil = Nil
| 24
|
intersection t Nil = Nil
| 24
|
intersection t Nil = Nil
| 24
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
THeK3nger/quadarto
|
src/Main.hs
|
mit
|
usage :: IO a
usage = do
progName <- getProgName
putStrLn ("Usage " ++ progName ++ " <input-file> <color_threshold> [-o <output_file>]")
exitWith ExitSuccess
| 163
|
usage :: IO a
usage = do
progName <- getProgName
putStrLn ("Usage " ++ progName ++ " <input-file> <color_threshold> [-o <output_file>]")
exitWith ExitSuccess
| 163
|
usage = do
progName <- getProgName
putStrLn ("Usage " ++ progName ++ " <input-file> <color_threshold> [-o <output_file>]")
exitWith ExitSuccess
| 149
| false
| true
| 0
| 10
| 28
| 44
| 20
| 24
| null | null |
silkapp/xmlhtml
|
src/Text/XmlHtml/Cursor.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
-- | Navigates a 'Cursor' to the first child that matches the predicate.
findChild :: (Cursor -> Bool) -> Cursor -> Maybe Cursor
findChild p cur = search p right =<< firstChild cur
| 259
|
findChild :: (Cursor -> Bool) -> Cursor -> Maybe Cursor
findChild p cur = search p right =<< firstChild cur
| 107
|
findChild p cur = search p right =<< firstChild cur
| 51
| true
| true
| 0
| 7
| 33
| 48
| 24
| 24
| null | null |
peddie/fingertrees
|
src/Data/FingerTree/IntervalMap.hs
|
bsd-3-clause
|
atLeast :: Ord v => Key v -> v -> Bool
atLeast NoKey _ = False
| 67
|
atLeast :: Ord v => Key v -> v -> Bool
atLeast NoKey _ = False
| 67
|
atLeast NoKey _ = False
| 28
| false
| true
| 0
| 9
| 20
| 40
| 17
| 23
| null | null |
christiaanb/ghc
|
compiler/stgSyn/CoreToStg.hs
|
bsd-3-clause
|
stgArity _ LambdaBound = 0
| 33
|
stgArity _ LambdaBound = 0
| 33
|
stgArity _ LambdaBound = 0
| 33
| false
| false
| 1
| 5
| 11
| 13
| 5
| 8
| null | null |
fmthoma/ghc
|
compiler/basicTypes/DataCon.hs
|
bsd-3-clause
|
-- | Gives the number of actual fields in the /representation/ of the
-- data constructor. This may be more than appear in the source code;
-- the extra ones are the existentially quantified dictionaries
dataConRepArity :: DataCon -> Arity
dataConRepArity (MkData { dcRepArity = arity }) = arity
| 295
|
dataConRepArity :: DataCon -> Arity
dataConRepArity (MkData { dcRepArity = arity }) = arity
| 91
|
dataConRepArity (MkData { dcRepArity = arity }) = arity
| 55
| true
| true
| 0
| 9
| 48
| 33
| 19
| 14
| null | null |
travitch/foreign-inference
|
src/Foreign/Inference/Report/FunctionText.hs
|
bsd-3-clause
|
sSubprogramMetadata _ = False
| 30
|
isSubprogramMetadata _ = False
| 30
|
isSubprogramMetadata _ = False
| 30
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
caasi/spj-book-student-1992
|
src/Utils.hs
|
bsd-3-clause
|
setInertsection (a:as) [] = []
| 30
|
setInertsection (a:as) [] = []
| 30
|
setInertsection (a:as) [] = []
| 30
| false
| false
| 0
| 6
| 4
| 24
| 11
| 13
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/DeleteVolume.hs
|
mpl-2.0
|
-- | The ID of the volume.
dvvVolumeId :: Lens' DeleteVolume Text
dvvVolumeId = lens _dvvVolumeId (\ s a -> s{_dvvVolumeId = a})
| 128
|
dvvVolumeId :: Lens' DeleteVolume Text
dvvVolumeId = lens _dvvVolumeId (\ s a -> s{_dvvVolumeId = a})
| 101
|
dvvVolumeId = lens _dvvVolumeId (\ s a -> s{_dvvVolumeId = a})
| 62
| true
| true
| 0
| 9
| 22
| 40
| 22
| 18
| null | null |
GregorySchwartz/scan
|
src/Print.hs
|
gpl-3.0
|
-- | Print the clusters of a tree
printClusters :: ClusterTree -> T.Text
printClusters (ClusterTree clusterTree) = header <> body
where
header = "record_id,record,cluster_id\n"
body = T.unlines . fmap printCluster . leaves $ clusterTree
-- | Print the basic structure of the tree
| 292
|
printClusters :: ClusterTree -> T.Text
printClusters (ClusterTree clusterTree) = header <> body
where
header = "record_id,record,cluster_id\n"
body = T.unlines . fmap printCluster . leaves $ clusterTree
-- | Print the basic structure of the tree
| 258
|
printClusters (ClusterTree clusterTree) = header <> body
where
header = "record_id,record,cluster_id\n"
body = T.unlines . fmap printCluster . leaves $ clusterTree
-- | Print the basic structure of the tree
| 219
| true
| true
| 0
| 8
| 55
| 62
| 32
| 30
| null | null |
edgarlepe/scheme
|
src/Lib.hs
|
bsd-3-clause
|
parseDec2 :: Parser LispVal
parseDec2 = try (string "#d") >> Integer . read <$> many1 digit
| 91
|
parseDec2 :: Parser LispVal
parseDec2 = try (string "#d") >> Integer . read <$> many1 digit
| 91
|
parseDec2 = try (string "#d") >> Integer . read <$> many1 digit
| 63
| false
| true
| 0
| 10
| 15
| 38
| 18
| 20
| null | null |
wavewave/lhc-analysis-collection
|
exe/evchainRunXQLD_2sg.hs
|
gpl-3.0
|
map_2sg_2l4j2x :: ProcSpecMap
map_2sg_2l4j2x =
HM.fromList [(Nothing , MGProc [] [ "p p > go go QED=0" ])
,(Just (3,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
,(Just (4,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
]
| 623
|
map_2sg_2l4j2x :: ProcSpecMap
map_2sg_2l4j2x =
HM.fromList [(Nothing , MGProc [] [ "p p > go go QED=0" ])
,(Just (3,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
,(Just (4,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
]
| 623
|
map_2sg_2l4j2x =
HM.fromList [(Nothing , MGProc [] [ "p p > go go QED=0" ])
,(Just (3,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
,(Just (4,1000021,[]), MGProc [ "define lep = e+ e- mu+ mu- ve ve~ vm vm~ "
, "define sxx = sxxp sxxp~ "]
[ "go > lep j j sxx " ] )
]
| 593
| false
| true
| 0
| 10
| 336
| 109
| 63
| 46
| null | null |
ekmett/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxSTC_SN_IDENTIFIER :: Int
wxSTC_SN_IDENTIFIER = 11
| 51
|
wxSTC_SN_IDENTIFIER :: Int
wxSTC_SN_IDENTIFIER = 11
| 51
|
wxSTC_SN_IDENTIFIER = 11
| 24
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
awbraunstein/emonad
|
src/KillRing.hs
|
mit
|
yank :: KillRing -> (String, KillRing)
yank (KR (x : xs) s) = (x, (KR (s ++ xs) [x]))
| 85
|
yank :: KillRing -> (String, KillRing)
yank (KR (x : xs) s) = (x, (KR (s ++ xs) [x]))
| 85
|
yank (KR (x : xs) s) = (x, (KR (s ++ xs) [x]))
| 46
| false
| true
| 0
| 9
| 18
| 63
| 35
| 28
| null | null |
beni55/base-compat
|
test/Data/IORef/CompatSpec.hs
|
mit
|
spec :: Spec
spec = do
describe "modifyIORef'" $
it "mutates the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 $ modifyIORef' ref (+1)
readIORef ref `shouldReturn` (1000000 :: Int)
describe "atomicModifyIORef'" $
it "atomically modifies the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 . atomicModifyIORef' ref $ \n -> (n+1, ())
readIORef ref `shouldReturn` (1000000 :: Int)
| 479
|
spec :: Spec
spec = do
describe "modifyIORef'" $
it "mutates the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 $ modifyIORef' ref (+1)
readIORef ref `shouldReturn` (1000000 :: Int)
describe "atomicModifyIORef'" $
it "atomically modifies the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 . atomicModifyIORef' ref $ \n -> (n+1, ())
readIORef ref `shouldReturn` (1000000 :: Int)
| 479
|
spec = do
describe "modifyIORef'" $
it "mutates the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 $ modifyIORef' ref (+1)
readIORef ref `shouldReturn` (1000000 :: Int)
describe "atomicModifyIORef'" $
it "atomically modifies the contents of an IORef strictly" $ do
ref <- newIORef 0
replicateM_ 1000000 . atomicModifyIORef' ref $ \n -> (n+1, ())
readIORef ref `shouldReturn` (1000000 :: Int)
| 466
| false
| true
| 0
| 13
| 116
| 161
| 75
| 86
| null | null |
rueshyna/gogol
|
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Aliases/Delete.hs
|
mpl-2.0
|
-- | JSONP
cadCallback :: Lens' CoursesAliasesDelete (Maybe Text)
cadCallback
= lens _cadCallback (\ s a -> s{_cadCallback = a})
| 130
|
cadCallback :: Lens' CoursesAliasesDelete (Maybe Text)
cadCallback
= lens _cadCallback (\ s a -> s{_cadCallback = a})
| 119
|
cadCallback
= lens _cadCallback (\ s a -> s{_cadCallback = a})
| 64
| true
| true
| 1
| 9
| 21
| 50
| 25
| 25
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
finalise t = t
| 14
|
finalise t = t
| 14
|
finalise t = t
| 14
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
SamirTalwar/advent-of-code
|
2016/AOC_21_2.hs
|
mit
|
unapply (MovePosition (Position x) (Position y)) cyphertext =
apply (MovePosition (Position y) (Position x)) cyphertext
| 121
|
unapply (MovePosition (Position x) (Position y)) cyphertext =
apply (MovePosition (Position y) (Position x)) cyphertext
| 121
|
unapply (MovePosition (Position x) (Position y)) cyphertext =
apply (MovePosition (Position y) (Position x)) cyphertext
| 121
| false
| false
| 0
| 9
| 16
| 56
| 27
| 29
| null | null |
creswick/pgftransform
|
src/haskell/Multimap.hs
|
apache-2.0
|
get :: (Ord k, Ord v) => k -> Multimap k v -> Set.Set v
get k m = Map.findWithDefault Set.empty k m
| 99
|
get :: (Ord k, Ord v) => k -> Multimap k v -> Set.Set v
get k m = Map.findWithDefault Set.empty k m
| 99
|
get k m = Map.findWithDefault Set.empty k m
| 43
| false
| true
| 0
| 10
| 22
| 67
| 30
| 37
| null | null |
ezyang/ghc
|
compiler/coreSyn/TrieMap.hs
|
bsd-3-clause
|
xtE (D env (Coercion c)) f m = m { cm_co = cm_co m
|> xtG (D env c) f }
| 130
|
xtE (D env (Coercion c)) f m = m { cm_co = cm_co m
|> xtG (D env c) f }
| 130
|
xtE (D env (Coercion c)) f m = m { cm_co = cm_co m
|> xtG (D env c) f }
| 130
| false
| false
| 0
| 10
| 79
| 55
| 27
| 28
| null | null |
rahulmutt/ghcvm
|
libraries/base/Foreign/Marshal/Array.hs
|
bsd-3-clause
|
callocArray0 :: Storable a => Int -> IO (Ptr a)
callocArray0 size = callocArray (size + 1)
| 91
|
callocArray0 :: Storable a => Int -> IO (Ptr a)
callocArray0 size = callocArray (size + 1)
| 91
|
callocArray0 size = callocArray (size + 1)
| 43
| false
| true
| 0
| 10
| 17
| 48
| 22
| 26
| null | null |
ghc-android/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args
| 125
|
emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args
| 125
|
emitPrimOp dflags res ReadByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args
| 125
| false
| false
| 0
| 9
| 22
| 36
| 17
| 19
| null | null |
brendanhay/gogol
|
gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs
|
mpl-2.0
|
-- | Token identifying the next page of results to return. If empty, no
-- further results are available.
larNextPageToken :: Lens' ListAnnouncementsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
| 256
|
larNextPageToken :: Lens' ListAnnouncementsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
| 150
|
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
| 85
| true
| true
| 1
| 9
| 43
| 53
| 26
| 27
| null | null |
andorp/hs-bluesnap
|
src/Bluesnap/API/Response.hs
|
gpl-3.0
|
elementWeb_info :: XMLParser Web_info
elementWeb_info = parseSchemaType "web-info"
| 82
|
elementWeb_info :: XMLParser Web_info
elementWeb_info = parseSchemaType "web-info"
| 82
|
elementWeb_info = parseSchemaType "web-info"
| 44
| false
| true
| 0
| 5
| 7
| 17
| 8
| 9
| null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
|
mpl-2.0
|
-- | Resource name of the HL7v2 store, of the form
-- \`projects\/{project_id}\/datasets\/{dataset_id}\/hl7V2Stores\/{hl7v2_store_id}\`.
hvsName :: Lens' Hl7V2Store (Maybe Text)
hvsName = lens _hvsName (\ s a -> s{_hvsName = a})
| 228
|
hvsName :: Lens' Hl7V2Store (Maybe Text)
hvsName = lens _hvsName (\ s a -> s{_hvsName = a})
| 91
|
hvsName = lens _hvsName (\ s a -> s{_hvsName = a})
| 50
| true
| true
| 2
| 9
| 29
| 56
| 26
| 30
| null | null |
geocurnoff/nikki
|
src/Base/Types.hs
|
lgpl-3.0
|
levelMetaData file =
LevelMetaData (guessName $ getAbsoluteFilePath file) Nothing Nothing Nothing Nothing
| 109
|
levelMetaData file =
LevelMetaData (guessName $ getAbsoluteFilePath file) Nothing Nothing Nothing Nothing
| 109
|
levelMetaData file =
LevelMetaData (guessName $ getAbsoluteFilePath file) Nothing Nothing Nothing Nothing
| 109
| false
| false
| 1
| 8
| 15
| 34
| 14
| 20
| null | null |
elben/typing-haskell-in-haskell
|
Type.hs
|
bsd-3-clause
|
tUnit = TCon (Tycon "()" Star)
| 33
|
tUnit = TCon (Tycon "()" Star)
| 33
|
tUnit = TCon (Tycon "()" Star)
| 33
| false
| false
| 0
| 7
| 8
| 17
| 8
| 9
| null | null |
adinapoli/xmonad-contrib
|
XMonad/Layout/WindowArranger.hs
|
bsd-3-clause
|
arrangeWindows :: ArrangeAll -> [(a,Rectangle)] -> ([(a, Rectangle)], Maybe (WindowArranger a))
arrangeWindows b wrs = (wrs, Just $ WA True b (map t wrs))
where t = if b then AWR else WR
| 190
|
arrangeWindows :: ArrangeAll -> [(a,Rectangle)] -> ([(a, Rectangle)], Maybe (WindowArranger a))
arrangeWindows b wrs = (wrs, Just $ WA True b (map t wrs))
where t = if b then AWR else WR
| 190
|
arrangeWindows b wrs = (wrs, Just $ WA True b (map t wrs))
where t = if b then AWR else WR
| 94
| false
| true
| 0
| 10
| 36
| 98
| 54
| 44
| null | null |
vinnymac/glot-www
|
Widget/Editor.hs
|
mit
|
getFilename lang Nothing 2 = addExt lang "dio"
| 46
|
getFilename lang Nothing 2 = addExt lang "dio"
| 46
|
getFilename lang Nothing 2 = addExt lang "dio"
| 46
| false
| false
| 0
| 5
| 7
| 18
| 8
| 10
| null | null |
s3rvac/shws
|
src/Test/LogTest.hs
|
gpl-2.0
|
-- | Returns prefix (label) for all tests.
testLabelPrefix :: String
testLabelPrefix = "Log: "
| 94
|
testLabelPrefix :: String
testLabelPrefix = "Log: "
| 51
|
testLabelPrefix = "Log: "
| 25
| true
| true
| 0
| 4
| 14
| 12
| 7
| 5
| null | null |
xenog/haskoin
|
src/Network/Haskoin/Test/Message.hs
|
unlicense
|
-- | Arbitrary Message
arbitraryMessage :: Gen Message
arbitraryMessage =
oneof
[ MVersion <$> arbitraryVersion
, return MVerAck
, MAddr <$> arbitraryAddr1
, MInv <$> arbitraryInv1
, MGetData <$> arbitraryGetData
, MNotFound <$> arbitraryNotFound
, MGetBlocks <$> arbitraryGetBlocks
, MGetHeaders <$> arbitraryGetHeaders
, MTx <$> arbitraryTx
, MBlock <$> arbitraryBlock
, MMerkleBlock <$> arbitraryMerkleBlock
, MHeaders <$> arbitraryHeaders
, return MGetAddr
, MFilterLoad <$> arbitraryFilterLoad
, MFilterAdd <$> arbitraryFilterAdd
, return MFilterClear
, MPing <$> arbitraryPing
, MPong <$> arbitraryPong
, MAlert <$> arbitraryAlert
, MReject <$> arbitraryReject
, return MSendHeaders
]
| 870
|
arbitraryMessage :: Gen Message
arbitraryMessage =
oneof
[ MVersion <$> arbitraryVersion
, return MVerAck
, MAddr <$> arbitraryAddr1
, MInv <$> arbitraryInv1
, MGetData <$> arbitraryGetData
, MNotFound <$> arbitraryNotFound
, MGetBlocks <$> arbitraryGetBlocks
, MGetHeaders <$> arbitraryGetHeaders
, MTx <$> arbitraryTx
, MBlock <$> arbitraryBlock
, MMerkleBlock <$> arbitraryMerkleBlock
, MHeaders <$> arbitraryHeaders
, return MGetAddr
, MFilterLoad <$> arbitraryFilterLoad
, MFilterAdd <$> arbitraryFilterAdd
, return MFilterClear
, MPing <$> arbitraryPing
, MPong <$> arbitraryPong
, MAlert <$> arbitraryAlert
, MReject <$> arbitraryReject
, return MSendHeaders
]
| 847
|
arbitraryMessage =
oneof
[ MVersion <$> arbitraryVersion
, return MVerAck
, MAddr <$> arbitraryAddr1
, MInv <$> arbitraryInv1
, MGetData <$> arbitraryGetData
, MNotFound <$> arbitraryNotFound
, MGetBlocks <$> arbitraryGetBlocks
, MGetHeaders <$> arbitraryGetHeaders
, MTx <$> arbitraryTx
, MBlock <$> arbitraryBlock
, MMerkleBlock <$> arbitraryMerkleBlock
, MHeaders <$> arbitraryHeaders
, return MGetAddr
, MFilterLoad <$> arbitraryFilterLoad
, MFilterAdd <$> arbitraryFilterAdd
, return MFilterClear
, MPing <$> arbitraryPing
, MPong <$> arbitraryPong
, MAlert <$> arbitraryAlert
, MReject <$> arbitraryReject
, return MSendHeaders
]
| 815
| true
| true
| 0
| 7
| 271
| 161
| 89
| 72
| null | null |
kawu/factorized-tag-parser
|
src/NLP/Partage/Earley/AutoAP.hs
|
bsd-2-clause
|
-- | ListT from a maybe.
some :: Monad m => Maybe a -> P.ListT m a
some = each . maybeToList
| 92
|
some :: Monad m => Maybe a -> P.ListT m a
some = each . maybeToList
| 67
|
some = each . maybeToList
| 25
| true
| true
| 1
| 9
| 21
| 44
| 19
| 25
| null | null |
asm-products/ledger-backend
|
library/Ledger/Application/Router.hs
|
agpl-3.0
|
route :: Request -> Action
route request =
let path = pathInfo request
method = requestMethod request
in maybe notFoundA (fromMaybe notAllowedA) (route' path method)
| 182
|
route :: Request -> Action
route request =
let path = pathInfo request
method = requestMethod request
in maybe notFoundA (fromMaybe notAllowedA) (route' path method)
| 182
|
route request =
let path = pathInfo request
method = requestMethod request
in maybe notFoundA (fromMaybe notAllowedA) (route' path method)
| 155
| false
| true
| 0
| 9
| 41
| 61
| 29
| 32
| null | null |
thalerjonathan/phd
|
thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/Main.hs
|
gpl-3.0
|
durationSecs :: Double
durationSecs = 60
| 40
|
durationSecs :: Double
durationSecs = 60
| 40
|
durationSecs = 60
| 17
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
airtial/Codegames
|
codewars/isomorphism.hs
|
gpl-2.0
|
isoList :: ISO a b -> ISO [a] [b]
isoList (ab, ba) = (fmap ab, fmap ba)
| 71
|
isoList :: ISO a b -> ISO [a] [b]
isoList (ab, ba) = (fmap ab, fmap ba)
| 71
|
isoList (ab, ba) = (fmap ab, fmap ba)
| 37
| false
| true
| 0
| 8
| 16
| 57
| 28
| 29
| null | null |
maoe/text-keepalived
|
src/Text/Keepalived/Types.hs
|
bsd-3-clause
|
renderNotificationEmail :: [String] -> Doc
renderNotificationEmail [] = empty
| 77
|
renderNotificationEmail :: [String] -> Doc
renderNotificationEmail [] = empty
| 77
|
renderNotificationEmail [] = empty
| 34
| false
| true
| 0
| 6
| 8
| 23
| 12
| 11
| null | null |
kmate/raw-feldspar
|
src/Feldspar/Run/Frontend.hs
|
bsd-3-clause
|
-- | Add an @#include@ statement to the generated code
addInclude :: String -> Run ()
addInclude = Run . Imp.addInclude
| 119
|
addInclude :: String -> Run ()
addInclude = Run . Imp.addInclude
| 64
|
addInclude = Run . Imp.addInclude
| 33
| true
| true
| 0
| 7
| 20
| 27
| 14
| 13
| null | null |
BlackBears/alanduncan.me
|
Pandoc/Fields.hs
|
mit
|
commentsTag :: String -> Context String
commentsTag key = field key $ \item -> do
comments <- commentsOn item
if comments
then unsafeCompiler $ readFile "provider/templates/comments.html"
else return ""
| 222
|
commentsTag :: String -> Context String
commentsTag key = field key $ \item -> do
comments <- commentsOn item
if comments
then unsafeCompiler $ readFile "provider/templates/comments.html"
else return ""
| 222
|
commentsTag key = field key $ \item -> do
comments <- commentsOn item
if comments
then unsafeCompiler $ readFile "provider/templates/comments.html"
else return ""
| 182
| false
| true
| 0
| 11
| 48
| 64
| 30
| 34
| null | null |
burz/Feval
|
examples.hs
|
mit
|
-- 4 / (3 - 1)
anotherIntExpr = Fx $ (Fx $ CInt 4) `Div` (Fx $ (Fx $ CInt 3) `Sub` (Fx $ CInt 1))
| 97
|
anotherIntExpr = Fx $ (Fx $ CInt 4) `Div` (Fx $ (Fx $ CInt 3) `Sub` (Fx $ CInt 1))
| 82
|
anotherIntExpr = Fx $ (Fx $ CInt 4) `Div` (Fx $ (Fx $ CInt 3) `Sub` (Fx $ CInt 1))
| 82
| true
| false
| 0
| 11
| 25
| 60
| 33
| 27
| null | null |
olsner/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
showSpace_RDR = varQual_RDR gHC_SHOW (fsLit "showSpace")
| 66
|
showSpace_RDR = varQual_RDR gHC_SHOW (fsLit "showSpace")
| 66
|
showSpace_RDR = varQual_RDR gHC_SHOW (fsLit "showSpace")
| 66
| false
| false
| 0
| 7
| 15
| 17
| 8
| 9
| null | null |
adinapoli/api-tools
|
src/Data/API/Changes.hs
|
bsd-3-clause
|
-- | Check that a changelog adequately describes how to migrate from
-- one version to another.
validateChanges :: (Read db, Read rec, Read fld)
=> (API, Version) -- ^ Starting schema and version
-> (API, VersionExtra) -- ^ Ending schema and version
-> APIChangelog -- ^ Changelog to be validated
-> CustomMigrations db rec fld -- ^ Custom migration functions
-> TypeName -- ^ Name of the dataset's type
-> DataChecks -- ^ How thoroughly to validate changes
-> Either ValidateFailure [ValidateWarning]
validateChanges (api,ver) (api',ver') clog custom root chks = snd <$>
validateChanges' (api,ver) (api',ver') clog (readCustomMigrations custom) root chks
| 841
|
validateChanges :: (Read db, Read rec, Read fld)
=> (API, Version) -- ^ Starting schema and version
-> (API, VersionExtra) -- ^ Ending schema and version
-> APIChangelog -- ^ Changelog to be validated
-> CustomMigrations db rec fld -- ^ Custom migration functions
-> TypeName -- ^ Name of the dataset's type
-> DataChecks -- ^ How thoroughly to validate changes
-> Either ValidateFailure [ValidateWarning]
validateChanges (api,ver) (api',ver') clog custom root chks = snd <$>
validateChanges' (api,ver) (api',ver') clog (readCustomMigrations custom) root chks
| 745
|
validateChanges (api,ver) (api',ver') clog custom root chks = snd <$>
validateChanges' (api,ver) (api',ver') clog (readCustomMigrations custom) root chks
| 155
| true
| true
| 0
| 14
| 286
| 157
| 86
| 71
| null | null |
leohahn/scheme-interpreter
|
src/Lib.hs
|
bsd-3-clause
|
showVal (Float contents) = show contents
| 40
|
showVal (Float contents) = show contents
| 40
|
showVal (Float contents) = show contents
| 40
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
emaphis/pythagorean
|
test/Tables_Test.hs
|
bsd-3-clause
|
testGetNumLower = TestCase $ do
assertEqual "Small letters should return data"
1 (getNumLower seMap 'a')
assertEqual "Capital letters should return data"
1 (getNumLower seMap 'A')
| 191
|
testGetNumLower = TestCase $ do
assertEqual "Small letters should return data"
1 (getNumLower seMap 'a')
assertEqual "Capital letters should return data"
1 (getNumLower seMap 'A')
| 191
|
testGetNumLower = TestCase $ do
assertEqual "Small letters should return data"
1 (getNumLower seMap 'a')
assertEqual "Capital letters should return data"
1 (getNumLower seMap 'A')
| 191
| false
| false
| 0
| 10
| 36
| 46
| 21
| 25
| null | null |
zmeadows/zwerg
|
lib/Zwerg/Util.hs
|
mit
|
chunksOf :: Int -> [e] -> [[e]]
chunksOf i ls = map (take i) (build (splitter ls))
where
build g = g (:) []
splitter :: [e] -> ([e] -> a -> a) -> a -> a
splitter [] _ n = n
splitter l c n = l `c` splitter (drop i l) c n
| 237
|
chunksOf :: Int -> [e] -> [[e]]
chunksOf i ls = map (take i) (build (splitter ls))
where
build g = g (:) []
splitter :: [e] -> ([e] -> a -> a) -> a -> a
splitter [] _ n = n
splitter l c n = l `c` splitter (drop i l) c n
| 237
|
chunksOf i ls = map (take i) (build (splitter ls))
where
build g = g (:) []
splitter :: [e] -> ([e] -> a -> a) -> a -> a
splitter [] _ n = n
splitter l c n = l `c` splitter (drop i l) c n
| 205
| false
| true
| 0
| 9
| 73
| 157
| 82
| 75
| null | null |
portnov/yaml-rpc
|
Network/YAML/TH/Server.hs
|
bsd-3-clause
|
convertType t = fail $ "Unsupported type: " ++ show t
| 53
|
convertType t = fail $ "Unsupported type: " ++ show t
| 53
|
convertType t = fail $ "Unsupported type: " ++ show t
| 53
| false
| false
| 3
| 6
| 10
| 24
| 9
| 15
| null | null |
zcwj/emacs
|
lisps/mew/bin/hs/Mail.hs
|
gpl-3.0
|
unfold (l:ls) = unfold' $ break (== ':') l
where
unfold' (_,[]) = unfold ls'
unfold' (k,_:v') = (key, Value (v:vs)) : unfold ls'
where
key = map toLower k
v = dropWhile isSpace v'
vs = takeWhile (isSpace . head) ls
ls' = dropWhile (isSpace . head) ls
| 295
|
unfold (l:ls) = unfold' $ break (== ':') l
where
unfold' (_,[]) = unfold ls'
unfold' (k,_:v') = (key, Value (v:vs)) : unfold ls'
where
key = map toLower k
v = dropWhile isSpace v'
vs = takeWhile (isSpace . head) ls
ls' = dropWhile (isSpace . head) ls
| 295
|
unfold (l:ls) = unfold' $ break (== ':') l
where
unfold' (_,[]) = unfold ls'
unfold' (k,_:v') = (key, Value (v:vs)) : unfold ls'
where
key = map toLower k
v = dropWhile isSpace v'
vs = takeWhile (isSpace . head) ls
ls' = dropWhile (isSpace . head) ls
| 295
| false
| false
| 2
| 10
| 93
| 122
| 67
| 55
| null | null |
jxv/cis-194-winter-2016
|
src/Homework/Week04/Assignment.hs
|
mit
|
safeHead (x:_) = Just x
| 23
|
safeHead (x:_) = Just x
| 23
|
safeHead (x:_) = Just x
| 23
| false
| false
| 0
| 7
| 4
| 19
| 9
| 10
| null | null |
agocorona/haste-perch
|
Haste/App/Perch.hs
|
gpl-3.0
|
label cont = nelem "label" `child` cont
| 40
|
label cont = nelem "label" `child` cont
| 40
|
label cont = nelem "label" `child` cont
| 40
| false
| false
| 0
| 6
| 7
| 18
| 9
| 9
| null | null |
jbedo/LinProg
|
bench.hs
|
bsd-3-clause
|
benchLP :: Int -> IO (Maybe ResultCode, [(Int, Double)])
benchLP n =
solve $ obj $ sum $ map var [1..n]
| 105
|
benchLP :: Int -> IO (Maybe ResultCode, [(Int, Double)])
benchLP n =
solve $ obj $ sum $ map var [1..n]
| 105
|
benchLP n =
solve $ obj $ sum $ map var [1..n]
| 48
| false
| true
| 6
| 10
| 22
| 68
| 33
| 35
| null | null |
mdsteele/fallback
|
src/Fallback/State/Item.hs
|
gpl-3.0
|
potionValue Fish = CanSell 15
| 29
|
potionValue Fish = CanSell 15
| 29
|
potionValue Fish = CanSell 15
| 29
| false
| false
| 1
| 5
| 4
| 16
| 5
| 11
| null | null |
echatav/error-continuations
|
src/Control/Monad/Trans/EitherCont.hs
|
unlicense
|
-- |'liftMonadError' embeds a 'MonadError' computation 'm' 'r' into
-- 'EitherContT' 'a' 'l' 'm' 'r'.
--
-- 'liftMonadError' and 'lowerMonadError' are
-- one-sided inverses, making @MonadError l m => m r@ a retract of
-- 'EitherContT' 'r' 'l' 'm' 'r'.
--
-- prop> lowerMonadError . liftMonadError = id
liftMonadError :: MonadError l m => m r -> EitherContT a l m r
liftMonadError mr = EitherContT $ \kl kr -> (mr >>= kr) `catchError` kl
| 437
|
liftMonadError :: MonadError l m => m r -> EitherContT a l m r
liftMonadError mr = EitherContT $ \kl kr -> (mr >>= kr) `catchError` kl
| 134
|
liftMonadError mr = EitherContT $ \kl kr -> (mr >>= kr) `catchError` kl
| 71
| true
| true
| 0
| 9
| 75
| 76
| 41
| 35
| null | null |
jstolarek/haddock
|
haddock-api/src/Haddock/Backends/LaTeX.hs
|
bsd-2-clause
|
ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode
| 57
|
ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode
| 57
|
ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode
| 57
| false
| false
| 0
| 5
| 8
| 18
| 8
| 10
| null | null |
purebred-mua/purebred
|
src/Purebred/Plugin/Internal.hs
|
agpl-3.0
|
getConfigHook :: (cap m) => ConfigHook cap -> Configuration -> m Configuration
getConfigHook (ConfigHook f) = f
| 111
|
getConfigHook :: (cap m) => ConfigHook cap -> Configuration -> m Configuration
getConfigHook (ConfigHook f) = f
| 111
|
getConfigHook (ConfigHook f) = f
| 32
| false
| true
| 0
| 8
| 16
| 47
| 22
| 25
| null | null |
wavewave/hoodle-core
|
src/Hoodle/Coroutine/Default.hs
|
gpl-3.0
|
menuEventProcess MenuLoadPNGorJPG = fileLoadPNGorJPG
| 52
|
menuEventProcess MenuLoadPNGorJPG = fileLoadPNGorJPG
| 52
|
menuEventProcess MenuLoadPNGorJPG = fileLoadPNGorJPG
| 52
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
hvr/vector
|
Data/Vector/Unboxed.hs
|
bsd-3-clause
|
maxIndexBy = G.maxIndexBy
| 25
|
maxIndexBy = G.maxIndexBy
| 25
|
maxIndexBy = G.maxIndexBy
| 25
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
sdiehl/ghc
|
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
|
bsd-3-clause
|
-- | Returns whether a name represents an occurrence of a top-level variable
-- ('VarName'), data constructor ('DataName'), type constructor, or type class
-- ('TcClsName'). If we can't be sure, it returns 'Nothing'.
--
-- ==== __Examples__
--
-- >>> nameSpace 'Prelude.id
-- Just VarName
-- >>> nameSpace (mkName "id")
-- Nothing -- only works for top-level variable names
-- >>> nameSpace 'Data.Maybe.Just
-- Just DataName
-- >>> nameSpace ''Data.Maybe.Maybe
-- Just TcClsName
-- >>> nameSpace ''Data.Ord.Ord
-- Just TcClsName
nameSpace :: Name -> Maybe NameSpace
nameSpace (Name _ (NameG ns _ _)) = Just ns
| 609
|
nameSpace :: Name -> Maybe NameSpace
nameSpace (Name _ (NameG ns _ _)) = Just ns
| 80
|
nameSpace (Name _ (NameG ns _ _)) = Just ns
| 43
| true
| true
| 0
| 9
| 95
| 58
| 36
| 22
| null | null |
lseelenbinder/oodle-compiler
|
Oodle/TypeChecker.hs
|
mit
|
methodCall ::
Scope -> Token -> Expression -> String -> [Type] -> Bool -> Error Type
methodCall scope tk callScope name actualP returnNull = do
callScope' <- resolveScope scope callScope
method <- getMethodDecl callScope' (name, tk)
let formalP = getParameterTypes method
if length actualP == length formalP then
if matchParameters actualP formalP then return
(if returnNull then typeNull else (Oodle.SymbolTable.getType method))
else
fail $ msgWithToken' tk $
"actual parameters do not match formal parameters ("
++ show actualP ++ " != " ++ show formalP ++ ")"
else fail $ msgWithToken tk "incorrect number of parameters" name
where matchParameters [] [] = True
matchParameters ((TypeId t):actual) ((TypeId t'):formal) =
-- check if either side is a child of the other
isChildType scope (TypeId t) (TypeId t')
|| isChildType scope (TypeId t') (TypeId t)
&& matchParameters actual formal
matchParameters (a:actual) (f:formal) =
-- check primative types
f == a
&& matchParameters actual formal
| 1,146
|
methodCall ::
Scope -> Token -> Expression -> String -> [Type] -> Bool -> Error Type
methodCall scope tk callScope name actualP returnNull = do
callScope' <- resolveScope scope callScope
method <- getMethodDecl callScope' (name, tk)
let formalP = getParameterTypes method
if length actualP == length formalP then
if matchParameters actualP formalP then return
(if returnNull then typeNull else (Oodle.SymbolTable.getType method))
else
fail $ msgWithToken' tk $
"actual parameters do not match formal parameters ("
++ show actualP ++ " != " ++ show formalP ++ ")"
else fail $ msgWithToken tk "incorrect number of parameters" name
where matchParameters [] [] = True
matchParameters ((TypeId t):actual) ((TypeId t'):formal) =
-- check if either side is a child of the other
isChildType scope (TypeId t) (TypeId t')
|| isChildType scope (TypeId t') (TypeId t)
&& matchParameters actual formal
matchParameters (a:actual) (f:formal) =
-- check primative types
f == a
&& matchParameters actual formal
| 1,146
|
methodCall scope tk callScope name actualP returnNull = do
callScope' <- resolveScope scope callScope
method <- getMethodDecl callScope' (name, tk)
let formalP = getParameterTypes method
if length actualP == length formalP then
if matchParameters actualP formalP then return
(if returnNull then typeNull else (Oodle.SymbolTable.getType method))
else
fail $ msgWithToken' tk $
"actual parameters do not match formal parameters ("
++ show actualP ++ " != " ++ show formalP ++ ")"
else fail $ msgWithToken tk "incorrect number of parameters" name
where matchParameters [] [] = True
matchParameters ((TypeId t):actual) ((TypeId t'):formal) =
-- check if either side is a child of the other
isChildType scope (TypeId t) (TypeId t')
|| isChildType scope (TypeId t') (TypeId t)
&& matchParameters actual formal
matchParameters (a:actual) (f:formal) =
-- check primative types
f == a
&& matchParameters actual formal
| 1,059
| false
| true
| 2
| 15
| 304
| 339
| 168
| 171
| null | null |
josuf107/Fizzckle
|
src/Fizz/Utils.hs
|
gpl-3.0
|
isEmpty :: String -> Bool
isEmpty = (=="") . filter (not . flip elem whiteChars)
| 80
|
isEmpty :: String -> Bool
isEmpty = (=="") . filter (not . flip elem whiteChars)
| 80
|
isEmpty = (=="") . filter (not . flip elem whiteChars)
| 54
| false
| true
| 1
| 8
| 14
| 45
| 21
| 24
| null | null |
kemskems/cis194-spring13
|
src/HW07/Editor.hs
|
bsd-3-clause
|
doCommand :: Buffer b => Command -> Editor b ()
doCommand View = do
cur <- getCurLine
let ls = [(cur - 2) .. (cur + 2)]
ss <- mapM (\l -> onBuffer $ line l) ls
zipWithM_ (showL cur) ls ss
where
showL _ _ Nothing = return ()
showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s)
where m | n == l = "*"
| otherwise = " "
| 360
|
doCommand :: Buffer b => Command -> Editor b ()
doCommand View = do
cur <- getCurLine
let ls = [(cur - 2) .. (cur + 2)]
ss <- mapM (\l -> onBuffer $ line l) ls
zipWithM_ (showL cur) ls ss
where
showL _ _ Nothing = return ()
showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s)
where m | n == l = "*"
| otherwise = " "
| 360
|
doCommand View = do
cur <- getCurLine
let ls = [(cur - 2) .. (cur + 2)]
ss <- mapM (\l -> onBuffer $ line l) ls
zipWithM_ (showL cur) ls ss
where
showL _ _ Nothing = return ()
showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s)
where m | n == l = "*"
| otherwise = " "
| 312
| false
| true
| 2
| 12
| 114
| 209
| 97
| 112
| null | null |
deepakjois/hs-logo
|
src/Diagrams/TwoD/Path/Turtle/Internal.hs
|
bsd-3-clause
|
traceTurtle :: TurtleState
-> TurtleState
traceTurtle t = traceShow t t
| 83
|
traceTurtle :: TurtleState
-> TurtleState
traceTurtle t = traceShow t t
| 83
|
traceTurtle t = traceShow t t
| 29
| false
| true
| 0
| 5
| 22
| 23
| 11
| 12
| null | null |
johnfn/hrogue
|
Main.hs
|
mit
|
main :: IO ()
main = do
hSetBuffering stdin NoBuffering
let game = makeGame
print $ renderGame game
--putStrLn $ showmap gamemap
{- WASD
119
97
115
100
-}
gameLoop (Player 0 0)
| 202
|
main :: IO ()
main = do
hSetBuffering stdin NoBuffering
let game = makeGame
print $ renderGame game
--putStrLn $ showmap gamemap
{- WASD
119
97
115
100
-}
gameLoop (Player 0 0)
| 202
|
main = do
hSetBuffering stdin NoBuffering
let game = makeGame
print $ renderGame game
--putStrLn $ showmap gamemap
{- WASD
119
97
115
100
-}
gameLoop (Player 0 0)
| 188
| false
| true
| 0
| 9
| 58
| 59
| 27
| 32
| null | null |
google-research/dex-lang
|
src/dex.hs
|
bsd-3-clause
|
parseOpts :: ParserInfo CmdOpts
parseOpts = simpleInfo $ CmdOpts <$> parseMode <*> parseEvalOpts
| 96
|
parseOpts :: ParserInfo CmdOpts
parseOpts = simpleInfo $ CmdOpts <$> parseMode <*> parseEvalOpts
| 96
|
parseOpts = simpleInfo $ CmdOpts <$> parseMode <*> parseEvalOpts
| 64
| false
| true
| 0
| 7
| 12
| 26
| 13
| 13
| null | null |
vTurbine/ghc
|
compiler/basicTypes/OccName.hs
|
bsd-3-clause
|
otherNameSpace TvName = TcClsName
| 33
|
otherNameSpace TvName = TcClsName
| 33
|
otherNameSpace TvName = TcClsName
| 33
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
xu-hao/QueryArrow
|
QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Query.hs
|
bsd-3-clause
|
fsSupported _ (FAtomic2 _ (Atom (FileHostPredName _) _)) env = True
| 67
|
fsSupported _ (FAtomic2 _ (Atom (FileHostPredName _) _)) env = True
| 67
|
fsSupported _ (FAtomic2 _ (Atom (FileHostPredName _) _)) env = True
| 67
| false
| false
| 1
| 10
| 10
| 37
| 17
| 20
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Y2021/M04/D22/Exercise.hs
|
mit
|
{--
Here's the problem:
>>> (read "ShaolinSoccer") :: WuShu
ShaolinSoccer
... works find. However, if you recall from a previous exercise
... (Y2021.M04.D14.Exercise) ...
We write out these types in human-readable forms, AND they're in our data-store
in that format, SO, GIVEN THAT, how do we read a value that's been human-
readable-i-tized?
(That's a word now).
--}
dataStore :: [String]
dataStore = ["Shaolin Soccer", "Fruits Basket", "Kung Fu Hustle"]
| 461
|
dataStore :: [String]
dataStore = ["Shaolin Soccer", "Fruits Basket", "Kung Fu Hustle"]
| 87
|
dataStore = ["Shaolin Soccer", "Fruits Basket", "Kung Fu Hustle"]
| 65
| true
| true
| 0
| 5
| 75
| 24
| 15
| 9
| null | null |
martin-kolinek/stack
|
src/Stack/Build/Cache.hs
|
bsd-3-clause
|
-- | Try to read the mod time of the cabal file from the last build
tryGetCabalMod :: (MonadUnliftIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m)
=> Path Abs Dir -> m (Maybe ModTime)
tryGetCabalMod dir = $(versionedDecodeFile modTimeVC) =<< configCabalMod dir
| 298
|
tryGetCabalMod :: (MonadUnliftIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m)
=> Path Abs Dir -> m (Maybe ModTime)
tryGetCabalMod dir = $(versionedDecodeFile modTimeVC) =<< configCabalMod dir
| 230
|
tryGetCabalMod dir = $(versionedDecodeFile modTimeVC) =<< configCabalMod dir
| 76
| true
| true
| 0
| 9
| 59
| 82
| 40
| 42
| null | null |
rfranek/duckling
|
Duckling/Rules.hs
|
bsd-3-clause
|
langRules TR = TRRules.rules
| 28
|
langRules TR = TRRules.rules
| 28
|
langRules TR = TRRules.rules
| 28
| false
| false
| 0
| 5
| 3
| 11
| 5
| 6
| null | null |
nick0x01/Win32-services
|
src/System/Win32/SystemServices/Services/SVC_ACCESS_RIGHTS.hs
|
bsd-3-clause
|
fromDWORD x = Left $ "The " ++ printf "%x" x ++ " control code is unsupported by this binding."
| 95
|
fromDWORD x = Left $ "The " ++ printf "%x" x ++ " control code is unsupported by this binding."
| 95
|
fromDWORD x = Left $ "The " ++ printf "%x" x ++ " control code is unsupported by this binding."
| 95
| false
| false
| 0
| 7
| 19
| 26
| 12
| 14
| null | null |
tsiliakis/xmobar
|
src/Signal.hs
|
bsd-3-clause
|
changeScreenHandler :: TMVar SignalType -> IO ()
changeScreenHandler sig = do
atomically $ putTMVar sig ChangeScreen
return ()
| 132
|
changeScreenHandler :: TMVar SignalType -> IO ()
changeScreenHandler sig = do
atomically $ putTMVar sig ChangeScreen
return ()
| 132
|
changeScreenHandler sig = do
atomically $ putTMVar sig ChangeScreen
return ()
| 83
| false
| true
| 0
| 8
| 23
| 46
| 20
| 26
| null | null |
atwupack/LearnOpenGL
|
app/1_Getting-started/6_Coordinate-systems/Coordinate-systems-multiple-objects.hs
|
bsd-3-clause
|
cubePositions :: [V3 GLfloat]
cubePositions = [
V3 0.0 0.0 0.0,
V3 2.0 5.0 (-15.0),
V3 (-1.5) (-2.2) (-2.5),
V3 (-3.8) (-2.0) (-12.3),
V3 2.4 (-0.4) (-3.5),
V3 (-1.7) 3.0 (-7.5),
V3 1.3 (-2.0) (-2.5),
V3 1.5 2.0 (-2.5),
V3 1.5 0.2 (-1.5),
V3 (-1.3) 1.0 (-1.5)]
| 306
|
cubePositions :: [V3 GLfloat]
cubePositions = [
V3 0.0 0.0 0.0,
V3 2.0 5.0 (-15.0),
V3 (-1.5) (-2.2) (-2.5),
V3 (-3.8) (-2.0) (-12.3),
V3 2.4 (-0.4) (-3.5),
V3 (-1.7) 3.0 (-7.5),
V3 1.3 (-2.0) (-2.5),
V3 1.5 2.0 (-2.5),
V3 1.5 0.2 (-1.5),
V3 (-1.3) 1.0 (-1.5)]
| 306
|
cubePositions = [
V3 0.0 0.0 0.0,
V3 2.0 5.0 (-15.0),
V3 (-1.5) (-2.2) (-2.5),
V3 (-3.8) (-2.0) (-12.3),
V3 2.4 (-0.4) (-3.5),
V3 (-1.7) 3.0 (-7.5),
V3 1.3 (-2.0) (-2.5),
V3 1.5 2.0 (-2.5),
V3 1.5 0.2 (-1.5),
V3 (-1.3) 1.0 (-1.5)]
| 276
| false
| true
| 0
| 8
| 92
| 202
| 110
| 92
| null | null |
DSLsofMath/Hatlab
|
tests/Tests.hs
|
bsd-3-clause
|
prop_simplify e x = evalFun e x == evalFun (simplify e) x
| 57
|
prop_simplify e x = evalFun e x == evalFun (simplify e) x
| 57
|
prop_simplify e x = evalFun e x == evalFun (simplify e) x
| 57
| false
| false
| 3
| 5
| 11
| 35
| 14
| 21
| null | null |
R-Morgan/hasStat
|
Dirichlet.hs
|
gpl-3.0
|
dirichletPDF :: [Float] -> [Float] -> Float
dirichletPDF xs alphas = (1 / (multinomialBeta alphas)) *
(product [x**(alpha - 1) | (x, alpha) <- zip xs alphas])
| 184
|
dirichletPDF :: [Float] -> [Float] -> Float
dirichletPDF xs alphas = (1 / (multinomialBeta alphas)) *
(product [x**(alpha - 1) | (x, alpha) <- zip xs alphas])
| 184
|
dirichletPDF xs alphas = (1 / (multinomialBeta alphas)) *
(product [x**(alpha - 1) | (x, alpha) <- zip xs alphas])
| 140
| false
| true
| 0
| 12
| 52
| 92
| 47
| 45
| null | null |
pdbartlett/misc-stuff
|
unfuddle/PdbMisc/Haskell/Tutorial/Main.hs
|
apache-2.0
|
primes = sieve [2..]
where
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
-- A function to compute fibonacci numbers
| 141
|
primes = sieve [2..]
where
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
-- A function to compute fibonacci numbers
| 141
|
primes = sieve [2..]
where
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
-- A function to compute fibonacci numbers
| 141
| false
| false
| 3
| 9
| 45
| 69
| 33
| 36
| null | null |
vimalloc/apfs-auto-snapshot
|
src/TMSnapshot.hs
|
agpl-3.0
|
parseTMSnapshotDates :: (MonadError String m) => [String] -> m [TMSnapshot]
parseTMSnapshotDates dates = sequence $ parseTMDate <$> dates
| 137
|
parseTMSnapshotDates :: (MonadError String m) => [String] -> m [TMSnapshot]
parseTMSnapshotDates dates = sequence $ parseTMDate <$> dates
| 137
|
parseTMSnapshotDates dates = sequence $ parseTMDate <$> dates
| 61
| false
| true
| 0
| 8
| 17
| 46
| 24
| 22
| null | null |
mheinzel/Rome
|
src/Lib.hs
|
mit
|
uploadBinary :: AWS.ToBody a
=> S3.BucketName
-> a
-> FilePath
-> FilePath
-> ReaderT (AWS.Env, Bool) IO ()
uploadBinary s3BucketName binaryZip destinationPath objectName = do
(env, verbose) <- ask
let objectKey = S3.ObjectKey $ T.pack destinationPath
runResourceT . AWS.runAWS env $ do
let body = AWS.toBody binaryZip
let sayFunc = if verbose then sayLnWithTime else sayLn
when verbose $
sayFunc $ "Started uploading " <> objectName <> " to: " <> destinationPath
rs <- AWS.trying AWS._Error (AWS.send $ S3.putObject s3BucketName objectKey body)
case rs of
Left e -> sayFunc $ "Error uploading " <> objectName <> ": " <> awsErrorToString e
Right _ -> sayFunc $ "Uploaded " <> objectName <> " to: " <> destinationPath
-- | Saves a ByteString to file in a given base directory.
| 887
|
uploadBinary :: AWS.ToBody a
=> S3.BucketName
-> a
-> FilePath
-> FilePath
-> ReaderT (AWS.Env, Bool) IO ()
uploadBinary s3BucketName binaryZip destinationPath objectName = do
(env, verbose) <- ask
let objectKey = S3.ObjectKey $ T.pack destinationPath
runResourceT . AWS.runAWS env $ do
let body = AWS.toBody binaryZip
let sayFunc = if verbose then sayLnWithTime else sayLn
when verbose $
sayFunc $ "Started uploading " <> objectName <> " to: " <> destinationPath
rs <- AWS.trying AWS._Error (AWS.send $ S3.putObject s3BucketName objectKey body)
case rs of
Left e -> sayFunc $ "Error uploading " <> objectName <> ": " <> awsErrorToString e
Right _ -> sayFunc $ "Uploaded " <> objectName <> " to: " <> destinationPath
-- | Saves a ByteString to file in a given base directory.
| 887
|
uploadBinary s3BucketName binaryZip destinationPath objectName = do
(env, verbose) <- ask
let objectKey = S3.ObjectKey $ T.pack destinationPath
runResourceT . AWS.runAWS env $ do
let body = AWS.toBody binaryZip
let sayFunc = if verbose then sayLnWithTime else sayLn
when verbose $
sayFunc $ "Started uploading " <> objectName <> " to: " <> destinationPath
rs <- AWS.trying AWS._Error (AWS.send $ S3.putObject s3BucketName objectKey body)
case rs of
Left e -> sayFunc $ "Error uploading " <> objectName <> ": " <> awsErrorToString e
Right _ -> sayFunc $ "Uploaded " <> objectName <> " to: " <> destinationPath
-- | Saves a ByteString to file in a given base directory.
| 714
| false
| true
| 32
| 12
| 239
| 247
| 126
| 121
| null | null |
alevy/postgresql-orm
|
src/Database/PostgreSQL/ORM/Association.hs
|
gpl-3.0
|
nestAssoc :: (Model a, Model b) =>
Association a b -> Association b c -> Association a (b :. c)
nestAssoc ab bc = ab { assocSelect = dbNest (assocSelect ab) (assocSelect bc)
, assocSelectOnlyB = assocSelect bc }
| 245
|
nestAssoc :: (Model a, Model b) =>
Association a b -> Association b c -> Association a (b :. c)
nestAssoc ab bc = ab { assocSelect = dbNest (assocSelect ab) (assocSelect bc)
, assocSelectOnlyB = assocSelect bc }
| 245
|
nestAssoc ab bc = ab { assocSelect = dbNest (assocSelect ab) (assocSelect bc)
, assocSelectOnlyB = assocSelect bc }
| 136
| false
| true
| 0
| 10
| 72
| 95
| 48
| 47
| null | null |
Shimuuar/protobuf
|
Data/Protobuf/Serialize/Protobuf.hs
|
bsd-3-clause
|
writeRequired n getter st = do
a <- getter
let go (MutableMsg marr ref) =
MutableMsg (marr >>= (\arr -> H.writeMutableHVec arr n a >> return arr))
ref
return $ go st
-- | Write optional field into accumulator
| 242
|
writeRequired n getter st = do
a <- getter
let go (MutableMsg marr ref) =
MutableMsg (marr >>= (\arr -> H.writeMutableHVec arr n a >> return arr))
ref
return $ go st
-- | Write optional field into accumulator
| 242
|
writeRequired n getter st = do
a <- getter
let go (MutableMsg marr ref) =
MutableMsg (marr >>= (\arr -> H.writeMutableHVec arr n a >> return arr))
ref
return $ go st
-- | Write optional field into accumulator
| 242
| false
| false
| 1
| 18
| 72
| 93
| 41
| 52
| null | null |
ucsd-progsys/nanomaly
|
src/NanoML/Classify.hs
|
bsd-3-clause
|
tis_op_ctx :: Bop -> Feature -- TExpr -> TExpr -> [Double]
tis_op_ctx b = ( mkContextLabels ("Is-" ++ show b), mkContextFeatures (tis_op b) )
| 141
|
tis_op_ctx :: Bop -> Feature
tis_op_ctx b = ( mkContextLabels ("Is-" ++ show b), mkContextFeatures (tis_op b) )
| 111
|
tis_op_ctx b = ( mkContextLabels ("Is-" ++ show b), mkContextFeatures (tis_op b) )
| 82
| true
| true
| 0
| 10
| 23
| 53
| 25
| 28
| null | null |
DrewBarclay/XMPP-Chatbot
|
src/XmlUtils.hs
|
bsd-3-clause
|
nodeToText _ = fromText ""
| 26
|
nodeToText _ = fromText ""
| 26
|
nodeToText _ = fromText ""
| 26
| false
| false
| 0
| 4
| 4
| 13
| 5
| 8
| null | null |
markflorisson/hpack
|
testrepo/bytestring-0.10.2.0/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs
|
bsd-3-clause
|
int8HexFixed_list :: Int8 -> [Word8]
int8HexFixed_list = wordHexFixed_list . (fromIntegral :: Int8 -> Word8 )
| 111
|
int8HexFixed_list :: Int8 -> [Word8]
int8HexFixed_list = wordHexFixed_list . (fromIntegral :: Int8 -> Word8 )
| 111
|
int8HexFixed_list = wordHexFixed_list . (fromIntegral :: Int8 -> Word8 )
| 74
| false
| true
| 0
| 7
| 16
| 32
| 18
| 14
| null | null |
nushio3/ghc
|
compiler/simplCore/CoreMonad.hs
|
bsd-3-clause
|
cmpEqTick (BetaReduction a) (BetaReduction b) = a `compare` b
| 87
|
cmpEqTick (BetaReduction a) (BetaReduction b) = a `compare` b
| 87
|
cmpEqTick (BetaReduction a) (BetaReduction b) = a `compare` b
| 87
| false
| false
| 1
| 8
| 34
| 33
| 15
| 18
| null | null |
brendanhay/gogol
|
gogol-compute/gen/Network/Google/Resource/Compute/SSLPolicies/Delete.hs
|
mpl-2.0
|
-- | Name of the SSL policy to delete. The name must be 1-63 characters long,
-- and comply with RFC1035.
spdSSLPolicy :: Lens' SSLPoliciesDelete Text
spdSSLPolicy
= lens _spdSSLPolicy (\ s a -> s{_spdSSLPolicy = a})
| 218
|
spdSSLPolicy :: Lens' SSLPoliciesDelete Text
spdSSLPolicy
= lens _spdSSLPolicy (\ s a -> s{_spdSSLPolicy = a})
| 112
|
spdSSLPolicy
= lens _spdSSLPolicy (\ s a -> s{_spdSSLPolicy = a})
| 67
| true
| true
| 1
| 9
| 38
| 47
| 23
| 24
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.