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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bitemyapp/ballast | tests/tests.hs | bsd-3-clause | unwrapPwMarketingInsert (_:xs) = unwrapPwMarketingInsert xs | 59 | unwrapPwMarketingInsert (_:xs) = unwrapPwMarketingInsert xs | 59 | unwrapPwMarketingInsert (_:xs) = unwrapPwMarketingInsert xs | 59 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
arekfu/project_euler | p0090/p0090.hs | mit | (==*) :: CubeDigit -> CubeDigit -> Bool
(CD '6') ==* (CD '9') = True | 68 | (==*) :: CubeDigit -> CubeDigit -> Bool
(CD '6') ==* (CD '9') = True | 68 | (CD '6') ==* (CD '9') = True | 28 | false | true | 0 | 7 | 13 | 43 | 21 | 22 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F18.hs | bsd-3-clause | -- glMultiTexCoord4fv ----------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glMultiTexCoord.xml OpenGL 2.x>.
glMultiTexCoord4fv
:: MonadIO m
=> GLenum -- ^ @target@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit).
-> Ptr GLfloat -- ... | 450 | glMultiTexCoord4fv
:: MonadIO m
=> GLenum -- ^ @target@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit).
-> Ptr GLfloat -- ^ @v@ pointing to @4@ elements of type @CoordF@.
-> m ()
glMultiTexCoord4fv v1 v2 = liftIO $ dyn101 ptr_glMultiTexCoord4fv v1 v2 | 270 | glMultiTexCoord4fv v1 v2 = liftIO $ dyn101 ptr_glMultiTexCoord4fv v1 v2 | 71 | true | true | 0 | 10 | 57 | 58 | 28 | 30 | null | null |
monsanto/hie | Hie/Language/Haskell/Exts/Annotated/Simplify.hs | gpl-3.0 | -- | Translate an annotated AST node representing a Haskell module, into
-- a simpler version that retains (almost) only abstract information.
-- In particular, XML and hybrid XML pages enabled by the XmlSyntax extension
-- are translated into standard Haskell modules with a @page@ function.
sModule :: SrcInf... | 1,745 | sModule :: SrcInfo loc => Module loc -> S.Module
sModule md = case md of
Module l mmh oss ids ds ->
let (mn, mwt, mes) = sModuleHead mmh
in S.Module (getPointLoc l) mn (map sModulePragma oss) mwt mes (map sImportDecl ids) (map sDecl ds)
XmlPage l mn oss xn attrs mat es ->
let loc... | 1,441 | sModule md = case md of
Module l mmh oss ids ds ->
let (mn, mwt, mes) = sModuleHead mmh
in S.Module (getPointLoc l) mn (map sModulePragma oss) mwt mes (map sImportDecl ids) (map sDecl ds)
XmlPage l mn oss xn attrs mat es ->
let loc = getPointLoc l
in S.Module loc (sModu... | 1,392 | true | true | 1 | 17 | 537 | 536 | 262 | 274 | null | null |
yulii/mdslide | test/Test/Server/Environment.hs | mit | serverEnvironmentSpecs :: [Spec]
serverEnvironmentSpecs = [ getFileNameSpec ] | 77 | serverEnvironmentSpecs :: [Spec]
serverEnvironmentSpecs = [ getFileNameSpec ] | 77 | serverEnvironmentSpecs = [ getFileNameSpec ] | 44 | false | true | 0 | 5 | 7 | 17 | 10 | 7 | null | null |
j1r1k/portager | src/Portager/Writes.hs | bsd-3-clause | -- |Converts a 'PackageSet' to 'PortageSetConfig' that can
createPortageSetConfig :: PackageSet -> PortageSetConfig
createPortageSetConfig s =
let cfg = _setConfiguration s
flat = Set.toAscList $ flattenSet s
in PortageSetConfig
{ _portageSetName = _setName s
, _portageSet = toPortageSet cf... | 509 | createPortageSetConfig :: PackageSet -> PortageSetConfig
createPortageSetConfig s =
let cfg = _setConfiguration s
flat = Set.toAscList $ flattenSet s
in PortageSetConfig
{ _portageSetName = _setName s
, _portageSet = toPortageSet cfg
, _portagePackageUse = toPackageUse flat
... | 450 | createPortageSetConfig s =
let cfg = _setConfiguration s
flat = Set.toAscList $ flattenSet s
in PortageSetConfig
{ _portageSetName = _setName s
, _portageSet = toPortageSet cfg
, _portagePackageUse = toPackageUse flat
, _portagePackageAcceptKeywords = toPackageAcceptKeywords... | 393 | true | true | 0 | 10 | 116 | 98 | 50 | 48 | null | null |
kejace/alto | src/Sparklines.hs | mit | stats :: [Double] -> Stats
stats xs = Stats { minValue = mn, maxValue = mx,
rangeOfValues = mx - mn, numberOfValues = length xs }
where
mn = minimum xs
mx = maximum xs | 191 | stats :: [Double] -> Stats
stats xs = Stats { minValue = mn, maxValue = mx,
rangeOfValues = mx - mn, numberOfValues = length xs }
where
mn = minimum xs
mx = maximum xs | 191 | stats xs = Stats { minValue = mn, maxValue = mx,
rangeOfValues = mx - mn, numberOfValues = length xs }
where
mn = minimum xs
mx = maximum xs | 164 | false | true | 2 | 7 | 58 | 88 | 42 | 46 | null | null |
shadwstalkr/sqlite-admin | Sqlite/Parser.hs | gpl-3.0 | parseCreateTable :: String -> Either ParseError [ColumnDesc]
parseCreateTable = parse createTableStmt "(unknown)" . dropWhile isSpace . map toLower | 147 | parseCreateTable :: String -> Either ParseError [ColumnDesc]
parseCreateTable = parse createTableStmt "(unknown)" . dropWhile isSpace . map toLower | 147 | parseCreateTable = parse createTableStmt "(unknown)" . dropWhile isSpace . map toLower | 86 | false | true | 0 | 7 | 17 | 42 | 20 | 22 | null | null |
piyush-kurur/yesod | yesod-core/Yesod/Internal/Cache.hs | mit | lookup :: CacheKey a -> Cache -> Maybe a
lookup (CacheKey i) (Cache m) = unsafeCoerce <$> Map.lookup i m | 104 | lookup :: CacheKey a -> Cache -> Maybe a
lookup (CacheKey i) (Cache m) = unsafeCoerce <$> Map.lookup i m | 104 | lookup (CacheKey i) (Cache m) = unsafeCoerce <$> Map.lookup i m | 63 | false | true | 0 | 7 | 19 | 53 | 25 | 28 | null | null |
DavidEichmann/boger-banana | src/BB/Examples/HogreHois05.hs | bsd-3-clause | myGame :: Frameworks t => GameBuilder t
myGame bs smgr = do
-- initialize the world (and ogre node)
(ogre1, ogre2) <- liftIO $ initWorld bs smgr
-- get the mouse position Behavior posB :: Behavior t Vec3
let mousePosB = getMousePosB bs
-- set ogre1 position to mouse position ... | 846 | myGame :: Frameworks t => GameBuilder t
myGame bs smgr = do
-- initialize the world (and ogre node)
(ogre1, ogre2) <- liftIO $ initWorld bs smgr
-- get the mouse position Behavior posB :: Behavior t Vec3
let mousePosB = getMousePosB bs
-- set ogre1 position to mouse position ... | 846 | myGame bs smgr = do
-- initialize the world (and ogre node)
(ogre1, ogre2) <- liftIO $ initWorld bs smgr
-- get the mouse position Behavior posB :: Behavior t Vec3
let mousePosB = getMousePosB bs
-- set ogre1 position to mouse position Behavior
setPosB bs ogre1 mouseP... | 806 | false | true | 2 | 12 | 270 | 182 | 96 | 86 | null | null |
icidasset/shikensu | tests/Test/Example.hs | mit | renderMarkdown :: Text -> Text
renderMarkdown text =
text | 61 | renderMarkdown :: Text -> Text
renderMarkdown text =
text | 61 | renderMarkdown text =
text | 30 | false | true | 0 | 7 | 12 | 24 | 10 | 14 | null | null |
stuartnelson3/molecule-weight | haskell/src/Peptide.hs | mit | aminoAcidWeight "(3i)" = 127.1 | 30 | aminoAcidWeight "(3i)" = 127.1 | 30 | aminoAcidWeight "(3i)" = 127.1 | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
google/codeworld | codeworld-base/src/Internal/CodeWorld.hs | apache-2.0 | traced :: (a, CWT.Text) -> a
traced (x, msg) = CW.trace (CWT.fromCWText msg) x | 78 | traced :: (a, CWT.Text) -> a
traced (x, msg) = CW.trace (CWT.fromCWText msg) x | 78 | traced (x, msg) = CW.trace (CWT.fromCWText msg) x | 49 | false | true | 0 | 8 | 13 | 47 | 25 | 22 | null | null |
franckrasolo/pepino | core/src/Pepino/Renderers/Ansi.hs | bsd-3-clause | step :: String -> Sentence -> Doc
step keyword sentence = indent 4 $ (bold . yellow . text) keyword <+> (green . text) sentence | 127 | step :: String -> Sentence -> Doc
step keyword sentence = indent 4 $ (bold . yellow . text) keyword <+> (green . text) sentence | 127 | step keyword sentence = indent 4 $ (bold . yellow . text) keyword <+> (green . text) sentence | 93 | false | true | 0 | 10 | 24 | 59 | 29 | 30 | null | null |
heades/Agda-LLS | Source/ALL/Languages/ILL/Parser/Tokenizer.hs | bsd-3-clause | bottom :: Monad m => ParsecT [Token] u m ()
bottom = constParser Bottom | 71 | bottom :: Monad m => ParsecT [Token] u m ()
bottom = constParser Bottom | 71 | bottom = constParser Bottom | 27 | false | true | 0 | 8 | 13 | 40 | 18 | 22 | null | null |
cbaatz/hamu8080 | src/Hamu8080/Compute.hs | mit | parityBit :: Byte -> Bool
parityBit byte = even (sum [if testBit byte i then 1 else 0 | i <- [0..7]] :: Int) | 108 | parityBit :: Byte -> Bool
parityBit byte = even (sum [if testBit byte i then 1 else 0 | i <- [0..7]] :: Int) | 108 | parityBit byte = even (sum [if testBit byte i then 1 else 0 | i <- [0..7]] :: Int) | 82 | false | true | 0 | 11 | 23 | 59 | 31 | 28 | null | null |
ssaavedra/liquidhaskell | tests/pos/LambdaEval.hs | bsd-3-clause | evalVar x []
= error "unbound variable" | 47 | evalVar x []
= error "unbound variable" | 47 | evalVar x []
= error "unbound variable" | 47 | false | false | 1 | 5 | 14 | 21 | 7 | 14 | null | null |
socrata-platform/ssync | src/test/haskell/Test.hs | apache-2.0 | main :: IO ()
main = defaultMainWithIngredients (antXMLRunner : defaultIngredients) tests | 89 | main :: IO ()
main = defaultMainWithIngredients (antXMLRunner : defaultIngredients) tests | 89 | main = defaultMainWithIngredients (antXMLRunner : defaultIngredients) tests | 75 | false | true | 0 | 7 | 10 | 33 | 15 | 18 | null | null |
xmonad/xmonad-contrib | XMonad/Util/Dzen.hs | bsd-3-clause | -- | Set the alignment of the slave window content.
-- Using this option only makes sense if you also use the @lineCount@ parameter.
slaveAlign :: Align -> DzenConfig
slaveAlign = align' "-sa" | 192 | slaveAlign :: Align -> DzenConfig
slaveAlign = align' "-sa" | 59 | slaveAlign = align' "-sa" | 25 | true | true | 0 | 5 | 32 | 20 | 11 | 9 | null | null |
dpwright/z80 | src/Z80/Operations.hs | mit | derefError :: Show a => a -> b
derefError x = error $ "Dereference syntax is a list with exactly one entry. Invalid: " ++ show x | 128 | derefError :: Show a => a -> b
derefError x = error $ "Dereference syntax is a list with exactly one entry. Invalid: " ++ show x | 128 | derefError x = error $ "Dereference syntax is a list with exactly one entry. Invalid: " ++ show x | 97 | false | true | 0 | 8 | 26 | 41 | 18 | 23 | null | null |
aa755/roshask | src/executable/PkgBuilder.hs | bsd-3-clause | genMsgCabal :: FilePath -> String -> IO FilePath
genMsgCabal pkgPath pkgName =
do deps' <- map (B.pack . rosPkg2CabalPkg) <$>
findDepsWithMessages pkgPath
cabalFilePath <- (</>cabalPkg++".cabal") .
joinPath . init . init . splitPath <$>
codeGenDir pkg... | 2,400 | genMsgCabal :: FilePath -> String -> IO FilePath
genMsgCabal pkgPath pkgName =
do deps' <- map (B.pack . rosPkg2CabalPkg) <$>
findDepsWithMessages pkgPath
cabalFilePath <- (</>cabalPkg++".cabal") .
joinPath . init . init . splitPath <$>
codeGenDir pkg... | 2,400 | genMsgCabal pkgPath pkgName =
do deps' <- map (B.pack . rosPkg2CabalPkg) <$>
findDepsWithMessages pkgPath
cabalFilePath <- (</>cabalPkg++".cabal") .
joinPath . init . init . splitPath <$>
codeGenDir pkgPath
let deps
| pkgName == "std_m... | 2,351 | false | true | 2 | 21 | 1,161 | 492 | 251 | 241 | null | null |
cullina/Extractor | src/BinaryField.hs | bsd-3-clause | {------}
expand 0 _ = [] | 25 | expand 0 _ = [] | 15 | expand 0 _ = [] | 15 | true | false | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
jaiyalas/creepy-waffle | netwire/intClock.hs | mit | beta :: (HasTime t s, Monad m) => Wire s e m a (Maybe Float)
beta = mkConst $ Right (Just 0.5) | 94 | beta :: (HasTime t s, Monad m) => Wire s e m a (Maybe Float)
beta = mkConst $ Right (Just 0.5) | 94 | beta = mkConst $ Right (Just 0.5) | 33 | false | true | 0 | 9 | 21 | 63 | 30 | 33 | null | null |
uuhan/Idris-dev | src/Idris/Core/CaseTree.hs | bsd-3-clause | substAlt :: Name -> Name -> CaseAlt -> CaseAlt
substAlt n repl (ConCase cn a ns sc) = ConCase cn a ns (substSC n repl sc) | 121 | substAlt :: Name -> Name -> CaseAlt -> CaseAlt
substAlt n repl (ConCase cn a ns sc) = ConCase cn a ns (substSC n repl sc) | 121 | substAlt n repl (ConCase cn a ns sc) = ConCase cn a ns (substSC n repl sc) | 74 | false | true | 0 | 7 | 25 | 61 | 30 | 31 | null | null |
mettekou/ghc | compiler/backpack/DriverBkp.hs | bsd-3-clause | newInstalledUnitId (ComponentId cid_fs) Nothing
= InstalledUnitId cid_fs | 76 | newInstalledUnitId (ComponentId cid_fs) Nothing
= InstalledUnitId cid_fs | 76 | newInstalledUnitId (ComponentId cid_fs) Nothing
= InstalledUnitId cid_fs | 76 | false | false | 0 | 7 | 10 | 20 | 9 | 11 | null | null |
zinfra/khan | khan/src/Khan/Model/R53/RecordSet.hs | mpl-2.0 | update :: HostedZoneId -> ResourceRecordSet -> AWS Bool
update zid rset = do
mr <- find zid $ match (rrsName rset) (setId rset)
case mr of
Just x | x == rset -> return False
Just x -> modify zid (upd x) >> return True
Nothing -> modify zid cre >> return True
where
upd r = Change D... | 378 | update :: HostedZoneId -> ResourceRecordSet -> AWS Bool
update zid rset = do
mr <- find zid $ match (rrsName rset) (setId rset)
case mr of
Just x | x == rset -> return False
Just x -> modify zid (upd x) >> return True
Nothing -> modify zid cre >> return True
where
upd r = Change D... | 378 | update zid rset = do
mr <- find zid $ match (rrsName rset) (setId rset)
case mr of
Just x | x == rset -> return False
Just x -> modify zid (upd x) >> return True
Nothing -> modify zid cre >> return True
where
upd r = Change DeleteAction r : cre
cre = [Change CreateAction rse... | 322 | false | true | 1 | 13 | 111 | 166 | 75 | 91 | null | null |
mit-pdos/fscq-impl | src/fscq.hs | mit | fscqOpenDirectory _ _ "" = return $ Left eNOENT | 47 | fscqOpenDirectory _ _ "" = return $ Left eNOENT | 47 | fscqOpenDirectory _ _ "" = return $ Left eNOENT | 47 | false | false | 0 | 6 | 8 | 20 | 9 | 11 | null | null |
pandaychen/PFQ | user/pfqd/src/Main.hs | gpl-2.0 | countEgress :: [Group] -> Int
countEgress gs = sum $ map (\Group{ output = out } -> length out) gs | 98 | countEgress :: [Group] -> Int
countEgress gs = sum $ map (\Group{ output = out } -> length out) gs | 98 | countEgress gs = sum $ map (\Group{ output = out } -> length out) gs | 68 | false | true | 0 | 11 | 19 | 50 | 26 | 24 | null | null |
michalkonecny/aern | aern-realfn/src/Numeric/AERN/RmToRn/NumericOrder/FromInOutRingOps/Arbitrary.hs | bsd-3-clause | -- maybe range
areaWhole4FunFromRingOps sampleFn =
(sampleFn, Nothing) | 75 | areaWhole4FunFromRingOps sampleFn =
(sampleFn, Nothing) | 59 | areaWhole4FunFromRingOps sampleFn =
(sampleFn, Nothing) | 59 | true | false | 0 | 5 | 12 | 16 | 9 | 7 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/Tracing.hs | mit | traverseInit :: Init -> [Ast]
traverseInit x =
AstInit x :
case x of
InitEmpty _ -> []
InitSome _ ih e -> traverseInitHow ih ++ traverseExp e | 155 | traverseInit :: Init -> [Ast]
traverseInit x =
AstInit x :
case x of
InitEmpty _ -> []
InitSome _ ih e -> traverseInitHow ih ++ traverseExp e | 155 | traverseInit x =
AstInit x :
case x of
InitEmpty _ -> []
InitSome _ ih e -> traverseInitHow ih ++ traverseExp e | 125 | false | true | 0 | 10 | 41 | 66 | 31 | 35 | null | null |
forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_compile/T3743.hs | bsd-3-clause | x :: (?x :: ()) => ()
x = undefined | 35 | x :: (?x :: ()) => ()
x = undefined | 35 | x = undefined | 13 | false | true | 0 | 8 | 9 | 31 | 15 | 16 | null | null |
d0kt0r0/estuary | client/src/Estuary/Types/View/Parser.hs | gpl-3.0 | notePadFunc :: Int -> View
notePadFunc x = NotePadView x | 56 | notePadFunc :: Int -> View
notePadFunc x = NotePadView x | 56 | notePadFunc x = NotePadView x | 29 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
dan-t/layers | src/Level/Render.hs | bsd-3-clause | runRenderers :: RS.RenderState -> [RD.Renderer] -> IO [RD.Renderer]
runRenderers renderState rs = do
foldrM (\r rs -> do
(finished, r') <- RD.runRenderer r renderState
if finished
then return rs
else return $ r' : rs) [] rs | 256 | runRenderers :: RS.RenderState -> [RD.Renderer] -> IO [RD.Renderer]
runRenderers renderState rs = do
foldrM (\r rs -> do
(finished, r') <- RD.runRenderer r renderState
if finished
then return rs
else return $ r' : rs) [] rs | 256 | runRenderers renderState rs = do
foldrM (\r rs -> do
(finished, r') <- RD.runRenderer r renderState
if finished
then return rs
else return $ r' : rs) [] rs | 188 | false | true | 0 | 14 | 69 | 103 | 52 | 51 | null | null |
genos/online_problems | advent_of_code_2021/day17/Main.hs | mit | part2 :: Target -> Int
part2 = solve length | 43 | part2 :: Target -> Int
part2 = solve length | 43 | part2 = solve length | 20 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
jgm/css-text | Text/CSS/Render.hs | bsd-2-clause | renderBlocks :: [(Text, [(Text, Text)])] -> Builder
renderBlocks = mconcat . map renderBlock | 92 | renderBlocks :: [(Text, [(Text, Text)])] -> Builder
renderBlocks = mconcat . map renderBlock | 92 | renderBlocks = mconcat . map renderBlock | 40 | false | true | 0 | 9 | 12 | 40 | 23 | 17 | null | null |
alang9/deque | Data/Deque/NonCat/LessTyped.hs | bsd-3-clause | fixup2' (BigR (RX (B5 a b c d e) (B0)) (Y1 (B1 (P s t))) LEmpty) = go7 a b c d e s t | 118 | fixup2' (BigR (RX (B5 a b c d e) (B0)) (Y1 (B1 (P s t))) LEmpty) = go7 a b c d e s t | 118 | fixup2' (BigR (RX (B5 a b c d e) (B0)) (Y1 (B1 (P s t))) LEmpty) = go7 a b c d e s t | 118 | false | false | 0 | 12 | 58 | 80 | 39 | 41 | null | null |
vincenthz/hs-foundation | basement/Basement/UArray.hs | bsd-3-clause | isSuffixOf :: PrimType ty => UArray ty -> UArray ty -> Bool
isSuffixOf suffix arr
| pLen > pArr = False
| otherwise = suffix == revTake pLen arr
where
!pLen = length suffix
!pArr = length arr
| 212 | isSuffixOf :: PrimType ty => UArray ty -> UArray ty -> Bool
isSuffixOf suffix arr
| pLen > pArr = False
| otherwise = suffix == revTake pLen arr
where
!pLen = length suffix
!pArr = length arr
| 212 | isSuffixOf suffix arr
| pLen > pArr = False
| otherwise = suffix == revTake pLen arr
where
!pLen = length suffix
!pArr = length arr
| 152 | false | true | 1 | 8 | 58 | 86 | 38 | 48 | null | null |
swamp-agr/carbuyer-advisor | test/Handler/MarksSpec.hs | mit | spec :: Spec
spec = withApp $ do
describe "getMarksR" $ do
error "Spec not implemented: getMarksR" | 111 | spec :: Spec
spec = withApp $ do
describe "getMarksR" $ do
error "Spec not implemented: getMarksR" | 111 | spec = withApp $ do
describe "getMarksR" $ do
error "Spec not implemented: getMarksR" | 98 | false | true | 0 | 11 | 29 | 31 | 14 | 17 | null | null |
bitemyapp/tandoori | src/Tandoori/Typing.hs | bsd-3-clause | tyBool = TyCon GHC.boolTyConName | 36 | tyBool = TyCon GHC.boolTyConName | 36 | tyBool = TyCon GHC.boolTyConName | 36 | false | false | 0 | 6 | 7 | 11 | 5 | 6 | null | null |
bgamari/pandoc | src/Text/Pandoc/Writers/RST.hs | gpl-2.0 | pictRefsToRST :: [([Inline], (String, String, Maybe String))]
-> State WriterState Doc
pictRefsToRST refs = mapM pictToRST refs >>= return . vcat | 159 | pictRefsToRST :: [([Inline], (String, String, Maybe String))]
-> State WriterState Doc
pictRefsToRST refs = mapM pictToRST refs >>= return . vcat | 159 | pictRefsToRST refs = mapM pictToRST refs >>= return . vcat | 58 | false | true | 0 | 9 | 34 | 60 | 32 | 28 | null | null |
ExNexu/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | defined (PPostulate _ _ _ _ _ _ n t) = [] | 41 | defined (PPostulate _ _ _ _ _ _ n t) = [] | 41 | defined (PPostulate _ _ _ _ _ _ n t) = [] | 41 | false | false | 0 | 6 | 11 | 32 | 15 | 17 | null | null |
TorosFanny/kaleidoscope | src/chapter4/Lexer.hs | mit | semiSep = Tok.semiSep lexer | 30 | semiSep = Tok.semiSep lexer | 30 | semiSep = Tok.semiSep lexer | 30 | false | false | 0 | 6 | 6 | 11 | 5 | 6 | null | null |
mzini/qlogic | Qlogic/Diophantine.hs | gpl-3.0 | shallowSimp ((DioMono n xs):ms) | n == SR.zero = shallowSimp ms | 63 | shallowSimp ((DioMono n xs):ms) | n == SR.zero = shallowSimp ms | 63 | shallowSimp ((DioMono n xs):ms) | n == SR.zero = shallowSimp ms | 63 | false | false | 0 | 9 | 10 | 39 | 18 | 21 | null | null |
agrafix/Spock-worker | src/Web/Spock/Worker/Internal/Queue.hs | mit | fromListPQ :: Ord p => Int -> [(p, [v])] -> Maybe (PureQueue p v)
fromListPQ limit kv
| length kv > limit = Nothing
| otherwise =
Just $
foldl (\(PureQueue content _) (k, v) ->
(PureQueue (M.insert k (V.fromList v) content) limit)
) (emptyPQ limit) kv | 308 | fromListPQ :: Ord p => Int -> [(p, [v])] -> Maybe (PureQueue p v)
fromListPQ limit kv
| length kv > limit = Nothing
| otherwise =
Just $
foldl (\(PureQueue content _) (k, v) ->
(PureQueue (M.insert k (V.fromList v) content) limit)
) (emptyPQ limit) kv | 308 | fromListPQ limit kv
| length kv > limit = Nothing
| otherwise =
Just $
foldl (\(PureQueue content _) (k, v) ->
(PureQueue (M.insert k (V.fromList v) content) limit)
) (emptyPQ limit) kv | 242 | false | true | 0 | 16 | 103 | 145 | 73 | 72 | null | null |
technogeeky/d-A | include/containers-0.5.0.0/Data/IntMap/Base.hs | gpl-3.0 | {--------------------------------------------------------------------
Operators
--------------------------------------------------------------------}
-- | /O(min(n,W))/. Find the value at a key.
-- Calls 'error' when the element can not be found.
--
-- > fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the m... | 412 | (!) :: IntMap a -> Key -> a
m ! k = find k m | 44 | m ! k = find k m | 16 | true | true | 0 | 9 | 66 | 45 | 24 | 21 | null | null |
zhensydow/zhtoolkit | src/GetJson.hs | gpl-3.0 | main :: IO ()
main = do
args <- getArgs
if length args /= 2
then printUsageInfo
else runGetJson (head args) (args!!1)
-- ----------------------------------------------------------------------------- | 207 | main :: IO ()
main = do
args <- getArgs
if length args /= 2
then printUsageInfo
else runGetJson (head args) (args!!1)
-- ----------------------------------------------------------------------------- | 207 | main = do
args <- getArgs
if length args /= 2
then printUsageInfo
else runGetJson (head args) (args!!1)
-- ----------------------------------------------------------------------------- | 193 | false | true | 0 | 10 | 32 | 60 | 30 | 30 | null | null |
ptkato/yesodemolidores | src/Handlers.hs | lgpl-3.0 | getHistoryR :: Handler Html
getHistoryR = defaultLayout $(whamletFile "hamlet/history.hamlet") | 98 | getHistoryR :: Handler Html
getHistoryR = defaultLayout $(whamletFile "hamlet/history.hamlet") | 94 | getHistoryR = defaultLayout $(whamletFile "hamlet/history.hamlet") | 66 | false | true | 0 | 8 | 12 | 24 | 11 | 13 | null | null |
uduki/hsQt | Qtc/Gui/QLineEdit.hs | bsd-2-clause | cursorPosition :: QLineEdit a -> (()) -> IO (Int)
cursorPosition x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QLineEdit_cursorPosition cobj_x0 | 166 | cursorPosition :: QLineEdit a -> (()) -> IO (Int)
cursorPosition x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QLineEdit_cursorPosition cobj_x0 | 166 | cursorPosition x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QLineEdit_cursorPosition cobj_x0 | 116 | false | true | 4 | 9 | 31 | 66 | 30 | 36 | null | null |
higgsd/euler | hs/49.hs | bsd-2-clause | findTriples x i k = head [a*10^(k*2) + b*10^k + c |
a <- ps, a /= x, let b = a+i, let c = b+i,
digitUsage a == digitUsage b,
digitUsage b == digitUsage c,
ps `has` b, ps `has` c]
where ps = dropWhile (10^(k-1)>) ... | 339 | findTriples x i k = head [a*10^(k*2) + b*10^k + c |
a <- ps, a /= x, let b = a+i, let c = b+i,
digitUsage a == digitUsage b,
digitUsage b == digitUsage c,
ps `has` b, ps `has` c]
where ps = dropWhile (10^(k-1)>) ... | 339 | findTriples x i k = head [a*10^(k*2) + b*10^k + c |
a <- ps, a /= x, let b = a+i, let c = b+i,
digitUsage a == digitUsage b,
digitUsage b == digitUsage c,
ps `has` b, ps `has` c]
where ps = dropWhile (10^(k-1)>) ... | 339 | false | false | 0 | 13 | 157 | 182 | 92 | 90 | null | null |
kovach/web | res1/Parse.hs | gpl-2.0 | int_ :: Parser Int
int_ = ParseEither (safeFirst "expected integer" . reads)
where
safeFirst :: e -> [a] -> Either e a
safeFirst e [] = Left e
safeFirst _ (x : _) = Right x | 186 | int_ :: Parser Int
int_ = ParseEither (safeFirst "expected integer" . reads)
where
safeFirst :: e -> [a] -> Either e a
safeFirst e [] = Left e
safeFirst _ (x : _) = Right x | 186 | int_ = ParseEither (safeFirst "expected integer" . reads)
where
safeFirst :: e -> [a] -> Either e a
safeFirst e [] = Left e
safeFirst _ (x : _) = Right x | 167 | false | true | 4 | 8 | 49 | 84 | 42 | 42 | null | null |
kyren/hsgb | lib/Gameboy/CPU.hs | unlicense | setAtDE :: (CPU m, Memory m) => Word8 -> m ()
setAtDE n = getDE >>= (`setMemory` n) | 83 | setAtDE :: (CPU m, Memory m) => Word8 -> m ()
setAtDE n = getDE >>= (`setMemory` n) | 83 | setAtDE n = getDE >>= (`setMemory` n) | 37 | false | true | 0 | 8 | 17 | 48 | 26 | 22 | null | null |
keithodulaigh/Hets | Comorphisms/HasCASL2IsabelleHOL.hs | gpl-2.0 | transOpId :: Env -> Id -> TypeScheme -> String
transOpId sign op ts = fromMaybe (showIsaConstT op baseSign) $ do
ops <- Map.lookup op (assumps sign)
if isSingleton ops then Nothing else do
i <- elemIndex ts $ map opType $ Set.toList ops
Just $ showIsaConstIT op (i + 1) baseSign | 290 | transOpId :: Env -> Id -> TypeScheme -> String
transOpId sign op ts = fromMaybe (showIsaConstT op baseSign) $ do
ops <- Map.lookup op (assumps sign)
if isSingleton ops then Nothing else do
i <- elemIndex ts $ map opType $ Set.toList ops
Just $ showIsaConstIT op (i + 1) baseSign | 290 | transOpId sign op ts = fromMaybe (showIsaConstT op baseSign) $ do
ops <- Map.lookup op (assumps sign)
if isSingleton ops then Nothing else do
i <- elemIndex ts $ map opType $ Set.toList ops
Just $ showIsaConstIT op (i + 1) baseSign | 243 | false | true | 0 | 14 | 62 | 126 | 59 | 67 | null | null |
tsahyt/lmrbot | src/Commands/Wolfram.hs | agpl-3.0 | wolfram :: MonadIO m => Manager -> Maybe WolframAPIKey -> Response m
wolfram _ Nothing = emptyResponse | 102 | wolfram :: MonadIO m => Manager -> Maybe WolframAPIKey -> Response m
wolfram _ Nothing = emptyResponse | 102 | wolfram _ Nothing = emptyResponse | 33 | false | true | 0 | 8 | 16 | 37 | 17 | 20 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsTypes.hs | bsd-3-clause | -- isCompoundHsType (L _ HsAppsTy{}) = True
isCompoundHsType (L _ HsEqTy{} ) = True | 84 | isCompoundHsType (L _ HsEqTy{} ) = True | 40 | isCompoundHsType (L _ HsEqTy{} ) = True | 40 | true | false | 0 | 8 | 14 | 22 | 11 | 11 | null | null |
omefire/lens | src/Control/Lens/Fold.hs | bsd-3-clause | -- | Return whether or not none of the elements viewed through an 'IndexedFold' or 'IndexedTraversal'
-- satisfy a predicate, with access to the @i@.
--
-- When you don't need access to the index then 'noneOf' is more flexible in what it accepts.
--
-- @
-- 'noneOf' l ≡ 'inoneOf' l '.' 'const'
-- @
--
-- @
-- 'inoneOf'... | 728 | inoneOf :: IndexedGetting i Any s a -> (i -> a -> Bool) -> s -> Bool
inoneOf l f = not . ianyOf l f | 99 | inoneOf l f = not . ianyOf l f | 30 | true | true | 0 | 9 | 170 | 76 | 44 | 32 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_LEX_BATCH :: Int
wxSTC_LEX_BATCH = 12 | 43 | wxSTC_LEX_BATCH :: Int
wxSTC_LEX_BATCH = 12 | 43 | wxSTC_LEX_BATCH = 12 | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsConc/src/PureAgentsConc.hs | gpl-3.0 | addNeighbours :: Agent m s e -> [Agent m s e] -> Agent m s e
addNeighbours a ns = a { neighbours = newNeighbours }
where
newNeighbours = foldl (\acc a -> Map.insert (agentId a) (msgBox a) acc) (neighbours a) ns | 222 | addNeighbours :: Agent m s e -> [Agent m s e] -> Agent m s e
addNeighbours a ns = a { neighbours = newNeighbours }
where
newNeighbours = foldl (\acc a -> Map.insert (agentId a) (msgBox a) acc) (neighbours a) ns | 222 | addNeighbours a ns = a { neighbours = newNeighbours }
where
newNeighbours = foldl (\acc a -> Map.insert (agentId a) (msgBox a) acc) (neighbours a) ns | 161 | false | true | 1 | 10 | 53 | 118 | 56 | 62 | null | null |
andyarvanitis/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | computeLet :: Name -> Elab' aux ()
computeLet n = processTactic' (ComputeLet n) | 79 | computeLet :: Name -> Elab' aux ()
computeLet n = processTactic' (ComputeLet n) | 79 | computeLet n = processTactic' (ComputeLet n) | 44 | false | true | 0 | 8 | 12 | 38 | 17 | 21 | null | null |
maoe/text-keepalived | src/Text/Keepalived/Parser.hs | bsd-3-clause | pTcpCheck :: Stream s Identity Token => Parsec s u TcpCheck
pTcpCheck = do
blockId "TCP_CHECK"
braces $ permute $ TcpCheck <$$> pConnectTimeout
<|?> (Nothing, Just <$> pConnectPort)
<|?> (Nothing, Just <$> pBindto)
-- | Parses a @SMTP_CHECK@. | 307 | pTcpCheck :: Stream s Identity Token => Parsec s u TcpCheck
pTcpCheck = do
blockId "TCP_CHECK"
braces $ permute $ TcpCheck <$$> pConnectTimeout
<|?> (Nothing, Just <$> pConnectPort)
<|?> (Nothing, Just <$> pBindto)
-- | Parses a @SMTP_CHECK@. | 307 | pTcpCheck = do
blockId "TCP_CHECK"
braces $ permute $ TcpCheck <$$> pConnectTimeout
<|?> (Nothing, Just <$> pConnectPort)
<|?> (Nothing, Just <$> pBindto)
-- | Parses a @SMTP_CHECK@. | 247 | false | true | 0 | 11 | 102 | 85 | 41 | 44 | null | null |
vTurbine/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | hsExprNeedsParens (HsUnboundVar {}) = False | 45 | hsExprNeedsParens (HsUnboundVar {}) = False | 45 | hsExprNeedsParens (HsUnboundVar {}) = False | 45 | false | false | 0 | 6 | 6 | 17 | 8 | 9 | null | null |
Hi-Angel/yi | yi-core/src/Yi/Buffer/HighLevel.hs | gpl-2.0 | getRawSelectRegionB :: BufferM Region
getRawSelectRegionB = do
s <- use highlightSelectionA
if s then getRawestSelectRegionB else do
p <- pointB
return $ mkRegion p p
-- | Get the current region boundaries. Extended to the current selection unit. | 261 | getRawSelectRegionB :: BufferM Region
getRawSelectRegionB = do
s <- use highlightSelectionA
if s then getRawestSelectRegionB else do
p <- pointB
return $ mkRegion p p
-- | Get the current region boundaries. Extended to the current selection unit. | 261 | getRawSelectRegionB = do
s <- use highlightSelectionA
if s then getRawestSelectRegionB else do
p <- pointB
return $ mkRegion p p
-- | Get the current region boundaries. Extended to the current selection unit. | 223 | false | true | 0 | 11 | 52 | 55 | 26 | 29 | null | null |
input-output-hk/rscoin-haskell | src/RSCoin/User/Cache.hs | gpl-3.0 | mkUserCache
:: MonadIO m
=> m UserCache
mkUserCache = liftIO $ newTVarIO nullCacheData | 94 | mkUserCache
:: MonadIO m
=> m UserCache
mkUserCache = liftIO $ newTVarIO nullCacheData | 94 | mkUserCache = liftIO $ newTVarIO nullCacheData | 46 | false | true | 0 | 6 | 20 | 31 | 14 | 17 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Erlang.hs | gpl-2.0 | parseRules ("Erlang","Normal Text") =
(((pColumn 0 >> pRegExpr regex_'28'3f'3a'2dmodule'7c'2dexport'7c'2ddefine'7c'2dundef'7c'2difdef'7c'2difndef'7c'2delse'7c'2dendif'7c'2dinclude'7c'2dinclude'5flib'29 >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_keywords >>= withAttribut... | 2,640 | parseRules ("Erlang","Normal Text") =
(((pColumn 0 >> pRegExpr regex_'28'3f'3a'2dmodule'7c'2dexport'7c'2ddefine'7c'2dundef'7c'2difdef'7c'2difndef'7c'2delse'7c'2dendif'7c'2dinclude'7c'2dinclude'5flib'29 >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_keywords >>= withAttribut... | 2,640 | parseRules ("Erlang","Normal Text") =
(((pColumn 0 >> pRegExpr regex_'28'3f'3a'2dmodule'7c'2dexport'7c'2ddefine'7c'2dundef'7c'2difdef'7c'2difndef'7c'2delse'7c'2dendif'7c'2dinclude'7c'2dinclude'5flib'29 >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_keywords >>= withAttribut... | 2,640 | false | false | 0 | 28 | 260 | 492 | 251 | 241 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/Update.hs | mpl-2.0 | -- | The name (project, location, cluster) of the cluster to update.
-- Specified in the format \`projects\/*\/locations\/*\/clusters\/*\`.
plcuName :: Lens' ProjectsLocationsClustersUpdate Text
plcuName = lens _plcuName (\ s a -> s{_plcuName = a}) | 248 | plcuName :: Lens' ProjectsLocationsClustersUpdate Text
plcuName = lens _plcuName (\ s a -> s{_plcuName = a}) | 108 | plcuName = lens _plcuName (\ s a -> s{_plcuName = a}) | 53 | true | true | 0 | 9 | 33 | 41 | 23 | 18 | null | null |
sonyandy/logicst | src/Control/Monad/ST/Logic/Internal.hs | bsd-3-clause | modifyRef :: MonadST m => Ref s m a -> (a -> a) -> LogicT s m ()
modifyRef ref f = modifyRef'' ref $ \ m a -> Value m $ f a | 123 | modifyRef :: MonadST m => Ref s m a -> (a -> a) -> LogicT s m ()
modifyRef ref f = modifyRef'' ref $ \ m a -> Value m $ f a | 123 | modifyRef ref f = modifyRef'' ref $ \ m a -> Value m $ f a | 58 | false | true | 0 | 10 | 33 | 82 | 38 | 44 | null | null |
ozgurakgun/Idris-dev | src/Idris/Prover.hs | bsd-3-clause | proverfc = fileFC "prover" | 26 | proverfc = fileFC "prover" | 26 | proverfc = fileFC "prover" | 26 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
johannesgerer/buchhaltung | src/Buchhaltung/Zipper.hs | mit | -- | Insert a new element just before the current focus, then move the
-- | focus to the newly inserted element.
insback :: a -> Zipper a -> Zipper a
insback x (LZ (pr :| ps) fs) = LZ (x :| ps) (pr:fs) | 201 | insback :: a -> Zipper a -> Zipper a
insback x (LZ (pr :| ps) fs) = LZ (x :| ps) (pr:fs) | 88 | insback x (LZ (pr :| ps) fs) = LZ (x :| ps) (pr:fs) | 51 | true | true | 0 | 12 | 43 | 70 | 35 | 35 | null | null |
frublox/aichanbot | src/Command/Info.hs | bsd-3-clause | dynCmdInfo :: Text -> CommandInfo
dynCmdInfo txt = CommandInfo
{ _name = txt
, _aliases = []
, _permissions = Perms.Anyone
, _help = "Usage !" <> txt <> " [optional username, w/ or w/out @]"
} | 230 | dynCmdInfo :: Text -> CommandInfo
dynCmdInfo txt = CommandInfo
{ _name = txt
, _aliases = []
, _permissions = Perms.Anyone
, _help = "Usage !" <> txt <> " [optional username, w/ or w/out @]"
} | 230 | dynCmdInfo txt = CommandInfo
{ _name = txt
, _aliases = []
, _permissions = Perms.Anyone
, _help = "Usage !" <> txt <> " [optional username, w/ or w/out @]"
} | 196 | false | true | 0 | 9 | 74 | 65 | 34 | 31 | null | null |
liyang/thyme | src/Data/Thyme/Clock/Internal.hs | bsd-3-clause | -- | Accessor for the time-of-day 'DiffTime' component of an 'UTCTime'.
--
-- @
-- 'utctDayTime' = 'view' '_utctDayTime'
-- @
utctDayTime :: UTCTime -> DiffTime
utctDayTime = view _utctDayTime | 192 | utctDayTime :: UTCTime -> DiffTime
utctDayTime = view _utctDayTime | 66 | utctDayTime = view _utctDayTime | 31 | true | true | 0 | 7 | 29 | 30 | 15 | 15 | null | null |
KenetJervet/mapensee | haskell/problems/LinkUp.hs | gpl-3.0 | main :: IO ()
main = do
board <- randomizeBoard (8, 10)
printBoard board | 76 | main :: IO ()
main = do
board <- randomizeBoard (8, 10)
printBoard board | 76 | main = do
board <- randomizeBoard (8, 10)
printBoard board | 62 | false | true | 1 | 10 | 17 | 42 | 18 | 24 | null | null |
BartMassey/ciphersaber2 | Data/CipherSaber2.hs | mit | toByteString :: String -> ByteString
toByteString s = BC.pack s | 63 | toByteString :: String -> ByteString
toByteString s = BC.pack s | 63 | toByteString s = BC.pack s | 26 | false | true | 0 | 6 | 9 | 23 | 11 | 12 | null | null |
rueshyna/gogol | gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs | mpl-2.0 | -- | Target bytes received per second.
nuTargetReceivedBytesPerSecond :: Lens' NetworkUtilization (Maybe Int32)
nuTargetReceivedBytesPerSecond
= lens _nuTargetReceivedBytesPerSecond
(\ s a -> s{_nuTargetReceivedBytesPerSecond = a})
. mapping _Coerce | 263 | nuTargetReceivedBytesPerSecond :: Lens' NetworkUtilization (Maybe Int32)
nuTargetReceivedBytesPerSecond
= lens _nuTargetReceivedBytesPerSecond
(\ s a -> s{_nuTargetReceivedBytesPerSecond = a})
. mapping _Coerce | 224 | nuTargetReceivedBytesPerSecond
= lens _nuTargetReceivedBytesPerSecond
(\ s a -> s{_nuTargetReceivedBytesPerSecond = a})
. mapping _Coerce | 151 | true | true | 0 | 10 | 40 | 55 | 28 | 27 | null | null |
tjakway/ghcjvm | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True)
= hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg] | 105 | ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True)
= hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg] | 105 | ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True)
= hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg] | 105 | false | false | 0 | 6 | 15 | 42 | 20 | 22 | null | null |
kim/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | The DB instance Class for the orderable DB instance
odbioDBInstanceClass :: Lens' OrderableDBInstanceOption (Maybe Text)
odbioDBInstanceClass =
lens _odbioDBInstanceClass (\s a -> s { _odbioDBInstanceClass = a }) | 221 | odbioDBInstanceClass :: Lens' OrderableDBInstanceOption (Maybe Text)
odbioDBInstanceClass =
lens _odbioDBInstanceClass (\s a -> s { _odbioDBInstanceClass = a }) | 164 | odbioDBInstanceClass =
lens _odbioDBInstanceClass (\s a -> s { _odbioDBInstanceClass = a }) | 95 | true | true | 1 | 9 | 33 | 50 | 25 | 25 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | -- ------------------------------------------------------------
-- * Basic sanity checks
-- ------------------------------------------------------------
-- | Check that this package description is sane.
--
checkSanity :: PackageDescription -> [PackageCheck]
checkSanity pkg =
catMaybes [
check (null . (\(Package... | 1,744 | checkSanity :: PackageDescription -> [PackageCheck]
checkSanity pkg =
catMaybes [
check (null . (\(PackageName n) -> n) . packageName $ pkg) $
PackageBuildImpossible "No 'name' field."
, check (null . versionBranch . packageVersion $ pkg) $
PackageBuildImpossible "No 'version' field."
, check (... | 1,537 | checkSanity pkg =
catMaybes [
check (null . (\(PackageName n) -> n) . packageName $ pkg) $
PackageBuildImpossible "No 'name' field."
, check (null . versionBranch . packageVersion $ pkg) $
PackageBuildImpossible "No 'version' field."
, check (null (executables pkg) && isNothing (library pkg)) $... | 1,485 | true | true | 18 | 16 | 371 | 419 | 197 | 222 | null | null |
ComputationWithBoundedResources/ara-inference | src/Data/Rewriting/ARA/ByInferenceRules/AnalyzerDatatype/Type.hs | mit | toADatatypeVector (SigRefParamCf dt m n) = SigRefParamCf dt m n | 71 | toADatatypeVector (SigRefParamCf dt m n) = SigRefParamCf dt m n | 71 | toADatatypeVector (SigRefParamCf dt m n) = SigRefParamCf dt m n | 71 | false | false | 0 | 7 | 17 | 26 | 12 | 14 | null | null |
flipstone/glados | src/Handler/Style.hs | mit | style :: App Response
style = dir "main.css" $ do
methodM GET
ok $ toResponse (styleView Nothing) | 101 | style :: App Response
style = dir "main.css" $ do
methodM GET
ok $ toResponse (styleView Nothing) | 101 | style = dir "main.css" $ do
methodM GET
ok $ toResponse (styleView Nothing) | 79 | false | true | 0 | 12 | 20 | 49 | 20 | 29 | null | null |
ysnrkdm/Hamlet | src/MoveGenerator.hs | mit | moveGenerationHelper colour puttables = (Move.Mv movePos (Piece.Pc colour)) : (moveGenerationHelper colour newPuttables)
where
(movePos, newPuttables) = BitBoard.takeOneAndSetZero puttables | 197 | moveGenerationHelper colour puttables = (Move.Mv movePos (Piece.Pc colour)) : (moveGenerationHelper colour newPuttables)
where
(movePos, newPuttables) = BitBoard.takeOneAndSetZero puttables | 197 | moveGenerationHelper colour puttables = (Move.Mv movePos (Piece.Pc colour)) : (moveGenerationHelper colour newPuttables)
where
(movePos, newPuttables) = BitBoard.takeOneAndSetZero puttables | 197 | false | false | 0 | 10 | 25 | 62 | 30 | 32 | null | null |
marcellussiegburg/autotool | collection/src/Polynomial/Reader.hs | gpl-2.0 | expr = E.buildExpressionParser table term | 41 | expr = E.buildExpressionParser table term | 41 | expr = E.buildExpressionParser table term | 41 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
mrakgr/futhark | src/Futhark/CodeGen/ImpGen/Kernels/ToOpenCL.hs | bsd-3-clause | typesInKernel (AnyKernel kernel) = typesInCode $ kernelBody kernel | 66 | typesInKernel (AnyKernel kernel) = typesInCode $ kernelBody kernel | 66 | typesInKernel (AnyKernel kernel) = typesInCode $ kernelBody kernel | 66 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M12/D13/Solution.hs | mit | readStr :: String -> Int
readStr "NA" = 0 | 41 | readStr :: String -> Int
readStr "NA" = 0 | 41 | readStr "NA" = 0 | 16 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
mcschroeder/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | isVoidArg _ = False | 19 | isVoidArg _ = False | 19 | isVoidArg _ = False | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jsavatgy/hatupist | code/settings.hs | gpl-2.0 | ivExactly n ivs =
case find (\iv -> n == (iNum iv)) ivs of
Just x -> x
Nothing -> zeroInterval { iNum = n } | 118 | ivExactly n ivs =
case find (\iv -> n == (iNum iv)) ivs of
Just x -> x
Nothing -> zeroInterval { iNum = n } | 118 | ivExactly n ivs =
case find (\iv -> n == (iNum iv)) ivs of
Just x -> x
Nothing -> zeroInterval { iNum = n } | 118 | false | false | 0 | 11 | 36 | 61 | 31 | 30 | null | null |
sherwoodwang/wxHaskell | samples/contrib/GLCanvas.hs | lgpl-2.1 | convInt32 = fromInteger . toInteger | 35 | convInt32 = fromInteger . toInteger | 35 | convInt32 = fromInteger . toInteger | 35 | false | false | 2 | 5 | 4 | 15 | 5 | 10 | null | null |
kadena-io/pact | src/Pact/Native/Db.hs | bsd-3-clause | txids' _ i as = argsError i as | 30 | txids' _ i as = argsError i as | 30 | txids' _ i as = argsError i as | 30 | false | false | 0 | 5 | 7 | 18 | 8 | 10 | null | null |
vbalalla/financial_contract_language | Language/SPL.hs | mit | always = Closed . const | 23 | always = Closed . const | 23 | always = Closed . const | 23 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
anchor/druid-query | tests/Network/Druid/Query/ASTSpec.hs | bsd-3-clause | timeSeriesQueryQ :: Query
timeSeriesQueryQ = QueryTimeSeries
{ _queryDataSourceName = "sample_datasource"
, _queryGranularity = GranularityDay
, _queryFilter = Just $ FilterAnd
[ FilterSelector "sample_dimension1" "sample_value1"
, FilterOr
[ FilterSelector "sample_dimension2" "s... | 977 | timeSeriesQueryQ :: Query
timeSeriesQueryQ = QueryTimeSeries
{ _queryDataSourceName = "sample_datasource"
, _queryGranularity = GranularityDay
, _queryFilter = Just $ FilterAnd
[ FilterSelector "sample_dimension1" "sample_value1"
, FilterOr
[ FilterSelector "sample_dimension2" "s... | 977 | timeSeriesQueryQ = QueryTimeSeries
{ _queryDataSourceName = "sample_datasource"
, _queryGranularity = GranularityDay
, _queryFilter = Just $ FilterAnd
[ FilterSelector "sample_dimension1" "sample_value1"
, FilterOr
[ FilterSelector "sample_dimension2" "sample_value2"
... | 951 | false | true | 0 | 12 | 285 | 145 | 82 | 63 | null | null |
NCrashed/servant-auth-token | src/Servant/Server/Auth/Token/Common.hs | bsd-3-clause | -- | Do something when first value is 'Nothing'
whenNothing :: Applicative m => Maybe a -> m () -> m ()
whenNothing Nothing m = m | 129 | whenNothing :: Applicative m => Maybe a -> m () -> m ()
whenNothing Nothing m = m | 81 | whenNothing Nothing m = m | 25 | true | true | 0 | 9 | 26 | 45 | 21 | 24 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 1340003 = 5325 | 34 | getValueFromProduct 1340003 = 5325 | 34 | getValueFromProduct 1340003 = 5325 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Genesis/Dummy.hs | mit | dummyGenesisSpec :: GenesisSpec
dummyGenesisSpec = UnsafeGenesisSpec
dummyGenesisAvvmBalances
dummyFtsSeed
noGenesisDelegation
dummyBlockVersionData
(genesisProtocolConstantsFromProtocolConstants dummyProtocolConstants
dummyProtocolMagic
)
d... | 342 | dummyGenesisSpec :: GenesisSpec
dummyGenesisSpec = UnsafeGenesisSpec
dummyGenesisAvvmBalances
dummyFtsSeed
noGenesisDelegation
dummyBlockVersionData
(genesisProtocolConstantsFromProtocolConstants dummyProtocolConstants
dummyProtocolMagic
)
d... | 342 | dummyGenesisSpec = UnsafeGenesisSpec
dummyGenesisAvvmBalances
dummyFtsSeed
noGenesisDelegation
dummyBlockVersionData
(genesisProtocolConstantsFromProtocolConstants dummyProtocolConstants
dummyProtocolMagic
)
dummyGenesisInitializer | 310 | false | true | 0 | 7 | 93 | 32 | 16 | 16 | null | null |
idontgetoutmuch/StochVol | StochVolMain.hs | bsd-3-clause | main :: IO ()
main = do
let result = runMC
mus = map (fst. fst) result
phis = map (snd . fst) result
taus = map snd result
putStrLn $ show $ (/(fromIntegral bigM)) $ sum mus
putStrLn $ show $ (/(fromIntegral bigM)) $ sum phis
putStrLn $ show $ (/(fromIntegral bigM)) $ sum taus
displayHeader ... | 644 | main :: IO ()
main = do
let result = runMC
mus = map (fst. fst) result
phis = map (snd . fst) result
taus = map snd result
putStrLn $ show $ (/(fromIntegral bigM)) $ sum mus
putStrLn $ show $ (/(fromIntegral bigM)) $ sum phis
putStrLn $ show $ (/(fromIntegral bigM)) $ sum taus
displayHeader ... | 644 | main = do
let result = runMC
mus = map (fst. fst) result
phis = map (snd . fst) result
taus = map snd result
putStrLn $ show $ (/(fromIntegral bigM)) $ sum mus
putStrLn $ show $ (/(fromIntegral bigM)) $ sum phis
putStrLn $ show $ (/(fromIntegral bigM)) $ sum taus
displayHeader "mus.png"
... | 630 | false | true | 0 | 17 | 150 | 345 | 165 | 180 | null | null |
qpfiffer/gather | src/Gather/DB.hs | mit | getRandomPersonColor :: IO Text
getRandomPersonColor = random_index >>= \rabbit ->
return $ person_colors !! rabbit
where
random_index = getStdRandom $ randomR (0, (Prelude.length person_colors) - 1) | 209 | getRandomPersonColor :: IO Text
getRandomPersonColor = random_index >>= \rabbit ->
return $ person_colors !! rabbit
where
random_index = getStdRandom $ randomR (0, (Prelude.length person_colors) - 1) | 209 | getRandomPersonColor = random_index >>= \rabbit ->
return $ person_colors !! rabbit
where
random_index = getStdRandom $ randomR (0, (Prelude.length person_colors) - 1) | 177 | false | true | 0 | 11 | 35 | 64 | 33 | 31 | null | null |
GaloisInc/sk-dev-platform | libs/SCD/src/SCD/GenShrimp/SimpleLobQC.hs | bsd-3-clause | genPolicy :: Gen Policy
genPolicy = do
setSt zeroSt
setQCSize 0
liftM (Policy []) $ genStmts True | 103 | genPolicy :: Gen Policy
genPolicy = do
setSt zeroSt
setQCSize 0
liftM (Policy []) $ genStmts True | 103 | genPolicy = do
setSt zeroSt
setQCSize 0
liftM (Policy []) $ genStmts True | 79 | false | true | 0 | 11 | 22 | 47 | 20 | 27 | null | null |
aminb/blog | src/Minification.hs | gpl-3.0 | minifyCss :: String -> String
minifyCss = stripBegin . stripEnd
. stripCssBefore . stripCssAfter
. mergeWhitespace . stripCssComments | 153 | minifyCss :: String -> String
minifyCss = stripBegin . stripEnd
. stripCssBefore . stripCssAfter
. mergeWhitespace . stripCssComments | 153 | minifyCss = stripBegin . stripEnd
. stripCssBefore . stripCssAfter
. mergeWhitespace . stripCssComments | 123 | false | true | 3 | 7 | 37 | 44 | 19 | 25 | null | null |
ivanmoore/seedy | src/SeedyPelias.hs | gpl-3.0 | seedyOptimiser :: Optimiser
seedyOptimiser (Index i : ops) json = (reform $ (substr start end) splitJSON, ops)
where
splitJSON = (split "{") json
substr :: Int -> Int -> [a] -> [a]
substr s e = (drop s) . (take e)
reform :: [String] -> String
reform = concat . (map (\x -> '{... | 588 | seedyOptimiser :: Optimiser
seedyOptimiser (Index i : ops) json = (reform $ (substr start end) splitJSON, ops)
where
splitJSON = (split "{") json
substr :: Int -> Int -> [a] -> [a]
substr s e = (drop s) . (take e)
reform :: [String] -> String
reform = concat . (map (\x -> '{... | 588 | seedyOptimiser (Index i : ops) json = (reform $ (substr start end) splitJSON, ops)
where
splitJSON = (split "{") json
substr :: Int -> Int -> [a] -> [a]
substr s e = (drop s) . (take e)
reform :: [String] -> String
reform = concat . (map (\x -> '{' : x))
indexItemRange :... | 560 | false | true | 0 | 12 | 168 | 271 | 144 | 127 | null | null |
YueLiPicasso/unification | MMAlgoA .Buggy.hs | gpl-3.0 | foteHasGoodForm _ = False | 63 | foteHasGoodForm _ = False | 63 | foteHasGoodForm _ = False | 63 | false | false | 0 | 4 | 41 | 10 | 4 | 6 | null | null |
mrkkrp/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Location of a package tarball
configPackageTarball :: (MonadReader env m, HasConfig env, MonadThrow m) => IndexName -> PackageIdentifier -> m (Path Abs File)
configPackageTarball iname ident = do
root <- configPackageIndexRoot iname
name <- parseRelDir $ packageNameString $ packageIdentifierName ident
... | 550 | configPackageTarball :: (MonadReader env m, HasConfig env, MonadThrow m) => IndexName -> PackageIdentifier -> m (Path Abs File)
configPackageTarball iname ident = do
root <- configPackageIndexRoot iname
name <- parseRelDir $ packageNameString $ packageIdentifierName ident
ver <- parseRelDir $ versionString ... | 515 | configPackageTarball iname ident = do
root <- configPackageIndexRoot iname
name <- parseRelDir $ packageNameString $ packageIdentifierName ident
ver <- parseRelDir $ versionString $ packageIdentifierVersion ident
base <- parseRelFile $ packageIdentifierString ident ++ ".tar.gz"
return (root </> $(mk... | 387 | true | true | 0 | 16 | 92 | 161 | 75 | 86 | null | null |
JamesSullivan1/Mpp | src/MppSemanticAnalyzer.hs | mit | sTypeErr (M_ass (s,es,e) pos) p a = "Type error in statement "
++ show (M_ass (s,es,e) pos) ++ ": Invalid type for symbol " ++ s
++ " (expected " ++ show p ++ ", given " ++ show a ++ ")." | 197 | sTypeErr (M_ass (s,es,e) pos) p a = "Type error in statement "
++ show (M_ass (s,es,e) pos) ++ ": Invalid type for symbol " ++ s
++ " (expected " ++ show p ++ ", given " ++ show a ++ ")." | 197 | sTypeErr (M_ass (s,es,e) pos) p a = "Type error in statement "
++ show (M_ass (s,es,e) pos) ++ ": Invalid type for symbol " ++ s
++ " (expected " ++ show p ++ ", given " ++ show a ++ ")." | 197 | false | false | 4 | 10 | 51 | 91 | 45 | 46 | null | null |
razvan9310/barrelfish | hake/Tools.hs | mit | k1om_netos_mpss_3_7_1 root
= ToolDetails {
toolPath = mkRoot root </>
"mpss-3.7.1/x86_64-mpsssdk-linux" </>
"usr/bin/k1om-mpss-linux",
toolPrefix = "k1om-mpss-linux-"
} | 233 | k1om_netos_mpss_3_7_1 root
= ToolDetails {
toolPath = mkRoot root </>
"mpss-3.7.1/x86_64-mpsssdk-linux" </>
"usr/bin/k1om-mpss-linux",
toolPrefix = "k1om-mpss-linux-"
} | 233 | k1om_netos_mpss_3_7_1 root
= ToolDetails {
toolPath = mkRoot root </>
"mpss-3.7.1/x86_64-mpsssdk-linux" </>
"usr/bin/k1om-mpss-linux",
toolPrefix = "k1om-mpss-linux-"
} | 233 | false | false | 0 | 9 | 81 | 34 | 18 | 16 | null | null |
msakai/ptq | src/MP.hs | lgpl-2.1 | applyMP (Op1 op a) = Op1 op (applyMP a) | 41 | applyMP (Op1 op a) = Op1 op (applyMP a) | 41 | applyMP (Op1 op a) = Op1 op (applyMP a) | 41 | false | false | 0 | 7 | 10 | 28 | 13 | 15 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.