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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rahulmutt/ghcvm | compiler/Eta/Utils/Outputable.hs | bsd-3-clause | brackets d = SDoc $ Pretty.brackets . runSDoc d | 52 | brackets d = SDoc $ Pretty.brackets . runSDoc d | 52 | brackets d = SDoc $ Pretty.brackets . runSDoc d | 52 | false | false | 0 | 7 | 13 | 22 | 10 | 12 | null | null |
edsko/cabal | Cabal/src/Distribution/Simple/Utils.hs | bsd-3-clause | -- | Ignore a Unicode byte order mark (BOM) at the beginning of the input
--
ignoreBOM :: String -> String
ignoreBOM ('\xFEFF':string) = string | 143 | ignoreBOM :: String -> String
ignoreBOM ('\xFEFF':string) = string | 66 | ignoreBOM ('\xFEFF':string) = string | 36 | true | true | 0 | 7 | 24 | 27 | 15 | 12 | null | null |
bitemyapp/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pHelperShutdownTimeout :: Field
pHelperShutdownTimeout =
withDoc "Shutdown timeout for the helper VM" .
optionalField $ simpleField "helper_shutdown_timeout" [t| Int |] | 172 | pHelperShutdownTimeout :: Field
pHelperShutdownTimeout =
withDoc "Shutdown timeout for the helper VM" .
optionalField $ simpleField "helper_shutdown_timeout" [t| Int |] | 172 | pHelperShutdownTimeout =
withDoc "Shutdown timeout for the helper VM" .
optionalField $ simpleField "helper_shutdown_timeout" [t| Int |] | 140 | false | true | 0 | 7 | 23 | 31 | 17 | 14 | null | null |
rfranek/duckling | Duckling/Numeral/PL/Rules.hs | bsd-3-clause | ruleSeven :: Rule
ruleSeven = Rule
{ name = "seven"
, pattern =
[ regex "sied(miu|em|mioma)"
]
, prod = \_ -> integer 7
} | 137 | ruleSeven :: Rule
ruleSeven = Rule
{ name = "seven"
, pattern =
[ regex "sied(miu|em|mioma)"
]
, prod = \_ -> integer 7
} | 137 | ruleSeven = Rule
{ name = "seven"
, pattern =
[ regex "sied(miu|em|mioma)"
]
, prod = \_ -> integer 7
} | 119 | false | true | 0 | 9 | 40 | 49 | 27 | 22 | null | null |
forste/haReFork | refactorer/RefacInstantiate.hs | bsd-3-clause | convert (HsFloatPrim x) = show x | 32 | convert (HsFloatPrim x) = show x | 32 | convert (HsFloatPrim x) = show x | 32 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
GaloisInc/pads-haskell | Examples/First.hs | bsd-3-clause | test_IdStr = mkTestCase "IdAlpha" expect_IdStr result_IdStr | 59 | test_IdStr = mkTestCase "IdAlpha" expect_IdStr result_IdStr | 59 | test_IdStr = mkTestCase "IdAlpha" expect_IdStr result_IdStr | 59 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
svenssonjoel/GCDObsidian | Obsidian/GCDObsidian/CodeGen/CUDA.hs | bsd-3-clause | mmCExpr mm (CExpr (CBinOp op e1 e2 t)) = cBinOp op (mmCExpr mm e1) (mmCExpr mm e2) t | 84 | mmCExpr mm (CExpr (CBinOp op e1 e2 t)) = cBinOp op (mmCExpr mm e1) (mmCExpr mm e2) t | 84 | mmCExpr mm (CExpr (CBinOp op e1 e2 t)) = cBinOp op (mmCExpr mm e1) (mmCExpr mm e2) t | 84 | false | false | 0 | 9 | 17 | 54 | 26 | 28 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/Check.hs | bsd-3-clause | make_list p (ListPat ps ty Nothing) = ListPat (p:ps) ty Nothing | 63 | make_list p (ListPat ps ty Nothing) = ListPat (p:ps) ty Nothing | 63 | make_list p (ListPat ps ty Nothing) = ListPat (p:ps) ty Nothing | 63 | false | false | 0 | 7 | 10 | 37 | 17 | 20 | null | null |
pbogdan/ngx-cache-inspector | src/Inspector/Cli/Args.hs | bsd-3-clause | findFlagPredicate (Etag key) header =
key `matches` (ShortBytes.fromShort . cacheHeaderEtag $ header) | 103 | findFlagPredicate (Etag key) header =
key `matches` (ShortBytes.fromShort . cacheHeaderEtag $ header) | 103 | findFlagPredicate (Etag key) header =
key `matches` (ShortBytes.fromShort . cacheHeaderEtag $ header) | 103 | false | false | 1 | 10 | 13 | 44 | 20 | 24 | null | null |
grwlf/cake3 | src/Development/Cake3/Types.hs | bsd-3-clause | groupRecipes :: (Foldable t) => t Recipe -> Map File (Set Recipe)
groupRecipes = groupSet rtgt | 95 | groupRecipes :: (Foldable t) => t Recipe -> Map File (Set Recipe)
groupRecipes = groupSet rtgt | 95 | groupRecipes = groupSet rtgt | 28 | false | true | 0 | 9 | 16 | 41 | 20 | 21 | null | null |
zaneli/network-voicetext | src/Network/VoiceText/Types.hs | mit | formatName Ogg = "ogg" | 22 | formatName Ogg = "ogg" | 22 | formatName Ogg = "ogg" | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ierton/yteratee | src/Data/Yteratee/IO/Posix.hs | bsd-3-clause | unFd :: Fd -> CInt
unFd (Fd x) = x | 34 | unFd :: Fd -> CInt
unFd (Fd x) = x | 34 | unFd (Fd x) = x | 15 | false | true | 0 | 6 | 9 | 28 | 13 | 15 | null | null |
juhp/cabal-rpm | src/Commands/Spec.hs | gpl-3.0 | ifJust :: Maybe a -> (a -> IO Bool) -> IO Bool
ifJust Nothing _ = return False | 78 | ifJust :: Maybe a -> (a -> IO Bool) -> IO Bool
ifJust Nothing _ = return False | 78 | ifJust Nothing _ = return False | 31 | false | true | 0 | 9 | 17 | 48 | 21 | 27 | null | null |
coreyoconnor/bind-marshal | test/ArbMarshal.hs | bsd-3-clause | type_for_value (Word32Value _) = Word32Hole | 43 | type_for_value (Word32Value _) = Word32Hole | 43 | type_for_value (Word32Value _) = Word32Hole | 43 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ezyang/ghc | compiler/cmm/CmmBuildInfoTables.hs | bsd-3-clause | updInfoSRTs _ t = t | 19 | updInfoSRTs _ t = t | 19 | updInfoSRTs _ t = t | 19 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
plumlife/cabal | Cabal/Distribution/ParseUtils.hs | bsd-3-clause | parseExtensionQ :: ReadP r Extension
parseExtensionQ = parseQuoted parse <++ parse | 82 | parseExtensionQ :: ReadP r Extension
parseExtensionQ = parseQuoted parse <++ parse | 82 | parseExtensionQ = parseQuoted parse <++ parse | 45 | false | true | 2 | 6 | 10 | 30 | 12 | 18 | null | null |
Russell91/pyfi | Python.hs | mit | defOVV :: (ToJSON a2, FromJSON b) => String -> (PyObject a1) -> a2 -> IO b
defOVV s x1 input2 = do
x2 <- toPyObject input2
fr <- def3 s "OVV" x1 x2
b <- fromPyObject fr
return b | 193 | defOVV :: (ToJSON a2, FromJSON b) => String -> (PyObject a1) -> a2 -> IO b
defOVV s x1 input2 = do
x2 <- toPyObject input2
fr <- def3 s "OVV" x1 x2
b <- fromPyObject fr
return b | 193 | defOVV s x1 input2 = do
x2 <- toPyObject input2
fr <- def3 s "OVV" x1 x2
b <- fromPyObject fr
return b | 118 | false | true | 0 | 9 | 54 | 96 | 44 | 52 | null | null |
sdiehl/ghc | compiler/utils/Util.hs | bsd-3-clause | abstractDataType :: String -> DataType
abstractDataType n = mkDataType n [abstractConstr n] | 91 | abstractDataType :: String -> DataType
abstractDataType n = mkDataType n [abstractConstr n] | 91 | abstractDataType n = mkDataType n [abstractConstr n] | 52 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
sonyandy/tnt | Control/Monad/Code/Opcode.hs | bsd-3-clause | athrow :: Word8
athrow = 0xbf | 29 | athrow :: Word8
athrow = 0xbf | 29 | athrow = 0xbf | 13 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tmcdonell/hfx | src/haskell/Mass.hs | bsd-3-clause | -- Glutamine Glx
getAAMassAvg 'X' = 113.1594 | 56 | getAAMassAvg 'X' = 113.1594 | 28 | getAAMassAvg 'X' = 113.1594 | 28 | true | false | 0 | 5 | 18 | 10 | 5 | 5 | null | null |
ublubu/shapes | shapes-demo/src/Physics/Draw/Linear.hs | mit | afrotate33 :: (Floating a) => a -> M33 a
afrotate33 = afmat33 . rotate22 | 72 | afrotate33 :: (Floating a) => a -> M33 a
afrotate33 = afmat33 . rotate22 | 72 | afrotate33 = afmat33 . rotate22 | 31 | false | true | 0 | 7 | 13 | 31 | 16 | 15 | null | null |
nyirog/cis194 | lec06.hs | unlicense | allList (Entry b bs) = b && allList bs | 38 | allList (Entry b bs) = b && allList bs | 38 | allList (Entry b bs) = b && allList bs | 38 | false | false | 0 | 6 | 8 | 25 | 11 | 14 | null | null |
sellerlabs/monad-metrics | src/Control/Monad/Metrics.hs | mit | -- | A type specialized version of 'counter'' to avoid ambiguous type
-- errors.
--
-- * /Since v0.1.0.0/
counter :: (MonadIO m, MonadMetrics m) => Text -> Int -> m ()
counter = counter' | 186 | counter :: (MonadIO m, MonadMetrics m) => Text -> Int -> m ()
counter = counter' | 80 | counter = counter' | 18 | true | true | 0 | 10 | 34 | 49 | 25 | 24 | null | null |
jasonzoladz/persistent | persistent/Database/Persist/Class/PersistField.hs | mit | getPersistMap :: PersistValue -> Either T.Text [(T.Text, PersistValue)]
getPersistMap (PersistMap kvs) = Right kvs | 114 | getPersistMap :: PersistValue -> Either T.Text [(T.Text, PersistValue)]
getPersistMap (PersistMap kvs) = Right kvs | 114 | getPersistMap (PersistMap kvs) = Right kvs | 42 | false | true | 0 | 9 | 13 | 45 | 23 | 22 | null | null |
bananu7/Turnip | src/Turnip/Eval/Util.hs | mit | getTableField :: TableRef -> Value -> LuaM Value
getTableField tr k = maybe Nil id <$> rawGetTableField tr k | 108 | getTableField :: TableRef -> Value -> LuaM Value
getTableField tr k = maybe Nil id <$> rawGetTableField tr k | 108 | getTableField tr k = maybe Nil id <$> rawGetTableField tr k | 59 | false | true | 0 | 7 | 18 | 41 | 19 | 22 | null | null |
koengit/induction-examples | Escape.hs | mit | code R = C | 12 | code R = C | 12 | code R = C | 12 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
diagrams/diagrams-contrib | src/Diagrams/TwoD/Path/Turtle/Internal.hs | bsd-3-clause | penDown :: (Ord n, Floating n) => TurtleState n -- ^ Turtle to modify
-> TurtleState n -- ^ Resulting turtle
penDown t
| isPenDown t = t
| otherwise = t # makeNewTrail # \t' -> t' { isPenDown = True } | 217 | penDown :: (Ord n, Floating n) => TurtleState n -- ^ Turtle to modify
-> TurtleState n
penDown t
| isPenDown t = t
| otherwise = t # makeNewTrail # \t' -> t' { isPenDown = True } | 194 | penDown t
| isPenDown t = t
| otherwise = t # makeNewTrail # \t' -> t' { isPenDown = True } | 98 | true | true | 1 | 9 | 59 | 79 | 40 | 39 | null | null |
glguy/irc-core | src/Client/Image/Message.hs | isc | parseIrcTextWithNicks ::
Palette {- ^ palette -} ->
HashMap Identifier Highlight {- ^ Highlights -} ->
Bool {- ^ explicit controls rendering -} ->
Text {- ^ input text -} ->
Image' {- ^ colored text -}
parseIrcTextWithNicks palette hilite explicit txt
... | 446 | parseIrcTextWithNicks ::
Palette {- ^ palette -} ->
HashMap Identifier Highlight {- ^ Highlights -} ->
Bool {- ^ explicit controls rendering -} ->
Text {- ^ input text -} ->
Image'
parseIrcTextWithNicks palette hilite explicit txt
| Text.any isControl txt = pars... | 413 | parseIrcTextWithNicks palette hilite explicit txt
| Text.any isControl txt = parseIrcText' explicit palette txt
| otherwise = highlightNicks palette hilite txt | 176 | true | true | 1 | 9 | 142 | 80 | 40 | 40 | null | null |
mbakke/ganeti | src/Ganeti/JSON.hs | bsd-2-clause | asJSObject _ = fail "not an object" | 35 | asJSObject _ = fail "not an object" | 35 | asJSObject _ = fail "not an object" | 35 | false | false | 0 | 4 | 6 | 13 | 5 | 8 | null | null |
AKST/jo | source/test/JoScript/Util/TextTest.hs | mit | tests =
[ TestLabel "JoScript.Util.Text.foldlM" tryFoldM
, TestLabel "JoScript.Util.Text.readInt" tryReadInt
, TestLabel "JoScript.Util.Text.readFloat" tryReadFloat
] | 174 | tests =
[ TestLabel "JoScript.Util.Text.foldlM" tryFoldM
, TestLabel "JoScript.Util.Text.readInt" tryReadInt
, TestLabel "JoScript.Util.Text.readFloat" tryReadFloat
] | 174 | tests =
[ TestLabel "JoScript.Util.Text.foldlM" tryFoldM
, TestLabel "JoScript.Util.Text.readInt" tryReadInt
, TestLabel "JoScript.Util.Text.readFloat" tryReadFloat
] | 174 | false | false | 0 | 6 | 22 | 30 | 15 | 15 | null | null |
Feeniks/valkyrie | src/Valkyrie/Graphics/Program.hs | bsd-3-clause | createProgram :: MonadIO m => [ShaderB] -> m Program
createProgram sx = liftIO $ do
let sids = map (\(SB s) -> shaderID s) sx
pid <- GL.glCreateProgram
mapM_ (GL.glAttachShader pid) sids
GL.glLinkProgram pid
ok <- status pid
case ok of
Left e -> error e
Right _ -> return $ Progr... | 326 | createProgram :: MonadIO m => [ShaderB] -> m Program
createProgram sx = liftIO $ do
let sids = map (\(SB s) -> shaderID s) sx
pid <- GL.glCreateProgram
mapM_ (GL.glAttachShader pid) sids
GL.glLinkProgram pid
ok <- status pid
case ok of
Left e -> error e
Right _ -> return $ Progr... | 326 | createProgram sx = liftIO $ do
let sids = map (\(SB s) -> shaderID s) sx
pid <- GL.glCreateProgram
mapM_ (GL.glAttachShader pid) sids
GL.glLinkProgram pid
ok <- status pid
case ok of
Left e -> error e
Right _ -> return $ Program pid | 273 | false | true | 0 | 16 | 93 | 148 | 66 | 82 | null | null |
gilligan/hoobuddy | src/Hoobuddy.hs | mit | -- | Prints dependencies from cabal file
deps :: FilePath -> IO ()
deps path = do
pkgs <- getDeps path
putStrLn $ unlines pkgs
-- | Returns list of dependencies from cabal file | 194 | deps :: FilePath -> IO ()
deps path = do
pkgs <- getDeps path
putStrLn $ unlines pkgs
-- | Returns list of dependencies from cabal file | 153 | deps path = do
pkgs <- getDeps path
putStrLn $ unlines pkgs
-- | Returns list of dependencies from cabal file | 127 | true | true | 0 | 8 | 51 | 45 | 21 | 24 | null | null |
sgf-dma/sgf-haskell-common | src/Sgf/Data/List.hs | bsd-3-clause | riseElems :: (a -> Bool) -> [a] -> [a]
--riseElems p xs = filter p xs ++ filter (not . p) xs
riseElems p = liftA2 (++) (filter p) (filter (not . p)) | 161 | riseElems :: (a -> Bool) -> [a] -> [a]
riseElems p = liftA2 (++) (filter p) (filter (not . p)) | 102 | riseElems p = liftA2 (++) (filter p) (filter (not . p)) | 63 | true | true | 0 | 9 | 45 | 71 | 36 | 35 | null | null |
blippy/sifi | src/Etb.hs | gpl-3.0 | reportAccs grp ledger = concatMap (printEtbAcc $ naccs ledger) grp | 66 | reportAccs grp ledger = concatMap (printEtbAcc $ naccs ledger) grp | 66 | reportAccs grp ledger = concatMap (printEtbAcc $ naccs ledger) grp | 66 | false | false | 0 | 8 | 9 | 26 | 12 | 14 | null | null |
rueshyna/gogol | gogol-resourceviews/gen/Network/Google/ResourceViews/Types/Product.hs | mpl-2.0 | -- | [Output Only] The time that this operation was started by the server, in
-- RFC3339 text format.
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a}) | 206 | oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a}) | 104 | oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a}) | 61 | true | true | 0 | 9 | 37 | 49 | 26 | 23 | null | null |
nikki-and-the-robots/nikki | src/Graphics/Qt/CPPWrapper.hs | lgpl-3.0 | setPixelQImage :: Ptr QImage -> (QtInt, QtInt) -> QRgb -> IO ()
setPixelQImage ptr (x, y) color =
cppSetPixelQImage ptr x y color | 133 | setPixelQImage :: Ptr QImage -> (QtInt, QtInt) -> QRgb -> IO ()
setPixelQImage ptr (x, y) color =
cppSetPixelQImage ptr x y color | 133 | setPixelQImage ptr (x, y) color =
cppSetPixelQImage ptr x y color | 69 | false | true | 0 | 9 | 26 | 59 | 30 | 29 | null | null |
mbakke/ganeti | src/Ganeti/Query/Node.hs | bsd-2-clause | -- | Map each name to a function that extracts that value from
-- the RPC result.
nodeLiveFieldExtract :: FieldName -> RpcResultNodeInfo -> J.JSValue
nodeLiveFieldExtract "bootid" res =
J.showJSON $ rpcResNodeInfoBootId res | 225 | nodeLiveFieldExtract :: FieldName -> RpcResultNodeInfo -> J.JSValue
nodeLiveFieldExtract "bootid" res =
J.showJSON $ rpcResNodeInfoBootId res | 143 | nodeLiveFieldExtract "bootid" res =
J.showJSON $ rpcResNodeInfoBootId res | 75 | true | true | 0 | 7 | 33 | 37 | 19 | 18 | null | null |
agentm/project-m36 | src/lib/ProjectM36/WCWidth.hs | unlicense | basicZero :: RangeSet Int
basicZero = foldr insertRange empty [
(0, 0),
(0x034f, 0x034f),
(0x200b, 0x200f),
(0x2028, 0x2029),
(0x202a, 0x202e),
(0x2060, 0x2063)
] | 176 | basicZero :: RangeSet Int
basicZero = foldr insertRange empty [
(0, 0),
(0x034f, 0x034f),
(0x200b, 0x200f),
(0x2028, 0x2029),
(0x202a, 0x202e),
(0x2060, 0x2063)
] | 176 | basicZero = foldr insertRange empty [
(0, 0),
(0x034f, 0x034f),
(0x200b, 0x200f),
(0x2028, 0x2029),
(0x202a, 0x202e),
(0x2060, 0x2063)
] | 150 | false | true | 0 | 7 | 36 | 75 | 46 | 29 | null | null |
brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Motif/ExpressionParsing.hs | mit | xxx = count 100 (spanned glycosylation) | 39 | xxx = count 100 (spanned glycosylation) | 39 | xxx = count 100 (spanned glycosylation) | 39 | false | false | 1 | 7 | 5 | 20 | 8 | 12 | null | null |
cutsea110/aop | src/Promorphism.hs | bsd-3-clause | takeTo :: (a -> Bool) -> ListF a :~> ListF a
takeTo pred = \case
Cons h t | pred h -> Cons h t
| otherwise -> Nil
Nil -> Nil
-- prepro double sumAlg $ cons 1 nil => 1
-- 1 + (0 * 2) => 1
-- prepro double sumAlg $ cons 1 (cons 2 nil) => 5
-- 1 + (2 * 2) + (0 * 2 * 2) => 5
-- pr... | 915 | takeTo :: (a -> Bool) -> ListF a :~> ListF a
takeTo pred = \case
Cons h t | pred h -> Cons h t
| otherwise -> Nil
Nil -> Nil
-- prepro double sumAlg $ cons 1 nil => 1
-- 1 + (0 * 2) => 1
-- prepro double sumAlg $ cons 1 (cons 2 nil) => 5
-- 1 + (2 * 2) + (0 * 2 * 2) => 5
-- pr... | 915 | takeTo pred = \case
Cons h t | pred h -> Cons h t
| otherwise -> Nil
Nil -> Nil
-- prepro double sumAlg $ cons 1 nil => 1
-- 1 + (0 * 2) => 1
-- prepro double sumAlg $ cons 1 (cons 2 nil) => 5
-- 1 + (2 * 2) + (0 * 2 * 2) => 5
-- prepro double sumAlg $ cons 1 (cons 2 (cons 3 n... | 870 | false | true | 0 | 11 | 388 | 103 | 57 | 46 | null | null |
ocus/TinyASM_Haskell | library/TinyASM/Compiler.hs | bsd-3-clause | compileInstructions :: [Instruction] -> [Int]
compileInstructions [] = [] | 73 | compileInstructions :: [Instruction] -> [Int]
compileInstructions [] = [] | 73 | compileInstructions [] = [] | 27 | false | true | 0 | 8 | 8 | 34 | 16 | 18 | null | null |
opentower/carnap | Carnap/src/Carnap/Languages/PureSecondOrder/Logic/Rules.hs | gpl-3.0 | -- | produces a schematic formula abstracting n terms from a given formula
lambdaScheme :: Int -> PolyadicallySOL (Form Bool)
lambdaScheme n = ls' n n
where v n = SOV $ "v_" ++ show n
phi n | n < 1 = SOPhi 1 AOne AOne
| n > 0 = case incBody (phi (n - 1)) of
... | 843 | lambdaScheme :: Int -> PolyadicallySOL (Form Bool)
lambdaScheme n = ls' n n
where v n = SOV $ "v_" ++ show n
phi n | n < 1 = SOPhi 1 AOne AOne
| n > 0 = case incBody (phi (n - 1)) of
Just p' -> mapover bump p' :!$: v 0
... | 768 | lambdaScheme n = ls' n n
where v n = SOV $ "v_" ++ show n
phi n | n < 1 = SOPhi 1 AOne AOne
| n > 0 = case incBody (phi (n - 1)) of
Just p' -> mapover bump p' :!$: v 0
Nothing -> error "trouble in lambdaSchem... | 717 | true | true | 5 | 12 | 329 | 335 | 155 | 180 | null | null |
gleachkr/Carnap | Carnap/src/Carnap/Core/ModelChecking/ModelFinder.hs | gpl-3.0 | evalForm :: Model (Either (Pred nm) Int) -> MLang nm -> Bool
evalForm model (MForall f) = all (evalForm model . f . MSingelton) enumerateNames | 144 | evalForm :: Model (Either (Pred nm) Int) -> MLang nm -> Bool
evalForm model (MForall f) = all (evalForm model . f . MSingelton) enumerateNames | 144 | evalForm model (MForall f) = all (evalForm model . f . MSingelton) enumerateNames | 83 | false | true | 0 | 10 | 26 | 69 | 33 | 36 | null | null |
nishiuramakoto/logiku | Handler/PrologProgram.hs | gpl-3.0 | sessionUserIdent = "userIdent" | 32 | sessionUserIdent = "userIdent" | 32 | sessionUserIdent = "userIdent" | 32 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Resource/Books/PromoOffer/Get.hs | mpl-2.0 | -- | device device
pogDevice :: Lens' PromoOfferGet (Maybe Text)
pogDevice
= lens _pogDevice (\ s a -> s{_pogDevice = a}) | 123 | pogDevice :: Lens' PromoOfferGet (Maybe Text)
pogDevice
= lens _pogDevice (\ s a -> s{_pogDevice = a}) | 104 | pogDevice
= lens _pogDevice (\ s a -> s{_pogDevice = a}) | 58 | true | true | 0 | 9 | 22 | 48 | 25 | 23 | null | null |
uduki/hsQt | Qtc/Core/QDateTime.hs | bsd-2-clause | toUTC :: QDateTime a -> (()) -> IO (QDateTime ())
toUTC x0 ()
= withQDateTimeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_toUTC cobj_x0 | 154 | toUTC :: QDateTime a -> (()) -> IO (QDateTime ())
toUTC x0 ()
= withQDateTimeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_toUTC cobj_x0 | 154 | toUTC x0 ()
= withQDateTimeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_toUTC cobj_x0 | 104 | false | true | 0 | 10 | 32 | 64 | 31 | 33 | null | null |
masaedw/PuddingX | src/Pudding/Parse.hs | bsd-3-clause | -- $setup
-- >>> import Data.Conduit
-- >>> import Data.Conduit.List
-- >>> import Data.Attoparsec
-- >>> :set -XOverloadedStrings
-- | token parser
--
-- >>> parseOnly pToken "123.5"
-- Right (PNumber 123.5)
-- >>> parseOnly pToken "\"aabbcc\""
-- Right (PString "aabbcc")
-- >>> parseOnly pToken "abc"
-- Right (PWord... | 729 | pToken :: Parser PToken
pToken = choice [PNumber <$> double <* spaceOrEnd
,PBool <$> choice [True <$ string "true"
,False <$ string "false"] <* spaceOrEnd
,PString <$> pString <* spaceOrEnd
,PWord <$> A.takeWhile1 (not . isSpace_w8) <* sp... | 346 | pToken = choice [PNumber <$> double <* spaceOrEnd
,PBool <$> choice [True <$ string "true"
,False <$ string "false"] <* spaceOrEnd
,PString <$> pString <* spaceOrEnd
,PWord <$> A.takeWhile1 (not . isSpace_w8) <* spaceOrEnd
... | 322 | true | true | 0 | 12 | 196 | 111 | 64 | 47 | null | null |
isomorphism/camera | src/Graphics/Camera/Angle.hs | bsd-3-clause | -- | Construct an angle using an angle unit isomorphism, e.g.:
--
-- @'angleFrom' 'degrees' 60@ ≡ @'angleFrom' 'turns' (1/6)@ ≡ @'angleFrom' 'radians' ('pi'/3)@
angleFrom :: AnIso' (Angle a) a -> a -> Angle a
angleFrom l = view . from $ l | 240 | angleFrom :: AnIso' (Angle a) a -> a -> Angle a
angleFrom l = view . from $ l | 77 | angleFrom l = view . from $ l | 29 | true | true | 1 | 9 | 44 | 52 | 25 | 27 | null | null |
entropia/tip-toi-reveng | src/GMEParser.hs | mit | getTVal :: SGet (TVal ResReg)
getTVal = do
t <- getWord8
case t of
0 -> Reg <$> getWord16
1 -> Const <$> getWord16
_ -> error $ "Unknown value tag " ++ show t | 181 | getTVal :: SGet (TVal ResReg)
getTVal = do
t <- getWord8
case t of
0 -> Reg <$> getWord16
1 -> Const <$> getWord16
_ -> error $ "Unknown value tag " ++ show t | 181 | getTVal = do
t <- getWord8
case t of
0 -> Reg <$> getWord16
1 -> Const <$> getWord16
_ -> error $ "Unknown value tag " ++ show t | 151 | false | true | 0 | 11 | 57 | 71 | 34 | 37 | null | null |
ckaestne/CIDE | other/CaseStudies/Arith/orig_armin/vars-ite/Arith.hs | gpl-3.0 | tvBinOp Sub (TVDouble x) (TVDouble y) = Result (TVDouble (x-y)) | 63 | tvBinOp Sub (TVDouble x) (TVDouble y) = Result (TVDouble (x-y)) | 63 | tvBinOp Sub (TVDouble x) (TVDouble y) = Result (TVDouble (x-y)) | 63 | false | false | 0 | 9 | 9 | 43 | 20 | 23 | null | null |
percivalgambit/hasked | src/Model/Buffer.hs | bsd-3-clause | getScreen :: (Int, Int) -> MBuffer -> IO String
getScreen (y, x) buffer = do
modifyIORef' buffer flushFocusedLine
(cursorY, _) <- getCursorPos buffer
let linesBefore = cursorY `mod` max (y-1) 1
linesAfter = max (y-1) 1 - linesBefore
readIORef buffer <&> \frozenBuffer ->
frozenBuffer^.t... | 849 | getScreen :: (Int, Int) -> MBuffer -> IO String
getScreen (y, x) buffer = do
modifyIORef' buffer flushFocusedLine
(cursorY, _) <- getCursorPos buffer
let linesBefore = cursorY `mod` max (y-1) 1
linesAfter = max (y-1) 1 - linesBefore
readIORef buffer <&> \frozenBuffer ->
frozenBuffer^.t... | 849 | getScreen (y, x) buffer = do
modifyIORef' buffer flushFocusedLine
(cursorY, _) <- getCursorPos buffer
let linesBefore = cursorY `mod` max (y-1) 1
linesAfter = max (y-1) 1 - linesBefore
readIORef buffer <&> \frozenBuffer ->
frozenBuffer^.textLines
& assembleScreen linesBefor... | 801 | false | true | 0 | 15 | 211 | 231 | 118 | 113 | null | null |
travitch/foreign-inference | src/Foreign/Inference/AnalysisMonad.hs | bsd-3-clause | runAnalysis :: (HasDiagnostics a)
=> AnalysisMonad env state a
-> DependencySummary
-> env
-> state
-> a
runAnalysis analysis ds env s = addDiagnostics res diags
where
(res, diags) = evalRWS (unAnalysis analysis) (Env ds env) s | 293 | runAnalysis :: (HasDiagnostics a)
=> AnalysisMonad env state a
-> DependencySummary
-> env
-> state
-> a
runAnalysis analysis ds env s = addDiagnostics res diags
where
(res, diags) = evalRWS (unAnalysis analysis) (Env ds env) s | 293 | runAnalysis analysis ds env s = addDiagnostics res diags
where
(res, diags) = evalRWS (unAnalysis analysis) (Env ds env) s | 128 | false | true | 0 | 9 | 102 | 92 | 46 | 46 | null | null |
aminb/blog | src/Image.hs | gpl-3.0 | processImages :: FilePath -> String -> IO String
processImages imgDir = fmap Html.renderTags
. addDimensionsAll imgDir
. filter (not . isImgCloseTag)
. Html.parseTags | 229 | processImages :: FilePath -> String -> IO String
processImages imgDir = fmap Html.renderTags
. addDimensionsAll imgDir
. filter (not . isImgCloseTag)
. Html.parseTags | 229 | processImages imgDir = fmap Html.renderTags
. addDimensionsAll imgDir
. filter (not . isImgCloseTag)
. Html.parseTags | 180 | false | true | 3 | 8 | 85 | 65 | 28 | 37 | null | null |
jeffchao/hedgewars-accessible | gameServer/Actions.hs | gpl-2.0 | processAction (AddRoom roomName roomPassword) = do
Just clId <- gets clientIndex
rnc <- gets roomsClients
proto <- io $ client'sM rnc clientProto clId
let rm = newRoom{
masterID = clId,
name = roomName,
password = roomPassword,
roomProto = proto
... | 615 | processAction (AddRoom roomName roomPassword) = do
Just clId <- gets clientIndex
rnc <- gets roomsClients
proto <- io $ client'sM rnc clientProto clId
let rm = newRoom{
masterID = clId,
name = roomName,
password = roomPassword,
roomProto = proto
... | 615 | processAction (AddRoom roomName roomPassword) = do
Just clId <- gets clientIndex
rnc <- gets roomsClients
proto <- io $ client'sM rnc clientProto clId
let rm = newRoom{
masterID = clId,
name = roomName,
password = roomPassword,
roomProto = proto
... | 615 | false | false | 0 | 13 | 216 | 189 | 93 | 96 | null | null |
k0001/gtk2hs | cairo/Graphics/Rendering/Cairo.hs | gpl-3.0 | -- | Gets the current transformation matrix, as set by 'setMatrix'.
--
getMatrix :: Render Matrix
getMatrix = liftRender0 Internal.getMatrix | 140 | getMatrix :: Render Matrix
getMatrix = liftRender0 Internal.getMatrix | 69 | getMatrix = liftRender0 Internal.getMatrix | 42 | true | true | 0 | 6 | 19 | 26 | 12 | 14 | null | null |
mongodb-haskell/mongodb | Database/MongoDB/Internal/Protocol.hs | apache-2.0 | -- | @'forkUnmaskedFinally' action and_then@ behaves the same as @'forkFinally' action and_then@, except that @action@ is run completely unmasked, whereas with 'forkFinally', @action@ is run with the same mask as the parent thread.
forkUnmaskedFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
forkUnma... | 426 | forkUnmaskedFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
forkUnmaskedFinally action and_then =
mask_ $ forkIOWithUnmask $ \unmask ->
try (unmask action) >>= and_then | 194 | forkUnmaskedFinally action and_then =
mask_ $ forkIOWithUnmask $ \unmask ->
try (unmask action) >>= and_then | 114 | true | true | 2 | 10 | 67 | 76 | 36 | 40 | null | null |
mrBliss/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | latexMunge '$' s = "{\\char '44}" ++ s | 39 | latexMunge '$' s = "{\\char '44}" ++ s | 39 | latexMunge '$' s = "{\\char '44}" ++ s | 39 | false | false | 0 | 5 | 8 | 15 | 7 | 8 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/Types.hs | apache-2.0 | -- ===================================================================
x ∈ xs = x `elem` xs | 91 | x ∈ xs = x `elem` xs | 20 | x ∈ xs = x `elem` xs | 20 | true | false | 3 | 5 | 8 | 21 | 10 | 11 | null | null |
urbanslug/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | addNewInScopeIds :: SimplEnv -> [CoreBndr] -> SimplEnv
-- The new Ids are guaranteed to be freshly allocated
addNewInScopeIds env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst }) vs
= env { seInScope = in_scope `extendInScopeSetList` vs,
seIdSubst = id_subst `delVarEnvList` vs } | 308 | addNewInScopeIds :: SimplEnv -> [CoreBndr] -> SimplEnv
addNewInScopeIds env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst }) vs
= env { seInScope = in_scope `extendInScopeSetList` vs,
seIdSubst = id_subst `delVarEnvList` vs } | 246 | addNewInScopeIds env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst }) vs
= env { seInScope = in_scope `extendInScopeSetList` vs,
seIdSubst = id_subst `delVarEnvList` vs } | 191 | true | true | 0 | 10 | 61 | 75 | 45 | 30 | null | null |
chrisdone/listens | src/Main.hs | bsd-3-clause | artistsPage :: Connection -> Int -> ActionT LT.Text IO ()
artistsPage conn limit =
do artists <- liftIO (getTopArtists conn limit)
page (toHtml ("Top " <> T.pack (show limit) <> " artists"))
(do row_ (do span6_ (do topTable artists))) | 251 | artistsPage :: Connection -> Int -> ActionT LT.Text IO ()
artistsPage conn limit =
do artists <- liftIO (getTopArtists conn limit)
page (toHtml ("Top " <> T.pack (show limit) <> " artists"))
(do row_ (do span6_ (do topTable artists))) | 251 | artistsPage conn limit =
do artists <- liftIO (getTopArtists conn limit)
page (toHtml ("Top " <> T.pack (show limit) <> " artists"))
(do row_ (do span6_ (do topTable artists))) | 193 | false | true | 0 | 19 | 55 | 116 | 54 | 62 | null | null |
c0c0n3/archlinux | vm/src/build/Paths.hs | gpl-3.0 | siteBuilder = baseTmpDir </> "site" | 36 | siteBuilder = baseTmpDir </> "site" | 36 | siteBuilder = baseTmpDir </> "site" | 36 | false | false | 0 | 5 | 5 | 10 | 5 | 5 | null | null |
AlexanderPankiv/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res ReadByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 114 | emitPrimOp dflags res ReadByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 114 | emitPrimOp dflags res ReadByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 114 | false | false | 0 | 7 | 25 | 30 | 14 | 16 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Quantities/Physics.hs | bsd-2-clause | momentOfInertia = uc CP.momentOfInertia (vec cI) momtInertU | 64 | momentOfInertia = uc CP.momentOfInertia (vec cI) momtInertU | 64 | momentOfInertia = uc CP.momentOfInertia (vec cI) momtInertU | 64 | false | false | 1 | 7 | 11 | 25 | 10 | 15 | null | null |
mariefarrell/Hets | utils/DrIFT-src/ParseLib2.hs | gpl-2.0 | many1 :: Parser a -> Parser [a]
many1 p = do
x <- p
xs <- many p
return (x : xs) | 86 | many1 :: Parser a -> Parser [a]
many1 p = do
x <- p
xs <- many p
return (x : xs) | 86 | many1 p = do
x <- p
xs <- many p
return (x : xs) | 54 | false | true | 0 | 10 | 27 | 62 | 27 | 35 | null | null |
dag/kibr | src/Happstack/Server/ETag.hs | bsd-2-clause | eTagWithFilter :: (FilterMonad Response m, ServerMonad m)
=> (Response -> String) -> m ()
eTagWithFilter tagger =
do
oldETag <- getHeaderM "If-None-Match"
composeFilter $ \response -> do
let curETag = tagger response
case oldETag of
Just etag | etag == B.pack curETag ->
... | 406 | eTagWithFilter :: (FilterMonad Response m, ServerMonad m)
=> (Response -> String) -> m ()
eTagWithFilter tagger =
do
oldETag <- getHeaderM "If-None-Match"
composeFilter $ \response -> do
let curETag = tagger response
case oldETag of
Just etag | etag == B.pack curETag ->
... | 406 | eTagWithFilter tagger =
do
oldETag <- getHeaderM "If-None-Match"
composeFilter $ \response -> do
let curETag = tagger response
case oldETag of
Just etag | etag == B.pack curETag ->
noContentLength . result 304 $ ""
_ -> setHeader "ETag" curETag response | 301 | false | true | 0 | 20 | 117 | 141 | 64 | 77 | null | null |
nevrenato/Hets_Fork | GMP/versioning/gmp-coloss-0.0.3/GMP/Logics/CKCM.hs | gpl-2.0 | addLayer :: ([[Int]],[([Int],[Int])]) -> [([[Int]],[([Int],[Int])])]
addLayer graph@(worlds,rel) = let exps = initialStates graph
in case exps of
[] -> trace ("initial states: " ++ show (exps)) $
[graph]
... | 665 | addLayer :: ([[Int]],[([Int],[Int])]) -> [([[Int]],[([Int],[Int])])]
addLayer graph@(worlds,rel) = let exps = initialStates graph
in case exps of
[] -> trace ("initial states: " ++ show (exps)) $
[graph]
... | 665 | addLayer graph@(worlds,rel) = let exps = initialStates graph
in case exps of
[] -> trace ("initial states: " ++ show (exps)) $
[graph]
_ -> trace ("initial states: " ++ show (exps)... | 596 | false | true | 1 | 20 | 320 | 219 | 116 | 103 | null | null |
MichaelBurge/stockfighter-jailbreak | src/Api/Stockfighter/Jailbreak/Decompiler/Passes.hs | bsd-3-clause | replaceSubtree :: (Statement -> [ Statement ] ) -> Statement -> Statement
replaceSubtree f stat =
let rewrite = replaceSubtree f
in normalizeStatement $ SBlock (stat ^. annotation) $ f $
case stat of
SExpression _ _ -> stat
SLabel _ _ -> stat
SGoto _ _ -> stat
SAsm _ _ -> stat
... | 735 | replaceSubtree :: (Statement -> [ Statement ] ) -> Statement -> Statement
replaceSubtree f stat =
let rewrite = replaceSubtree f
in normalizeStatement $ SBlock (stat ^. annotation) $ f $
case stat of
SExpression _ _ -> stat
SLabel _ _ -> stat
SGoto _ _ -> stat
SAsm _ _ -> stat
... | 735 | replaceSubtree f stat =
let rewrite = replaceSubtree f
in normalizeStatement $ SBlock (stat ^. annotation) $ f $
case stat of
SExpression _ _ -> stat
SLabel _ _ -> stat
SGoto _ _ -> stat
SAsm _ _ -> stat
SBlock offset children -> SBlock offset $ map rewrite children
SV... | 661 | false | true | 0 | 13 | 240 | 313 | 147 | 166 | null | null |
3of8/haskell_playground | maximum-matching/Data/Graph/Inductive/Query/MaximumMatching.hs | gpl-2.0 | matchNode :: Graph gr => gr a b -> Matching -> Node -> Matching
matchNode g matching root
| root `M.member` matching = matching
| otherwise = constructMatching $
matchNode' ([root], S.singleton root, M.empty, M.fromList [(i,i) | i <- nodes g])
where constructMatching :: (Matching, Maybe Node)... | 3,363 | matchNode :: Graph gr => gr a b -> Matching -> Node -> Matching
matchNode g matching root
| root `M.member` matching = matching
| otherwise = constructMatching $
matchNode' ([root], S.singleton root, M.empty, M.fromList [(i,i) | i <- nodes g])
where constructMatching :: (Matching, Maybe Node)... | 3,363 | matchNode g matching root
| root `M.member` matching = matching
| otherwise = constructMatching $
matchNode' ([root], S.singleton root, M.empty, M.fromList [(i,i) | i <- nodes g])
where constructMatching :: (Matching, Maybe Node) -> Matching
constructMatching (p, v) =
let c... | 3,299 | false | true | 89 | 16 | 1,366 | 1,295 | 688 | 607 | null | null |
nicuveo/HCM | src/Main.hs | mit | check :: CardMap -> IO ()
check cm = do
config <- getFilePath appName quantityFile
when someEmptySets $ putStrLn ("Your card collection seems outdated.\
\\nPlease backup your collection file and run `hcm update`.\
\\nYour collection file is: " ++ config) >> exitFailure
where someEmptySets = any null [cm @= set | ... | 336 | check :: CardMap -> IO ()
check cm = do
config <- getFilePath appName quantityFile
when someEmptySets $ putStrLn ("Your card collection seems outdated.\
\\nPlease backup your collection file and run `hcm update`.\
\\nYour collection file is: " ++ config) >> exitFailure
where someEmptySets = any null [cm @= set | ... | 336 | check cm = do
config <- getFilePath appName quantityFile
when someEmptySets $ putStrLn ("Your card collection seems outdated.\
\\nPlease backup your collection file and run `hcm update`.\
\\nYour collection file is: " ++ config) >> exitFailure
where someEmptySets = any null [cm @= set | set <- cardSets] | 310 | false | true | 0 | 11 | 59 | 87 | 41 | 46 | null | null |
jstolarek/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | runPhase_MoveBinary :: DynFlags -> FilePath -> IO Bool
runPhase_MoveBinary dflags input_fn
| WayPar `elem` ways dflags && not (gopt Opt_Static dflags) =
panic ("Don't know how to combine PVM wrapper and dynamic wrapper")
| WayPar `elem` ways dflags = do
let sysMan = pgm_sysman dflags
pvm... | 994 | runPhase_MoveBinary :: DynFlags -> FilePath -> IO Bool
runPhase_MoveBinary dflags input_fn
| WayPar `elem` ways dflags && not (gopt Opt_Static dflags) =
panic ("Don't know how to combine PVM wrapper and dynamic wrapper")
| WayPar `elem` ways dflags = do
let sysMan = pgm_sysman dflags
pvm... | 994 | runPhase_MoveBinary dflags input_fn
| WayPar `elem` ways dflags && not (gopt Opt_Static dflags) =
panic ("Don't know how to combine PVM wrapper and dynamic wrapper")
| WayPar `elem` ways dflags = do
let sysMan = pgm_sysman dflags
pvm_root <- getEnv "PVM_ROOT"
pvm_arch <- getEnv "... | 939 | false | true | 1 | 15 | 257 | 215 | 100 | 115 | null | null |
lamdu/lamdu | src/Lamdu/GUI/WidgetIds.hs | gpl-3.0 | branchSelection :: Id
branchSelection = Id ["selected branch"] | 62 | branchSelection :: Id
branchSelection = Id ["selected branch"] | 62 | branchSelection = Id ["selected branch"] | 40 | false | true | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
stulli/projectEuler | eu16.hs | bsd-3-clause | main :: IO ()
main = print $ sum $ map digitToInt $ show $ 2^1000 | 65 | main :: IO ()
main = print $ sum $ map digitToInt $ show $ 2^1000 | 65 | main = print $ sum $ map digitToInt $ show $ 2^1000 | 51 | false | true | 1 | 9 | 15 | 43 | 19 | 24 | null | null |
ksaveljev/hake-2 | src/QCommon/QCommon.hs | bsd-3-clause | printTimeStats :: Int -> Int -> Int -> Quake ()
printTimeStats _ _ _ = do -- to avoid unused var warning
-- printTimeStats timeBefore timeBetween timeAfter =
hsv <- fmap (^.cvValue) hostSpeedsCVar
when (hsv /= 0) $
error "QCommon.printTimeStats" -- TODO
{- let timeAll = timeAfter - timeBefore
... | 651 | printTimeStats :: Int -> Int -> Int -> Quake ()
printTimeStats _ _ _ = do -- to avoid unused var warning
-- printTimeStats timeBefore timeBetween timeAfter =
hsv <- fmap (^.cvValue) hostSpeedsCVar
when (hsv /= 0) $
error "QCommon.printTimeStats" -- TODO
{- let timeAll = timeAfter - timeBefore
... | 651 | printTimeStats _ _ _ = do -- to avoid unused var warning
-- printTimeStats timeBefore timeBetween timeAfter =
hsv <- fmap (^.cvValue) hostSpeedsCVar
when (hsv /= 0) $
error "QCommon.printTimeStats" -- TODO
{- let timeAll = timeAfter - timeBefore
timeSV = timeBetween - timeBefore
... | 603 | false | true | 0 | 10 | 221 | 75 | 38 | 37 | null | null |
bananu7/Hate | src/Hate/Graphics/Backend/Common/Util.hs | mit | -- |Produce a 'Ptr' value to be used as an offset of the given number
-- of bytes.
offsetPtr :: Int -> Ptr a
offsetPtr = wordPtrToPtr . fromIntegral | 151 | offsetPtr :: Int -> Ptr a
offsetPtr = wordPtrToPtr . fromIntegral | 65 | offsetPtr = wordPtrToPtr . fromIntegral | 39 | true | true | 0 | 6 | 31 | 24 | 13 | 11 | null | null |
slon1024/functional_programming | haskell/List.hs | mit | elem e (x:xs) | e == x = True
| otherwise = elem e xs | 70 | elem e (x:xs) | e == x = True
| otherwise = elem e xs | 70 | elem e (x:xs) | e == x = True
| otherwise = elem e xs | 70 | false | false | 1 | 8 | 31 | 42 | 19 | 23 | null | null |
jhoxray/muon | src/Quark/Base/Raw.hs | bsd-3-clause | getTextColumn nm cms = getBColumn nm (textCols cms) | 51 | getTextColumn nm cms = getBColumn nm (textCols cms) | 51 | getTextColumn nm cms = getBColumn nm (textCols cms) | 51 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
k-bx/snap-server | test/Snap/Test/Common.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Kill the false negative on derived show instances.
coverShowInstance :: (Monad m, Show a) => a -> m ()
coverShowInstance x = a `deepseq` b `deepseq` c `deepseq` return ()
where
a = showsPrec 0 x ""
b = show x
c = showList ... | 407 | coverShowInstance :: (Monad m, Show a) => a -> m ()
coverShowInstance x = a `deepseq` b `deepseq` c `deepseq` return ()
where
a = showsPrec 0 x ""
b = show x
c = showList [x] ""
------------------------------------------------------------------------------ | 272 | coverShowInstance x = a `deepseq` b `deepseq` c `deepseq` return ()
where
a = showsPrec 0 x ""
b = show x
c = showList [x] ""
------------------------------------------------------------------------------ | 220 | true | true | 0 | 8 | 65 | 100 | 54 | 46 | null | null |
martin-kolinek/stack | src/main/Main.hs | bsd-3-clause | -- | Fix up extra-deps for a project
solverCmd :: Bool -- ^ modify stack.yaml automatically?
-> GlobalOpts
-> IO ()
solverCmd fixStackYaml go =
withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml) | 229 | solverCmd :: Bool -- ^ modify stack.yaml automatically?
-> GlobalOpts
-> IO ()
solverCmd fixStackYaml go =
withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml) | 192 | solverCmd fixStackYaml go =
withBuildConfigAndLock go (\_ -> solveExtraDeps fixStackYaml) | 93 | true | true | 0 | 8 | 54 | 47 | 24 | 23 | null | null |
thinkpad20/s3-streams | src/Network/AWS/S3/Command.hs | mit | -- | Sets the storage option for an S3 uploaded file.
setStorageClass :: (Str s, Monad m) => StorageClass -> S3Builder' s m
setStorageClass = addHeader "x-amz-storage-class" . show | 180 | setStorageClass :: (Str s, Monad m) => StorageClass -> S3Builder' s m
setStorageClass = addHeader "x-amz-storage-class" . show | 126 | setStorageClass = addHeader "x-amz-storage-class" . show | 56 | true | true | 0 | 7 | 28 | 43 | 22 | 21 | null | null |
steshaw/haskell-script-examples | src/dataimporter.hs | mit | -- Adding program help text to the parser
optsParserInfo :: ParserInfo Options
optsParserInfo = info (helper <*> optsParser)
( fullDesc
<> progDesc "A csv importer"
<> header "dataimporter - a csv importer"
) | 217 | optsParserInfo :: ParserInfo Options
optsParserInfo = info (helper <*> optsParser)
( fullDesc
<> progDesc "A csv importer"
<> header "dataimporter - a csv importer"
) | 175 | optsParserInfo = info (helper <*> optsParser)
( fullDesc
<> progDesc "A csv importer"
<> header "dataimporter - a csv importer"
) | 138 | true | true | 0 | 8 | 41 | 45 | 22 | 23 | null | null |
revnull/implicit-logging | src/Control/Logging.hs | lgpl-3.0 | defaultLogConfig :: c -> LogConfig c
defaultLogConfig = LogConfig Info hdr putStrLn where
hdr = [LH $ LAT "%F %X%Q", LH LALevel]
-- | The default 'LogConfig' that opens a file for logging. | 193 | defaultLogConfig :: c -> LogConfig c
defaultLogConfig = LogConfig Info hdr putStrLn where
hdr = [LH $ LAT "%F %X%Q", LH LALevel]
-- | The default 'LogConfig' that opens a file for logging. | 193 | defaultLogConfig = LogConfig Info hdr putStrLn where
hdr = [LH $ LAT "%F %X%Q", LH LALevel]
-- | The default 'LogConfig' that opens a file for logging. | 156 | false | true | 0 | 7 | 37 | 48 | 25 | 23 | null | null |
rueshyna/gogol | gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ReadGroup' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'reaReferenceSetId'
--
-- * 'reaPrograms'
--
-- * 'reaExperiment'
--
-- * 'reaName'
--
-- * 'reaDataSetId'
--
-- * 'reaId'
--
-- * 'reaSampleId'
--
-- ... | 748 | readGroup
:: ReadGroup
readGroup =
ReadGroup'
{ _reaReferenceSetId = Nothing
, _reaPrograms = Nothing
, _reaExperiment = Nothing
, _reaName = Nothing
, _reaDataSetId = Nothing
, _reaId = Nothing
, _reaSampleId = Nothing
, _reaPredictedInsertSize = Nothing
, _reaDescription = ... | 358 | readGroup =
ReadGroup'
{ _reaReferenceSetId = Nothing
, _reaPrograms = Nothing
, _reaExperiment = Nothing
, _reaName = Nothing
, _reaDataSetId = Nothing
, _reaId = Nothing
, _reaSampleId = Nothing
, _reaPredictedInsertSize = Nothing
, _reaDescription = Nothing
, _reaInfo = No... | 331 | true | true | 1 | 7 | 168 | 103 | 71 | 32 | null | null |
WSCU/JSEuterpea | Euterpea Examples/SimpleEuterpea.hs | gpl-3.0 | MajorS b = makeScale MajorS c1 b
| 33 | cMajorS b = makeScale MajorS c1 b | 33 | cMajorS b = makeScale MajorS c1 b | 33 | false | false | 0 | 5 | 7 | 17 | 7 | 10 | null | null |
rvion/stack | src/Stack/Types/Package.hs | bsd-3-clause | isCTest :: NamedComponent -> Bool
isCTest CTest{} = True | 56 | isCTest :: NamedComponent -> Bool
isCTest CTest{} = True | 56 | isCTest CTest{} = True | 22 | false | true | 0 | 5 | 8 | 27 | 12 | 15 | null | null |
jtpaasch/Hurl | src/Hurl.hs | mit | doRequest :: (HStream ty) => Request ty -> IO (Response ty)
doRequest request = do
let response = simpleHTTP request
contents <- response
unwrapResponse contents
-- unwrapResponse :: Result (Response ty) -> IO (Response ty) | 236 | doRequest :: (HStream ty) => Request ty -> IO (Response ty)
doRequest request = do
let response = simpleHTTP request
contents <- response
unwrapResponse contents
-- unwrapResponse :: Result (Response ty) -> IO (Response ty) | 236 | doRequest request = do
let response = simpleHTTP request
contents <- response
unwrapResponse contents
-- unwrapResponse :: Result (Response ty) -> IO (Response ty) | 176 | false | true | 0 | 11 | 47 | 69 | 31 | 38 | null | null |
lpeterse/koka | src/Lib/Printer.hs | apache-2.0 | sanitizeT :: T.Text -> T.Text
sanitizeT s | null exeExtension = s | 65 | sanitizeT :: T.Text -> T.Text
sanitizeT s | null exeExtension = s | 65 | sanitizeT s | null exeExtension = s | 35 | false | true | 0 | 8 | 11 | 31 | 14 | 17 | null | null |
patrikja/testing-feat | Test/Feat/Finite.hs | bsd-3-clause | fromFinite :: Finite a -> (Index,[a])
fromFinite (Finite c ix) = (c,map ix [0..c-1]) | 85 | fromFinite :: Finite a -> (Index,[a])
fromFinite (Finite c ix) = (c,map ix [0..c-1]) | 84 | fromFinite (Finite c ix) = (c,map ix [0..c-1]) | 46 | false | true | 0 | 9 | 14 | 64 | 32 | 32 | null | null |
mcmaniac/ghc | compiler/utils/Serialized.hs | bsd-3-clause | serializeWithData' :: Data a => a -> [Word8] -> [Word8]
serializeWithData' what = fst $ gfoldl (\(before, a_to_b) a -> (before . serializeWithData' a, a_to_b a))
(\x -> (serializeConstr (constrRep (toConstr what)), x))
what | 301 | serializeWithData' :: Data a => a -> [Word8] -> [Word8]
serializeWithData' what = fst $ gfoldl (\(before, a_to_b) a -> (before . serializeWithData' a, a_to_b a))
(\x -> (serializeConstr (constrRep (toConstr what)), x))
what | 301 | serializeWithData' what = fst $ gfoldl (\(before, a_to_b) a -> (before . serializeWithData' a, a_to_b a))
(\x -> (serializeConstr (constrRep (toConstr what)), x))
what | 245 | false | true | 0 | 14 | 111 | 107 | 57 | 50 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CopyImage.hs | mpl-2.0 | -- | The ID of the AMI to copy.
ciSourceImageId :: Lens' CopyImage Text
ciSourceImageId = lens _ciSourceImageId (\ s a -> s{_ciSourceImageId = a}) | 146 | ciSourceImageId :: Lens' CopyImage Text
ciSourceImageId = lens _ciSourceImageId (\ s a -> s{_ciSourceImageId = a}) | 114 | ciSourceImageId = lens _ciSourceImageId (\ s a -> s{_ciSourceImageId = a}) | 74 | true | true | 0 | 9 | 24 | 40 | 22 | 18 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | groundMaxRange ProtossProbe = 32 | 32 | groundMaxRange ProtossProbe = 32 | 32 | groundMaxRange ProtossProbe = 32 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/Linear/Vector/Type.hs | bsd-3-clause | inftyNorm :: (HasIntegers a, CanMinMaxSameType a) => Vector a -> a
inftyNorm (v :: Vector a) =
V.foldl' max (convertExactly 0 :: a) v | 137 | inftyNorm :: (HasIntegers a, CanMinMaxSameType a) => Vector a -> a
inftyNorm (v :: Vector a) =
V.foldl' max (convertExactly 0 :: a) v | 137 | inftyNorm (v :: Vector a) =
V.foldl' max (convertExactly 0 :: a) v | 70 | false | true | 0 | 8 | 27 | 64 | 32 | 32 | null | null |
oden-lang/oden | src/Oden/Backend/Go.hs | mit | genType (Mono.TTuple _ f s r) =
GT.Struct <$> zipWithM genTupleField [0..] (f:s:r)
where
genTupleField :: Int -> Mono.Type -> Codegen GT.StructField
genTupleField n t = GT.StructField (GI.Identifier ("_" ++ show n)) <$> genType t | 237 | genType (Mono.TTuple _ f s r) =
GT.Struct <$> zipWithM genTupleField [0..] (f:s:r)
where
genTupleField :: Int -> Mono.Type -> Codegen GT.StructField
genTupleField n t = GT.StructField (GI.Identifier ("_" ++ show n)) <$> genType t | 237 | genType (Mono.TTuple _ f s r) =
GT.Struct <$> zipWithM genTupleField [0..] (f:s:r)
where
genTupleField :: Int -> Mono.Type -> Codegen GT.StructField
genTupleField n t = GT.StructField (GI.Identifier ("_" ++ show n)) <$> genType t | 237 | false | false | 0 | 11 | 42 | 113 | 55 | 58 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcPluginM.hs | bsd-3-clause | zonkTcType :: TcType -> TcPluginM TcType
zonkTcType = unsafeTcPluginTcM . TcM.zonkTcType | 88 | zonkTcType :: TcType -> TcPluginM TcType
zonkTcType = unsafeTcPluginTcM . TcM.zonkTcType | 88 | zonkTcType = unsafeTcPluginTcM . TcM.zonkTcType | 47 | false | true | 0 | 7 | 10 | 30 | 13 | 17 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hdbc-postgresql-1.1.4.1/testsrc/TestUtils.hs | bsd-3-clause | sqlTestCase a =
TestCase (handleSqlError a) | 48 | sqlTestCase a =
TestCase (handleSqlError a) | 48 | sqlTestCase a =
TestCase (handleSqlError a) | 48 | false | false | 0 | 7 | 10 | 18 | 8 | 10 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Primitive types and values
gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 80 | gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 50 | gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 50 | true | false | 0 | 7 | 15 | 16 | 8 | 8 | null | null |
psibi/yesod | yesod-form/Yesod/Form/Fields.hs | mit | mkOptionList :: [Option a] -> OptionList a
mkOptionList os = OptionList
{ olOptions = os
, olReadExternal = flip Map.lookup $ Map.fromList $ map (optionExternalValue &&& optionInternalValue) os
} | 207 | mkOptionList :: [Option a] -> OptionList a
mkOptionList os = OptionList
{ olOptions = os
, olReadExternal = flip Map.lookup $ Map.fromList $ map (optionExternalValue &&& optionInternalValue) os
} | 207 | mkOptionList os = OptionList
{ olOptions = os
, olReadExternal = flip Map.lookup $ Map.fromList $ map (optionExternalValue &&& optionInternalValue) os
} | 164 | false | true | 0 | 11 | 40 | 75 | 37 | 38 | null | null |
jkpl/ptt | test/Ptt/Time/ClockSpec.hs | mit | spec :: Spec
spec =
describe "time parsing and formatting" $
it "can be repeated to produce the original value" $ property $
\(Positive seconds) -> secondsFromText (secondsToText seconds) == Just seconds | 215 | spec :: Spec
spec =
describe "time parsing and formatting" $
it "can be repeated to produce the original value" $ property $
\(Positive seconds) -> secondsFromText (secondsToText seconds) == Just seconds | 215 | spec =
describe "time parsing and formatting" $
it "can be repeated to produce the original value" $ property $
\(Positive seconds) -> secondsFromText (secondsToText seconds) == Just seconds | 202 | false | true | 0 | 10 | 43 | 56 | 27 | 29 | null | null |
Khady/Functional-Programming | codes/seasons.hs | unlicense | toInt Fall = 3 | 17 | toInt Fall = 3 | 17 | toInt Fall = 3 | 17 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
mgeorgoulopoulos/TetrisHaskellWeekend | Logic.hs | mit | handleEvent (EventKey (Char 's') Down _ _) s = rotateCCW s | 58 | handleEvent (EventKey (Char 's') Down _ _) s = rotateCCW s | 58 | handleEvent (EventKey (Char 's') Down _ _) s = rotateCCW s | 58 | false | false | 0 | 9 | 10 | 32 | 15 | 17 | null | null |
ghcjs/ghcjs-base | test/Tests/Properties.hs | mit | s_toCaseFold_length xs = S.length (S.toCaseFold s) >= length xs
where s = S.streamList xs | 93 | s_toCaseFold_length xs = S.length (S.toCaseFold s) >= length xs
where s = S.streamList xs | 93 | s_toCaseFold_length xs = S.length (S.toCaseFold s) >= length xs
where s = S.streamList xs | 93 | false | false | 0 | 9 | 17 | 42 | 19 | 23 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.