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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vikraman/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | idSizeW :: DynFlags -> Id -> Int
idSizeW dflags = argRepSizeW dflags . bcIdArgRep | 81 | idSizeW :: DynFlags -> Id -> Int
idSizeW dflags = argRepSizeW dflags . bcIdArgRep | 81 | idSizeW dflags = argRepSizeW dflags . bcIdArgRep | 48 | false | true | 1 | 8 | 13 | 36 | 15 | 21 | null | null |
hudon/refraction-hs | src/Network/Refraction/Tor.hs | gpl-3.0 | isTorUp :: IO Bool
isTorUp = let maybeToBool Nothing = return False
maybeToBool _ = return True
in whichControlPort >>= maybeToBool | 155 | isTorUp :: IO Bool
isTorUp = let maybeToBool Nothing = return False
maybeToBool _ = return True
in whichControlPort >>= maybeToBool | 155 | isTorUp = let maybeToBool Nothing = return False
maybeToBool _ = return True
in whichControlPort >>= maybeToBool | 136 | false | true | 0 | 9 | 44 | 46 | 21 | 25 | null | null |
HaritzPuerto/SemanticsforWhileLanguage | While/Exercises02.hs | mit | nsAexp (NonTerminal (Add x y) s) = Terminal z
where
Terminal z1 = nsAexp (NonTerminal x s)
Terminal z2 = nsAexp (NonTerminal y s)
z = z1 + z2 | 149 | nsAexp (NonTerminal (Add x y) s) = Terminal z
where
Terminal z1 = nsAexp (NonTerminal x s)
Terminal z2 = nsAexp (NonTerminal y s)
z = z1 + z2 | 149 | nsAexp (NonTerminal (Add x y) s) = Terminal z
where
Terminal z1 = nsAexp (NonTerminal x s)
Terminal z2 = nsAexp (NonTerminal y s)
z = z1 + z2 | 149 | false | false | 1 | 9 | 36 | 83 | 37 | 46 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GamePhysics/Assumptions.hs | bsd-2-clause | allObject :: Sentence -> [Sentence]
allObject thing = [S "All objects are", thing] | 82 | allObject :: Sentence -> [Sentence]
allObject thing = [S "All objects are", thing] | 82 | allObject thing = [S "All objects are", thing] | 46 | false | true | 0 | 8 | 12 | 36 | 17 | 19 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | testNewNode07 = testNodeEq "testNewNode07" tnns2 tnn07 | 54 | testNewNode07 = testNodeEq "testNewNode07" tnns2 tnn07 | 54 | testNewNode07 = testNodeEq "testNewNode07" tnns2 tnn07 | 54 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
urbanslug/ghc | compiler/utils/Util.hs | bsd-3-clause | third3 :: (c -> d) -> (a, b, c) -> (a, b, d)
third3 f (a, b, c) = (a, b, f c) | 77 | third3 :: (c -> d) -> (a, b, c) -> (a, b, d)
third3 f (a, b, c) = (a, b, f c) | 77 | third3 f (a, b, c) = (a, b, f c) | 32 | false | true | 0 | 7 | 22 | 70 | 41 | 29 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The AWS account ID of the image owner.
iOwnerId :: Lens' Image Text
iOwnerId = lens _iOwnerId (\s a -> s { _iOwnerId = a }) | 128 | iOwnerId :: Lens' Image Text
iOwnerId = lens _iOwnerId (\s a -> s { _iOwnerId = a }) | 84 | iOwnerId = lens _iOwnerId (\s a -> s { _iOwnerId = a }) | 55 | true | true | 0 | 9 | 27 | 47 | 23 | 24 | null | null |
kellino/TypeSystems | gradualSecurity/src/Parser.hs | mit | ifThenElse :: Parser Term
ifThenElse = do
rword "if"
b <- expr
rword "then"
e1 <- expr
rword "else"
e2 <- expr
return $ IfThenElse b e1 e2
-----------------------
-- Boolean Operators --
----------------------- | 241 | ifThenElse :: Parser Term
ifThenElse = do
rword "if"
b <- expr
rword "then"
e1 <- expr
rword "else"
e2 <- expr
return $ IfThenElse b e1 e2
-----------------------
-- Boolean Operators --
----------------------- | 241 | ifThenElse = do
rword "if"
b <- expr
rword "then"
e1 <- expr
rword "else"
e2 <- expr
return $ IfThenElse b e1 e2
-----------------------
-- Boolean Operators --
----------------------- | 215 | false | true | 1 | 9 | 64 | 74 | 31 | 43 | null | null |
nevrenato/HetsAlloy | Maude/PreComorphism.hs | gpl-2.0 | -- | creates a conjuctive formula distinguishing the size of the list
createConjForm :: [CAS.CASLFORMULA] -> CAS.CASLFORMULA
createConjForm = CAS.conjunct | 154 | createConjForm :: [CAS.CASLFORMULA] -> CAS.CASLFORMULA
createConjForm = CAS.conjunct | 84 | createConjForm = CAS.conjunct | 29 | true | true | 0 | 7 | 19 | 25 | 14 | 11 | null | null |
supki/envparse | example/Main.hs | bsd-2-clause | main :: IO ()
main = do
Hello {name, quiet} <- hello
unless quiet $
putStrLn ("Hello, " ++ name ++ "!") | 111 | main :: IO ()
main = do
Hello {name, quiet} <- hello
unless quiet $
putStrLn ("Hello, " ++ name ++ "!") | 111 | main = do
Hello {name, quiet} <- hello
unless quiet $
putStrLn ("Hello, " ++ name ++ "!") | 97 | false | true | 0 | 11 | 29 | 56 | 27 | 29 | null | null |
bagnalla/PCF | src/Symtab.hs | mit | -- The empty Symtab
empty = Map.empty | 37 | empty = Map.empty | 17 | empty = Map.empty | 17 | true | false | 0 | 5 | 6 | 9 | 5 | 4 | null | null |
Happy0/haskellscrabble | test/Tests/SharedTestData.hs | gpl-3.0 | rogueBelow = (Pos 7 11 "G11", Normal $ Just (Letter 'Z' 2)) | 59 | rogueBelow = (Pos 7 11 "G11", Normal $ Just (Letter 'Z' 2)) | 59 | rogueBelow = (Pos 7 11 "G11", Normal $ Just (Letter 'Z' 2)) | 59 | false | false | 0 | 9 | 11 | 34 | 17 | 17 | null | null |
23Skidoo/xmlhtml | test/suite/Text/XmlHtml/Tests.hs | bsd-3-clause | renderHTMLAmpAttr1 :: Bool
renderHTMLAmpAttr1 =
toByteString (render (HtmlDocument UTF8 Nothing [
Element "body" [("foo", "a & b")] [] ]))
== "<body foo=\'a & b\'></body>" | 187 | renderHTMLAmpAttr1 :: Bool
renderHTMLAmpAttr1 =
toByteString (render (HtmlDocument UTF8 Nothing [
Element "body" [("foo", "a & b")] [] ]))
== "<body foo=\'a & b\'></body>" | 187 | renderHTMLAmpAttr1 =
toByteString (render (HtmlDocument UTF8 Nothing [
Element "body" [("foo", "a & b")] [] ]))
== "<body foo=\'a & b\'></body>" | 160 | false | true | 0 | 14 | 39 | 55 | 29 | 26 | null | null |
Zigazou/Sudoku | src/Sudoku/Sudoku.hs | gpl-3.0 | {-|
Returns all the possible `Coords` for a `Sudoku` grid.
-}
allCoords :: [Coords]
allCoords = [ (x, y) | y <- [0..8], x <- [0..8] ] | 133 | allCoords :: [Coords]
allCoords = [ (x, y) | y <- [0..8], x <- [0..8] ] | 71 | allCoords = [ (x, y) | y <- [0..8], x <- [0..8] ] | 49 | true | true | 0 | 9 | 26 | 57 | 30 | 27 | null | null |
jdiez17/HaskellHawk | IO/Factoids.hs | mit | recall :: Message -> Bot ()
recall m = do
res <- get (pack name)
case res of
Nothing -> return ()
(Just def) -> respond m $ name ++ " is " ++ (unpack def)
where
nameWithQMark = head $ words $ payload m
name = take (length nameWithQMark - 1) nameWithQMark | 300 | recall :: Message -> Bot ()
recall m = do
res <- get (pack name)
case res of
Nothing -> return ()
(Just def) -> respond m $ name ++ " is " ++ (unpack def)
where
nameWithQMark = head $ words $ payload m
name = take (length nameWithQMark - 1) nameWithQMark | 300 | recall m = do
res <- get (pack name)
case res of
Nothing -> return ()
(Just def) -> respond m $ name ++ " is " ++ (unpack def)
where
nameWithQMark = head $ words $ payload m
name = take (length nameWithQMark - 1) nameWithQMark | 272 | false | true | 0 | 13 | 98 | 130 | 61 | 69 | null | null |
greenrd/sort-dli | src/Main.hs | bsd-3-clause | destFilenames :: [Text]
destFilenames = do
a <- ['a'..'z']
b <- ['a'..'z']
return $ pack [a, b] | 101 | destFilenames :: [Text]
destFilenames = do
a <- ['a'..'z']
b <- ['a'..'z']
return $ pack [a, b] | 101 | destFilenames = do
a <- ['a'..'z']
b <- ['a'..'z']
return $ pack [a, b] | 77 | false | true | 0 | 10 | 22 | 61 | 29 | 32 | null | null |
snoyberg/ghc | libraries/base/GHC/IO/Encoding.hs | bsd-3-clause | -- | Look up the named Unicode encoding. May fail with
--
-- * 'isDoesNotExistError' if the encoding is unknown
--
-- The set of known encodings is system-dependent, but includes at least:
--
-- * @UTF-8@
--
-- * @UTF-16@, @UTF-16BE@, @UTF-16LE@
--
-- * @UTF-32@, @UTF-32BE@, @UTF-32LE@
--
-- There is additional no... | 2,633 | mkTextEncoding :: String -> IO TextEncoding
mkTextEncoding e = case mb_coding_failure_mode of
Nothing -> unknownEncodingErr e
Just cfm -> mkTextEncoding' cfm enc
where
(enc, suffix) = span (/= '/') e
mb_coding_failure_mode = case suffix of
"" -> Just ErrorOnCodingFailure
"//... | 495 | mkTextEncoding e = case mb_coding_failure_mode of
Nothing -> unknownEncodingErr e
Just cfm -> mkTextEncoding' cfm enc
where
(enc, suffix) = span (/= '/') e
mb_coding_failure_mode = case suffix of
"" -> Just ErrorOnCodingFailure
"//IGNORE" -> Just IgnoreCodingFailure
... | 451 | true | true | 2 | 8 | 597 | 150 | 107 | 43 | null | null |
triplepointfive/hogldev | tutorial18/LightingTechnique.hs | mit | setLightingWorldMatrix :: LightingTechnique -> [[GLfloat]] -> IO ()
setLightingWorldMatrix LightingTechnique{..} mat =
uniformMat lWorldMatrixLoc $= mat | 156 | setLightingWorldMatrix :: LightingTechnique -> [[GLfloat]] -> IO ()
setLightingWorldMatrix LightingTechnique{..} mat =
uniformMat lWorldMatrixLoc $= mat | 156 | setLightingWorldMatrix LightingTechnique{..} mat =
uniformMat lWorldMatrixLoc $= mat | 88 | false | true | 0 | 8 | 19 | 48 | 24 | 24 | null | null |
Mikolaj/miniutter | NLP/Miniutter/English.hs | bsd-3-clause | onFirstWord :: (Text -> Text) -> Text -> Text
onFirstWord f t =
let (starting, restRaw) = T.span isWordLetter t
rest = T.dropWhile (not . isWordLetter) restRaw
fstarting = f starting
in if T.null starting
then t
else if T.null fstarting
then rest
else f starting <> restRaw | 319 | onFirstWord :: (Text -> Text) -> Text -> Text
onFirstWord f t =
let (starting, restRaw) = T.span isWordLetter t
rest = T.dropWhile (not . isWordLetter) restRaw
fstarting = f starting
in if T.null starting
then t
else if T.null fstarting
then rest
else f starting <> restRaw | 319 | onFirstWord f t =
let (starting, restRaw) = T.span isWordLetter t
rest = T.dropWhile (not . isWordLetter) restRaw
fstarting = f starting
in if T.null starting
then t
else if T.null fstarting
then rest
else f starting <> restRaw | 273 | false | true | 2 | 11 | 93 | 123 | 60 | 63 | null | null |
mgajda/tinyMesh | Packet/Parse.hs | bsd-2-clause | untilEOF :: Parser a -> Parser [a]
untilEOF p = loop []
where
loop acc = do
isEnd <- atEnd
if isEnd
then return $ reverse acc
else do
n <- p
loop $ n:acc | 207 | untilEOF :: Parser a -> Parser [a]
untilEOF p = loop []
where
loop acc = do
isEnd <- atEnd
if isEnd
then return $ reverse acc
else do
n <- p
loop $ n:acc | 207 | untilEOF p = loop []
where
loop acc = do
isEnd <- atEnd
if isEnd
then return $ reverse acc
else do
n <- p
loop $ n:acc | 172 | false | true | 0 | 11 | 88 | 86 | 40 | 46 | null | null |
greedy/fdo-desktop-entry | System/Freedesktop/DesktopEntry.hs | bsd-3-clause | keys :: Maybe Locale -> [Maybe Locale]
keys (Just (Locale lang (Just country) (Just modifier))) =
[Just $ Locale lang (Just country) (Just modifier),
Just $ Locale lang (Just country) Nothing,
Just $ Locale lang Nothing (Just modifier),
Just $ Locale lang Nothing Nothing,
Nothing] | 295 | keys :: Maybe Locale -> [Maybe Locale]
keys (Just (Locale lang (Just country) (Just modifier))) =
[Just $ Locale lang (Just country) (Just modifier),
Just $ Locale lang (Just country) Nothing,
Just $ Locale lang Nothing (Just modifier),
Just $ Locale lang Nothing Nothing,
Nothing] | 295 | keys (Just (Locale lang (Just country) (Just modifier))) =
[Just $ Locale lang (Just country) (Just modifier),
Just $ Locale lang (Just country) Nothing,
Just $ Locale lang Nothing (Just modifier),
Just $ Locale lang Nothing Nothing,
Nothing] | 256 | false | true | 0 | 11 | 58 | 138 | 69 | 69 | null | null |
shlevy/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | -- Dictionary instance application
evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvExpr
evDFunApp df tys ets = Var df `mkTyApps` tys `mkApps` ets | 144 | evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvExpr
evDFunApp df tys ets = Var df `mkTyApps` tys `mkApps` ets | 109 | evDFunApp df tys ets = Var df `mkTyApps` tys `mkApps` ets | 57 | true | true | 0 | 8 | 23 | 52 | 29 | 23 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs | mpl-2.0 | -- | Number of variables in the container version.
cvhNumVariables :: Lens' ContainerVersionHeader (Maybe Text)
cvhNumVariables
= lens _cvhNumVariables
(\ s a -> s{_cvhNumVariables = a}) | 194 | cvhNumVariables :: Lens' ContainerVersionHeader (Maybe Text)
cvhNumVariables
= lens _cvhNumVariables
(\ s a -> s{_cvhNumVariables = a}) | 143 | cvhNumVariables
= lens _cvhNumVariables
(\ s a -> s{_cvhNumVariables = a}) | 82 | true | true | 0 | 8 | 33 | 49 | 25 | 24 | null | null |
siddhanathan/ghc | compiler/vectorise/Vectorise/Monad/Naming.hs | bsd-3-clause | -- |Make a fresh type variable with the given kind.
-- The variable's name is formed using the given string as the prefix.
--
newTyVar :: FastString -> Kind -> VM Var
newTyVar fs k
= do u <- liftDs newUnique
return $ mkTyVar (mkSysTvName u fs) k | 252 | newTyVar :: FastString -> Kind -> VM Var
newTyVar fs k
= do u <- liftDs newUnique
return $ mkTyVar (mkSysTvName u fs) k | 126 | newTyVar fs k
= do u <- liftDs newUnique
return $ mkTyVar (mkSysTvName u fs) k | 85 | true | true | 0 | 10 | 54 | 60 | 29 | 31 | null | null |
GRACeFUL-project/haskelzinc | src/Interfaces/MZBuiltIns.hs | bsd-3-clause | -- Set operators
mz_range = infOp ".." | 42 | mz_range = infOp ".." | 25 | mz_range = infOp ".." | 25 | true | false | 0 | 5 | 10 | 10 | 5 | 5 | null | null |
HaskellForCats/HaskellForCats | Trees/BiTree01.hs | mit | depth (Node _ t1 n t2) = 1 + max (depth t1) (depth t2) | 58 | depth (Node _ t1 n t2) = 1 + max (depth t1) (depth t2) | 58 | depth (Node _ t1 n t2) = 1 + max (depth t1) (depth t2) | 58 | false | false | 0 | 8 | 17 | 42 | 20 | 22 | null | null |
MarcusVoelker/Recolang | Parser/Lexer.hs | mit | tokenizeFloat :: STokenizer r
tokenizeFloat = Float . read <$> cParse (\s -> ('.' `elem` s) && any isDigit s) (some (cParse (\s -> not (null s) && (isDigit (head s) || head s == '.')) (tokenParse id) "Expected digit or '.'")) "Expected Float" | 242 | tokenizeFloat :: STokenizer r
tokenizeFloat = Float . read <$> cParse (\s -> ('.' `elem` s) && any isDigit s) (some (cParse (\s -> not (null s) && (isDigit (head s) || head s == '.')) (tokenParse id) "Expected digit or '.'")) "Expected Float" | 242 | tokenizeFloat = Float . read <$> cParse (\s -> ('.' `elem` s) && any isDigit s) (some (cParse (\s -> not (null s) && (isDigit (head s) || head s == '.')) (tokenParse id) "Expected digit or '.'")) "Expected Float" | 212 | false | true | 0 | 19 | 43 | 121 | 62 | 59 | null | null |
osa1/chsc | StaticFlags.hs | bsd-3-clause | eXPAND_CASE_DEFAULTS :: Bool
eXPAND_CASE_DEFAULTS = "--expand-case-defaults" `elem` aRGS | 88 | eXPAND_CASE_DEFAULTS :: Bool
eXPAND_CASE_DEFAULTS = "--expand-case-defaults" `elem` aRGS | 88 | eXPAND_CASE_DEFAULTS = "--expand-case-defaults" `elem` aRGS | 59 | false | true | 0 | 6 | 7 | 26 | 12 | 14 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Pos/List.hs | mpl-2.0 | -- | The ID of the target merchant.
pllTargetMerchantId :: Lens' PosList Word64
pllTargetMerchantId
= lens _pllTargetMerchantId
(\ s a -> s{_pllTargetMerchantId = a})
. _Coerce | 190 | pllTargetMerchantId :: Lens' PosList Word64
pllTargetMerchantId
= lens _pllTargetMerchantId
(\ s a -> s{_pllTargetMerchantId = a})
. _Coerce | 154 | pllTargetMerchantId
= lens _pllTargetMerchantId
(\ s a -> s{_pllTargetMerchantId = a})
. _Coerce | 110 | true | true | 2 | 8 | 39 | 50 | 24 | 26 | null | null |
homam/fsm-conversational-ui | src/TestFMS6.hs | bsd-3-clause | -- arithOperationApp
arithFlow :: NodeId -> App
arithFlow "start" = arithApp | 77 | arithFlow :: NodeId -> App
arithFlow "start" = arithApp | 55 | arithFlow "start" = arithApp | 28 | true | true | 0 | 5 | 11 | 19 | 10 | 9 | null | null |
seppeljordan/octree | tests/test_Octree.hs | bsd-3-clause | pointwiseOrd [] = EQ | 25 | pointwiseOrd [] = EQ | 25 | pointwiseOrd [] = EQ | 25 | false | false | 0 | 6 | 8 | 11 | 5 | 6 | null | null |
m-alvarez/jhc | src/Grin/Show.hs | mit | prettyExp vl Prim { expPrimitive = ap, expArgs = vs } = vl <> prim (pprint ap) <+> hsep (map prettyVal vs) | 106 | prettyExp vl Prim { expPrimitive = ap, expArgs = vs } = vl <> prim (pprint ap) <+> hsep (map prettyVal vs) | 106 | prettyExp vl Prim { expPrimitive = ap, expArgs = vs } = vl <> prim (pprint ap) <+> hsep (map prettyVal vs) | 106 | false | false | 0 | 9 | 21 | 54 | 27 | 27 | null | null |
nbrk/ld | library/GPS.hs | bsd-2-clause | gpsX :: (a, b) -> a
gpsX = fst | 30 | gpsX :: (a, b) -> a
gpsX = fst | 30 | gpsX = fst | 10 | false | true | 0 | 6 | 8 | 21 | 12 | 9 | null | null |
isido/functional-morphology-for-koine-greek | lib/Dictionary.hs | gpl-3.0 | is_empty_dictionary :: Dictionary -> Bool
is_empty_dictionary (Dict xs) = and $ map is_empty_entry xs | 101 | is_empty_dictionary :: Dictionary -> Bool
is_empty_dictionary (Dict xs) = and $ map is_empty_entry xs | 101 | is_empty_dictionary (Dict xs) = and $ map is_empty_entry xs | 59 | false | true | 0 | 6 | 13 | 37 | 17 | 20 | null | null |
george-lamperis/l4-engine | src/L4Engine.hs | mit | whiteBishops :: Position -> Bitboard
whiteBishops pos = (bishops pos) .&. (white pos) | 85 | whiteBishops :: Position -> Bitboard
whiteBishops pos = (bishops pos) .&. (white pos) | 85 | whiteBishops pos = (bishops pos) .&. (white pos) | 48 | false | true | 0 | 8 | 12 | 40 | 18 | 22 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'MetricDescriptorMetadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mdmSamplePeriod'
--
-- * 'mdmIngestDelay'
--
-- * 'mdmLaunchStage'
metricDescriptorMetadata
:: MetricDescriptorMetadata
metricDescr... | 466 | metricDescriptorMetadata
:: MetricDescriptorMetadata
metricDescriptorMetadata =
MetricDescriptorMetadata'
{ _mdmSamplePeriod = Nothing
, _mdmIngestDelay = Nothing
, _mdmLaunchStage = Nothing
} | 214 | metricDescriptorMetadata =
MetricDescriptorMetadata'
{ _mdmSamplePeriod = Nothing
, _mdmIngestDelay = Nothing
, _mdmLaunchStage = Nothing
} | 157 | true | true | 1 | 7 | 82 | 47 | 29 | 18 | null | null |
Laar/haskell-src-exts-quickcheck | src/Test/QuickCheck/Instances/HaskellSrcExts/Generators.hs | bsd-3-clause | (.&&), (.||) :: (a -> Bool) -> (a -> Bool) -> a -> Bool
p1 .&& p2 = \v -> p1 v && p2 v | 86 | (.&&), (.||) :: (a -> Bool) -> (a -> Bool) -> a -> Bool
p1 .&& p2 = \v -> p1 v && p2 v | 86 | p1 .&& p2 = \v -> p1 v && p2 v | 30 | false | true | 4 | 10 | 24 | 73 | 36 | 37 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/PgCatalog/PgConstraint.hs | mit | pgConstraintMarshaller :: Orville.SqlMarshaller PgConstraint PgConstraint
pgConstraintMarshaller =
PgConstraint
<$> Orville.marshallField pgConstraintOid oidField
<*> Orville.marshallField pgConstraintName constraintNameField
<*> Orville.marshallField pgConstraintNamespaceOid constraintNamespaceOidField
... | 780 | pgConstraintMarshaller :: Orville.SqlMarshaller PgConstraint PgConstraint
pgConstraintMarshaller =
PgConstraint
<$> Orville.marshallField pgConstraintOid oidField
<*> Orville.marshallField pgConstraintName constraintNameField
<*> Orville.marshallField pgConstraintNamespaceOid constraintNamespaceOidField
... | 780 | pgConstraintMarshaller =
PgConstraint
<$> Orville.marshallField pgConstraintOid oidField
<*> Orville.marshallField pgConstraintName constraintNameField
<*> Orville.marshallField pgConstraintNamespaceOid constraintNamespaceOidField
<*> Orville.marshallField pgConstraintType constraintTypeField
<*> ... | 706 | false | true | 26 | 6 | 81 | 142 | 70 | 72 | null | null |
fjarri/haskell-random123 | test/TestThreefry.hs | bsd-3-clause | test_threefry4x32 = results @?= reference where
key = (123, 456) :: Array2 Word64
rounds = 32
counters = [
(0x097a4f5083c77380, 0x51794d6039c75400),
(0x65918ba6ccfe6400, 0x3d91c69276916c00),
(0xdfe3269c92f1f800, 0xe6a0ab67f2207800),
(0x6240b418d521f000, 0x40299ed82854f400),
... | 740 | test_threefry4x32 = results @?= reference where
key = (123, 456) :: Array2 Word64
rounds = 32
counters = [
(0x097a4f5083c77380, 0x51794d6039c75400),
(0x65918ba6ccfe6400, 0x3d91c69276916c00),
(0xdfe3269c92f1f800, 0xe6a0ab67f2207800),
(0x6240b418d521f000, 0x40299ed82854f400),
... | 740 | test_threefry4x32 = results @?= reference where
key = (123, 456) :: Array2 Word64
rounds = 32
counters = [
(0x097a4f5083c77380, 0x51794d6039c75400),
(0x65918ba6ccfe6400, 0x3d91c69276916c00),
(0xdfe3269c92f1f800, 0xe6a0ab67f2207800),
(0x6240b418d521f000, 0x40299ed82854f400),
... | 740 | false | false | 0 | 9 | 156 | 153 | 95 | 58 | null | null |
sumitsahrawat/plot-gtk-ui | lib/Graphics/Rendering/Plot/Gtk/UI/ErrorFig.hs | gpl-2.0 | getErrors :: FigureSettings -> [String]
getErrors fset = prepare [
"~~ Error(s) ~~"
, let Just (xl, xu) = xRange fset
in if xu <= xl then "Invalid X-Range" else ""
, case yRange fset of
Nothing -> "Unrealistic Y-Range"
... | 809 | getErrors :: FigureSettings -> [String]
getErrors fset = prepare [
"~~ Error(s) ~~"
, let Just (xl, xu) = xRange fset
in if xu <= xl then "Invalid X-Range" else ""
, case yRange fset of
Nothing -> "Unrealistic Y-Range"
... | 809 | getErrors fset = prepare [
"~~ Error(s) ~~"
, let Just (xl, xu) = xRange fset
in if xu <= xl then "Invalid X-Range" else ""
, case yRange fset of
Nothing -> "Unrealistic Y-Range"
Just (yl, yu) -> if yu <= y... | 769 | false | true | 0 | 12 | 389 | 144 | 78 | 66 | null | null |
kaizhang/haskell-igraph | tests/Test/Algorithms.hs | mit | communityTest :: TestTree
communityTest = testGroup "Community"
[ consistency, consistency2 ]
where
consistency = testCase "Consistency" $ do
rs <- replicateM 50 $ withSeed 134 $ findCommunity zacharyKarate Nothing Nothing spinglass
all (== head rs) rs @=? True
consistency2 = testCase "Con... | 756 | communityTest :: TestTree
communityTest = testGroup "Community"
[ consistency, consistency2 ]
where
consistency = testCase "Consistency" $ do
rs <- replicateM 50 $ withSeed 134 $ findCommunity zacharyKarate Nothing Nothing spinglass
all (== head rs) rs @=? True
consistency2 = testCase "Con... | 756 | communityTest = testGroup "Community"
[ consistency, consistency2 ]
where
consistency = testCase "Consistency" $ do
rs <- replicateM 50 $ withSeed 134 $ findCommunity zacharyKarate Nothing Nothing spinglass
all (== head rs) rs @=? True
consistency2 = testCase "Consistency -- leiden" $ do
... | 730 | false | true | 6 | 11 | 201 | 425 | 235 | 190 | null | null |
prowdsponsor/esqueleto | src/Database/Esqueleto/Internal/Sql.hs | bsd-3-clause | from5P :: Proxy (a,b,c,d,e) -> Proxy ((a,b),(c,d),e)
from5P = const Proxy | 73 | from5P :: Proxy (a,b,c,d,e) -> Proxy ((a,b),(c,d),e)
from5P = const Proxy | 73 | from5P = const Proxy | 20 | false | true | 0 | 9 | 10 | 65 | 36 | 29 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | genericTyConNames :: [Name]
genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, pTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName, par0TyConName,
d1TyConName, c1TyConName, s1TyConN... | 497 | genericTyConNames :: [Name]
genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, pTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName, par0TyConName,
d1TyConName, c1TyConName, s1TyConN... | 497 | genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, pTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName, par0TyConName,
d1TyConName, c1TyConName, s1TyConName, noSelTyConName,
rep... | 469 | false | true | 0 | 5 | 69 | 101 | 66 | 35 | null | null |
brendanhay/gogol | gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs | mpl-2.0 | -- | Cookie expiration policy for this application.
aDefaultCookieExpiration :: Lens' Application (Maybe Scientific)
aDefaultCookieExpiration
= lens _aDefaultCookieExpiration
(\ s a -> s{_aDefaultCookieExpiration = a})
. mapping _GDuration | 253 | aDefaultCookieExpiration :: Lens' Application (Maybe Scientific)
aDefaultCookieExpiration
= lens _aDefaultCookieExpiration
(\ s a -> s{_aDefaultCookieExpiration = a})
. mapping _GDuration | 201 | aDefaultCookieExpiration
= lens _aDefaultCookieExpiration
(\ s a -> s{_aDefaultCookieExpiration = a})
. mapping _GDuration | 136 | true | true | 2 | 8 | 41 | 59 | 28 | 31 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_32 (64#) = happyGoto action_139 | 38 | action_32 (64#) = happyGoto action_139 | 38 | action_32 (64#) = happyGoto action_139 | 38 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
bgamari/haskell-platform | hptool/src/HaddockMaster.hs | bsd-3-clause | haddockReadArg :: HaddockPkgLoc -> String
haddockReadArg HaddockPkgLoc{..} =
"--read-interface=" ++ pkgLocHtml ++ "," ++ pkgLocIntf | 135 | haddockReadArg :: HaddockPkgLoc -> String
haddockReadArg HaddockPkgLoc{..} =
"--read-interface=" ++ pkgLocHtml ++ "," ++ pkgLocIntf | 135 | haddockReadArg HaddockPkgLoc{..} =
"--read-interface=" ++ pkgLocHtml ++ "," ++ pkgLocIntf | 93 | false | true | 0 | 7 | 18 | 36 | 18 | 18 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2009-Real_World_Haskell/Parse.hs | unlicense | {- Identity Parser 240/280
Does not touch parse state.
Uses its argument as the result.
We wrap the body of the function in our Parse type to satisfy the type checker.
To call: remove Parse wrapper to get function inside via using "runParse".
Also need to construct a ParseState.
Finally, separate the result of the pa... | 422 | identity :: a -> Parse a
identity a = Parse (\s -> Right (a, s)) | 68 | identity a = Parse (\s -> Right (a, s)) | 43 | true | true | 0 | 9 | 82 | 46 | 23 | 23 | null | null |
bluepeppers/highhockwho | src/Network/HighHock/Watcher.hs | agpl-3.0 | control :: MonadIO m => C.Controller -> Source m a -> Source m a
control c v = do
running <- liftIO $ C.wait c
if not running
then return ()
else v >> control c v | 174 | control :: MonadIO m => C.Controller -> Source m a -> Source m a
control c v = do
running <- liftIO $ C.wait c
if not running
then return ()
else v >> control c v | 174 | control c v = do
running <- liftIO $ C.wait c
if not running
then return ()
else v >> control c v | 109 | false | true | 0 | 11 | 48 | 92 | 41 | 51 | null | null |
agrafix/hackage-server | Distribution/Server/Features/Security/Backup.hs | bsd-3-clause | emptyPartialState :: PartialState
emptyPartialState = PartialState Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing
Nothing | 204 | emptyPartialState :: PartialState
emptyPartialState = PartialState Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing
Nothing | 204 | emptyPartialState = PartialState Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing
Nothing | 170 | false | true | 0 | 5 | 80 | 30 | 15 | 15 | null | null |
deontologician/orbRPG | Game/OrbRPG/Combinations.hs | gpl-3.0 | D Asmodeus @>> E Erbium = P Red | 31 | D Asmodeus @>> E Erbium = P Red | 31 | D Asmodeus @>> E Erbium = P Red | 31 | false | false | 0 | 6 | 7 | 21 | 8 | 13 | null | null |
ben-schulz/Idris-dev | src/Idris/Error.hs | bsd-3-clause | warnDisamb ist (PHidden tm) = warnDisamb ist tm | 47 | warnDisamb ist (PHidden tm) = warnDisamb ist tm | 47 | warnDisamb ist (PHidden tm) = warnDisamb ist tm | 47 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
anchor/gearman-haskell | src/System/Gearman/Protocol.hs | mit | submitJobLowBg :: PacketHeader
submitJobLowBg = PacketHeader SubmitJobLowBg Req DomainClient | 102 | submitJobLowBg :: PacketHeader
submitJobLowBg = PacketHeader SubmitJobLowBg Req DomainClient | 102 | submitJobLowBg = PacketHeader SubmitJobLowBg Req DomainClient | 66 | false | true | 0 | 5 | 18 | 18 | 9 | 9 | null | null |
eelco/gdiff | src/Data/Generic/Diff.hs | bsd-3-clause | diffLMemo :: (Family f, List f txs, List f tys) => txs -> tys -> EditScriptLMemo f txs tys
diffLMemo = diffLMemo' list list | 123 | diffLMemo :: (Family f, List f txs, List f tys) => txs -> tys -> EditScriptLMemo f txs tys
diffLMemo = diffLMemo' list list | 123 | diffLMemo = diffLMemo' list list | 32 | false | true | 0 | 8 | 23 | 56 | 28 | 28 | null | null |
basvandijk/string-combinators | Data/String/Combinators.hs | bsd-3-clause | -- | A ';' character.
semi :: IsString s => s
semi = char ';' | 61 | semi :: IsString s => s
semi = char ';' | 39 | semi = char ';' | 15 | true | true | 0 | 6 | 14 | 22 | 11 | 11 | null | null |
nushio3/ghc | testsuite/tests/typecheck/should_compile/PolyRec.hs | bsd-3-clause | -- 'test' checks that g's type is polymorphic enough
test :: Functor f => (f Int -> b) -> f (Y Maybe) -> b
test = g | 117 | test :: Functor f => (f Int -> b) -> f (Y Maybe) -> b
test = g | 62 | test = g | 8 | true | true | 0 | 11 | 28 | 53 | 24 | 29 | null | null |
phischu/fragnix | builtins/base/Data.Data.hs | bsd-3-clause | productDataType :: DataType
productDataType = mkDataType "Data.Monoid.Product" [productConstr] | 94 | productDataType :: DataType
productDataType = mkDataType "Data.Monoid.Product" [productConstr] | 94 | productDataType = mkDataType "Data.Monoid.Product" [productConstr] | 66 | false | true | 0 | 6 | 7 | 25 | 11 | 14 | null | null |
gridaphobe/ghc | compiler/utils/Outputable.hs | bsd-3-clause | warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x | 61 | warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x | 61 | warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x | 61 | false | false | 0 | 7 | 13 | 23 | 10 | 13 | null | null |
rwtodd/small_programs | i_ching/haskell/iching.hs | gpl-2.0 | main = do
putStrLn "Reading in data..."
descArr <- read_descs
rawInput
page ; at 1 20 ; controls
main_loop descArr
page ; at 1 1
putStrLn "Goodbye!"
cookedInput | 179 | main = do
putStrLn "Reading in data..."
descArr <- read_descs
rawInput
page ; at 1 20 ; controls
main_loop descArr
page ; at 1 1
putStrLn "Goodbye!"
cookedInput | 179 | main = do
putStrLn "Reading in data..."
descArr <- read_descs
rawInput
page ; at 1 20 ; controls
main_loop descArr
page ; at 1 1
putStrLn "Goodbye!"
cookedInput | 179 | false | false | 0 | 7 | 46 | 65 | 26 | 39 | null | null |
ahanikel/raft | src/main/haskell/raft/Raft.hs | bsd-3-clause | castVote :: Address -> ApplicationContext ()
castVote recipientAddr = do
ctx <- get
let self = state_self ctx
let term = state_term ctx
let peers = state_peers ctx
let recipient = filter ((== addr_to_string recipientAddr) . show . actor_addr) peers
case recipient of
[] ->... | 536 | castVote :: Address -> ApplicationContext ()
castVote recipientAddr = do
ctx <- get
let self = state_self ctx
let term = state_term ctx
let peers = state_peers ctx
let recipient = filter ((== addr_to_string recipientAddr) . show . actor_addr) peers
case recipient of
[] ->... | 536 | castVote recipientAddr = do
ctx <- get
let self = state_self ctx
let term = state_term ctx
let peers = state_peers ctx
let recipient = filter ((== addr_to_string recipientAddr) . show . actor_addr) peers
case recipient of
[] -> log "ERROR: castVote: recipient not found"
... | 491 | false | true | 0 | 16 | 137 | 168 | 77 | 91 | null | null |
olorin/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types/Product.hs | mpl-2.0 | -- | The name of the environment.
erdEnvironmentName :: Lens' EnvironmentResourceDescription (Maybe Text)
erdEnvironmentName = lens _erdEnvironmentName (\ s a -> s{_erdEnvironmentName = a}) | 189 | erdEnvironmentName :: Lens' EnvironmentResourceDescription (Maybe Text)
erdEnvironmentName = lens _erdEnvironmentName (\ s a -> s{_erdEnvironmentName = a}) | 155 | erdEnvironmentName = lens _erdEnvironmentName (\ s a -> s{_erdEnvironmentName = a}) | 83 | true | true | 0 | 9 | 23 | 46 | 25 | 21 | null | null |
mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Lazy.hs | bsd-3-clause | -- | /O(n+m)/ Find all non-overlapping instances of @needle@ in
-- @haystack@. Each element of the returned list consists of a pair:
--
-- * The entire string prior to the /k/th match (i.e. the prefix)
--
-- * The /k/th match, followed by the remainder of the string
--
-- Examples:
--
-- > breakOnAll "::" ""
-- > ==> ... | 1,637 | breakOnAll :: Text -- ^ @needle@ to search for
-> Text -- ^ @haystack@ in which to search
-> [(Text, Text)]
breakOnAll pat src
| null pat = liquidError "breakOnAll"
| otherwise = breakOnAll_go (ltlen pat) 0 empty src (indices pat src)
where
{-@ Decrease bre... | 951 | breakOnAll pat src
| null pat = liquidError "breakOnAll"
| otherwise = breakOnAll_go (ltlen pat) 0 empty src (indices pat src)
where
{-@ Decrease breakOnAll_go 5 @-}
breakOnAll_go l !n p s (x:xs) = let h :*: t = splitAtWord (x-n) s
h' = append p h
... | 795 | true | true | 1 | 11 | 444 | 212 | 119 | 93 | null | null |
nh2/quickcheck | examples/Heap_Program.hs | bsd-3-clause | heap :: Ord a => HeapP a -> Heap a
heap Empty = empty | 65 | heap :: Ord a => HeapP a -> Heap a
heap Empty = empty | 65 | heap Empty = empty | 30 | false | true | 0 | 8 | 25 | 36 | 15 | 21 | null | null |
bjornbm/astro | src/Astro/Coords/ECR.hs | bsd-3-clause | ecrToOrbitalFrame :: RealFloat a => PosVel ECR a -> Coord ECR a -> Coord Orbital a
ecrToOrbitalFrame pv p = C $ orbitalFrameECR pv `matVec` (c p `elemSub` cpos pv) | 163 | ecrToOrbitalFrame :: RealFloat a => PosVel ECR a -> Coord ECR a -> Coord Orbital a
ecrToOrbitalFrame pv p = C $ orbitalFrameECR pv `matVec` (c p `elemSub` cpos pv) | 163 | ecrToOrbitalFrame pv p = C $ orbitalFrameECR pv `matVec` (c p `elemSub` cpos pv) | 80 | false | true | 0 | 9 | 29 | 79 | 37 | 42 | null | null |
Macil-dev/verhface-ll | src/Bindings/Verba/ErrorCodes.hs | unlicense | verr 6 = VerbaError 6 "E_KEY_NOT_FOUND" "Ключ не найден (или искажен)" | 79 | verr 6 = VerbaError 6 "E_KEY_NOT_FOUND" "Ключ не найден (или искажен)" | 79 | verr 6 = VerbaError 6 "E_KEY_NOT_FOUND" "Ключ не найден (или искажен)" | 79 | false | false | 1 | 5 | 19 | 19 | 7 | 12 | null | null |
mahrz/hit | src/Numeric/Information/Distribution.hs | mit | (<**>) :: (Num prob, Ord a) =>
Dist prob [a] -- ^
-> Dist prob [a]
-> Dist prob [a]
(<**>) = liftM2 (++) | 134 | (<**>) :: (Num prob, Ord a) =>
Dist prob [a] -- ^
-> Dist prob [a]
-> Dist prob [a]
(<**>) = liftM2 (++) | 134 | (<**>) = liftM2 (++) | 20 | false | true | 0 | 9 | 53 | 68 | 38 | 30 | null | null |
Lainepress/hledger | hledger-lib/Hledger/Data/Dates.hs | gpl-3.0 | dateperiodexpr :: Day -> GenParser Char st (Interval, DateSpan)
dateperiodexpr rdate = do
many spacenonewline
s <- periodexprdatespan rdate
return (NoInterval, s)
-- Parse a reporting interval. | 200 | dateperiodexpr :: Day -> GenParser Char st (Interval, DateSpan)
dateperiodexpr rdate = do
many spacenonewline
s <- periodexprdatespan rdate
return (NoInterval, s)
-- Parse a reporting interval. | 200 | dateperiodexpr rdate = do
many spacenonewline
s <- periodexprdatespan rdate
return (NoInterval, s)
-- Parse a reporting interval. | 136 | false | true | 0 | 8 | 33 | 60 | 29 | 31 | null | null |
acowley/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- PrelPtr module
ptrTyConName, funPtrTyConName :: Name
ptrTyConName = tcQual gHC_PTR (fsLit "Ptr") ptrTyConKey | 121 | ptrTyConName, funPtrTyConName :: Name
ptrTyConName = tcQual gHC_PTR (fsLit "Ptr") ptrTyConKey | 103 | ptrTyConName = tcQual gHC_PTR (fsLit "Ptr") ptrTyConKey | 65 | true | true | 0 | 7 | 23 | 27 | 15 | 12 | null | null |
HIPERFIT/futhark | src/Futhark/CLI/Literate.hs | isc | valueToBMP _ = Nothing | 22 | valueToBMP _ = Nothing | 22 | valueToBMP _ = Nothing | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT48.hs | gpl-3.0 | (+) :: Nat -> Nat -> Nat
Z + y = y | 34 | (+) :: Nat -> Nat -> Nat
Z + y = y | 34 | Z + y = y | 9 | false | true | 0 | 9 | 11 | 32 | 15 | 17 | null | null |
tripped/hlog | src/Ecumenical.hs | bsd-3-clause | fileContents :: FilePath -> IO (Maybe ByteString)
fileContents path = do
contents <- (try $ readFile path) :: IO (Either IOException ByteString)
case contents of
Left _ -> return Nothing
Right text -> return $ Just text | 244 | fileContents :: FilePath -> IO (Maybe ByteString)
fileContents path = do
contents <- (try $ readFile path) :: IO (Either IOException ByteString)
case contents of
Left _ -> return Nothing
Right text -> return $ Just text | 244 | fileContents path = do
contents <- (try $ readFile path) :: IO (Either IOException ByteString)
case contents of
Left _ -> return Nothing
Right text -> return $ Just text | 194 | false | true | 0 | 11 | 61 | 93 | 43 | 50 | null | null |
rueshyna/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetIAMPolicy.hs | mpl-2.0 | -- | OAuth access token.
pgipAccessToken :: Lens' ProjectsGetIAMPolicy (Maybe Text)
pgipAccessToken
= lens _pgipAccessToken
(\ s a -> s{_pgipAccessToken = a}) | 166 | pgipAccessToken :: Lens' ProjectsGetIAMPolicy (Maybe Text)
pgipAccessToken
= lens _pgipAccessToken
(\ s a -> s{_pgipAccessToken = a}) | 141 | pgipAccessToken
= lens _pgipAccessToken
(\ s a -> s{_pgipAccessToken = a}) | 82 | true | true | 1 | 9 | 29 | 51 | 25 | 26 | null | null |
ankhers/haskell-ide-engine | src/Haskell/Ide/Engine/Swagger.hs | bsd-3-clause | -- ---------------------------------------------------------------------
-- Keep the type checker happy while extracting the reply schema
commandResponse :: UntaggedCommand -> Declare (Definitions Schema) Response
commandResponse (Command _x f) = declareCmdResponse f | 268 | commandResponse :: UntaggedCommand -> Declare (Definitions Schema) Response
commandResponse (Command _x f) = declareCmdResponse f | 129 | commandResponse (Command _x f) = declareCmdResponse f | 53 | true | true | 0 | 9 | 28 | 47 | 22 | 25 | null | null |
kajigor/uKanren_transformations | test/resources/Program/Path.hs | bsd-3-clause | eqPairDef :: Def
eqPairDef =
Def "eqPair" ["a", "b", "q15"] (
fresh ["q16", "a1", "a2", "b1", "b2", "q17", "q18"] (
(V "q16" === C "pair" [V "a", V "b"]) &&&
(V "q16" === C "pair" [C "pair" [V "a1", V "a2"], C "pair" [V "b1", V "b2"]]) &&&
(call "eqNat" [V "a1", V "b1", V "q17"]) &&&
... | 530 | eqPairDef :: Def
eqPairDef =
Def "eqPair" ["a", "b", "q15"] (
fresh ["q16", "a1", "a2", "b1", "b2", "q17", "q18"] (
(V "q16" === C "pair" [V "a", V "b"]) &&&
(V "q16" === C "pair" [C "pair" [V "a1", V "a2"], C "pair" [V "b1", V "b2"]]) &&&
(call "eqNat" [V "a1", V "b1", V "q17"]) &&&
... | 530 | eqPairDef =
Def "eqPair" ["a", "b", "q15"] (
fresh ["q16", "a1", "a2", "b1", "b2", "q17", "q18"] (
(V "q16" === C "pair" [V "a", V "b"]) &&&
(V "q16" === C "pair" [C "pair" [V "a1", V "a2"], C "pair" [V "b1", V "b2"]]) &&&
(call "eqNat" [V "a1", V "b1", V "q17"]) &&&
(call "eqN... | 513 | false | true | 0 | 19 | 170 | 301 | 152 | 149 | null | null |
sdiehl/ghc | compiler/GHC/Hs/Pat.hs | bsd-3-clause | pprPat (ConPatIn con details) = pprUserCon (unLoc con) details | 64 | pprPat (ConPatIn con details) = pprUserCon (unLoc con) details | 64 | pprPat (ConPatIn con details) = pprUserCon (unLoc con) details | 64 | false | false | 0 | 7 | 10 | 28 | 13 | 15 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Scales.hs | gpl-3.0 | shang :: Fractional a => [a]
shang = [0,2,5,7,10] | 49 | shang :: Fractional a => [a]
shang = [0,2,5,7,10] | 49 | shang = [0,2,5,7,10] | 20 | false | true | 0 | 8 | 8 | 43 | 22 | 21 | null | null |
piotrm0/planar | Parser.hs | artistic-2.0 | letins :: Parser Expr
letins = do
reserved "var"
defs <- commaSep $ do
var <- identifier
reservedOp "="
val <- expr
return (var, val)
reserved "in"
body <- expr
return $ foldr (uncurry Let) body defs | 225 | letins :: Parser Expr
letins = do
reserved "var"
defs <- commaSep $ do
var <- identifier
reservedOp "="
val <- expr
return (var, val)
reserved "in"
body <- expr
return $ foldr (uncurry Let) body defs | 225 | letins = do
reserved "var"
defs <- commaSep $ do
var <- identifier
reservedOp "="
val <- expr
return (var, val)
reserved "in"
body <- expr
return $ foldr (uncurry Let) body defs | 203 | false | true | 0 | 12 | 62 | 96 | 42 | 54 | null | null |
corajr/scalar-convert | src/Text/Scalar/RDF.hs | bsd-3-clause | versionURItoResourceID :: VersionURI -> Maybe String
versionURItoResourceID = getSingleFieldFromString "/([^./]+?)\\.\\d+$" . T.unpack . unVersionURI | 149 | versionURItoResourceID :: VersionURI -> Maybe String
versionURItoResourceID = getSingleFieldFromString "/([^./]+?)\\.\\d+$" . T.unpack . unVersionURI | 149 | versionURItoResourceID = getSingleFieldFromString "/([^./]+?)\\.\\d+$" . T.unpack . unVersionURI | 96 | false | true | 0 | 7 | 13 | 31 | 15 | 16 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Text/Printf.hs | bsd-3-clause | fmtu b Nothing prec0 m0 i0 =
case fmtu' prec0 m0 i0 of
Just s -> ("", s)
Nothing -> errorBadArgument
where
fmtu' :: Maybe Int -> Maybe Integer -> Integer -> Maybe String
fmtu' prec (Just m) i | i < 0 =
fmtu' prec Nothing (-2 * m + i)
fmtu' (Just prec) _ i | i >= 0 =
fmap (integral_pr... | 558 | fmtu b Nothing prec0 m0 i0 =
case fmtu' prec0 m0 i0 of
Just s -> ("", s)
Nothing -> errorBadArgument
where
fmtu' :: Maybe Int -> Maybe Integer -> Integer -> Maybe String
fmtu' prec (Just m) i | i < 0 =
fmtu' prec Nothing (-2 * m + i)
fmtu' (Just prec) _ i | i >= 0 =
fmap (integral_pr... | 558 | fmtu b Nothing prec0 m0 i0 =
case fmtu' prec0 m0 i0 of
Just s -> ("", s)
Nothing -> errorBadArgument
where
fmtu' :: Maybe Int -> Maybe Integer -> Integer -> Maybe String
fmtu' prec (Just m) i | i < 0 =
fmtu' prec Nothing (-2 * m + i)
fmtu' (Just prec) _ i | i >= 0 =
fmap (integral_pr... | 558 | false | false | 6 | 11 | 161 | 244 | 110 | 134 | null | null |
Persi/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | readSingleEscaped = do
s <- backslash
let attempt level code p msg = do { try $ parseNote level code msg; x <- p; return [s,x]; }
do {
x <- lookAhead singleQuote;
parseProblem InfoC 1003 "Are you trying to escape that single quote? echo 'You'\\''re doing it wrong'.";
return [s];
... | 519 | readSingleEscaped = do
s <- backslash
let attempt level code p msg = do { try $ parseNote level code msg; x <- p; return [s,x]; }
do {
x <- lookAhead singleQuote;
parseProblem InfoC 1003 "Are you trying to escape that single quote? echo 'You'\\''re doing it wrong'.";
return [s];
... | 519 | readSingleEscaped = do
s <- backslash
let attempt level code p msg = do { try $ parseNote level code msg; x <- p; return [s,x]; }
do {
x <- lookAhead singleQuote;
parseProblem InfoC 1003 "Are you trying to escape that single quote? echo 'You'\\''re doing it wrong'.";
return [s];
... | 519 | false | false | 0 | 13 | 158 | 142 | 69 | 73 | null | null |
damoxc/ganeti | src/Ganeti/HTools/Node.hs | gpl-2.0 | -- * Initialization functions
-- | Create a new node.
--
-- The index and the peers maps are empty, and will be need to be
-- update later via the 'setIdx' and 'buildPeers' functions.
create :: String -> Double -> Int -> Int -> Double
-> Int -> Double -> Bool -> Int -> T.Gdx -> Node
create name_init mem_t_init ... | 1,485 | create :: String -> Double -> Int -> Int -> Double
-> Int -> Double -> Bool -> Int -> T.Gdx -> Node
create name_init mem_t_init mem_n_init mem_f_init
dsk_t_init dsk_f_init cpu_t_init offline_init spindles_init
group_init =
Node { name = name_init
, alias = name_init
, tMem = mem_t_i... | 1,300 | create name_init mem_t_init mem_n_init mem_f_init
dsk_t_init dsk_f_init cpu_t_init offline_init spindles_init
group_init =
Node { name = name_init
, alias = name_init
, tMem = mem_t_init
, nMem = mem_n_init
, fMem = mem_f_init
, tDsk = dsk_t_init
, fDsk = dsk_f_... | 1,193 | true | true | 0 | 16 | 482 | 349 | 204 | 145 | null | null |
shlevy/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr MFENCE = text "\tmfence" | 33 | pprInstr MFENCE = text "\tmfence" | 33 | pprInstr MFENCE = text "\tmfence" | 33 | false | false | 1 | 5 | 4 | 15 | 5 | 10 | null | null |
jameysharp/corrode | src/Language/Rust/Idiomatic.hs | gpl-2.0 | -- If the last statement is a block, that's a tail-block.
tailExpr (Rust.BlockExpr b) = Just (Just (Rust.BlockExpr (tailBlock b))) | 130 | tailExpr (Rust.BlockExpr b) = Just (Just (Rust.BlockExpr (tailBlock b))) | 72 | tailExpr (Rust.BlockExpr b) = Just (Just (Rust.BlockExpr (tailBlock b))) | 72 | true | false | 0 | 11 | 19 | 41 | 20 | 21 | null | null |
WraithM/peertrader-backend | src/PeerTrader/AutoFilter/AutoFilter.hs | bsd-3-clause | -- | Check if a value is inside of a range, inclusively
inclInRange :: Ord a => a -> Range a -> Bool
inclInRange x (Range l h) = x >= l && x <= h | 145 | inclInRange :: Ord a => a -> Range a -> Bool
inclInRange x (Range l h) = x >= l && x <= h | 89 | inclInRange x (Range l h) = x >= l && x <= h | 44 | true | true | 0 | 8 | 35 | 55 | 27 | 28 | null | null |
brendanhay/gogol | gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs | mpl-2.0 | -- | Opacity of the interior of the polygon: 0.0 (transparent) to 1.0
-- (opaque).
psFillOpacity :: Lens' PolygonStyle (Maybe Double)
psFillOpacity
= lens _psFillOpacity
(\ s a -> s{_psFillOpacity = a})
. mapping _Coerce | 234 | psFillOpacity :: Lens' PolygonStyle (Maybe Double)
psFillOpacity
= lens _psFillOpacity
(\ s a -> s{_psFillOpacity = a})
. mapping _Coerce | 151 | psFillOpacity
= lens _psFillOpacity
(\ s a -> s{_psFillOpacity = a})
. mapping _Coerce | 100 | true | true | 2 | 8 | 48 | 60 | 29 | 31 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.Prim.hs | bsd-3-clause | -- |Coerce directly from address to int. Strongly deprecated.
addr2Int# :: Addr# -> Int#
addr2Int# = addr2Int# | 111 | addr2Int# :: Addr# -> Int#
addr2Int# = addr2Int# | 48 | addr2Int# = addr2Int# | 21 | true | true | 0 | 5 | 17 | 16 | 9 | 7 | null | null |
frantisekfarka/ghc-dsi | compiler/main/DynFlags.hs | bsd-3-clause | setWarnSafe :: Bool -> DynP ()
setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l }) | 106 | setWarnSafe :: Bool -> DynP ()
setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l }) | 106 | setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l }) | 75 | false | true | 0 | 11 | 22 | 55 | 28 | 27 | null | null |
grnet/snf-ganeti | src/Ganeti/WConfd/Core.hs | bsd-2-clause | -- * Prepareation for cluster destruction
-- | Prepare daemon for cluster destruction. This consists of
-- verifying that the requester owns the BGL exclusively, transfering the BGL
-- to WConfD itself, and modifying the configuration so that no
-- node is the master any more. Note that, since we own the BGL exclusive... | 1,606 | prepareClusterDestruction :: ClientId -> WConfdMonad ()
prepareClusterDestruction cid = do
la <- readLockAllocation
unless (L.holdsLock cid BGL L.OwnExclusive la)
. failError $ "Cluster destruction requested without owning BGL exclusively"
logDebug $ "preparing cluster destruction as requested by " ++ show ci... | 1,195 | prepareClusterDestruction cid = do
la <- readLockAllocation
unless (L.holdsLock cid BGL L.OwnExclusive la)
. failError $ "Cluster destruction requested without owning BGL exclusively"
logDebug $ "preparing cluster destruction as requested by " ++ show cid
-- transfer BGL to ourselfs. The do this, by adding ... | 1,139 | true | true | 0 | 13 | 384 | 257 | 128 | 129 | null | null |
rueshyna/gogol | gogol-fitness/gen/Network/Google/Resource/Fitness/Users/DataSources/DataSets/Get.hs | mpl-2.0 | -- | Creates a value of 'UsersDataSourcesDataSetsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'udsdsgDataSourceId'
--
-- * 'udsdsgUserId'
--
-- * 'udsdsgDataSetId'
--
-- * 'udsdsgLimit'
--
-- * 'udsdsgPageToken'
usersDataSource... | 786 | usersDataSourcesDataSetsGet
:: Text -- ^ 'udsdsgDataSourceId'
-> Text -- ^ 'udsdsgUserId'
-> Text -- ^ 'udsdsgDataSetId'
-> UsersDataSourcesDataSetsGet
usersDataSourcesDataSetsGet pUdsdsgDataSourceId_ pUdsdsgUserId_ pUdsdsgDataSetId_ =
UsersDataSourcesDataSetsGet'
{ _udsdsgDataSourceId = pUdsdsg... | 481 | usersDataSourcesDataSetsGet pUdsdsgDataSourceId_ pUdsdsgUserId_ pUdsdsgDataSetId_ =
UsersDataSourcesDataSetsGet'
{ _udsdsgDataSourceId = pUdsdsgDataSourceId_
, _udsdsgUserId = pUdsdsgUserId_
, _udsdsgDataSetId = pUdsdsgDataSetId_
, _udsdsgLimit = Nothing
, _udsdsgPageToken = Nothing
} | 313 | true | true | 0 | 9 | 138 | 87 | 54 | 33 | null | null |
brendanhay/gogol | gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Annotations/Summary.hs | mpl-2.0 | -- | Array of layer IDs to get the summary for.
mlasLayerIds :: Lens' MyLibraryAnnotationsSummary [Text]
mlasLayerIds
= lens _mlasLayerIds (\ s a -> s{_mlasLayerIds = a})
. _Coerce | 188 | mlasLayerIds :: Lens' MyLibraryAnnotationsSummary [Text]
mlasLayerIds
= lens _mlasLayerIds (\ s a -> s{_mlasLayerIds = a})
. _Coerce | 140 | mlasLayerIds
= lens _mlasLayerIds (\ s a -> s{_mlasLayerIds = a})
. _Coerce | 83 | true | true | 0 | 10 | 36 | 49 | 26 | 23 | null | null |
vikraman/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | isStateHackType :: Type -> Bool
isStateHackType ty
| opt_NoStateHack
= False
| otherwise
= case tyConAppTyCon_maybe ty of
Just tycon -> tycon == statePrimTyCon
_ -> False
-- This is a gross hack. It claims that
-- every function over realWorldStatePrimTy is a one-shot
... | 1,161 | isStateHackType :: Type -> Bool
isStateHackType ty
| opt_NoStateHack
= False
| otherwise
= case tyConAppTyCon_maybe ty of
Just tycon -> tycon == statePrimTyCon
_ -> False
-- This is a gross hack. It claims that
-- every function over realWorldStatePrimTy is a one-shot
... | 1,161 | isStateHackType ty
| opt_NoStateHack
= False
| otherwise
= case tyConAppTyCon_maybe ty of
Just tycon -> tycon == statePrimTyCon
_ -> False
-- This is a gross hack. It claims that
-- every function over realWorldStatePrimTy is a one-shot
-- function. This is pre... | 1,129 | false | true | 0 | 9 | 382 | 79 | 45 | 34 | null | null |
TomMD/CV | Utils/ConvexHull.hs | bsd-3-clause | convexHull :: [(Double,Double)] -> [(Double,Double)]
convexHull lst =
let frst = minPoint lst
in case frst of
Nothing -> []
Just f ->
let sorted = sortBy (comparing (heading f)) (filter (/=f) lst)
in case sorted of
(a:b:cs) -> grahamScan (b:a:f:[]) cs
... | 663 | convexHull :: [(Double,Double)] -> [(Double,Double)]
convexHull lst =
let frst = minPoint lst
in case frst of
Nothing -> []
Just f ->
let sorted = sortBy (comparing (heading f)) (filter (/=f) lst)
in case sorted of
(a:b:cs) -> grahamScan (b:a:f:[]) cs
... | 663 | convexHull lst =
let frst = minPoint lst
in case frst of
Nothing -> []
Just f ->
let sorted = sortBy (comparing (heading f)) (filter (/=f) lst)
in case sorted of
(a:b:cs) -> grahamScan (b:a:f:[]) cs
cs -> f:cs
where
graham... | 610 | false | true | 3 | 19 | 248 | 306 | 157 | 149 | null | null |
xkollar/handy-haskell | hlint/HLint.hs | gpl-3.0 | warn = (\ x -> f $ g x) ==> f . g | 33 | warn = (\ x -> f $ g x) ==> f . g | 33 | warn = (\ x -> f $ g x) ==> f . g | 33 | false | false | 0 | 10 | 12 | 29 | 15 | 14 | null | null |
linusyang/barrelfish | hake/RuleDefs.hs | mit | kernelLdFlags "xscale" = XScale.kernelLdFlags | 45 | kernelLdFlags "xscale" = XScale.kernelLdFlags | 45 | kernelLdFlags "xscale" = XScale.kernelLdFlags | 45 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
alcidesv/ReH | hs-src/Rede/SpdyProtocol/TrivialTestWorker.hs | bsd-3-clause | getRelPathMime :: String -> B.ByteString
getRelPathMime rel_path = case maybe_mime of
Just (_, mime_type) -> mime_type
Nothing ->
case maybe_mime2 of
Just (_, mime_type) -> mime_type
Nothing -> "application/octet-stream"
where
maybe_mime... | 530 | getRelPathMime :: String -> B.ByteString
getRelPathMime rel_path = case maybe_mime of
Just (_, mime_type) -> mime_type
Nothing ->
case maybe_mime2 of
Just (_, mime_type) -> mime_type
Nothing -> "application/octet-stream"
where
maybe_mime... | 530 | getRelPathMime rel_path = case maybe_mime of
Just (_, mime_type) -> mime_type
Nothing ->
case maybe_mime2 of
Just (_, mime_type) -> mime_type
Nothing -> "application/octet-stream"
where
maybe_mime = find (\ (ext, _) -> ext `B.isSuffixOf... | 489 | false | true | 4 | 11 | 152 | 152 | 84 | 68 | null | null |
jgm/blaze-html | Text/Blaze/Internal.hs | bsd-3-clause | dataAttribute :: Tag -- ^ Name of the attribute.
-> AttributeValue -- ^ Value for the attribute.
-> Attribute -- ^ Resulting HTML attribute.
dataAttribute tag value = Attribute $ AddCustomAttribute
(Static "data-" `mappend` Static (unTag tag))
(Static " data-" `map... | 397 | dataAttribute :: Tag -- ^ Name of the attribute.
-> AttributeValue -- ^ Value for the attribute.
-> Attribute
dataAttribute tag value = Attribute $ AddCustomAttribute
(Static "data-" `mappend` Static (unTag tag))
(Static " data-" `mappend` Static (unTag tag) `mappend` St... | 360 | dataAttribute tag value = Attribute $ AddCustomAttribute
(Static "data-" `mappend` Static (unTag tag))
(Static " data-" `mappend` Static (unTag tag) `mappend` Static "=\"")
(unAttributeValue value) | 209 | true | true | 0 | 12 | 107 | 95 | 50 | 45 | null | null |
dalaing/type-systems | src/Rules/Unification.hs | bsd-3-clause | mkUnify' :: (Eq a, Ord (f a), Foldable f, MonadError e m, AsUnificationExpectedEq e f a, AsOccursError e f a, AsUnificationMismatch e f a)
=> Prism' (f a) a
-> (f a -> f a)
-> [UnificationRule m f a]
-> [UConstraint f a]
-> EquivT s (f a) (f a) m ()
mkUnify' pVar normalizeFn rule... | 468 | mkUnify' :: (Eq a, Ord (f a), Foldable f, MonadError e m, AsUnificationExpectedEq e f a, AsOccursError e f a, AsUnificationMismatch e f a)
=> Prism' (f a) a
-> (f a -> f a)
-> [UnificationRule m f a]
-> [UConstraint f a]
-> EquivT s (f a) (f a) m ()
mkUnify' pVar normalizeFn rule... | 468 | mkUnify' pVar normalizeFn rules =
let
unify1 = mkUnify1 pVar normalizeFn rules
unify [] = return ()
unify (x : xs) = do
unify1 x
unify xs
in
unify | 178 | false | true | 0 | 12 | 153 | 226 | 109 | 117 | null | null |
mrakgr/futhark | src/Futhark/Representation/SOACS/Simplify.hs | bsd-3-clause | simplifyClosedFormReduce _ _ = cannotSimplify | 45 | simplifyClosedFormReduce _ _ = cannotSimplify | 45 | simplifyClosedFormReduce _ _ = cannotSimplify | 45 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
orchid-hybrid/bee | Bee/DerivRegex.hs | gpl-3.0 | d a (r :& s) = d a r :& d a s | 29 | d a (r :& s) = d a r :& d a s | 29 | d a (r :& s) = d a r :& d a s | 29 | false | false | 2 | 6 | 12 | 38 | 15 | 23 | null | null |
lagleki/tersmu-0.2 | TersmuIRC.hs | gpl-3.0 | showParsedText jbo s (Left pos) = return $ "Parse error at " ++ show pos | 72 | showParsedText jbo s (Left pos) = return $ "Parse error at " ++ show pos | 72 | showParsedText jbo s (Left pos) = return $ "Parse error at " ++ show pos | 72 | false | false | 0 | 7 | 14 | 30 | 14 | 16 | null | null |
sandrolovnicki/lambda-calculus-interpreter | app/Main.hs | mit | -------------------------------------------------------------------------------------
-- MAIN with Read-Evaluate-Print Loop --
-------------------------------------------------------------------------------------
repl :: Environment -> InputT IO ()
repl env =
getInputLine (boldCyan "pLam>" <> " ")
>>= ( \case
... | 526 | repl :: Environment -> InputT IO ()
repl env =
getInputLine (boldCyan "pLam>" <> " ")
>>= ( \case
Nothing -> pure ()
Just line
| line == ":quit" || line == ":q" -> void (outputStrLn (boldCyan "Goodbye!"))
| otherwise -> execute line env >>= repl
) | 313 | repl env =
getInputLine (boldCyan "pLam>" <> " ")
>>= ( \case
Nothing -> pure ()
Just line
| line == ":quit" || line == ":q" -> void (outputStrLn (boldCyan "Goodbye!"))
| otherwise -> execute line env >>= repl
) | 277 | true | true | 2 | 15 | 120 | 124 | 59 | 65 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.