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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
michalt/cvector | Data/CVector/Mutable.hs | bsd-3-clause | init :: CMVector s a -> CMVector s a
init = G.init | 50 | init :: CMVector s a -> CMVector s a
init = G.init | 50 | init = G.init | 13 | false | true | 0 | 6 | 11 | 27 | 13 | 14 | null | null |
helino/wham | src/Main.hs | bsd-3-clause | options :: [OptDescr Flag]
options = [Option ['d'] ["debug"] (NoArg Debug)
"show debug info",
Option ['s'] ["state"] (ReqArg readState "state")
"evaluate from the given state",
Option ['a'] ["analyze"] (NoArg Analysis)
"run the static analyzer"] | 302 | options :: [OptDescr Flag]
options = [Option ['d'] ["debug"] (NoArg Debug)
"show debug info",
Option ['s'] ["state"] (ReqArg readState "state")
"evaluate from the given state",
Option ['a'] ["analyze"] (NoArg Analysis)
"run the static analyzer"] | 302 | options = [Option ['d'] ["debug"] (NoArg Debug)
"show debug info",
Option ['s'] ["state"] (ReqArg readState "state")
"evaluate from the given state",
Option ['a'] ["analyze"] (NoArg Analysis)
"run the static analyzer"] | 275 | false | true | 0 | 8 | 90 | 91 | 49 | 42 | null | null |
vedgar/mlr | 2016 Kolokvij/Z1.hs | unlicense | true_c = logconst True | 22 | true_c = logconst True | 22 | true_c = logconst True | 22 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | manageably = id | 15 | manageably = id | 15 | manageably = id | 15 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/Module.hs | bsd-3-clause | moduleNameString :: ModuleName -> String
moduleNameString (ModuleName mod) = unpackFS mod | 89 | moduleNameString :: ModuleName -> String
moduleNameString (ModuleName mod) = unpackFS mod | 89 | moduleNameString (ModuleName mod) = unpackFS mod | 48 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
nukisman/elm-format-short | src/Box.hs | bsd-3-clause | lineLength :: Int -> Line -> Int
lineLength startColumn line' =
startColumn +
case line' of
Text string -> T.length string
Space -> 1
Tab -> tabLength startColumn
Row lines' -> rowLength startColumn lines' | 250 | lineLength :: Int -> Line -> Int
lineLength startColumn line' =
startColumn +
case line' of
Text string -> T.length string
Space -> 1
Tab -> tabLength startColumn
Row lines' -> rowLength startColumn lines' | 250 | lineLength startColumn line' =
startColumn +
case line' of
Text string -> T.length string
Space -> 1
Tab -> tabLength startColumn
Row lines' -> rowLength startColumn lines' | 217 | false | true | 2 | 9 | 78 | 81 | 36 | 45 | null | null |
codemac/yi-editor | src/Data/Trie.hs | gpl-2.0 | lookupPrefix :: (MonadPlus m) => String -> Trie -> m Trie
lookupPrefix [] trie = return trie | 92 | lookupPrefix :: (MonadPlus m) => String -> Trie -> m Trie
lookupPrefix [] trie = return trie | 92 | lookupPrefix [] trie = return trie | 34 | false | true | 0 | 8 | 16 | 41 | 20 | 21 | null | null |
pmiddend/jumpie | lib/Jumpie/GameObject.hs | gpl-3.0 | isSensorLine :: GameObject -> Bool
isSensorLine (ObjectSensorLine _) = True | 75 | isSensorLine :: GameObject -> Bool
isSensorLine (ObjectSensorLine _) = True | 75 | isSensorLine (ObjectSensorLine _) = True | 40 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
juhp/stack | src/Stack/Types/Config.hs | bsd-3-clause | parseProjectAndConfigMonoid :: Path Abs Dir -> Value -> Yaml.Parser (WithJSONWarnings (IO ProjectAndConfigMonoid))
parseProjectAndConfigMonoid rootDir =
withObjectWarnings "ProjectAndConfigMonoid" $ \o -> do
packages <- o ..:? "packages" ..!= [RelFilePath "."]
deps <- jsonSubWarningsTT (o ..:? "extr... | 1,731 | parseProjectAndConfigMonoid :: Path Abs Dir -> Value -> Yaml.Parser (WithJSONWarnings (IO ProjectAndConfigMonoid))
parseProjectAndConfigMonoid rootDir =
withObjectWarnings "ProjectAndConfigMonoid" $ \o -> do
packages <- o ..:? "packages" ..!= [RelFilePath "."]
deps <- jsonSubWarningsTT (o ..:? "extr... | 1,731 | parseProjectAndConfigMonoid rootDir =
withObjectWarnings "ProjectAndConfigMonoid" $ \o -> do
packages <- o ..:? "packages" ..!= [RelFilePath "."]
deps <- jsonSubWarningsTT (o ..:? "extra-deps") ..!= []
flags' <- o ..:? "flags" ..!= mempty
let flags = unCabalStringMap <$> unCabalStrin... | 1,616 | false | true | 0 | 20 | 525 | 418 | 209 | 209 | null | null |
Ferdinand-vW/sessiontypes | src/Control/SessionTypes/Visualize.hs | gpl-3.0 | -- | Insert new number of weaknings into state
saveWk :: Int -> DiagramM ()
saveWk w = modify $ \(DState n _ loc d g) -> DState n w loc d g | 139 | saveWk :: Int -> DiagramM ()
saveWk w = modify $ \(DState n _ loc d g) -> DState n w loc d g | 92 | saveWk w = modify $ \(DState n _ loc d g) -> DState n w loc d g | 63 | true | true | 0 | 8 | 32 | 58 | 29 | 29 | null | null |
hephaestus-pl/hephaestus | alexandre/feature-modeling/src/FeatureModel/Logic.hs | mit | --
-- Expression simplifications
simplifyExpression :: FeatureExpression -> FeatureExpression
simplifyExpression (And e1 e2) = simplifyAnd e1 e2 | 144 | simplifyExpression :: FeatureExpression -> FeatureExpression
simplifyExpression (And e1 e2) = simplifyAnd e1 e2 | 111 | simplifyExpression (And e1 e2) = simplifyAnd e1 e2 | 50 | true | true | 0 | 7 | 16 | 33 | 17 | 16 | null | null |
bendmorris/scotch | Scotch/Eval/ReadFile.hs | gpl-3.0 | -- interpret a list of code lines using a list of scoped bindings
wexecute :: InterpreterSettings -> [PosExpr] -> VarDict -> IO VarDict
wexecute _ [] bindings = do return bindings | 179 | wexecute :: InterpreterSettings -> [PosExpr] -> VarDict -> IO VarDict
wexecute _ [] bindings = do return bindings | 113 | wexecute _ [] bindings = do return bindings | 43 | true | true | 0 | 8 | 30 | 45 | 22 | 23 | null | null |
mosigo/haskell-sandbox | src/AminoAcid.hs | bsd-3-clause | radicalAtomCoordinates (Tryptophan cb cg cd1 cd2 ne1 ce2 ce3 cz2 cz3 ch2) atomType =
let (Hydrated cbCoords _) = cb
(Hydrated cgCoords _) = cg
(Hydrated cd1Coords _) = cd1
(Hydrated cd2Coords _) = cd2
(Hydrated ne1Coords _) = ne1
(Hydrated ce2Coords _) = ce2
(Hydrated ce3Coords _... | 744 | radicalAtomCoordinates (Tryptophan cb cg cd1 cd2 ne1 ce2 ce3 cz2 cz3 ch2) atomType =
let (Hydrated cbCoords _) = cb
(Hydrated cgCoords _) = cg
(Hydrated cd1Coords _) = cd1
(Hydrated cd2Coords _) = cd2
(Hydrated ne1Coords _) = ne1
(Hydrated ce2Coords _) = ce2
(Hydrated ce3Coords _... | 744 | radicalAtomCoordinates (Tryptophan cb cg cd1 cd2 ne1 ce2 ce3 cz2 cz3 ch2) atomType =
let (Hydrated cbCoords _) = cb
(Hydrated cgCoords _) = cg
(Hydrated cd1Coords _) = cd1
(Hydrated cd2Coords _) = cd2
(Hydrated ne1Coords _) = ne1
(Hydrated ce2Coords _) = ce2
(Hydrated ce3Coords _... | 744 | false | false | 11 | 10 | 231 | 287 | 131 | 156 | null | null |
antitypical/Surface | src/Data/Name/Internal.hs | mit | interleave :: [a] -> [a] -> [a]
interleave [] ys = ys | 53 | interleave :: [a] -> [a] -> [a]
interleave [] ys = ys | 53 | interleave [] ys = ys | 21 | false | true | 0 | 7 | 11 | 35 | 19 | 16 | null | null |
benkolera/haskell-ldap-classy | LDAP/Classy/Dn/Internal.hs | mit | optionalSpace :: Parser ()
optionalSpace = skipMany space | 57 | optionalSpace :: Parser ()
optionalSpace = skipMany space | 57 | optionalSpace = skipMany space | 30 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
Lignum/Tetoris | src/Utils.hs | mit | rotateFunc RotateRight = rotateRight | 36 | rotateFunc RotateRight = rotateRight | 36 | rotateFunc RotateRight = rotateRight | 36 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
google-research/dex-lang | src/lib/Util.hs | bsd-3-clause | zipErr :: MonadFail m => m a
zipErr = fail "zip error" | 54 | zipErr :: MonadFail m => m a
zipErr = fail "zip error" | 54 | zipErr = fail "zip error" | 25 | false | true | 0 | 6 | 11 | 24 | 11 | 13 | null | null |
BartMassey/permutations | Data/Permutations.hs | bsd-3-clause | -- | Given a cycle specification of a permutation, return a
-- function which permutes its input list in the specified
-- way.
--
-- No checking is done on anything here, so one must be
-- careful that the arguments to both fromCycles and the
-- returned function make sense.
fromCycles :: Cycles -> Permutation a
fromC... | 347 | fromCycles :: Cycles -> Permutation a
fromCycles = fromSigma . toSigma | 70 | fromCycles = fromSigma . toSigma | 32 | true | true | 0 | 6 | 62 | 29 | 18 | 11 | null | null |
chreekat/snowdrift | tests/UserTest.hs | agpl-3.0 | userSpecs :: Spec
userSpecs = do
let users :: [NamedUser]
users = [minBound .. maxBound]
ydescribe "user" $ do
yit "creates a user" $ [marked|
forM_ users $ \user -> do
get200 UserCreateR
withStatus 303 True $ request $ do
setUrl ... | 717 | userSpecs :: Spec
userSpecs = do
let users :: [NamedUser]
users = [minBound .. maxBound]
ydescribe "user" $ do
yit "creates a user" $ [marked|
forM_ users $ \user -> do
get200 UserCreateR
withStatus 303 True $ request $ do
setUrl ... | 717 | userSpecs = do
let users :: [NamedUser]
users = [minBound .. maxBound]
ydescribe "user" $ do
yit "creates a user" $ [marked|
forM_ users $ \user -> do
get200 UserCreateR
withStatus 303 True $ request $ do
setUrl UserCreateR
... | 699 | false | true | 0 | 11 | 319 | 72 | 39 | 33 | null | null |
seinokatsuhiro/koshu-java-tool | InstSize.hs | bsd-3-clause | instSize (J.LSTORE _) = 2 | 39 | instSize (J.LSTORE _) = 2 | 39 | instSize (J.LSTORE _) = 2 | 39 | false | false | 0 | 7 | 18 | 18 | 8 | 10 | null | null |
shlevy/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | thenAClassOpKey = mkPreludeMiscIdUnique 753 | 47 | thenAClassOpKey = mkPreludeMiscIdUnique 753 | 47 | thenAClassOpKey = mkPreludeMiscIdUnique 753 | 47 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/CreateDBCluster.hs | mpl-2.0 | -- | A value that indicates that the DB cluster should be associated with the
-- specified option group.
--
-- Permanent options cannot be removed from an option group. The option
-- group cannot be removed from a DB cluster once it is associated with a
-- DB cluster.
cdcOptionGroupName :: Lens' CreateDBCluster (Maybe ... | 409 | cdcOptionGroupName :: Lens' CreateDBCluster (Maybe Text)
cdcOptionGroupName = lens _cdcOptionGroupName (\ s a -> s{_cdcOptionGroupName = a}) | 140 | cdcOptionGroupName = lens _cdcOptionGroupName (\ s a -> s{_cdcOptionGroupName = a}) | 83 | true | true | 0 | 9 | 66 | 51 | 30 | 21 | null | null |
Batev/Vienna-University-of-Technology | Functional Programming/Complex functions/ComplexFunctions8.hs | mit | stream' :: [Integer] -> [Integer] -> [Integer]
stream' a@(x:xs) b@(y:ys) = case compare x y of
LT -> x : stream' xs b
EQ -> x : stream' xs ys
GT -> y : stream' a ys
---------------
-- Aufgabe 3 --
--------------- | 268 | stream' :: [Integer] -> [Integer] -> [Integer]
stream' a@(x:xs) b@(y:ys) = case compare x y of
LT -> x : stream' xs b
EQ -> x : stream' xs ys
GT -> y : stream' a ys
---------------
-- Aufgabe 3 --
--------------- | 266 | stream' a@(x:xs) b@(y:ys) = case compare x y of
LT -> x : stream' xs b
EQ -> x : stream' xs ys
GT -> y : stream' a ys
---------------
-- Aufgabe 3 --
--------------- | 219 | false | true | 2 | 10 | 98 | 117 | 59 | 58 | null | null |
Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | elementToListItem opts (Sec _ num id' headerText subsecs) = do
let sectnum = if writerNumberSections opts
then (thespan ! [theclass "toc-section-number"] << showSecNum num) +++
stringToHtml opts" "
else noHtml
txt <- liftM (sectnum +++) $ inlineListToHt... | 657 | elementToListItem opts (Sec _ num id' headerText subsecs) = do
let sectnum = if writerNumberSections opts
then (thespan ! [theclass "toc-section-number"] << showSecNum num) +++
stringToHtml opts" "
else noHtml
txt <- liftM (sectnum +++) $ inlineListToHt... | 657 | elementToListItem opts (Sec _ num id' headerText subsecs) = do
let sectnum = if writerNumberSections opts
then (thespan ! [theclass "toc-section-number"] << showSecNum num) +++
stringToHtml opts" "
else noHtml
txt <- liftM (sectnum +++) $ inlineListToHt... | 657 | false | false | 0 | 17 | 196 | 195 | 95 | 100 | null | null |
shlevy/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | tidyToIfaceCo :: Coercion -> IfaceCoercion
-- It's vital to tidy before converting to an IfaceType
-- or nested binders will become indistinguishable!
--
-- Also for the free type variables, tell toIfaceCoercionX to
-- leave them as IfaceFreeCoVar. This is super-important
-- for debug printing.
tidyToIfaceCo co = toIf... | 500 | tidyToIfaceCo :: Coercion -> IfaceCoercion
tidyToIfaceCo co = toIfaceCoercionX (mkVarSet free_tcvs) (tidyCo env co)
where
env = tidyFreeTyCoVars emptyTidyEnv free_tcvs
free_tcvs = toposortTyVars $ tyCoVarsOfCoList co
------------ | 246 | tidyToIfaceCo co = toIfaceCoercionX (mkVarSet free_tcvs) (tidyCo env co)
where
env = tidyFreeTyCoVars emptyTidyEnv free_tcvs
free_tcvs = toposortTyVars $ tyCoVarsOfCoList co
------------ | 203 | true | true | 3 | 7 | 84 | 78 | 38 | 40 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Smart.hs | bsd-3-clause | -- FIXME: add missing operations from Floating, RealFrac & RealFloat
-- Relational and equality operators
mkLt :: (Elt t, IsScalar t) => Exp t -> Exp t -> Exp Bool
mkLt x y = Exp $ PrimLt scalarType `PrimApp` tup2 (x, y) | 222 | mkLt :: (Elt t, IsScalar t) => Exp t -> Exp t -> Exp Bool
mkLt x y = Exp $ PrimLt scalarType `PrimApp` tup2 (x, y) | 114 | mkLt x y = Exp $ PrimLt scalarType `PrimApp` tup2 (x, y) | 56 | true | true | 0 | 8 | 43 | 72 | 37 | 35 | null | null |
ruudkoot/odin | src/SCSI/MMC/Blank.hs | gpl-3.0 | blankingType (BlankTrackTail lba) = (4, lba) | 50 | blankingType (BlankTrackTail lba) = (4, lba) | 50 | blankingType (BlankTrackTail lba) = (4, lba) | 50 | false | false | 0 | 7 | 11 | 21 | 11 | 10 | null | null |
sgillespie/ghc | compiler/types/Class.hs | bsd-3-clause | {-
Note [Associated type tyvar names]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The TyCon of an associated type should use the same variable names as its
parent class. Thus
class C a b where
type F b x a :: *
We make F use the same Name for 'a' as C does, and similary 'b'.
The reason for this is when checking insta... | 1,127 | classArity :: Class -> Arity
classArity clas = length (classTyVars clas) | 72 | classArity clas = length (classTyVars clas) | 43 | true | true | 0 | 7 | 310 | 28 | 14 | 14 | null | null |
isomorphism/hackage2 | Distribution/Server/Features/Core.hs | bsd-3-clause | withPackageId :: DynamicPath -> (PackageId -> ServerPartE a) -> ServerPartE a
withPackageId dpath = require (return $ lookup "package" dpath >>= fromReqURI) | 156 | withPackageId :: DynamicPath -> (PackageId -> ServerPartE a) -> ServerPartE a
withPackageId dpath = require (return $ lookup "package" dpath >>= fromReqURI) | 156 | withPackageId dpath = require (return $ lookup "package" dpath >>= fromReqURI) | 78 | false | true | 0 | 10 | 21 | 58 | 27 | 31 | null | null |
pmiddend/reviewer | src/Reviewer/Url.hs | gpl-3.0 | urlAsText :: Iso' Url Text
urlAsText = iso (\(Url t) -> t) Url | 62 | urlAsText :: Iso' Url Text
urlAsText = iso (\(Url t) -> t) Url | 62 | urlAsText = iso (\(Url t) -> t) Url | 35 | false | true | 1 | 9 | 12 | 38 | 18 | 20 | null | null |
google/codeworld | codeworld-base/src/Internal/Picture.hs | apache-2.0 | -- | A coordinate plane.
--
-- Adding this to your pictures can help you measure distances
-- more accurately.
--
-- Example:
--
-- > program = drawingOf(myPicture & coordinatePlane)
-- > myPicture = ...
coordinatePlane :: HasCallStack => Picture
coordinatePlane = withFrozenCallStack $ CWPic CW.coordinatePlane | 311 | coordinatePlane :: HasCallStack => Picture
coordinatePlane = withFrozenCallStack $ CWPic CW.coordinatePlane | 107 | coordinatePlane = withFrozenCallStack $ CWPic CW.coordinatePlane | 64 | true | true | 0 | 7 | 46 | 40 | 22 | 18 | null | null |
glutamate/matio | src/Data/Mat/Data.hs | bsd-3-clause | matTypeEqual :: MatType d a b -> MatType d' a' c -> Maybe (Equal b c)
matTypeEqual MatDouble MatDouble = return Refl | 117 | matTypeEqual :: MatType d a b -> MatType d' a' c -> Maybe (Equal b c)
matTypeEqual MatDouble MatDouble = return Refl | 117 | matTypeEqual MatDouble MatDouble = return Refl | 47 | false | true | 0 | 9 | 22 | 52 | 24 | 28 | null | null |
kmate/HaRe | old/testing/addOneParameter/C2_AstOut.hs | bsd-3-clause | sumSquares1 ((x : xs))
= ((sq sq_f) x) + (sumSquares1 xs) | 61 | sumSquares1 ((x : xs))
= ((sq sq_f) x) + (sumSquares1 xs) | 61 | sumSquares1 ((x : xs))
= ((sq sq_f) x) + (sumSquares1 xs) | 61 | false | false | 0 | 9 | 14 | 41 | 21 | 20 | null | null |
DougBurke/swish | tests/GraphTest.hs | lgpl-2.1 | eq1hs1, eq1hs2 :: [Arc (ScopedLabel LabelMem)]
eq1hs1 = [t10_1,t11_1,t12_1,t20_1,t21_1,t22_1] | 98 | eq1hs1, eq1hs2 :: [Arc (ScopedLabel LabelMem)]
eq1hs1 = [t10_1,t11_1,t12_1,t20_1,t21_1,t22_1] | 98 | eq1hs1 = [t10_1,t11_1,t12_1,t20_1,t21_1,t22_1] | 51 | false | true | 2 | 8 | 13 | 48 | 26 | 22 | null | null |
siddhanathan/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | matchContextErrString ProcExpr = ptext (sLit "proc") | 70 | matchContextErrString ProcExpr = ptext (sLit "proc") | 70 | matchContextErrString ProcExpr = ptext (sLit "proc") | 70 | false | false | 0 | 7 | 23 | 18 | 8 | 10 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Liquid/Environment.hs | bsd-3-clause | getClassInvariant :: CGEnv -> AbsName -> F.Reft
--------------------------------------------------------------------------------
getClassInvariant (envCHA -> c) = mconcat . map inv . classAncestors c
where
inv a | Just (TD s p _) <- resolveType c a, sigKind s == ClassTDK = p
| otherwise = mempty
------... | 394 | getClassInvariant :: CGEnv -> AbsName -> F.Reft
getClassInvariant (envCHA -> c) = mconcat . map inv . classAncestors c
where
inv a | Just (TD s p _) <- resolveType c a, sigKind s == ClassTDK = p
| otherwise = mempty
-------------------------------------------------------------------------------- | 313 | getClassInvariant (envCHA -> c) = mconcat . map inv . classAncestors c
where
inv a | Just (TD s p _) <- resolveType c a, sigKind s == ClassTDK = p
| otherwise = mempty
-------------------------------------------------------------------------------- | 265 | true | true | 0 | 11 | 60 | 117 | 53 | 64 | null | null |
olsner/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr (GITOD src dst) = pprFormatFormatRegReg (sLit "gitod") II32 FF64 src dst | 82 | pprGInstr (GITOD src dst) = pprFormatFormatRegReg (sLit "gitod") II32 FF64 src dst | 82 | pprGInstr (GITOD src dst) = pprFormatFormatRegReg (sLit "gitod") II32 FF64 src dst | 82 | false | false | 0 | 7 | 11 | 34 | 16 | 18 | null | null |
dikmax/haskell-blog | src/HtmlAttributes.hs | bsd-2-clause | typeJavascript :: (Text, Text)
typeJavascript = type_ "text/javascript" | 71 | typeJavascript :: (Text, Text)
typeJavascript = type_ "text/javascript" | 71 | typeJavascript = type_ "text/javascript" | 40 | false | true | 0 | 5 | 7 | 20 | 11 | 9 | null | null |
f-me/snap-core | test/suite/Snap/Internal/Routing/Tests.hs | bsd-3-clause | ------------------------------------------------------------------------------
routesEmptyCapture :: Snap ByteString
routesEmptyCapture = route [ ("foo/:id", fooCapture) ] | 171 | routesEmptyCapture :: Snap ByteString
routesEmptyCapture = route [ ("foo/:id", fooCapture) ] | 92 | routesEmptyCapture = route [ ("foo/:id", fooCapture) ] | 54 | true | true | 0 | 7 | 11 | 27 | 15 | 12 | null | null |
henvic/plc | src/EntradaESaidaMonads.hs | cc0-1.0 | sumChars l n = do c <- getChar
putChar '\n'
sumChars (l ++ [c]) (n-1) | 105 | sumChars l n = do c <- getChar
putChar '\n'
sumChars (l ++ [c]) (n-1) | 105 | sumChars l n = do c <- getChar
putChar '\n'
sumChars (l ++ [c]) (n-1) | 105 | false | false | 1 | 11 | 50 | 54 | 23 | 31 | null | null |
ivan-m/theseus | utils/comparison.hs | mit | --------------------------------------------------------------------------------
main :: IO ()
main = do
testBench $ do
collection "Comparing encoding speed" $
compareFuncAll "Grouped Word* values"
(`withLibrary` (\p -> map (encode p) bws))
normalForm
collectio... | 941 | main :: IO ()
main = do
testBench $ do
collection "Comparing encoding speed" $
compareFuncAll "Grouped Word* values"
(`withLibrary` (\p -> map (encode p) bws))
normalForm
collection "Comparing decoding speed" $
compareFuncAll "Grouped Word* values"
... | 859 | main = do
testBench $ do
collection "Comparing encoding speed" $
compareFuncAll "Grouped Word* values"
(`withLibrary` (\p -> map (encode p) bws))
normalForm
collection "Comparing decoding speed" $
compareFuncAll "Grouped Word* values"
... | 845 | true | true | 0 | 17 | 247 | 220 | 108 | 112 | null | null |
Some-T/Portfolio | HASKELL/Labs/H3/H3.hsproj/H3.hs | unlicense | (a,b,c) = ((-b + t)/a', (-b - t)/a')
where
t = | 55 | volumeCylinder (radius,height) = pi * radius^2 * height | 55 | volumeCylinder (radius,height) = pi * radius^2 * height | 55 | false | false | 1 | 9 | 19 | 56 | 30 | 26 | null | null |
danchoi/sqljson | Main.hs | mit | runSql :: Conf -> Value -> IO Value
runSql conf (Array v) =
-- we must assume the vector is of Number ints at this point, since it matches the keypath
let vs = V.toList $ v
ints = catMaybes . map forceToInt $ vs
in runSqlInts conf ints | 257 | runSql :: Conf -> Value -> IO Value
runSql conf (Array v) =
-- we must assume the vector is of Number ints at this point, since it matches the keypath
let vs = V.toList $ v
ints = catMaybes . map forceToInt $ vs
in runSqlInts conf ints | 257 | runSql conf (Array v) =
-- we must assume the vector is of Number ints at this point, since it matches the keypath
let vs = V.toList $ v
ints = catMaybes . map forceToInt $ vs
in runSqlInts conf ints | 221 | false | true | 0 | 11 | 70 | 78 | 36 | 42 | null | null |
gcampax/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | exprStats (Coercion c) = coStats c | 37 | exprStats (Coercion c) = coStats c | 37 | exprStats (Coercion c) = coStats c | 37 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
diminishedprime/.org | programmey_stuff/write_yourself_a_scheme/ch_05/hello.hs | mit | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 64 | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 64 | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 64 | false | false | 0 | 6 | 11 | 18 | 8 | 10 | null | null |
michaelficarra/purescript | src/Language/PureScript/Sugar/TypeClasses/Deriving.hs | mit | lamNull :: Expr -> Expr
lamNull = lam "$q" | 42 | lamNull :: Expr -> Expr
lamNull = lam "$q" | 42 | lamNull = lam "$q" | 18 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
amccausl/Swish | Swish/HaskellUtils/ParseURI.hs | lgpl-2.1 | regChar :: String -> [(String, String)]
regChar = oneOf
[ unreserved,
(char ';'),
(char ':'),
(char '@'),
(char '&'),
(char '='),
(char '+'),
(char '$'),
(char ','),
escaped ] | 307 | regChar :: String -> [(String, String)]
regChar = oneOf
[ unreserved,
(char ';'),
(char ':'),
(char '@'),
(char '&'),
(char '='),
(char '+'),
(char '$'),
(char ','),
escaped ] | 303 | regChar = oneOf
[ unreserved,
(char ';'),
(char ':'),
(char '@'),
(char '&'),
(char '='),
(char '+'),
(char '$'),
(char ','),
escaped ] | 263 | false | true | 0 | 9 | 160 | 112 | 60 | 52 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/List.hs | mpl-2.0 | -- | Field by which to sort the list.
alSortField :: Lens' AdsList (Maybe AdsListSortField)
alSortField
= lens _alSortField (\ s a -> s{_alSortField = a}) | 156 | alSortField :: Lens' AdsList (Maybe AdsListSortField)
alSortField
= lens _alSortField (\ s a -> s{_alSortField = a}) | 118 | alSortField
= lens _alSortField (\ s a -> s{_alSortField = a}) | 64 | true | true | 1 | 9 | 27 | 50 | 25 | 25 | null | null |
meoblast001/ext2-info | src/Data/EXT2/Directory.hs | mit | buildFsTree :: Handle -> Superblock -> BlockGroupDescriptorTable ->
IO (Maybe FsItem)
buildFsTree handle sb bgdTable = do
rootInode <- fetchInode sb bgdTable handle 2
case rootInode of
(Just root) -> buildFsTreeRecur handle sb bgdTable "" root
Nothing -> return Nothing | 296 | buildFsTree :: Handle -> Superblock -> BlockGroupDescriptorTable ->
IO (Maybe FsItem)
buildFsTree handle sb bgdTable = do
rootInode <- fetchInode sb bgdTable handle 2
case rootInode of
(Just root) -> buildFsTreeRecur handle sb bgdTable "" root
Nothing -> return Nothing | 296 | buildFsTree handle sb bgdTable = do
rootInode <- fetchInode sb bgdTable handle 2
case rootInode of
(Just root) -> buildFsTreeRecur handle sb bgdTable "" root
Nothing -> return Nothing | 195 | false | true | 0 | 11 | 66 | 94 | 44 | 50 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/Outputable.hs | bsd-3-clause | keyword :: SDoc -> SDoc
keyword = colored Col.colBold | 53 | keyword :: SDoc -> SDoc
keyword = colored Col.colBold | 53 | keyword = colored Col.colBold | 29 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
kwibus/myLang | src/LambdaF.hs | bsd-3-clause | wrap (Lam.Lambda i n t) = LambdaF i n t | 39 | wrap (Lam.Lambda i n t) = LambdaF i n t | 39 | wrap (Lam.Lambda i n t) = LambdaF i n t | 39 | false | false | 0 | 7 | 9 | 31 | 13 | 18 | null | null |
f-me/snap-core | test/suite/Snap/Util/FileServe/Tests.hs | bsd-3-clause | goIfModifiedSince :: Snap a -> ByteString -> ByteString -> IO Response
goIfModifiedSince m s lm = do
rq <- mkRequest s
let r = setHeader "if-modified-since" lm rq
liftM snd (run_ $ runIt m r)
------------------------------------------------------------------------------ | 284 | goIfModifiedSince :: Snap a -> ByteString -> ByteString -> IO Response
goIfModifiedSince m s lm = do
rq <- mkRequest s
let r = setHeader "if-modified-since" lm rq
liftM snd (run_ $ runIt m r)
------------------------------------------------------------------------------ | 284 | goIfModifiedSince m s lm = do
rq <- mkRequest s
let r = setHeader "if-modified-since" lm rq
liftM snd (run_ $ runIt m r)
------------------------------------------------------------------------------ | 213 | false | true | 0 | 10 | 49 | 83 | 38 | 45 | null | null |
thomasjm/hrtree | Zipper.hs | mit | replace :: node -> Loc node dat -> Loc node dat
replace n (Loc (_, cxt)) = Loc (n, cxt) | 87 | replace :: node -> Loc node dat -> Loc node dat
replace n (Loc (_, cxt)) = Loc (n, cxt) | 87 | replace n (Loc (_, cxt)) = Loc (n, cxt) | 39 | false | true | 0 | 8 | 19 | 55 | 28 | 27 | null | null |
xcv-/hfind | cli/System/HFind/ArgParse.hs | mit | parseConsumers (i, "-print":fmt:args) = do
let sourceName = "argument #" ++ show (i+1)
format <- parseStringInterp sourceName fmt
let consume = liftIO . TextIO.putStrLn <=< format
(state', consumer) <- parseMoreConsumers (i+2, args)
return (state', Pipes.chain consume >-> consumer) | 303 | parseConsumers (i, "-print":fmt:args) = do
let sourceName = "argument #" ++ show (i+1)
format <- parseStringInterp sourceName fmt
let consume = liftIO . TextIO.putStrLn <=< format
(state', consumer) <- parseMoreConsumers (i+2, args)
return (state', Pipes.chain consume >-> consumer) | 303 | parseConsumers (i, "-print":fmt:args) = do
let sourceName = "argument #" ++ show (i+1)
format <- parseStringInterp sourceName fmt
let consume = liftIO . TextIO.putStrLn <=< format
(state', consumer) <- parseMoreConsumers (i+2, args)
return (state', Pipes.chain consume >-> consumer) | 303 | false | false | 0 | 13 | 58 | 124 | 61 | 63 | null | null |
anttisalonen/freekick | haskell/libfreekick/Freekick/Libsoccer/Club.hs | agpl-3.0 | printPlayerStats :: Player -> IO ()
printPlayerStats pl = do
let pls = skills pl
let plp = personal pl
let ppersonals = firstname plp ++ " " ++ lastname plp ++ "\t" ++ show (yearofbirth plp) ++ " " ++ (nationality plp)
let ppos = positionToString (position pl)
let pskills = show (stamina pls) ++ " "... | 545 | printPlayerStats :: Player -> IO ()
printPlayerStats pl = do
let pls = skills pl
let plp = personal pl
let ppersonals = firstname plp ++ " " ++ lastname plp ++ "\t" ++ show (yearofbirth plp) ++ " " ++ (nationality plp)
let ppos = positionToString (position pl)
let pskills = show (stamina pls) ++ " "... | 545 | printPlayerStats pl = do
let pls = skills pl
let plp = personal pl
let ppersonals = firstname plp ++ " " ++ lastname plp ++ "\t" ++ show (yearofbirth plp) ++ " " ++ (nationality plp)
let ppos = positionToString (position pl)
let pskills = show (stamina pls) ++ " " ++ show (speed pls) ++ " " ++ show ... | 509 | false | true | 0 | 23 | 127 | 253 | 116 | 137 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | doVecPackOp :: Maybe MachOp -- Cast from element to vector component
-> CmmType -- Type of vector
-> CmmExpr -- Initial vector
-> [CmmExpr] -- Elements
-> CmmFormal -- Destination for result
-> FCode ()
doVecPackOp maybe_pre_write_cast ty ... | 1,379 | doVecPackOp :: Maybe MachOp -- Cast from element to vector component
-> CmmType -- Type of vector
-> CmmExpr -- Initial vector
-> [CmmExpr] -- Elements
-> CmmFormal -- Destination for result
-> FCode ()
doVecPackOp maybe_pre_write_cast ty ... | 1,379 | doVecPackOp maybe_pre_write_cast ty z es res = do
dst <- newTemp ty
emitAssign (CmmLocal dst) z
vecPack dst es 0
where
vecPack :: CmmFormal -> [CmmExpr] -> Int -> FCode ()
vecPack src [] _ =
emitAssign (CmmLocal res) (CmmReg (CmmLocal src))
vecPack src (e : es) i = do
dst <- n... | 1,095 | false | true | 0 | 14 | 524 | 433 | 211 | 222 | null | null |
Mahdi89/eTeak | src/Options.hs | bsd-3-clause | prettyPrintSubOptions :: SubOption subOption => SubOptionUsages subOption ->
String -> [subOption] -> IO ()
prettyPrintSubOptions usage prefix opts = mapM_ putStrLn $ columnFormat [optOns, optNames, optValues, optDescs]
[prefix,"",""," -- "] [prefix,"",""," "]
where
optionOnDe... | 1,413 | prettyPrintSubOptions :: SubOption subOption => SubOptionUsages subOption ->
String -> [subOption] -> IO ()
prettyPrintSubOptions usage prefix opts = mapM_ putStrLn $ columnFormat [optOns, optNames, optValues, optDescs]
[prefix,"",""," -- "] [prefix,"",""," "]
where
optionOnDef (n... | 1,409 | prettyPrintSubOptions usage prefix opts = mapM_ putStrLn $ columnFormat [optOns, optNames, optValues, optDescs]
[prefix,"",""," -- "] [prefix,"",""," "]
where
optionOnDef (name, optUsage) =
(on, name, value, subOptionDescription optUsage)
where
... | 1,293 | false | true | 0 | 17 | 506 | 357 | 189 | 168 | null | null |
alexbiehl/postie | src/Network/Mail/Postie/Address.hs | bsd-3-clause | commentContent :: Parser ()
commentContent = skipWhile1 isCommentText <|> ignore quotedPair <|> comment | 103 | commentContent :: Parser ()
commentContent = skipWhile1 isCommentText <|> ignore quotedPair <|> comment | 103 | commentContent = skipWhile1 isCommentText <|> ignore quotedPair <|> comment | 75 | false | true | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
tjakway/ghcjvm | compiler/main/DynFlags.hs | bsd-3-clause | opt_L :: DynFlags -> [String]
opt_L dflags = sOpt_L (settings dflags) | 85 | opt_L :: DynFlags -> [String]
opt_L dflags = sOpt_L (settings dflags) | 85 | opt_L dflags = sOpt_L (settings dflags) | 39 | false | true | 0 | 8 | 26 | 36 | 16 | 20 | null | null |
rumblesan/improviz | test/Tests/Language/Interpreter/Expressions.hs | bsd-3-clause | test_number_expression :: Assertion
test_number_expression =
let program = "3"
expected = Number 3
in resultTest program expected "expected 3 result" | 161 | test_number_expression :: Assertion
test_number_expression =
let program = "3"
expected = Number 3
in resultTest program expected "expected 3 result" | 161 | test_number_expression =
let program = "3"
expected = Number 3
in resultTest program expected "expected 3 result" | 125 | false | true | 0 | 9 | 31 | 37 | 18 | 19 | null | null |
pap/postgrest | test/SpecHelper.hs | mit | cfg :: AppConfig
cfg = AppConfig "postgrest_test" 5432 "postgrest_test" "" "localhost" 3000 "postgrest_anonymous" False 10 "1" "safe" | 133 | cfg :: AppConfig
cfg = AppConfig "postgrest_test" 5432 "postgrest_test" "" "localhost" 3000 "postgrest_anonymous" False 10 "1" "safe" | 133 | cfg = AppConfig "postgrest_test" 5432 "postgrest_test" "" "localhost" 3000 "postgrest_anonymous" False 10 "1" "safe" | 116 | false | true | 0 | 6 | 16 | 41 | 18 | 23 | null | null |
graninas/Haskell-Algorithms | Tests/TransitionGraph/transition-graph/src/TransitionGraph/Graph.hs | gpl-3.0 | leaf1
:: (Monad lang)
=> (i -> lang ())
-> Graph lang i ()
leaf1 flowF1 = with1 flowF1 (pure ()) | 102 | leaf1
:: (Monad lang)
=> (i -> lang ())
-> Graph lang i ()
leaf1 flowF1 = with1 flowF1 (pure ()) | 102 | leaf1 flowF1 = with1 flowF1 (pure ()) | 37 | false | true | 0 | 11 | 26 | 67 | 31 | 36 | null | null |
ndmitchell/tagsoup | src/Text/HTML/TagSoup/Options.hs | bsd-3-clause | -- | A 'ParseOptions' structure using a custom function to lookup attributes. Any attribute
-- that is not found will be left intact, and a 'TagWarning' given (if 'optTagWarning' is set).
--
-- If you do not want to resolve any entities, simpliy pass @const Nothing@ for the lookup function.
parseOptionsEntities :: ... | 976 | parseOptionsEntities :: StringLike str => (str -> Maybe str) -> ParseOptions str
parseOptionsEntities lookupEntity = ParseOptions False False entityData entityAttrib True
where
entityData x = TagText a : b
where (a,b) = entityAttrib x
entityAttrib ~(x,b) =
let x' = x `append... | 680 | parseOptionsEntities lookupEntity = ParseOptions False False entityData entityAttrib True
where
entityData x = TagText a : b
where (a,b) = entityAttrib x
entityAttrib ~(x,b) =
let x' = x `append` fromString [';'|b]
in case lookupEntity x' of
Just ... | 599 | true | true | 0 | 14 | 256 | 193 | 101 | 92 | null | null |
isovector/eden | src/Control/Monad/Jail.hs | bsd-3-clause | runJailT :: (Functor m)
=> JailT s s m a
-> s
-> m (Maybe (a, s))
runJailT ac = fmap (\(a, s, _, v) ->
if v then Just (a, s) else Nothing)
. runJailT' ac True id | 236 | runJailT :: (Functor m)
=> JailT s s m a
-> s
-> m (Maybe (a, s))
runJailT ac = fmap (\(a, s, _, v) ->
if v then Just (a, s) else Nothing)
. runJailT' ac True id | 236 | runJailT ac = fmap (\(a, s, _, v) ->
if v then Just (a, s) else Nothing)
. runJailT' ac True id | 143 | false | true | 0 | 11 | 113 | 106 | 57 | 49 | null | null |
haraldsteinlechner/lambdaWolf | src/Test.hs | gpl-3.0 | keyPressed l b f zd xs ys s (GLFW.CharKey 'b') d =
keyPressed l b f zd xs ys s (GLFW.CharKey 'B') d | 101 | keyPressed l b f zd xs ys s (GLFW.CharKey 'b') d =
keyPressed l b f zd xs ys s (GLFW.CharKey 'B') d | 101 | keyPressed l b f zd xs ys s (GLFW.CharKey 'b') d =
keyPressed l b f zd xs ys s (GLFW.CharKey 'B') d | 101 | false | false | 1 | 8 | 24 | 79 | 29 | 50 | null | null |
apriori/daak | lib/DAAK/Core/ResidualSpace.hs | mit | -- | split 1st space by 2nd space, taking into account non overlapping and only
-- | partially overlapping cases
splitSpaceSupport :: EuclideanSpace3D -> EuclideanSpace3D -> [ResidualSpace]
splitSpaceSupport a b
| overlap a b
= splitSpaceDirectSupport a (a `SP.intersect` b)
| otherwise = [mkResidualSpace a] | 314 | splitSpaceSupport :: EuclideanSpace3D -> EuclideanSpace3D -> [ResidualSpace]
splitSpaceSupport a b
| overlap a b
= splitSpaceDirectSupport a (a `SP.intersect` b)
| otherwise = [mkResidualSpace a] | 201 | splitSpaceSupport a b
| overlap a b
= splitSpaceDirectSupport a (a `SP.intersect` b)
| otherwise = [mkResidualSpace a] | 124 | true | true | 0 | 9 | 50 | 80 | 38 | 42 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | printRawIdKey = mkPreludeMiscIdUnique 46 | 56 | printRawIdKey = mkPreludeMiscIdUnique 46 | 56 | printRawIdKey = mkPreludeMiscIdUnique 46 | 56 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
Zigazou/HaMinitel | example/simpleForm/simpleForm.hs | gpl-3.0 | -- | Defines the interactive elements of our textual user interface.
-- There are 3 text fields
formInputs :: [IO TextField]
formInputs =
[ textField attributes { posX = 17, posY = 8 } 15 ""
, textField attributes { posX = 17, posY = 10 } 15 ""
, textField attributes { posX = 17, posY = 12 } 3 ""
]
... | 731 | formInputs :: [IO TextField]
formInputs =
[ textField attributes { posX = 17, posY = 8 } 15 ""
, textField attributes { posX = 17, posY = 10 } 15 ""
, textField attributes { posX = 17, posY = 12 } 3 ""
]
-- All fields will use VideoTex mode and are written white on blue
where attributes = Comm... | 633 | formInputs =
[ textField attributes { posX = 17, posY = 8 } 15 ""
, textField attributes { posX = 17, posY = 10 } 15 ""
, textField attributes { posX = 17, posY = 12 } 3 ""
]
-- All fields will use VideoTex mode and are written white on blue
where attributes = CommonAttributes { mode = V... | 604 | true | true | 0 | 8 | 346 | 139 | 80 | 59 | null | null |
pandaychen/PFQ | user/pfq-omatic/pfq-omatic.hs | gpl-2.0 | pfq_symvers :: [String]
pfq_omatic_ver = "5.2" | 48 | pfq_symvers :: [String]
pfq_omatic_ver = "5.2" | 47 | pfq_omatic_ver = "5.2" | 23 | false | true | 0 | 7 | 7 | 21 | 9 | 12 | null | null |
mettekou/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | tupArgPresent :: LHsTupArg id -> Bool
tupArgPresent (L _ (Present {})) = True | 77 | tupArgPresent :: LHsTupArg id -> Bool
tupArgPresent (L _ (Present {})) = True | 77 | tupArgPresent (L _ (Present {})) = True | 39 | false | true | 0 | 8 | 12 | 41 | 19 | 22 | null | null |
bitemyapp/ganeti | src/Ganeti/JQScheduler.hs | bsd-2-clause | -- | Decide on which jobs to schedule next for execution. This is the
-- pure function doing the scheduling.
selectJobsToRun :: Int -- ^ How many jobs are allowed to run at the
-- same time.
-> Set FilterRule -- ^ Filter rules to respect for scheduling
-> Queue
... | 869 | selectJobsToRun :: Int -- ^ How many jobs are allowed to run at the
-- same time.
-> Set FilterRule -- ^ Filter rules to respect for scheduling
-> Queue
-> (Queue, [JobWithStat])
selectJobsToRun count filters queue =
let n = count - length (qRun... | 760 | selectJobsToRun count filters queue =
let n = count - length (qRunning queue) - length (qManipulated queue)
chosen = take n
. jobFiltering queue filters
. reasonRateLimit queue
. sortBy (comparing (calcJobPriority . jJob))
. filter (jobEligible queue)
... | 508 | true | true | 0 | 16 | 276 | 211 | 111 | 100 | null | null |
luzhuomi/cpp-obs | Language/C/Obfuscate/CFF.hs | apache-2.0 | -- CL_cff
-- unlike the paper, we use switch instead of nested if
cff_trans_blks :: Bool -> -- ^ is return void
S.Set Ident -> -- ^ local vars
S.Set Ident -> -- ^ formal args
ContextName ->
Ident -> -- ^ top level function name
... | 556 | cff_trans_blks :: Bool -> -- ^ is return void
S.Set Ident -> -- ^ local vars
S.Set Ident -> -- ^ formal args
ContextName ->
Ident -> -- ^ top level function name
M.Map Ident LabeledBlock -> -- ^ KEnv
[(Ident, ... | 490 | cff_trans_blks isVoid localVars formalArgs ctxtName fname kenv [] = [] | 70 | true | true | 0 | 14 | 204 | 102 | 55 | 47 | null | null |
jstolarek/slicer | bench/SlicerBenchmarkSuite.hs | gpl-3.0 | main :: IO ()
main = mkBenchmarks >>= defaultMain >> cleanFiles | 63 | main :: IO ()
main = mkBenchmarks >>= defaultMain >> cleanFiles | 63 | main = mkBenchmarks >>= defaultMain >> cleanFiles | 49 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
nevrenato/Hets_Fork | Temporal/NuSmv.hs | gpl-2.0 | showBasicExpr (Range from to) outer = concat [ show from, "..", show to ] | 84 | showBasicExpr (Range from to) outer = concat [ show from, "..", show to ] | 84 | showBasicExpr (Range from to) outer = concat [ show from, "..", show to ] | 84 | false | false | 1 | 7 | 24 | 39 | 18 | 21 | null | null |
sjakobi/stack | test/integration/lib/StackTest.hs | bsd-3-clause | -- | Is the OS Windows?
isWindows = os == "mingw32" | 51 | isWindows = os == "mingw32" | 27 | isWindows = os == "mingw32" | 27 | true | false | 2 | 5 | 10 | 18 | 7 | 11 | null | null |
plumlife/cabal | Cabal/Distribution/ParseUtils.hs | bsd-3-clause | parseSpaceList :: ReadP r a -- ^The parser for the stuff between commas
-> ReadP r [a]
parseSpaceList p = sepBy p skipSpaces | 139 | parseSpaceList :: ReadP r a -- ^The parser for the stuff between commas
-> ReadP r [a]
parseSpaceList p = sepBy p skipSpaces | 139 | parseSpaceList p = sepBy p skipSpaces | 37 | false | true | 0 | 8 | 37 | 43 | 19 | 24 | null | null |
stmfunk/laughing-dangerzone | caesarCipher.hs | gpl-2.0 | reverseKey :: [(Char, Char)] -> [(Char, Char)]
reverseKey keys = [(last, first) | (first, last) <- keys] | 104 | reverseKey :: [(Char, Char)] -> [(Char, Char)]
reverseKey keys = [(last, first) | (first, last) <- keys] | 104 | reverseKey keys = [(last, first) | (first, last) <- keys] | 57 | false | true | 0 | 8 | 16 | 59 | 35 | 24 | null | null |
evanrinehart/mikmod | Sound/MikMod.hs | lgpl-3.0 | mikmodSetup :: Int -> IO ()
mikmodSetup sfxVoices = do
mikmodRegisterAllDrivers
mikmodRegisterAllLoaders
mikmodInit ""
mikmodSetNumVoices (-1) sfxVoices
mikmodEnableOutput
-- | Run an action between 'mikmodSetup' and 'mikmodExit'. It does not handle
-- freeing of Modules or Samples. | 296 | mikmodSetup :: Int -> IO ()
mikmodSetup sfxVoices = do
mikmodRegisterAllDrivers
mikmodRegisterAllLoaders
mikmodInit ""
mikmodSetNumVoices (-1) sfxVoices
mikmodEnableOutput
-- | Run an action between 'mikmodSetup' and 'mikmodExit'. It does not handle
-- freeing of Modules or Samples. | 296 | mikmodSetup sfxVoices = do
mikmodRegisterAllDrivers
mikmodRegisterAllLoaders
mikmodInit ""
mikmodSetNumVoices (-1) sfxVoices
mikmodEnableOutput
-- | Run an action between 'mikmodSetup' and 'mikmodExit'. It does not handle
-- freeing of Modules or Samples. | 268 | false | true | 0 | 9 | 49 | 53 | 24 | 29 | null | null |
ThoughtLeadr/Riak-Haskell-HTTP-Client | src/Network/Riak/HTTP/MapReduce.hs | bsd-3-clause | buildReqBody _ _ _ = error "Not yet implemented :(" | 51 | buildReqBody _ _ _ = error "Not yet implemented :(" | 51 | buildReqBody _ _ _ = error "Not yet implemented :(" | 51 | false | false | 0 | 5 | 9 | 16 | 7 | 9 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT29.hs | gpl-3.0 | qrev (x:xs) acc = qrev xs (x:acc) | 33 | qrev (x:xs) acc = qrev xs (x:acc) | 33 | qrev (x:xs) acc = qrev xs (x:acc) | 33 | false | false | 1 | 6 | 6 | 35 | 15 | 20 | null | null |
DavidAlphaFox/ghc | libraries/containers/Data/Map/Base.hs | bsd-3-clause | -- | /O(log n)/. The expression (@'updateWithKey' f k map@) updates the
-- value @x@ at @k@ (if it is in the map). If (@f k x@) is 'Nothing',
-- the element is deleted. If it is (@'Just' y@), the key @k@ is bound
-- to the new value @y@.
--
-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
-- >... | 1,113 | updateWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
updateWithKey = go
where
go :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
STRICT_2_OF_3(go)
go _ _ Tip = Tip
go f k(Bin sx kx x l r) =
case compare k kx of
LT -> balanceR kx x (go f k l) r
... | 505 | updateWithKey = go
where
go :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
STRICT_2_OF_3(go)
go _ _ Tip = Tip
go f k(Bin sx kx x l r) =
case compare k kx of
LT -> balanceR kx x (go f k l) r
GT -> balanceL kx x l (go f k r)
EQ -> case f kx x of
... | 432 | true | true | 6 | 12 | 330 | 264 | 133 | 131 | null | null |
yaxu/smooth | Stream.hs | gpl-3.0 | hasRequired :: OscShape -> OscMap -> Bool
hasRequired s m = isSubset (required s) (Map.keys (Map.filter (\x -> x /= Nothing) m)) | 128 | hasRequired :: OscShape -> OscMap -> Bool
hasRequired s m = isSubset (required s) (Map.keys (Map.filter (\x -> x /= Nothing) m)) | 128 | hasRequired s m = isSubset (required s) (Map.keys (Map.filter (\x -> x /= Nothing) m)) | 86 | false | true | 0 | 12 | 21 | 65 | 33 | 32 | null | null |
opqdonut/riot | Riot/Entry.hs | gpl-2.0 | entrytree_set_entry et e =
et{entrytree_thisentry = e} | 58 | entrytree_set_entry et e =
et{entrytree_thisentry = e} | 58 | entrytree_set_entry et e =
et{entrytree_thisentry = e} | 58 | false | false | 0 | 6 | 10 | 19 | 10 | 9 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] Server-defined URL for this resource.
bslSelfLink :: Lens' BackendServiceList (Maybe Text)
bslSelfLink
= lens _bslSelfLink (\ s a -> s{_bslSelfLink = a}) | 174 | bslSelfLink :: Lens' BackendServiceList (Maybe Text)
bslSelfLink
= lens _bslSelfLink (\ s a -> s{_bslSelfLink = a}) | 117 | bslSelfLink
= lens _bslSelfLink (\ s a -> s{_bslSelfLink = a}) | 64 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
nmattia/stutter | src/Stutter/Parser.hs | mit | -- | Parse a range of the form 'a-z' (int or char)
parseRange :: Atto.Parser Range
parseRange = (<?> "range") $
parseIntRange <|> parseCharRange | 148 | parseRange :: Atto.Parser Range
parseRange = (<?> "range") $
parseIntRange <|> parseCharRange | 97 | parseRange = (<?> "range") $
parseIntRange <|> parseCharRange | 65 | true | true | 0 | 7 | 27 | 29 | 16 | 13 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.10/base/GHC/List.hs | bsd-3-clause | -- | The 'zipWith3' function takes a function which combines three
-- elements, as well as three lists and returns a list of their point-wise
-- combination, analogous to 'zipWith'.
zipWith3 :: (a->b->c->d) -> [a]->[b]->[c]->[d]
zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith... | 332 | zipWith3 :: (a->b->c->d) -> [a]->[b]->[c]->[d]
zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith3 z as bs cs | 150 | zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith3 z as bs cs | 88 | true | true | 0 | 9 | 90 | 114 | 59 | 55 | null | null |
ml9951/ghc | testsuite/tests/ado/ado001.hs | bsd-3-clause | test6 :: M ()
test6 = do
x1 <- a
x2 <- const b x1
x3 <- const c x1
x4 <- const d x3
x5 <- const e x4
x6 <- const f x4
x7 <- const g x6
return () `const` (x1,x2,x3,x4,x5,x6,x7)
-- (a | b); (c | d) | 212 | test6 :: M ()
test6 = do
x1 <- a
x2 <- const b x1
x3 <- const c x1
x4 <- const d x3
x5 <- const e x4
x6 <- const f x4
x7 <- const g x6
return () `const` (x1,x2,x3,x4,x5,x6,x7)
-- (a | b); (c | d) | 212 | test6 = do
x1 <- a
x2 <- const b x1
x3 <- const c x1
x4 <- const d x3
x5 <- const e x4
x6 <- const f x4
x7 <- const g x6
return () `const` (x1,x2,x3,x4,x5,x6,x7)
-- (a | b); (c | d) | 198 | false | true | 1 | 9 | 67 | 135 | 63 | 72 | null | null |
corajr/cataskell | src/Cataskell/GameData/Board.hs | bsd-3-clause | getRoads :: Board -> Map.Map UndirectedEdge OnEdge
getRoads b = Map.mapMaybe id . op RoadMap $ view roads b | 107 | getRoads :: Board -> Map.Map UndirectedEdge OnEdge
getRoads b = Map.mapMaybe id . op RoadMap $ view roads b | 107 | getRoads b = Map.mapMaybe id . op RoadMap $ view roads b | 56 | false | true | 0 | 8 | 18 | 46 | 21 | 25 | null | null |
sdiehl/ghc | compiler/utils/UniqFM.hs | bsd-3-clause | listToUFM_C
:: Uniquable key
=> (elt -> elt -> elt)
-> [(key, elt)]
-> UniqFM elt
listToUFM_C f = foldl' (\m (k, v) -> addToUFM_C f m k v) emptyUFM | 155 | listToUFM_C
:: Uniquable key
=> (elt -> elt -> elt)
-> [(key, elt)]
-> UniqFM elt
listToUFM_C f = foldl' (\m (k, v) -> addToUFM_C f m k v) emptyUFM | 155 | listToUFM_C f = foldl' (\m (k, v) -> addToUFM_C f m k v) emptyUFM | 65 | false | true | 0 | 10 | 37 | 86 | 44 | 42 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/SlideshowM.hs | bsd-3-clause | getMenuIx :: MonadClientUI m => String -> Int -> Int -> Int -> m Int
getMenuIx menuName maxIx initIx clearIx = do
menuIxMap <- getsSession smenuIxMap
-- Beware, values in @menuIxMap@ may be negative (meaning: a key, not slot).
let menuIx = if menuName == ""
then clearIx
else maybe cl... | 524 | getMenuIx :: MonadClientUI m => String -> Int -> Int -> Int -> m Int
getMenuIx menuName maxIx initIx clearIx = do
menuIxMap <- getsSession smenuIxMap
-- Beware, values in @menuIxMap@ may be negative (meaning: a key, not slot).
let menuIx = if menuName == ""
then clearIx
else maybe cl... | 524 | getMenuIx menuName maxIx initIx clearIx = do
menuIxMap <- getsSession smenuIxMap
-- Beware, values in @menuIxMap@ may be negative (meaning: a key, not slot).
let menuIx = if menuName == ""
then clearIx
else maybe clearIx (+ initIx) (M.lookup menuName menuIxMap)
... | 455 | false | true | 0 | 15 | 142 | 127 | 60 | 67 | null | null |
cshung/MiscLab | Haskell99/BinomialHeap.hs | mit | insert :: (Ord a) => BinomialHeap a -> a -> BinomialHeap a
insert queue insertValue =
let
List queueList = queue
newQueueList = mergeOneNode queueList Node { size = 1, value = insertValue, children = []}
in
List newQueueList | 241 | insert :: (Ord a) => BinomialHeap a -> a -> BinomialHeap a
insert queue insertValue =
let
List queueList = queue
newQueueList = mergeOneNode queueList Node { size = 1, value = insertValue, children = []}
in
List newQueueList | 241 | insert queue insertValue =
let
List queueList = queue
newQueueList = mergeOneNode queueList Node { size = 1, value = insertValue, children = []}
in
List newQueueList | 182 | false | true | 0 | 12 | 55 | 89 | 45 | 44 | null | null |
nevrenato/Hets_Fork | Common/AnnoParser.hs | gpl-2.0 | annotations :: GenParser Char st [Annotation]
annotations = many (annotationL << skip) | 86 | annotations :: GenParser Char st [Annotation]
annotations = many (annotationL << skip) | 86 | annotations = many (annotationL << skip) | 40 | false | true | 0 | 7 | 11 | 31 | 16 | 15 | null | null |
substack/hsopenid | src/Network/OpenID/Discovery.hs | bsd-3-clause | discoverYADIS :: Monad m
=> Resolver m -> Identifier -> Maybe String
-> M m (Provider,Identifier)
discoverYADIS resolve ident mb_loc = do
let err = raise . Error
uri = fromMaybe (getIdentifier ident) mb_loc
case parseURI uri of
Nothing -> err "Unable to parse identifier as a U... | 1,115 | discoverYADIS :: Monad m
=> Resolver m -> Identifier -> Maybe String
-> M m (Provider,Identifier)
discoverYADIS resolve ident mb_loc = do
let err = raise . Error
uri = fromMaybe (getIdentifier ident) mb_loc
case parseURI uri of
Nothing -> err "Unable to parse identifier as a U... | 1,115 | discoverYADIS resolve ident mb_loc = do
let err = raise . Error
uri = fromMaybe (getIdentifier ident) mb_loc
case parseURI uri of
Nothing -> err "Unable to parse identifier as a URI"
Just uri -> do
estr <- lift $ resolve Request
{ rqMethod = GET
, rqURI = uri
, rqHe... | 989 | false | true | 0 | 29 | 393 | 329 | 156 | 173 | null | null |
karamellpelle/MEnv | source/MEnv/Resource/IOS.hs | bsd-2-clause | -- | modify resource
resourceModify :: (res -> res) -> MEnv res ()
resourceModify =
MState.modify | 101 | resourceModify :: (res -> res) -> MEnv res ()
resourceModify =
MState.modify | 80 | resourceModify =
MState.modify | 34 | true | true | 0 | 7 | 19 | 32 | 17 | 15 | null | null |
bitemyapp/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel | 59 | labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel | 59 | labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel | 59 | false | false | 0 | 6 | 17 | 20 | 9 | 11 | null | null |
michaelficarra/purescript | src/Language/PureScript/CoreFn/Expr.hs | mit | modifyAnn f (ObjectUpdate a b c) = ObjectUpdate (f a) b c | 58 | modifyAnn f (ObjectUpdate a b c) = ObjectUpdate (f a) b c | 58 | modifyAnn f (ObjectUpdate a b c) = ObjectUpdate (f a) b c | 58 | false | false | 0 | 7 | 12 | 36 | 16 | 20 | null | null |
kim/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/ListJobs.hs | mpl-2.0 | -- | 'ListJobsResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'ljrJobList' @::@ ['GlacierJobDescription']
--
-- * 'ljrMarker' @::@ 'Maybe' 'Text'
--
listJobsResponse :: ListJobsResponse
listJobsResponse = ListJobsResponse
{ _ljrJobList = mempty
, _ljrMarker = Nothin... | 327 | listJobsResponse :: ListJobsResponse
listJobsResponse = ListJobsResponse
{ _ljrJobList = mempty
, _ljrMarker = Nothing
} | 133 | listJobsResponse = ListJobsResponse
{ _ljrJobList = mempty
, _ljrMarker = Nothing
} | 96 | true | true | 0 | 6 | 54 | 33 | 23 | 10 | null | null |
Dobiasd/HackerRank-solutions | Algorithms/Geometry/Sherlock_and_Planes/Main.hs | mit | solve :: [String] -> String
solve = map strToPoint >>> pointsInPlane >>> boolToString | 85 | solve :: [String] -> String
solve = map strToPoint >>> pointsInPlane >>> boolToString | 85 | solve = map strToPoint >>> pointsInPlane >>> boolToString | 57 | false | true | 0 | 7 | 12 | 36 | 16 | 20 | null | null |
sproctor/dirtywater | src/LuaHelpers.hs | gpl-2.0 | getPropertyForCharacter :: LuaState -> String -> Character -> IO ByteString
getPropertyForCharacter luaState objId c = do
Lua.getglobal luaState "_properties"
Lua.getfield luaState (-1) objId
unlessM (Lua.isfunction luaState (-1)) $ error $ "Invalid value in _properties[" ++ objId ++ "]"
pushCharacter luaState ... | 423 | getPropertyForCharacter :: LuaState -> String -> Character -> IO ByteString
getPropertyForCharacter luaState objId c = do
Lua.getglobal luaState "_properties"
Lua.getfield luaState (-1) objId
unlessM (Lua.isfunction luaState (-1)) $ error $ "Invalid value in _properties[" ++ objId ++ "]"
pushCharacter luaState ... | 423 | getPropertyForCharacter luaState objId c = do
Lua.getglobal luaState "_properties"
Lua.getfield luaState (-1) objId
unlessM (Lua.isfunction luaState (-1)) $ error $ "Invalid value in _properties[" ++ objId ++ "]"
pushCharacter luaState c c
Lua.call luaState 1 1
result <- Lua.tostring luaState (-1)
Lua.pop... | 347 | false | true | 0 | 15 | 71 | 154 | 70 | 84 | null | null |
A1kmm/declarative-fieldml-prototype | src/Data/FieldML/InitialModel.hs | bsd-3-clause | vRealASinh = L2ValueID 26 | 31 | vRealASinh = L2ValueID 26 | 31 | vRealASinh = L2ValueID 26 | 31 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.