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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
djeik/goto | test/Spec.hs | mit | getTestSources :: FilePath -> IO [(String, String)]
getTestSources sourcesDir = getGoFiles >>= mapM readWithPath where
getGoFiles = filter isGoFile <$> getSourcePaths
isGoFile = (==) ".go" . takeExtension
getSourcePaths = getDirectoryContents sourcesDir
readWithPath p = (,) <$> pure (sourcesDir </> p) <... | 350 | getTestSources :: FilePath -> IO [(String, String)]
getTestSources sourcesDir = getGoFiles >>= mapM readWithPath where
getGoFiles = filter isGoFile <$> getSourcePaths
isGoFile = (==) ".go" . takeExtension
getSourcePaths = getDirectoryContents sourcesDir
readWithPath p = (,) <$> pure (sourcesDir </> p) <... | 350 | getTestSources sourcesDir = getGoFiles >>= mapM readWithPath where
getGoFiles = filter isGoFile <$> getSourcePaths
isGoFile = (==) ".go" . takeExtension
getSourcePaths = getDirectoryContents sourcesDir
readWithPath p = (,) <$> pure (sourcesDir </> p) <*> readFile (sourcesDir </> p) | 298 | false | true | 0 | 11 | 60 | 112 | 58 | 54 | null | null |
Heather/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC Placeholder = Nothing | 43 | highestFC Placeholder = Nothing | 43 | highestFC Placeholder = Nothing | 43 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
simhu/cubical | Eval.hs | mit | faceName :: Name -> Side -> Name
faceName 0 _ = 0 | 65 | faceName :: Name -> Side -> Name
faceName 0 _ = 0 | 65 | faceName 0 _ = 0 | 32 | false | true | 0 | 8 | 27 | 30 | 13 | 17 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/ServiceCatalogLaunchTemplateConstraint.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-acceptlanguage
scltcAcceptLanguage :: Lens' ServiceCatalogLaunchTemplateConstraint (Maybe (Val Text))
scltcAcceptLanguage = lens _serviceCatalogLaunchT... | 425 | scltcAcceptLanguage :: Lens' ServiceCatalogLaunchTemplateConstraint (Maybe (Val Text))
scltcAcceptLanguage = lens _serviceCatalogLaunchTemplateConstraintAcceptLanguage (\s a -> s { _serviceCatalogLaunchTemplateConstraintAcceptLanguage = a }) | 241 | scltcAcceptLanguage = lens _serviceCatalogLaunchTemplateConstraintAcceptLanguage (\s a -> s { _serviceCatalogLaunchTemplateConstraintAcceptLanguage = a }) | 154 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | induction tm ctxt env _ = do fail "Can't do induction here" | 59 | induction tm ctxt env _ = do fail "Can't do induction here" | 59 | induction tm ctxt env _ = do fail "Can't do induction here" | 59 | false | false | 0 | 7 | 11 | 25 | 9 | 16 | null | null |
phadej/range-set-list | tests/Map.hs | mit | toRSet (AIntersection a b) = RSet.intersection (toRSet a) (toRSet b) | 69 | toRSet (AIntersection a b) = RSet.intersection (toRSet a) (toRSet b) | 69 | toRSet (AIntersection a b) = RSet.intersection (toRSet a) (toRSet b) | 69 | false | false | 0 | 7 | 10 | 37 | 17 | 20 | null | null |
ocramz/monad-bayes | test/TestTrace.hs | mit | -- extractNormal :: Cache Double -> Maybe Double
-- extractNormal (Cache (Continuous (Normal _ _)) x) = Just (realToFrac x)
-- extractNormal _ = Nothing
--
-- extractInt :: Cache Double -> Maybe Int
-- extractInt (Cache (Discrete _) x) = Just (fromIntegral x)
-- extractInt _ = Nothing
discreteWeights :: Fractional a =... | 360 | discreteWeights :: Fractional a => [a]
discreteWeights = [0.0001, 0.9999] | 73 | discreteWeights = [0.0001, 0.9999] | 34 | true | true | 0 | 6 | 59 | 34 | 22 | 12 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Projects/SetCommonInstanceMetadata.hs | mpl-2.0 | -- | Project ID for this request.
pscimProject :: Lens' ProjectsSetCommonInstanceMetadata Text
pscimProject
= lens _pscimProject (\ s a -> s{_pscimProject = a}) | 162 | pscimProject :: Lens' ProjectsSetCommonInstanceMetadata Text
pscimProject
= lens _pscimProject (\ s a -> s{_pscimProject = a}) | 128 | pscimProject
= lens _pscimProject (\ s a -> s{_pscimProject = a}) | 67 | true | true | 1 | 9 | 24 | 46 | 22 | 24 | null | null |
ardumont/category-theory-lab | app/Main.hs | gpl-3.0 | n FS = X6 | 10 | n FS = X6 | 10 | n FS = X6 | 10 | false | false | 0 | 4 | 4 | 10 | 4 | 6 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs | bsd-3-clause | (=<<) :: _ => _
(=<<) = (P.=<<) | 31 | (=<<) :: _ => _
(=<<) = (P.=<<) | 31 | (=<<) = (P.=<<) | 15 | false | true | 0 | 7 | 7 | 31 | 16 | 15 | null | null |
shlevy/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ [res] UnsafeFreezeArrayArrayOp [arg]
= emit $ catAGraphs
[ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN0_infoLabel)),
mkAssign (CmmLocal res) arg ] | 174 | emitPrimOp _ [res] UnsafeFreezeArrayArrayOp [arg]
= emit $ catAGraphs
[ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN0_infoLabel)),
mkAssign (CmmLocal res) arg ] | 174 | emitPrimOp _ [res] UnsafeFreezeArrayArrayOp [arg]
= emit $ catAGraphs
[ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN0_infoLabel)),
mkAssign (CmmLocal res) arg ] | 174 | false | false | 3 | 11 | 35 | 68 | 31 | 37 | null | null |
sherwoodwang/wxHaskell | wx/src/Graphics/UI/WX/Menu.hs | lgpl-2.1 | menuRadioItem :: Menu a -> [Prop (MenuItem ())] -> IO (MenuItem ())
menuRadioItem menu props
= menuItemKind menu wxITEM_RADIO ([checked := True] ++ props) | 156 | menuRadioItem :: Menu a -> [Prop (MenuItem ())] -> IO (MenuItem ())
menuRadioItem menu props
= menuItemKind menu wxITEM_RADIO ([checked := True] ++ props) | 156 | menuRadioItem menu props
= menuItemKind menu wxITEM_RADIO ([checked := True] ++ props) | 88 | false | true | 0 | 11 | 25 | 73 | 36 | 37 | null | null |
m00nlight/99-problems | miscellaneous/sieveArray.hs | bsd-3-clause | run2 f n = length (f n) | 23 | run2 f n = length (f n) | 23 | run2 f n = length (f n) | 23 | false | false | 1 | 7 | 6 | 24 | 9 | 15 | null | null |
svenssonjoel/EmbArBB | Samples/sobel.hs | bsd-3-clause | gx :: Exp Word8 -> Exp Float
gx x = foldl (+) 0
$ P.zipWith (*) [toFloat (getNeighbor2D x a b) / 255
| (a,b) <- s1] coeffs | 151 | gx :: Exp Word8 -> Exp Float
gx x = foldl (+) 0
$ P.zipWith (*) [toFloat (getNeighbor2D x a b) / 255
| (a,b) <- s1] coeffs | 149 | gx x = foldl (+) 0
$ P.zipWith (*) [toFloat (getNeighbor2D x a b) / 255
| (a,b) <- s1] coeffs | 120 | false | true | 0 | 11 | 56 | 80 | 41 | 39 | null | null |
ssaavedra/liquidhaskell | tests/todo/InlineMeasure.hs | bsd-3-clause | {-@ measure mmax @-}
mmax :: (Int, Int) -> Int
mmax (x,y) = if x > y then x else y | 88 | mmax :: (Int, Int) -> Int
mmax (x,y) = if x > y then x else y | 67 | mmax (x,y) = if x > y then x else y | 35 | true | true | 0 | 6 | 26 | 43 | 25 | 18 | null | null |
gbaz/cabal | cabal-install/Distribution/Client/Install.hs | bsd-3-clause | reportPlanningFailure :: Verbosity -> InstallArgs -> InstallContext -> String
-> IO ()
reportPlanningFailure verbosity
(_, _, comp, platform, _, _, _
,_, configFlags, _, installFlags, _)
(_, sourcePkgDb, _, _, pkgSpecifiers, _)
message = do
when reportFailure $ do
-- Only create re... | 1,818 | reportPlanningFailure :: Verbosity -> InstallArgs -> InstallContext -> String
-> IO ()
reportPlanningFailure verbosity
(_, _, comp, platform, _, _, _
,_, configFlags, _, installFlags, _)
(_, sourcePkgDb, _, _, pkgSpecifiers, _)
message = do
when reportFailure $ do
-- Only create re... | 1,818 | reportPlanningFailure verbosity
(_, _, comp, platform, _, _, _
,_, configFlags, _, installFlags, _)
(_, sourcePkgDb, _, _, pkgSpecifiers, _)
message = do
when reportFailure $ do
-- Only create reports for explicitly named packages
let pkgids = filter
(SourcePackageIndex.elemByPackageId (pa... | 1,709 | false | true | 0 | 21 | 506 | 375 | 191 | 184 | null | null |
higgsd/euler | hs/43.hs | bsd-2-clause | sumAll = sum $ map (fromDigits.reverse) $
genDigits [] [0..9] (1:1:1:primeSieve 1000) | 94 | sumAll = sum $ map (fromDigits.reverse) $
genDigits [] [0..9] (1:1:1:primeSieve 1000) | 94 | sumAll = sum $ map (fromDigits.reverse) $
genDigits [] [0..9] (1:1:1:primeSieve 1000) | 94 | false | false | 0 | 10 | 20 | 54 | 27 | 27 | null | null |
facebookincubator/duckling | Duckling/Ordinal/ML/Corpus.hs | bsd-3-clause | corpus :: Corpus
corpus = (context, testOptions, allExamples) | 61 | corpus :: Corpus
corpus = (context, testOptions, allExamples) | 61 | corpus = (context, testOptions, allExamples) | 44 | false | true | 0 | 6 | 7 | 27 | 13 | 14 | null | null |
kseo/fp | src/FP/Function.hs | bsd-3-clause | divide :: Object -> Object
divide (SequenceObject [AtomObject (NumberAtom x), AtomObject (NumberAtom y)]) =
if y == 0
then Bottom
else makeNumber $ x `div` y | 175 | divide :: Object -> Object
divide (SequenceObject [AtomObject (NumberAtom x), AtomObject (NumberAtom y)]) =
if y == 0
then Bottom
else makeNumber $ x `div` y | 175 | divide (SequenceObject [AtomObject (NumberAtom x), AtomObject (NumberAtom y)]) =
if y == 0
then Bottom
else makeNumber $ x `div` y | 148 | false | true | 0 | 11 | 43 | 70 | 37 | 33 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_TEXTURE_2D_ARRAY_EXT :: GLenum
gl_TEXTURE_2D_ARRAY_EXT = 0x8C1A | 66 | gl_TEXTURE_2D_ARRAY_EXT :: GLenum
gl_TEXTURE_2D_ARRAY_EXT = 0x8C1A | 66 | gl_TEXTURE_2D_ARRAY_EXT = 0x8C1A | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rayl/gedcom-tools | Main.hs | bsd-3-clause | rENDL = chk "ENDL" | 18 | rENDL = chk "ENDL" | 18 | rENDL = chk "ENDL" | 18 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
rad1al/hutton_exercises | ch11.hs | gpl-2.0 | -- clear screen --
cls :: IO ()
cls = putStr "\ESC[2J" | 54 | cls :: IO ()
cls = putStr "\ESC[2J" | 35 | cls = putStr "\ESC[2J" | 22 | true | true | 0 | 7 | 11 | 26 | 11 | 15 | null | null |
skeskinen/FTGL | Graphics/Rendering/FTGL.hs | bsd-2-clause | marshalTextAlignment :: TextAlignment -> CInt
marshalTextAlignment AlignLeft = 0 | 80 | marshalTextAlignment :: TextAlignment -> CInt
marshalTextAlignment AlignLeft = 0 | 80 | marshalTextAlignment AlignLeft = 0 | 34 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
pbl64k/HackerRank-Contests | 2014-06-20-FP/BoleynSalary/bs.accepted.hs | bsd-2-clause | ordr cs acc n = Fld.foldr (\x acc -> ordr cs acc x) (n : acc) (cs ! n) | 70 | ordr cs acc n = Fld.foldr (\x acc -> ordr cs acc x) (n : acc) (cs ! n) | 70 | ordr cs acc n = Fld.foldr (\x acc -> ordr cs acc x) (n : acc) (cs ! n) | 70 | false | false | 0 | 8 | 18 | 53 | 27 | 26 | null | null |
scvalex/daemonize-doublefork | System/Posix/Daemon.hs | gpl-3.0 | -- | Double-fork to create a well behaved daemon. If PIDFILE is
-- given, check/set pidfile; if we cannot obtain a lock on the file,
-- another process is already using it, so fail. The program is
-- started with @SIGHUP@ masked; HANDLER is invoked on @SIGHUP@.
--
-- See: <http://www.enderunix.org/docs/eng/daemon.php... | 2,775 | startDaemon :: FilePath -- ^ PIDFILE
-> IO () -- ^ HANDLER
-> IO () -- ^ PROGRAM
-> IO ()
startDaemon pidFile handler program = do
checkRunning
_ <- forkProcess p -- fork first child...
exitImmediately ExitSuccess -- ...and exit
wh... | 2,006 | startDaemon pidFile handler program = do
checkRunning
_ <- forkProcess p -- fork first child...
exitImmediately ExitSuccess -- ...and exit
where
p = do
_ <- createSession -- create a new session and make
-- this process its leader; see
... | 1,850 | true | true | 5 | 16 | 890 | 455 | 224 | 231 | null | null |
kadena-io/pact | src-tool/Pact/Analyze/Feature.hs | bsd-3-clause | -- Pattern synonyms for matching on symbol names
symIs :: Feature -> Text -> Bool
symIs feat sym = symbol feat == sym | 118 | symIs :: Feature -> Text -> Bool
symIs feat sym = symbol feat == sym | 68 | symIs feat sym = symbol feat == sym | 35 | true | true | 0 | 8 | 23 | 38 | 17 | 21 | null | null |
PipocaQuemada/ermine | src/Ermine/Parser/Resolver.hs | bsd-2-clause | fixityTypeGlobals :: Module -> HashMap Text Global
fixityTypeGlobals = fixityGlobals TypeLevel | 94 | fixityTypeGlobals :: Module -> HashMap Text Global
fixityTypeGlobals = fixityGlobals TypeLevel | 94 | fixityTypeGlobals = fixityGlobals TypeLevel | 43 | false | true | 0 | 7 | 10 | 28 | 12 | 16 | null | null |
joehillen/aura | src/Aura/Pkgbuild/Base.hs | gpl-3.0 | depends :: Namespace -> [String]
depends = flip value "depends" | 63 | depends :: Namespace -> [String]
depends = flip value "depends" | 63 | depends = flip value "depends" | 30 | false | true | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
conal/hermit | src/HERMIT/Libraries/Int.hs | bsd-2-clause | {-
Defines the following lemmas:
forall n m. (m == n) = (n == m)
forall n m. (m < n ) = (n > m)
forall n m. (m <= n) = (n >= m)
forall n m. (m >= n) = (n < m)
forall n m. (m <= n) = False => (m == n) = False
forall n m. (m == n) = True => (m <= n) = True
forall n m. (min n m) = (min m n)
forall n m. (m... | 2,841 | lemmas :: LemmaLibrary
lemmas = do
intTy <- findTypeT "Prelude.Int"
nId <- constT $ newIdH "n" intTy
mId <- constT $ newIdH "m" intTy
let n = varToCoreExpr nId
m = varToCoreExpr mId
#if __GLASGOW_HASKELL__ > 710
appTo i e = return $ mkCoreApp (text "appTo") (varToCoreExpr i) e
#else
... | 2,425 | lemmas = do
intTy <- findTypeT "Prelude.Int"
nId <- constT $ newIdH "n" intTy
mId <- constT $ newIdH "m" intTy
let n = varToCoreExpr nId
m = varToCoreExpr mId
#if __GLASGOW_HASKELL__ > 710
appTo i e = return $ mkCoreApp (text "appTo") (varToCoreExpr i) e
#else
appTo i e = retur... | 2,402 | true | true | 0 | 21 | 849 | 812 | 403 | 409 | null | null |
nominolo/haddock2 | tests/unit-tests/parsetests.hs | bsd-2-clause | tests :: [ParseTest]
tests = [
ParseTest {
input = "foobar"
, result = Just $ DocParagraph $ DocString "foobar\n"
}
, ParseTest {
input = "foobar\n\nghci> fib 10\n55"
, result = Just $ DocAppend (DocParagraph $ DocString "foobar\n") (DocExamples $ [Example "fib 10" ["55"]])
}
, P... | 692 | tests :: [ParseTest]
tests = [
ParseTest {
input = "foobar"
, result = Just $ DocParagraph $ DocString "foobar\n"
}
, ParseTest {
input = "foobar\n\nghci> fib 10\n55"
, result = Just $ DocAppend (DocParagraph $ DocString "foobar\n") (DocExamples $ [Example "fib 10" ["55"]])
}
, P... | 692 | tests = [
ParseTest {
input = "foobar"
, result = Just $ DocParagraph $ DocString "foobar\n"
}
, ParseTest {
input = "foobar\n\nghci> fib 10\n55"
, result = Just $ DocAppend (DocParagraph $ DocString "foobar\n") (DocExamples $ [Example "fib 10" ["55"]])
}
, ParseTest {
inpu... | 671 | false | true | 0 | 15 | 193 | 191 | 107 | 84 | null | null |
mettekou/ghc | compiler/basicTypes/SrcLoc.hs | bsd-3-clause | srcSpanFirstCharacter (RealSrcSpan span) = RealSrcSpan $ mkRealSrcSpan loc1 loc2
where
loc1@(SrcLoc f l c) = realSrcSpanStart span
loc2 = SrcLoc f l (c+1)
{-
************************************************************************
* *
\subse... | 581 | srcSpanFirstCharacter (RealSrcSpan span) = RealSrcSpan $ mkRealSrcSpan loc1 loc2
where
loc1@(SrcLoc f l c) = realSrcSpanStart span
loc2 = SrcLoc f l (c+1)
{-
************************************************************************
* *
\subse... | 581 | srcSpanFirstCharacter (RealSrcSpan span) = RealSrcSpan $ mkRealSrcSpan loc1 loc2
where
loc1@(SrcLoc f l c) = realSrcSpanStart span
loc2 = SrcLoc f l (c+1)
{-
************************************************************************
* *
\subse... | 581 | false | false | 2 | 8 | 193 | 78 | 35 | 43 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | mapTreeConstrs :: (c -> d) -> CondTree v c a -> CondTree v d a
mapTreeConstrs f = mapCondTree id f id | 101 | mapTreeConstrs :: (c -> d) -> CondTree v c a -> CondTree v d a
mapTreeConstrs f = mapCondTree id f id | 101 | mapTreeConstrs f = mapCondTree id f id | 38 | false | true | 0 | 8 | 21 | 54 | 25 | 29 | null | null |
zerobuzz/servant | servant-server/test/Servant/ServerSpec.hs | bsd-3-clause | captureSpec :: Spec
captureSpec = do
describe "Servant.API.Capture" $ do
with (return (serve captureApi captureServer)) $ do
it "can capture parts of the 'pathInfo'" $ do
response <- get "/2"
liftIO $ decode' (simpleBody response) `shouldBe` Just tweety
it "returns 400 if the decodin... | 930 | captureSpec :: Spec
captureSpec = do
describe "Servant.API.Capture" $ do
with (return (serve captureApi captureServer)) $ do
it "can capture parts of the 'pathInfo'" $ do
response <- get "/2"
liftIO $ decode' (simpleBody response) `shouldBe` Just tweety
it "returns 400 if the decodin... | 930 | captureSpec = do
describe "Servant.API.Capture" $ do
with (return (serve captureApi captureServer)) $ do
it "can capture parts of the 'pathInfo'" $ do
response <- get "/2"
liftIO $ decode' (simpleBody response) `shouldBe` Just tweety
it "returns 400 if the decoding fails" $ do
... | 910 | false | true | 0 | 22 | 197 | 240 | 117 | 123 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_207 (54#) = happyGoto action_359 | 39 | action_207 (54#) = happyGoto action_359 | 39 | action_207 (54#) = happyGoto action_359 | 39 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Lupino/dispatch-article | src/Article/Router/Helper.hs | bsd-3-clause | articles :: (HasMySQL u, HasOtherEnv Cache u) => ActionH u w (ListResult Article)
articles = articles' s t
where s = flip' getArticleList $ desc "id"
t = countArticle | 176 | articles :: (HasMySQL u, HasOtherEnv Cache u) => ActionH u w (ListResult Article)
articles = articles' s t
where s = flip' getArticleList $ desc "id"
t = countArticle | 176 | articles = articles' s t
where s = flip' getArticleList $ desc "id"
t = countArticle | 94 | false | true | 1 | 8 | 38 | 70 | 34 | 36 | null | null |
gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/tests/test-nqueens.hs | bsd-2-clause | remdups :: (Eq a) => [a] -> [a] -- {{{
remdups [] = [] | 56 | remdups :: (Eq a) => [a] -> [a]
remdups [] = [] | 49 | remdups [] = [] | 17 | true | true | 0 | 7 | 15 | 38 | 21 | 17 | null | null |
danchoi/sqltmpl | Main.hs | mit | escapeStringLiteral [] = [] | 27 | escapeStringLiteral [] = [] | 27 | escapeStringLiteral [] = [] | 27 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
WSCU/JSEuterpea | Euterpea Examples/Basics.hs | gpl-3.0 | rumSnare = rhythm " * * " (e acousticSnare)
| 47 | drumSnare = rhythm " * * " (e acousticSnare) | 47 | drumSnare = rhythm " * * " (e acousticSnare) | 47 | false | false | 1 | 7 | 12 | 20 | 8 | 12 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/GHC/Unicode.hs | bsd-3-clause | toTitle c = chr (fromIntegral (towtitle (fromIntegral (ord c)))) | 64 | toTitle c = chr (fromIntegral (towtitle (fromIntegral (ord c)))) | 64 | toTitle c = chr (fromIntegral (towtitle (fromIntegral (ord c)))) | 64 | false | false | 1 | 13 | 8 | 40 | 17 | 23 | null | null |
brendanhay/gogol | gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs | mpl-2.0 | -- | Specifies the format of the policy.Valid values are 0, 1, and 3.
-- Requests that specify an invalid value are rejected.Any operation that
-- affects conditional role bindings must specify version 3. This
-- requirement applies to the following operations: Getting a policy that
-- includes a conditional role bindi... | 1,212 | pVersion :: Lens' Policy (Maybe Int32)
pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce | 118 | pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce | 79 | true | true | 0 | 10 | 202 | 69 | 42 | 27 | null | null |
utky/budget | app/Main.hs | bsd-3-clause | parseDatapath :: [String] -> String
parseDatapath [] = ":memory:" | 80 | parseDatapath :: [String] -> String
parseDatapath [] = ":memory:" | 80 | parseDatapath [] = ":memory:" | 44 | false | true | 0 | 6 | 23 | 23 | 12 | 11 | null | null |
vito/atomo | src/Atomo/Kernel/Expression.hs | bsd-3-clause | load :: VM ()
load = do
[p|`Block new: (es: List)|] =::: [e|`Block new: es arguments: []|]
[p|`Block new: (es: List) arguments: (as: List)|] =: do
es <- getList [e|es|] >>= mapM findExpression
as <- getList [e|as|] >>=
mapM (\e -> findExpression e >>= toPattern' . fromExpression)
... | 11,615 | load :: VM ()
load = do
[p|`Block new: (es: List)|] =::: [e|`Block new: es arguments: []|]
[p|`Block new: (es: List) arguments: (as: List)|] =: do
es <- getList [e|es|] >>= mapM findExpression
as <- getList [e|as|] >>=
mapM (\e -> findExpression e >>= toPattern' . fromExpression)
... | 11,615 | load = do
[p|`Block new: (es: List)|] =::: [e|`Block new: es arguments: []|]
[p|`Block new: (es: List) arguments: (as: List)|] =: do
es <- getList [e|es|] >>= mapM findExpression
as <- getList [e|as|] >>=
mapM (\e -> findExpression e >>= toPattern' . fromExpression)
return (... | 11,601 | false | true | 0 | 22 | 3,920 | 3,851 | 1,911 | 1,940 | null | null |
ekr/tamarin-prover | lib/theory/src/Theory/Tools/Wellformedness.hs | gpl-3.0 | multRestrictedReport :: OpenTheory -> WfErrorReport
multRestrictedReport thy = do
ru <- theoryRules thy
(,) "multiplication restriction of rules" <$>
case restrictedFailures ru of
([],[]) -> []
(mults, unbounds) ->
return $
(text "The following rule is n... | 2,855 | multRestrictedReport :: OpenTheory -> WfErrorReport
multRestrictedReport thy = do
ru <- theoryRules thy
(,) "multiplication restriction of rules" <$>
case restrictedFailures ru of
([],[]) -> []
(mults, unbounds) ->
return $
(text "The following rule is n... | 2,855 | multRestrictedReport thy = do
ru <- theoryRules thy
(,) "multiplication restriction of rules" <$>
case restrictedFailures ru of
([],[]) -> []
(mults, unbounds) ->
return $
(text "The following rule is not multiplication restricted:")
$-$ ... | 2,803 | false | true | 0 | 21 | 926 | 762 | 380 | 382 | null | null |
osa1/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTermNames (PInferRef _ _ n) = [n] | 42 | extractPTermNames (PInferRef _ _ n) = [n] | 42 | extractPTermNames (PInferRef _ _ n) = [n] | 42 | false | false | 0 | 7 | 7 | 22 | 11 | 11 | null | null |
vdweegen/UvA-Software_Testing | Lab6/Bauke/Lecture6.hs | gpl-3.0 | decipher :: Integer -> Integer
decipher = decode secret bound | 61 | decipher :: Integer -> Integer
decipher = decode secret bound | 61 | decipher = decode secret bound | 30 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFRulesetTest.hs | lgpl-2.1 | u_p1 = Res (makeScopedName "" "http://example.org/" "p1") | 58 | u_p1 = Res (makeScopedName "" "http://example.org/" "p1") | 58 | u_p1 = Res (makeScopedName "" "http://example.org/" "p1") | 58 | false | false | 1 | 7 | 7 | 23 | 9 | 14 | null | null |
joelburget/haste-compiler | src/Data/JSTarget/Print.hs | bsd-3-clause | neg (BinOp Neq a b) = Just $ BinOp Eq a b | 41 | neg (BinOp Neq a b) = Just $ BinOp Eq a b | 41 | neg (BinOp Neq a b) = Just $ BinOp Eq a b | 41 | false | false | 2 | 6 | 11 | 32 | 14 | 18 | null | null |
andrewthad/vinyl-vectors | src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic.hs | bsd-3-clause | -- | /O(n)/ Right fold (function applied to each element and its index)
ifoldr :: G.Vector Vector (Rec Identity rs)
=> (Int -> Rec Identity rs -> r -> r) -> r -> Vector (Rec Identity rs) -> r
ifoldr = G.ifoldr | 211 | ifoldr :: G.Vector Vector (Rec Identity rs)
=> (Int -> Rec Identity rs -> r -> r) -> r -> Vector (Rec Identity rs) -> r
ifoldr = G.ifoldr | 139 | ifoldr = G.ifoldr | 17 | true | true | 4 | 8 | 43 | 80 | 38 | 42 | null | null |
avieth/diplomacy | Diplomacy/SVGMap.hs | bsd-3-clause | provinceElement (Normal Rome) = S.polygon ! A.points "247,442 248,447 256,458 271,464 279,458 280,455 279,451 274,447 263,434 250,438" | 134 | provinceElement (Normal Rome) = S.polygon ! A.points "247,442 248,447 256,458 271,464 279,458 280,455 279,451 274,447 263,434 250,438" | 134 | provinceElement (Normal Rome) = S.polygon ! A.points "247,442 248,447 256,458 271,464 279,458 280,455 279,451 274,447 263,434 250,438" | 134 | false | false | 0 | 7 | 16 | 27 | 12 | 15 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M08/D25/Solution.hs | mit | -- actually, the concept of 'monthly' can get messy. We'll handle this manually
-- for now, but ...
addMonth :: Day -> Day
addMonth (toGregorian -> (yr, m, d)) =
let (yrp, newm) = m `divMod` 12
in fromGregorian (yr + fromIntegral yrp) (newm + 1) d | 255 | addMonth :: Day -> Day
addMonth (toGregorian -> (yr, m, d)) =
let (yrp, newm) = m `divMod` 12
in fromGregorian (yr + fromIntegral yrp) (newm + 1) d | 154 | addMonth (toGregorian -> (yr, m, d)) =
let (yrp, newm) = m `divMod` 12
in fromGregorian (yr + fromIntegral yrp) (newm + 1) d | 131 | true | true | 0 | 10 | 54 | 84 | 46 | 38 | null | null |
JustinUnger/haskell-book | ch9/ch9-ex.hs | mit | squishMap :: (a -> [b]) -> [a] -> [b]
squishMap _ [] = [] | 57 | squishMap :: (a -> [b]) -> [a] -> [b]
squishMap _ [] = [] | 57 | squishMap _ [] = [] | 19 | false | true | 0 | 9 | 13 | 50 | 25 | 25 | null | null |
taylor1791/adventofcode | 2015/src/Day14.hs | bsd-2-clause | -- Part 1
leadingDeer :: Time -> [(String, [(Rate, Period)])] -> (String, Distance)
leadingDeer time = maximumBy (\(_, x) (_, y) -> compare x y) . map (fmap (distance time)) | 174 | leadingDeer :: Time -> [(String, [(Rate, Period)])] -> (String, Distance)
leadingDeer time = maximumBy (\(_, x) (_, y) -> compare x y) . map (fmap (distance time)) | 163 | leadingDeer time = maximumBy (\(_, x) (_, y) -> compare x y) . map (fmap (distance time)) | 89 | true | true | 0 | 10 | 30 | 96 | 54 | 42 | null | null |
Hara-Laboratory/subleq-mips | TestRFix2.hs | gpl-3.0 | prop_Addrh :: SubleqUWord -> SubleqUWord -> SubleqUWord -> Bool
prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2)
where
d = fromIntegral rd
t = fromIntegral rt
s = fromIntegral rs
[rd', rt', rs'] = map fromIntegral $ executeSubroutine "addr... | 358 | prop_Addrh :: SubleqUWord -> SubleqUWord -> SubleqUWord -> Bool
prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2)
where
d = fromIntegral rd
t = fromIntegral rt
s = fromIntegral rs
[rd', rt', rs'] = map fromIntegral $ executeSubroutine "addr... | 358 | prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2)
where
d = fromIntegral rd
t = fromIntegral rt
s = fromIntegral rs
[rd', rt', rs'] = map fromIntegral $ executeSubroutine "addrhTest" $ map fromIntegral [rd, rt, rs] | 294 | false | true | 0 | 12 | 86 | 156 | 84 | 72 | null | null |
lynchronan/haskoin-crypto | src/Haskoin/Crypto/ECDSA.hs | unlicense | verifyMessage h (Signature r s) q =
case getAffine p of
Nothing -> False
-- 4.1.4.7 / 4.1.4.8
(Just (x,_)) -> (toFieldN x) == r
where
-- 4.1.4.2 / 4.1.4.3
e = toFieldN h
-- 4.1.4.4
s' = inverseN s
u1 = e*s'
u2 = r*s'
-- 4.1.... | 393 | verifyMessage h (Signature r s) q =
case getAffine p of
Nothing -> False
-- 4.1.4.7 / 4.1.4.8
(Just (x,_)) -> (toFieldN x) == r
where
-- 4.1.4.2 / 4.1.4.3
e = toFieldN h
-- 4.1.4.4
s' = inverseN s
u1 = e*s'
u2 = r*s'
-- 4.1.... | 393 | verifyMessage h (Signature r s) q =
case getAffine p of
Nothing -> False
-- 4.1.4.7 / 4.1.4.8
(Just (x,_)) -> (toFieldN x) == r
where
-- 4.1.4.2 / 4.1.4.3
e = toFieldN h
-- 4.1.4.4
s' = inverseN s
u1 = e*s'
u2 = r*s'
-- 4.1.... | 393 | false | false | 4 | 10 | 163 | 127 | 64 | 63 | null | null |
christiaanb/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | noSpecPrags :: TcSpecPrags
noSpecPrags = SpecPrags [] | 53 | noSpecPrags :: TcSpecPrags
noSpecPrags = SpecPrags [] | 53 | noSpecPrags = SpecPrags [] | 26 | false | true | 0 | 6 | 6 | 23 | 9 | 14 | null | null |
rybak/powers | Test.hs | mit | simpleWorld = [[ 2, 4, 0, 0], emptyRow, emptyRow, emptyRow] | 59 | simpleWorld = [[ 2, 4, 0, 0], emptyRow, emptyRow, emptyRow] | 59 | simpleWorld = [[ 2, 4, 0, 0], emptyRow, emptyRow, emptyRow] | 59 | false | false | 0 | 6 | 9 | 30 | 19 | 11 | null | null |
AlexanderPankiv/ghc | compiler/cmm/PprC.hs | bsd-3-clause | te_Reg _ = return () | 31 | te_Reg _ = return () | 31 | te_Reg _ = return () | 31 | false | false | 0 | 5 | 15 | 15 | 6 | 9 | null | null |
reckbo/ppl | pipeline-lib/MABS.hs | bsd-3-clause | register :: FilePath
-> FilePath
-> (FilePath,FilePath)
-> FilePath
-> Action FilePath
register antsPath outdir (moving, movingMask) fixed
= let outMask = outdir </> (intercalate "-" ["Mask"
,takeBaseName movingMask
... | 513 | register :: FilePath
-> FilePath
-> (FilePath,FilePath)
-> FilePath
-> Action FilePath
register antsPath outdir (moving, movingMask) fixed
= let outMask = outdir </> (intercalate "-" ["Mask"
,takeBaseName movingMask
... | 513 | register antsPath outdir (moving, movingMask) fixed
= let outMask = outdir </> (intercalate "-" ["Mask"
,takeBaseName movingMask
,"in"
,takeBaseName moving]) <.> "nii.gz"
in wi... | 390 | false | true | 0 | 14 | 231 | 118 | 61 | 57 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/Haddock.hs | bsd-3-clause | haddock pkg_descr lbi suffixes flags' = do
let verbosity = flag haddockVerbosity
comp = compiler lbi
platform = hostPlatform lbi
flags = case haddockTarget of
ForDevelopment -> flags'
ForHackage -> flags'
{ haddockHoogle = Flag True
... | 5,146 | haddock pkg_descr lbi suffixes flags' = do
let verbosity = flag haddockVerbosity
comp = compiler lbi
platform = hostPlatform lbi
flags = case haddockTarget of
ForDevelopment -> flags'
ForHackage -> flags'
{ haddockHoogle = Flag True
... | 5,146 | haddock pkg_descr lbi suffixes flags' = do
let verbosity = flag haddockVerbosity
comp = compiler lbi
platform = hostPlatform lbi
flags = case haddockTarget of
ForDevelopment -> flags'
ForHackage -> flags'
{ haddockHoogle = Flag True
... | 5,146 | false | false | 0 | 26 | 1,608 | 1,139 | 547 | 592 | null | null |
wjzz/GoStat | src/Server.hs | bsd-3-clause | fetchLang :: ServerPart Messages
fetchLang = do
langStr <- look "lang" `mplus` (return "pl")
return $ case langStr of
"pl" -> pl
_ -> eng | 169 | fetchLang :: ServerPart Messages
fetchLang = do
langStr <- look "lang" `mplus` (return "pl")
return $ case langStr of
"pl" -> pl
_ -> eng | 169 | fetchLang = do
langStr <- look "lang" `mplus` (return "pl")
return $ case langStr of
"pl" -> pl
_ -> eng | 136 | false | true | 0 | 10 | 56 | 59 | 29 | 30 | null | null |
facebookincubator/duckling | Duckling/Time/ZH/Rules.hs | bsd-3-clause | ruleHalfAfterpastNoonmidnight :: Rule
ruleHalfAfterpastNoonmidnight = Rule
{ name = "half after|past noon|midnight"
, pattern =
[ Predicate isMidnightOrNoon
, regex "过"
, regex "半"
]
, prod = \tokens -> case tokens of
(Token Time TimeData {TTime.form = Just (TTime.TimeOfDay (Just hours) _)}:... | 386 | ruleHalfAfterpastNoonmidnight :: Rule
ruleHalfAfterpastNoonmidnight = Rule
{ name = "half after|past noon|midnight"
, pattern =
[ Predicate isMidnightOrNoon
, regex "过"
, regex "半"
]
, prod = \tokens -> case tokens of
(Token Time TimeData {TTime.form = Just (TTime.TimeOfDay (Just hours) _)}:... | 386 | ruleHalfAfterpastNoonmidnight = Rule
{ name = "half after|past noon|midnight"
, pattern =
[ Predicate isMidnightOrNoon
, regex "过"
, regex "半"
]
, prod = \tokens -> case tokens of
(Token Time TimeData {TTime.form = Just (TTime.TimeOfDay (Just hours) _)}:
_) -> tt $ hourMinute True hou... | 348 | false | true | 0 | 22 | 97 | 127 | 66 | 61 | null | null |
taruti/diagrams-cairo-raster | site/site.hs | bsd-3-clause | tmplCtx :: Context String
tmplCtx =
dateField "date" "%Y-%m-%d" <>
defaultContext | 89 | tmplCtx :: Context String
tmplCtx =
dateField "date" "%Y-%m-%d" <>
defaultContext | 89 | tmplCtx =
dateField "date" "%Y-%m-%d" <>
defaultContext | 63 | false | true | 1 | 6 | 18 | 28 | 11 | 17 | null | null |
evgenim/tm | src/TM/Time.hs | gpl-3.0 | hour = 60 * 60 | 16 | hour = 60 * 60 | 16 | hour = 60 * 60 | 16 | false | false | 2 | 5 | 6 | 15 | 5 | 10 | null | null |
gallais/potpourri | haskell/hsubst/Context.hs | gpl-3.0 | wkSubstTm :: Subst a b c d -> Subst a (Maybe b) c (Maybe d)
wkSubstTm (SubstDa v u) = SubstDa v (wkTy u) | 104 | wkSubstTm :: Subst a b c d -> Subst a (Maybe b) c (Maybe d)
wkSubstTm (SubstDa v u) = SubstDa v (wkTy u) | 104 | wkSubstTm (SubstDa v u) = SubstDa v (wkTy u) | 44 | false | true | 0 | 8 | 23 | 67 | 32 | 35 | null | null |
keithodulaigh/Hets | Fpl/Sign.hs | gpl-2.0 | addBools :: OpMap -> OpMap
addBools = addOpTo falseC boolType . addOpTo trueC boolType | 86 | addBools :: OpMap -> OpMap
addBools = addOpTo falseC boolType . addOpTo trueC boolType | 86 | addBools = addOpTo falseC boolType . addOpTo trueC boolType | 59 | false | true | 0 | 6 | 13 | 29 | 14 | 15 | null | null |
shlevy/ghc | compiler/basicTypes/IdInfo.hs | bsd-3-clause | isEmptyRuleInfo :: RuleInfo -> Bool
isEmptyRuleInfo (RuleInfo rs _) = null rs | 77 | isEmptyRuleInfo :: RuleInfo -> Bool
isEmptyRuleInfo (RuleInfo rs _) = null rs | 77 | isEmptyRuleInfo (RuleInfo rs _) = null rs | 41 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
brendanhay/gogol | gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Backups/Get.hs | mpl-2.0 | -- | V1 error format.
pibgXgafv :: Lens' ProjectsInstancesBackupsGet (Maybe Xgafv)
pibgXgafv
= lens _pibgXgafv (\ s a -> s{_pibgXgafv = a}) | 141 | pibgXgafv :: Lens' ProjectsInstancesBackupsGet (Maybe Xgafv)
pibgXgafv
= lens _pibgXgafv (\ s a -> s{_pibgXgafv = a}) | 119 | pibgXgafv
= lens _pibgXgafv (\ s a -> s{_pibgXgafv = a}) | 58 | true | true | 1 | 9 | 23 | 50 | 25 | 25 | null | null |
andrzejgorski/pascalis | source/MonadsFunctions.hs | bsd-3-clause | getLine_IO :: MRSIO String
getLine_IO = lift $ lift $ getLine | 61 | getLine_IO :: MRSIO String
getLine_IO = lift $ lift $ getLine | 61 | getLine_IO = lift $ lift $ getLine | 34 | false | true | 4 | 6 | 10 | 30 | 12 | 18 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateApp.hs | mpl-2.0 | -- | The app virtual host settings, with multiple domains separated by commas. For
-- example: ''www.example.com, example.com''
caDomains :: Lens' CreateApp [Text]
caDomains = lens _caDomains (\s a -> s { _caDomains = a }) . _List | 230 | caDomains :: Lens' CreateApp [Text]
caDomains = lens _caDomains (\s a -> s { _caDomains = a }) . _List | 102 | caDomains = lens _caDomains (\s a -> s { _caDomains = a }) . _List | 66 | true | true | 0 | 10 | 37 | 48 | 27 | 21 | null | null |
shlevy/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mkWpLams :: [Var] -> HsWrapper
mkWpLams ids = mk_co_lam_fn WpEvLam ids | 70 | mkWpLams :: [Var] -> HsWrapper
mkWpLams ids = mk_co_lam_fn WpEvLam ids | 70 | mkWpLams ids = mk_co_lam_fn WpEvLam ids | 39 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
elieux/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | mkParent :: Name -> AvailInfo -> Parent
mkParent _ (Avail NotPatSyn _) = NoParent | 91 | mkParent :: Name -> AvailInfo -> Parent
mkParent _ (Avail NotPatSyn _) = NoParent | 91 | mkParent _ (Avail NotPatSyn _) = NoParent | 51 | false | true | 0 | 7 | 23 | 32 | 16 | 16 | null | null |
brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Snapshots/Get.hs | mpl-2.0 | -- | OAuth access token.
snaAccessToken :: Lens' SnapshotsGet (Maybe Text)
snaAccessToken
= lens _snaAccessToken
(\ s a -> s{_snaAccessToken = a}) | 154 | snaAccessToken :: Lens' SnapshotsGet (Maybe Text)
snaAccessToken
= lens _snaAccessToken
(\ s a -> s{_snaAccessToken = a}) | 129 | snaAccessToken
= lens _snaAccessToken
(\ s a -> s{_snaAccessToken = a}) | 79 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x2F801' = "\x4E38" | 34 | decomposeChar '\x2F801' = "\x4E38" | 34 | decomposeChar '\x2F801' = "\x4E38" | 34 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
scottgw/language-eiffel | Language/Eiffel/Parser/Typ.hs | bsd-3-clause | attTyp :: Parser Typ
attTyp = keyword TokAttached >> (likeTyp <|> baseTyp) | 74 | attTyp :: Parser Typ
attTyp = keyword TokAttached >> (likeTyp <|> baseTyp) | 74 | attTyp = keyword TokAttached >> (likeTyp <|> baseTyp) | 53 | false | true | 1 | 8 | 11 | 32 | 14 | 18 | null | null |
jtdaugherty/vty | src/Graphics/Vty/Attributes.hs | bsd-3-clause | hasStyle :: Style -> Style -> Bool
hasStyle s bitMask = ( s .&. bitMask ) /= 0 | 78 | hasStyle :: Style -> Style -> Bool
hasStyle s bitMask = ( s .&. bitMask ) /= 0 | 78 | hasStyle s bitMask = ( s .&. bitMask ) /= 0 | 43 | false | true | 0 | 8 | 17 | 41 | 19 | 22 | null | null |
haskoin/haskoin | src/Haskoin/Script/SigHash.hs | unlicense | -- | Is the SIGHASH_ANYONECANPAY flag set?
hasAnyoneCanPayFlag :: SigHash -> Bool
hasAnyoneCanPayFlag = (/= 0) . (.&. sigHashAnyoneCanPay) | 138 | hasAnyoneCanPayFlag :: SigHash -> Bool
hasAnyoneCanPayFlag = (/= 0) . (.&. sigHashAnyoneCanPay) | 95 | hasAnyoneCanPayFlag = (/= 0) . (.&. sigHashAnyoneCanPay) | 56 | true | true | 0 | 6 | 18 | 28 | 17 | 11 | null | null |
supermario/stack | src/Stack/Types/Config.hs | bsd-3-clause | minimalEnvSettings :: EnvSettings
minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 196 | minimalEnvSettings :: EnvSettings
minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 196 | minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 162 | false | true | 0 | 6 | 46 | 37 | 23 | 14 | null | null |
stephenjbarr/gradebot | Gradebot.hs | mit | indivQuestionReport :: QFeedback -> GMap -> String
indivQuestionReport = makeCodeReport_Q | 89 | indivQuestionReport :: QFeedback -> GMap -> String
indivQuestionReport = makeCodeReport_Q | 89 | indivQuestionReport = makeCodeReport_Q | 38 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
tensorflow/haskell | tensorflow-records/tests/Main.hs | apache-2.0 | -- There's no (Arbitrary BL.ByteString), so pack it from a list of chunks.
propEncodeDecodeInverse :: [[Word8]] -> Bool
propEncodeDecodeInverse s =
let bs = BL.fromChunks . fmap B.pack $ s
in runGet getTFRecord (runPut (putTFRecord bs)) == Right bs | 257 | propEncodeDecodeInverse :: [[Word8]] -> Bool
propEncodeDecodeInverse s =
let bs = BL.fromChunks . fmap B.pack $ s
in runGet getTFRecord (runPut (putTFRecord bs)) == Right bs | 182 | propEncodeDecodeInverse s =
let bs = BL.fromChunks . fmap B.pack $ s
in runGet getTFRecord (runPut (putTFRecord bs)) == Right bs | 137 | true | true | 0 | 12 | 47 | 79 | 38 | 41 | null | null |
willprice/camle-compiler | src/Language/Camle/JouetteBackend.hs | mit | modifyCode :: (Code -> Code) -> ASMGen ()
modifyCode fn = modify $ \s -> s { code = fn $ code s } | 97 | modifyCode :: (Code -> Code) -> ASMGen ()
modifyCode fn = modify $ \s -> s { code = fn $ code s } | 97 | modifyCode fn = modify $ \s -> s { code = fn $ code s } | 55 | false | true | 0 | 10 | 23 | 54 | 28 | 26 | null | null |
pharpend/puffytools | ptk/Ptk/Journal/ListEntries.hs | bsd-3-clause | slugType :: Type Slug
slugType = Type {parser = \s -> mkSlugEither (pack s)
,name = "JOURNAL_SLUG"
,defaultValue = Nothing} | 155 | slugType :: Type Slug
slugType = Type {parser = \s -> mkSlugEither (pack s)
,name = "JOURNAL_SLUG"
,defaultValue = Nothing} | 155 | slugType = Type {parser = \s -> mkSlugEither (pack s)
,name = "JOURNAL_SLUG"
,defaultValue = Nothing} | 133 | false | true | 0 | 10 | 51 | 48 | 27 | 21 | null | null |
tjakway/ghcjvm | utils/genprimopcode/Main.hs | bsd-3-clause | ppType (TyApp (TyCon "Char#") []) = "charPrimTy" | 54 | ppType (TyApp (TyCon "Char#") []) = "charPrimTy" | 54 | ppType (TyApp (TyCon "Char#") []) = "charPrimTy" | 54 | false | false | 0 | 8 | 12 | 26 | 12 | 14 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110713set5.hs | gpl-3.0 | webdavdir :: WebDAVRemoteDir
webdavdir = WebDAVRemoteDir "paper3/ttbar_TEV_sm_big" | 83 | webdavdir :: WebDAVRemoteDir
webdavdir = WebDAVRemoteDir "paper3/ttbar_TEV_sm_big" | 82 | webdavdir = WebDAVRemoteDir "paper3/ttbar_TEV_sm_big" | 53 | false | true | 0 | 5 | 7 | 14 | 7 | 7 | null | null |
kallisti-dev/hs-webdriver | src/Test/WebDriver/Common/Keys.hs | bsd-3-clause | numpad5 :: Text
numpad5 = "\xe01f" | 34 | numpad5 :: Text
numpad5 = "\xe01f" | 34 | numpad5 = "\xe01f" | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
sdiehl/ghc | compiler/utils/Pretty.hs | bsd-3-clause | -- | Apply 'hang' to the arguments if the first 'Doc' is not empty.
hangNotEmpty :: Doc -> Int -> Doc -> Doc
hangNotEmpty d1 n d2 = if isEmpty d1
then d2
else hang d1 n d2 | 217 | hangNotEmpty :: Doc -> Int -> Doc -> Doc
hangNotEmpty d1 n d2 = if isEmpty d1
then d2
else hang d1 n d2 | 149 | hangNotEmpty d1 n d2 = if isEmpty d1
then d2
else hang d1 n d2 | 108 | true | true | 0 | 7 | 83 | 49 | 25 | 24 | null | null |
ananthakumaran/webify | src/Font.hs | mit | parseNameRecord :: B.ByteString -> Int -> Get NameRecord
parseNameRecord font storageOffset = do
platformId <- getUShort
encodingId <- getUShort
languageId <- getUShort
nameId <- getUShort
strLength <- getUShort
strOffset <- getUShort
let str = decoder platformId encodingId $ substr
(fromInteg... | 617 | parseNameRecord :: B.ByteString -> Int -> Get NameRecord
parseNameRecord font storageOffset = do
platformId <- getUShort
encodingId <- getUShort
languageId <- getUShort
nameId <- getUShort
strLength <- getUShort
strOffset <- getUShort
let str = decoder platformId encodingId $ substr
(fromInteg... | 617 | parseNameRecord font storageOffset = do
platformId <- getUShort
encodingId <- getUShort
languageId <- getUShort
nameId <- getUShort
strLength <- getUShort
strOffset <- getUShort
let str = decoder platformId encodingId $ substr
(fromIntegral ((fromIntegral storageOffset :: Int) + fromIntegral s... | 560 | false | true | 1 | 17 | 128 | 207 | 92 | 115 | null | null |
ivanperez-keera/SoOSiM-ui | src/Graphics/Diagrams/Types.hs | bsd-3-clause | makeColor :: Float -> Float -> Float -> Float -> Color
makeColor = G.makeColor | 78 | makeColor :: Float -> Float -> Float -> Float -> Color
makeColor = G.makeColor | 78 | makeColor = G.makeColor | 23 | false | true | 0 | 8 | 13 | 29 | 15 | 14 | null | null |
pogin503/vbautil | atcoder/beg078/beg078b.hs | mit | solve :: Int -> Int -> Int -> Int -> Int
solve x y z acc =
if quot x ((y + z) * acc + z) == 1 && mod x ((y + z) * acc + z) < y + z
then acc
else solve x y z (acc + 1) | 172 | solve :: Int -> Int -> Int -> Int -> Int
solve x y z acc =
if quot x ((y + z) * acc + z) == 1 && mod x ((y + z) * acc + z) < y + z
then acc
else solve x y z (acc + 1) | 172 | solve x y z acc =
if quot x ((y + z) * acc + z) == 1 && mod x ((y + z) * acc + z) < y + z
then acc
else solve x y z (acc + 1) | 131 | false | true | 0 | 15 | 58 | 122 | 63 | 59 | null | null |
mietek/stack | src/Stack/Docker.hs | bsd-3-clause | pull :: (MonadLogger m,MonadIO m,MonadThrow m) => Config -> m ()
pull config =
do envOverride <- getEnvOverride (configPlatform config)
checkDockerVersion envOverride
pwd <- getWorkingDir
pullImage pwd envOverride docker (dockerImage docker)
where docker = configDocker config
-- | Pull Docker image ... | 334 | pull :: (MonadLogger m,MonadIO m,MonadThrow m) => Config -> m ()
pull config =
do envOverride <- getEnvOverride (configPlatform config)
checkDockerVersion envOverride
pwd <- getWorkingDir
pullImage pwd envOverride docker (dockerImage docker)
where docker = configDocker config
-- | Pull Docker image ... | 334 | pull config =
do envOverride <- getEnvOverride (configPlatform config)
checkDockerVersion envOverride
pwd <- getWorkingDir
pullImage pwd envOverride docker (dockerImage docker)
where docker = configDocker config
-- | Pull Docker image from registry. | 269 | false | true | 0 | 10 | 62 | 103 | 48 | 55 | null | null |
a143753/AOJ | 1137.hs | apache-2.0 | dec2str' dec ((s,v):ts) =
let n = dec `div` v
r = dec `mod` v
c = case n of
0 -> ""
1 -> [s]
otherwise -> (show n) ++ [s]
in
c ++ (dec2str' r ts) | 201 | dec2str' dec ((s,v):ts) =
let n = dec `div` v
r = dec `mod` v
c = case n of
0 -> ""
1 -> [s]
otherwise -> (show n) ++ [s]
in
c ++ (dec2str' r ts) | 201 | dec2str' dec ((s,v):ts) =
let n = dec `div` v
r = dec `mod` v
c = case n of
0 -> ""
1 -> [s]
otherwise -> (show n) ++ [s]
in
c ++ (dec2str' r ts) | 201 | false | false | 0 | 14 | 93 | 107 | 58 | 49 | null | null |
ingemaradahl/bilder | src/TypeChecker/Renamer/Utils.hs | lgpl-3.0 | pushAlias ∷ TCM ()
pushAlias = modify (\st → st { aliases = Map.empty:aliases st}) | 82 | pushAlias ∷ TCM ()
pushAlias = modify (\st → st { aliases = Map.empty:aliases st}) | 82 | pushAlias = modify (\st → st { aliases = Map.empty:aliases st}) | 63 | false | true | 0 | 11 | 14 | 50 | 24 | 26 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QKeySequence.hs | bsd-2-clause | eRedo :: StandardKey
eRedo
= ieStandardKey $ 12 | 49 | eRedo :: StandardKey
eRedo
= ieStandardKey $ 12 | 49 | eRedo
= ieStandardKey $ 12 | 28 | false | true | 0 | 6 | 9 | 22 | 9 | 13 | null | null |
tgdavies/codeworld | funblocks-client/src/Blocks/Types.hs | apache-2.0 | txtLowercase = standardFunction "txtLowercase" "lowercase" Nothing [typeText, typeText]
["TEXT"] colorText "The text in lowercase" | 146 | txtLowercase = standardFunction "txtLowercase" "lowercase" Nothing [typeText, typeText]
["TEXT"] colorText "The text in lowercase" | 146 | txtLowercase = standardFunction "txtLowercase" "lowercase" Nothing [typeText, typeText]
["TEXT"] colorText "The text in lowercase" | 146 | false | false | 1 | 6 | 29 | 36 | 16 | 20 | null | null |
nazrhom/vcs-clojure | src/Oracle/DiffOracle.hs | bsd-3-clause | buildDelInsMap :: [GroupDiffAction] -> DelInsMap
buildDelInsMap [] = (M.empty, M.empty) | 97 | buildDelInsMap :: [GroupDiffAction] -> DelInsMap
buildDelInsMap [] = (M.empty, M.empty) | 97 | buildDelInsMap [] = (M.empty, M.empty) | 48 | false | true | 0 | 6 | 19 | 33 | 18 | 15 | null | null |
databrary/databrary | src/View/Form.hs | agpl-3.0 | inputPassword :: Field
inputPassword ref _ = H.input
H.! HA.type_ "password"
H.! HA.id ref
H.! HA.name ref | 116 | inputPassword :: Field
inputPassword ref _ = H.input
H.! HA.type_ "password"
H.! HA.id ref
H.! HA.name ref | 116 | inputPassword ref _ = H.input
H.! HA.type_ "password"
H.! HA.id ref
H.! HA.name ref | 93 | false | true | 7 | 6 | 26 | 57 | 24 | 33 | null | null |
frantisekfarka/ghc-dsi | libraries/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | ioe_EOF = ioException
(IOError Nothing EOF "" "" Nothing Nothing) | 68 | ioe_EOF = ioException
(IOError Nothing EOF "" "" Nothing Nothing) | 68 | ioe_EOF = ioException
(IOError Nothing EOF "" "" Nothing Nothing) | 68 | false | false | 0 | 7 | 12 | 25 | 12 | 13 | null | null |
tdeekens/tda452-code | Lab-3/Sudoku.hs | mit | candidates :: Sudoku -> Pos -> [Int]
candidates s (x, y) = [1..9] \\ [fromJust x | x <- (filter isJust fll)]
where
bs = blocks s
rc = bs!!x ++ bs!!(9+y)
b = bs!!( 17 + nthBlock (x `div` 3, y `div` 3) )
fll = (rc ++ b)
-- Helper function returning the block number of a given position | 306 | candidates :: Sudoku -> Pos -> [Int]
candidates s (x, y) = [1..9] \\ [fromJust x | x <- (filter isJust fll)]
where
bs = blocks s
rc = bs!!x ++ bs!!(9+y)
b = bs!!( 17 + nthBlock (x `div` 3, y `div` 3) )
fll = (rc ++ b)
-- Helper function returning the block number of a given position | 306 | candidates s (x, y) = [1..9] \\ [fromJust x | x <- (filter isJust fll)]
where
bs = blocks s
rc = bs!!x ++ bs!!(9+y)
b = bs!!( 17 + nthBlock (x `div` 3, y `div` 3) )
fll = (rc ++ b)
-- Helper function returning the block number of a given position | 269 | false | true | 12 | 10 | 83 | 174 | 83 | 91 | null | null |
AugustusHuang/hs-learning | elementary.hs | mit | -- take'
take' :: Int -> [a] -> [a]
take' n _
| n <= 0 = [] | 60 | take' :: Int -> [a] -> [a]
take' n _
| n <= 0 = [] | 51 | take' n _
| n <= 0 = [] | 24 | true | true | 0 | 9 | 18 | 49 | 23 | 26 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/ViolinPizzicato.hs | bsd-3-clause | note7 :: Note
note7 = Note
(Pitch 293.665 50 "d4")
8
(Range
(NoteRange
(NoteRangeAmplitude 7341.62 25 0.33)
(NoteRangeHarmonicFreq 1 293.66))
(NoteRange
(NoteRangeAmplitude 293.66 1 8069.0)
(NoteRangeHarmonicFreq 37 10865.6)))
[Harmonic 1 (... | 1,408 | note7 :: Note
note7 = Note
(Pitch 293.665 50 "d4")
8
(Range
(NoteRange
(NoteRangeAmplitude 7341.62 25 0.33)
(NoteRangeHarmonicFreq 1 293.66))
(NoteRange
(NoteRangeAmplitude 293.66 1 8069.0)
(NoteRangeHarmonicFreq 37 10865.6)))
[Harmonic 1 (... | 1,408 | note7 = Note
(Pitch 293.665 50 "d4")
8
(Range
(NoteRange
(NoteRangeAmplitude 7341.62 25 0.33)
(NoteRangeHarmonicFreq 1 293.66))
(NoteRange
(NoteRangeAmplitude 293.66 1 8069.0)
(NoteRangeHarmonicFreq 37 10865.6)))
[Harmonic 1 (-2.778) 8069.0... | 1,394 | false | true | 0 | 11 | 399 | 570 | 296 | 274 | null | null |
siddhanathan/yi | yi-language/src/Yi/Style.hs | gpl-2.0 | yellow = RGB 255 255 0 | 27 | yellow = RGB 255 255 0 | 27 | yellow = RGB 255 255 0 | 27 | false | false | 1 | 5 | 10 | 19 | 6 | 13 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.