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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ku-fpg/better-life | examples/simulations/HuttonCanvas.hs | bsd-2-clause | -- Runs Life for the specified number of generations
-- Then it prints the final board configuration as a list of positions
lifeX :: Int -> Config -> Scene -> IO ()
lifeX x c s = blankCanvas 3000 $ \dc -> lifeXCanvas x dc (scene c s :: Board) | 243 | lifeX :: Int -> Config -> Scene -> IO ()
lifeX x c s = blankCanvas 3000 $ \dc -> lifeXCanvas x dc (scene c s :: Board) | 118 | lifeX x c s = blankCanvas 3000 $ \dc -> lifeXCanvas x dc (scene c s :: Board) | 77 | true | true | 2 | 10 | 50 | 72 | 35 | 37 | null | null |
NightRa/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC (PAppImpl t _) = highestFC t | 38 | highestFC (PAppImpl t _) = highestFC t | 38 | highestFC (PAppImpl t _) = highestFC t | 38 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
taxell/SHK | src/LexJSH.hs | mit | lexOp _ ('/' : rest) = '/' : ' ' : lexOp True rest | 50 | lexOp _ ('/' : rest) = '/' : ' ' : lexOp True rest | 50 | lexOp _ ('/' : rest) = '/' : ' ' : lexOp True rest | 50 | false | false | 1 | 6 | 13 | 33 | 15 | 18 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | readSingleQuotedLiteral = do
singleQuote
strs <- many1 readSingleQuotedPart
singleQuote
return $ concat strs | 124 | readSingleQuotedLiteral = do
singleQuote
strs <- many1 readSingleQuotedPart
singleQuote
return $ concat strs | 124 | readSingleQuotedLiteral = do
singleQuote
strs <- many1 readSingleQuotedPart
singleQuote
return $ concat strs | 124 | false | false | 0 | 8 | 28 | 32 | 13 | 19 | null | null |
AndrewRademacher/gdax | test/Test.hs | mit | main :: IO ()
main = do
gAccessKey <- CBS.pack <$> getEnv "GDAX_SANDBOX_KEY"
gSecretKey <- Base64.decodeLenient . CBS.pack <$> getEnv "GDAX_SANDBOX_SECRET"
gPassphrase <- CBS.pack <$> getEnv "GDAX_SANDBOX_PASSPHRASE"
sbox <- mkSandboxGdax gAccessKey gSecretKey gPassphrase
live <- mkLiveUnsignedGdax... | 360 | main :: IO ()
main = do
gAccessKey <- CBS.pack <$> getEnv "GDAX_SANDBOX_KEY"
gSecretKey <- Base64.decodeLenient . CBS.pack <$> getEnv "GDAX_SANDBOX_SECRET"
gPassphrase <- CBS.pack <$> getEnv "GDAX_SANDBOX_PASSPHRASE"
sbox <- mkSandboxGdax gAccessKey gSecretKey gPassphrase
live <- mkLiveUnsignedGdax... | 360 | main = do
gAccessKey <- CBS.pack <$> getEnv "GDAX_SANDBOX_KEY"
gSecretKey <- Base64.decodeLenient . CBS.pack <$> getEnv "GDAX_SANDBOX_SECRET"
gPassphrase <- CBS.pack <$> getEnv "GDAX_SANDBOX_PASSPHRASE"
sbox <- mkSandboxGdax gAccessKey gSecretKey gPassphrase
live <- mkLiveUnsignedGdax
defaultMa... | 346 | false | true | 0 | 10 | 66 | 109 | 49 | 60 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | mkCoVarCos :: [CoVar] -> [Coercion]
mkCoVarCos = map mkCoVarCo | 62 | mkCoVarCos :: [CoVar] -> [Coercion]
mkCoVarCos = map mkCoVarCo | 62 | mkCoVarCos = map mkCoVarCo | 26 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/GraphOps.hs | bsd-3-clause | freezeOneInGraph
:: (Uniquable k)
=> Graph k cls color
-> ( Graph k cls color -- the new graph
, Bool ) -- whether we found a node to freeze
freezeOneInGraph graph
= let compareNodeDegree n1 n2
= compare (sizeUniqSet $ nodeConflicts n1) ... | 910 | freezeOneInGraph
:: (Uniquable k)
=> Graph k cls color
-> ( Graph k cls color -- the new graph
, Bool )
freezeOneInGraph graph
= let compareNodeDegree n1 n2
= compare (sizeUniqSet $ nodeConflicts n1) (sizeUniqSet $ nodeConflicts n2)
candidates
... | 852 | freezeOneInGraph graph
= let compareNodeDegree n1 n2
= compare (sizeUniqSet $ nodeConflicts n1) (sizeUniqSet $ nodeConflicts n2)
candidates
= sortBy compareNodeDegree
$ take 5 -- 5 isn't special, it's just a small number.
$ scanGraph (\no... | 704 | true | true | 0 | 16 | 345 | 189 | 99 | 90 | null | null |
sdiehl/ghc | libraries/base/GHC/Arr.hs | bsd-3-clause | unsafeAt :: Array i e -> Int -> e
unsafeAt (Array _ _ _ arr#) (I# i#) =
case indexArray# arr# i# of (# e #) -> e
-- | Look up an element in an array without forcing it | 172 | unsafeAt :: Array i e -> Int -> e
unsafeAt (Array _ _ _ arr#) (I# i#) =
case indexArray# arr# i# of (# e #) -> e
-- | Look up an element in an array without forcing it | 172 | unsafeAt (Array _ _ _ arr#) (I# i#) =
case indexArray# arr# i# of (# e #) -> e
-- | Look up an element in an array without forcing it | 138 | false | true | 0 | 8 | 44 | 65 | 32 | 33 | null | null |
konn/reactive-objc | Messaging/Core.hs | bsd-3-clause | send :: (a :> b, Selector a msg) => Object b -> Message msg -> Returns msg
send = send' . cast | 94 | send :: (a :> b, Selector a msg) => Object b -> Message msg -> Returns msg
send = send' . cast | 94 | send = send' . cast | 19 | false | true | 0 | 8 | 21 | 51 | 25 | 26 | null | null |
vincenthz/hs-foundation | basement/Basement/Block.hs | bsd-3-clause | break :: PrimType ty => (ty -> Bool) -> Block ty -> (Block ty, Block ty)
break predicate blk = findBreak 0
where
!len = length blk
findBreak !i
| i .==# len = (blk, mempty)
| predicate (unsafeIndex blk i) = splitAt (offsetAsSize i) blk
| otherwise ... | 370 | break :: PrimType ty => (ty -> Bool) -> Block ty -> (Block ty, Block ty)
break predicate blk = findBreak 0
where
!len = length blk
findBreak !i
| i .==# len = (blk, mempty)
| predicate (unsafeIndex blk i) = splitAt (offsetAsSize i) blk
| otherwise ... | 370 | break predicate blk = findBreak 0
where
!len = length blk
findBreak !i
| i .==# len = (blk, mempty)
| predicate (unsafeIndex blk i) = splitAt (offsetAsSize i) blk
| otherwise = findBreak (i + 1)
{-# INLINE findBreak #-}
| 297 | false | true | 1 | 11 | 134 | 151 | 70 | 81 | null | null |
uuhan/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | holeName i = sMN i "hole" | 25 | holeName i = sMN i "hole" | 25 | holeName i = sMN i "hole" | 25 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
shlevy/hnix-store | hnix-store-core/tests/Hash.hs | mit | -- TODO: Move the fixtures into a common module
spec_hash :: Spec
spec_hash = do
describe "hashing parity with nix-store" $ do
it "produces (base32 . sha256) of \"nix-output:foo\" the same as Nix does at the moment for placeholder \"foo\"" $
shouldBe (encodeBase32 (hash @SHA256 "nix-output:foo"))
... | 990 | spec_hash :: Spec
spec_hash = do
describe "hashing parity with nix-store" $ do
it "produces (base32 . sha256) of \"nix-output:foo\" the same as Nix does at the moment for placeholder \"foo\"" $
shouldBe (encodeBase32 (hash @SHA256 "nix-output:foo"))
"1x0ymrsy7yr7i9wdsqy9khmzc1yy7nvxw6rdp72y... | 941 | spec_hash = do
describe "hashing parity with nix-store" $ do
it "produces (base32 . sha256) of \"nix-output:foo\" the same as Nix does at the moment for placeholder \"foo\"" $
shouldBe (encodeBase32 (hash @SHA256 "nix-output:foo"))
"1x0ymrsy7yr7i9wdsqy9khmzc1yy7nvxw6rdp72yzn50285s67j5"
... | 923 | true | true | 0 | 17 | 211 | 133 | 62 | 71 | null | null |
berdario/managemytime | src/ManageMyTime/Docs.hs | bsd-3-clause | profileURI = URI { uriScheme="http"
, uriAuthority=Just URIAuth { uriUserInfo=""
, uriRegName="localhost"
, uriPort=":8080"}
, uriPath="/profile"
, uriQuery="", uriFragment=""} | 317 | profileURI = URI { uriScheme="http"
, uriAuthority=Just URIAuth { uriUserInfo=""
, uriRegName="localhost"
, uriPort=":8080"}
, uriPath="/profile"
, uriQuery="", uriFragment=""} | 317 | profileURI = URI { uriScheme="http"
, uriAuthority=Just URIAuth { uriUserInfo=""
, uriRegName="localhost"
, uriPort=":8080"}
, uriPath="/profile"
, uriQuery="", uriFragment=""} | 317 | false | false | 0 | 9 | 159 | 61 | 38 | 23 | null | null |
8l/metafun | src/Language/Kiff/Typing/Instantiate.hs | gpl-3.0 | ensureTv :: Tv -> Instantiate Tv
ensureTv tv = do lookup <- getTv tv
case lookup of
Just tv' -> return tv'
Nothing -> inst tv
where inst tv = do tv' <- lift mkTv
modify (Map.insert tv tv')
return tv' | 304 | ensureTv :: Tv -> Instantiate Tv
ensureTv tv = do lookup <- getTv tv
case lookup of
Just tv' -> return tv'
Nothing -> inst tv
where inst tv = do tv' <- lift mkTv
modify (Map.insert tv tv')
return tv' | 304 | ensureTv tv = do lookup <- getTv tv
case lookup of
Just tv' -> return tv'
Nothing -> inst tv
where inst tv = do tv' <- lift mkTv
modify (Map.insert tv tv')
return tv' | 271 | false | true | 0 | 10 | 145 | 101 | 44 | 57 | null | null |
jbapple/three-finger-trees | Spinal.hs | agpl-3.0 | mtoList = L.unfoldr ltail | 25 | mtoList = L.unfoldr ltail | 25 | mtoList = L.unfoldr ltail | 25 | false | false | 1 | 5 | 3 | 15 | 5 | 10 | null | null |
ThoughtLeadr/Riak-Haskell-HTTP-Client | src/Network/Riak/HTTP/Internal.hs | bsd-3-clause | buildURI client bucket key = (buildURIBase client) {
uriPath = "/riak" </> (escape bucket) </> (escape key)
} | 113 | buildURI client bucket key = (buildURIBase client) {
uriPath = "/riak" </> (escape bucket) </> (escape key)
} | 113 | buildURI client bucket key = (buildURIBase client) {
uriPath = "/riak" </> (escape bucket) </> (escape key)
} | 113 | false | false | 0 | 10 | 21 | 47 | 24 | 23 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Utils.hs | bsd-3-clause | primRepForeignHint Int32Rep = SignedHint | 44 | primRepForeignHint Int32Rep = SignedHint | 44 | primRepForeignHint Int32Rep = SignedHint | 44 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
Xawirses/GitMining | FrequentPatterns.hs | gpl-2.0 | generateNextLevel :: [ItemSet] -> [ItemSet]
generateNextLevel level = trace ("Computing level " ++ show (isSize (head level))) $
foldr (\value old -> generate value ++ old) [] level
where
generate value = takeWhile (/= empty) $
parMap rpar (semiUnion value) (tail $ List.dropWhile (/= val... | 416 | generateNextLevel :: [ItemSet] -> [ItemSet]
generateNextLevel level = trace ("Computing level " ++ show (isSize (head level))) $
foldr (\value old -> generate value ++ old) [] level
where
generate value = takeWhile (/= empty) $
parMap rpar (semiUnion value) (tail $ List.dropWhile (/= val... | 416 | generateNextLevel level = trace ("Computing level " ++ show (isSize (head level))) $
foldr (\value old -> generate value ++ old) [] level
where
generate value = takeWhile (/= empty) $
parMap rpar (semiUnion value) (tail $ List.dropWhile (/= value) level) -- FIXME: this could be a better ... | 372 | false | true | 0 | 13 | 99 | 151 | 77 | 74 | null | null |
hexenroehrling/hs-scheduler | app/Run.hs | gpl-3.0 | mainAction (Grep cmd) = do
cmdAbs <- liftIO $ do
dir <- getCurrentDirectory
canonicalizePath $ dir </> cmd
let setGrep = \rs -> rs {rsLogGrepWork = cmdAbs}
modifyRunSetup setGrep
printSetup
unlessM (readerWorkSet Map.null) $ do
liftIO $ do
putStrLn ""
putStrLn "Just grepping all work ... | 363 | mainAction (Grep cmd) = do
cmdAbs <- liftIO $ do
dir <- getCurrentDirectory
canonicalizePath $ dir </> cmd
let setGrep = \rs -> rs {rsLogGrepWork = cmdAbs}
modifyRunSetup setGrep
printSetup
unlessM (readerWorkSet Map.null) $ do
liftIO $ do
putStrLn ""
putStrLn "Just grepping all work ... | 363 | mainAction (Grep cmd) = do
cmdAbs <- liftIO $ do
dir <- getCurrentDirectory
canonicalizePath $ dir </> cmd
let setGrep = \rs -> rs {rsLogGrepWork = cmdAbs}
modifyRunSetup setGrep
printSetup
unlessM (readerWorkSet Map.null) $ do
liftIO $ do
putStrLn ""
putStrLn "Just grepping all work ... | 363 | false | false | 0 | 13 | 93 | 122 | 53 | 69 | null | null |
JustinUnger/haskell-book | ch24/nanoparsec.hs | mit | natural :: Parser Int
natural = do
cs <- some digit
return $ read cs | 76 | natural :: Parser Int
natural = do
cs <- some digit
return $ read cs | 76 | natural = do
cs <- some digit
return $ read cs | 54 | false | true | 0 | 9 | 22 | 40 | 16 | 24 | null | null |
keithduncan/chatterbox | src/common/Workqueue.hs | mit | redisConnectionInfo :: URI -> R.ConnectInfo
redisConnectionInfo (URI "redis:" (Just (URIAuth auth regname port)) path _ _) =
R.defaultConnectInfo { R.connectHost = regname'
, R.connectPort = portNumber
, R.connectAuth = authentication
, R.connectDat... | 1,070 | redisConnectionInfo :: URI -> R.ConnectInfo
redisConnectionInfo (URI "redis:" (Just (URIAuth auth regname port)) path _ _) =
R.defaultConnectInfo { R.connectHost = regname'
, R.connectPort = portNumber
, R.connectAuth = authentication
, R.connectDat... | 1,070 | redisConnectionInfo (URI "redis:" (Just (URIAuth auth regname port)) path _ _) =
R.defaultConnectInfo { R.connectHost = regname'
, R.connectPort = portNumber
, R.connectAuth = authentication
, R.connectDatabase = database
}
... | 1,026 | false | true | 4 | 16 | 388 | 300 | 157 | 143 | null | null |
massysett/penny | penny/lib/Penny/Rep.hs | bsd-3-clause | groupers'BrimRadCom (BrimRadCom'BrimGroupedRadCom b)
= groupers'BrimGroupedRadCom b | 85 | groupers'BrimRadCom (BrimRadCom'BrimGroupedRadCom b)
= groupers'BrimGroupedRadCom b | 85 | groupers'BrimRadCom (BrimRadCom'BrimGroupedRadCom b)
= groupers'BrimGroupedRadCom b | 85 | false | false | 0 | 7 | 7 | 18 | 8 | 10 | null | null |
co-dan/NPNTool | src/NPNTool/NPNet.hs | bsd-3-clause | fromPNet :: Ord v => PTNet -> SNet l v Int
fromPNet pn = Net { places = places pn
, trans = trans pn
, pre = fromTokens . (pre pn)
, post = fromTokens . (post pn)
, initial = undefined
} | 286 | fromPNet :: Ord v => PTNet -> SNet l v Int
fromPNet pn = Net { places = places pn
, trans = trans pn
, pre = fromTokens . (pre pn)
, post = fromTokens . (post pn)
, initial = undefined
} | 286 | fromPNet pn = Net { places = places pn
, trans = trans pn
, pre = fromTokens . (pre pn)
, post = fromTokens . (post pn)
, initial = undefined
} | 243 | false | true | 0 | 9 | 143 | 90 | 48 | 42 | null | null |
RefactoringTools/HaRe | old/refactorer/AzGhcPlay2.hs | bsd-3-clause | showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p) | 65 | showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p) | 65 | showParsedModule p = showData Parser 0 (GHC.pm_parsed_source p) | 65 | false | false | 0 | 8 | 9 | 24 | 11 | 13 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2009-Real_World_Haskell/PNM.hs | unlicense | {- getting rid of boilerplate 238/278
Every step in "ladder" of parseP5 deconstructs a Maybe and either fails or passes the unwrapped result to a function.
Abstract into: value as left argument, function as right.
If not Nothing then apply function to value wrapped in Just.
Defined as operator to enable chaining functi... | 568 | (>>?) :: Maybe a -> (a -> Maybe b) -> Maybe b
Nothing >>? _ = Nothing | 69 | Nothing >>? _ = Nothing | 23 | true | true | 0 | 9 | 100 | 44 | 22 | 22 | null | null |
snoyberg/ghc | compiler/basicTypes/Module.hs | bsd-3-clause | -- | Test if a 'UnitId' corresponds to a given 'InstalledUnitId',
-- modulo instantiation.
installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool
installedUnitIdEq iuid uid =
fst (splitUnitIdInsts uid) == iuid | 213 | installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool
installedUnitIdEq iuid uid =
fst (splitUnitIdInsts uid) == iuid | 122 | installedUnitIdEq iuid uid =
fst (splitUnitIdInsts uid) == iuid | 67 | true | true | 0 | 8 | 33 | 39 | 20 | 19 | null | null |
fmapfmapfmap/amazonka | amazonka-codecommit/gen/Network/AWS/CodeCommit/CreateBranch.hs | mpl-2.0 | -- | Creates a value of 'CreateBranch' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cbRepositoryName'
--
-- * 'cbBranchName'
--
-- * 'cbCommitId'
createBranch
:: Text -- ^ 'cbRepositoryName'
-> Text -- ^ 'cbBranchName'
... | 554 | createBranch
:: Text -- ^ 'cbRepositoryName'
-> Text -- ^ 'cbBranchName'
-> Text -- ^ 'cbCommitId'
-> CreateBranch
createBranch pRepositoryName_ pBranchName_ pCommitId_ =
CreateBranch'
{ _cbRepositoryName = pRepositoryName_
, _cbBranchName = pBranchName_
, _cbCommitId = pCommitId_
} | 319 | createBranch pRepositoryName_ pBranchName_ pCommitId_ =
CreateBranch'
{ _cbRepositoryName = pRepositoryName_
, _cbBranchName = pBranchName_
, _cbCommitId = pCommitId_
} | 188 | true | true | 0 | 9 | 114 | 71 | 42 | 29 | null | null |
t0yv0/haskell-earley | Text/Earley.hs | bsd-3-clause | feed :: Dynamic -> Thread a -> Thread a
feed _ (Available _) = error "Cannot feed a completed thread." | 102 | feed :: Dynamic -> Thread a -> Thread a
feed _ (Available _) = error "Cannot feed a completed thread." | 102 | feed _ (Available _) = error "Cannot feed a completed thread." | 62 | false | true | 0 | 7 | 19 | 39 | 18 | 21 | null | null |
harrisi/on-being-better | list-expansion/Haskell/cis194/spring13/07/JoinList.hs | cc0-1.0 | indexJ i jl@(Append m l r)
| i >= jlSize jl = Nothing
| i < lSize = indexJ i l
| otherwise = indexJ (i - lSize) r
where lSize = jlSize l | 144 | indexJ i jl@(Append m l r)
| i >= jlSize jl = Nothing
| i < lSize = indexJ i l
| otherwise = indexJ (i - lSize) r
where lSize = jlSize l | 144 | indexJ i jl@(Append m l r)
| i >= jlSize jl = Nothing
| i < lSize = indexJ i l
| otherwise = indexJ (i - lSize) r
where lSize = jlSize l | 144 | false | false | 1 | 9 | 41 | 87 | 41 | 46 | null | null |
GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs | bsd-3-clause | -- | Translate a typed LLVM 'L.Value' to a Heapster permission + translation
translateLLVMValue :: (1 <= w, KnownNat w) => NatRepr w -> L.Type -> L.Value ->
LLVMTransM (PermExpr (LLVMShapeType w), OpenTerm)
translateLLVMValue w tp@(L.PrimType (L.Integer n)) (L.ValInteger i) =
translateLLVMType w... | 391 | translateLLVMValue :: (1 <= w, KnownNat w) => NatRepr w -> L.Type -> L.Value ->
LLVMTransM (PermExpr (LLVMShapeType w), OpenTerm)
translateLLVMValue w tp@(L.PrimType (L.Integer n)) (L.ValInteger i) =
translateLLVMType w tp >>= \(sh,_) ->
return (sh, bvLitOfIntOpenTerm (fromIntegral n) i) | 314 | translateLLVMValue w tp@(L.PrimType (L.Integer n)) (L.ValInteger i) =
translateLLVMType w tp >>= \(sh,_) ->
return (sh, bvLitOfIntOpenTerm (fromIntegral n) i) | 162 | true | true | 0 | 13 | 78 | 140 | 72 | 68 | null | null |
alphalambda/codeworld | codeworld-prediction/src/CodeWorld/Prediction/Paper.hs | apache-2.0 | commitHorizon :: Log world -> Timestamp
commitHorizon log = minimum [t | (p, t) <- latest log] | 94 | commitHorizon :: Log world -> Timestamp
commitHorizon log = minimum [t | (p, t) <- latest log] | 94 | commitHorizon log = minimum [t | (p, t) <- latest log] | 54 | false | true | 0 | 9 | 16 | 44 | 22 | 22 | null | null |
duncanfinney/haskell-play | 07-IO.hs | mit | maybeRead :: Read a => String -> Maybe a
maybeRead s = case reads s of
[(x, "")] -> Just x
_ -> Nothing | 143 | maybeRead :: Read a => String -> Maybe a
maybeRead s = case reads s of
[(x, "")] -> Just x
_ -> Nothing | 143 | maybeRead s = case reads s of
[(x, "")] -> Just x
_ -> Nothing | 102 | false | true | 0 | 9 | 63 | 64 | 30 | 34 | null | null |
kisp/ksquant2 | Main.hs | gpl-3.0 | simple2sf_score :: L.LispVal -> SF.Score
simple2sf_score simple =
let
lispVal2Score :: L.LispVal -> A.Score L.LispVal
lispVal2Score = L.fromSexp
score = lispVal2Score simple :: A.Score L.LispVal
sf_score = fmap (L.mapcar' SF.sexp2event) score :: SF.Score
in sf_score | 287 | simple2sf_score :: L.LispVal -> SF.Score
simple2sf_score simple =
let
lispVal2Score :: L.LispVal -> A.Score L.LispVal
lispVal2Score = L.fromSexp
score = lispVal2Score simple :: A.Score L.LispVal
sf_score = fmap (L.mapcar' SF.sexp2event) score :: SF.Score
in sf_score | 287 | simple2sf_score simple =
let
lispVal2Score :: L.LispVal -> A.Score L.LispVal
lispVal2Score = L.fromSexp
score = lispVal2Score simple :: A.Score L.LispVal
sf_score = fmap (L.mapcar' SF.sexp2event) score :: SF.Score
in sf_score | 245 | false | true | 0 | 12 | 55 | 96 | 48 | 48 | null | null |
pgreze/7languages7weeks | haskell/day2.hs | mit | --lstrip = lstripWith whitespaces
--rstrip = rstripWith whitespaces
replace :: Char -> String -> String -> String
replace old new (c:s) = (if c == old then new else [c]) ++ replace old new s | 203 | replace :: Char -> String -> String -> String
replace old new (c:s) = (if c == old then new else [c]) ++ replace old new s | 122 | replace old new (c:s) = (if c == old then new else [c]) ++ replace old new s | 76 | true | true | 0 | 8 | 47 | 68 | 37 | 31 | null | null |
clarkcb/xsearch | haskell/hssearch/src/HsSearch/FileUtil.hs | mit | getFileString :: FilePath -> IO (Either String String)
getFileString f = do
bsEither <- getFileByteString f
case bsEither of
(Left err) -> return $ Left err
(Right bs) -> return $ Right (BC.unpack bs) | 212 | getFileString :: FilePath -> IO (Either String String)
getFileString f = do
bsEither <- getFileByteString f
case bsEither of
(Left err) -> return $ Left err
(Right bs) -> return $ Right (BC.unpack bs) | 212 | getFileString f = do
bsEither <- getFileByteString f
case bsEither of
(Left err) -> return $ Left err
(Right bs) -> return $ Right (BC.unpack bs) | 157 | false | true | 0 | 14 | 45 | 92 | 43 | 49 | null | null |
input-output-hk/pos-haskell-prototype | crypto/Pos/Crypto/Signing/Safe.hs | mit | -- | Regenerates secret key with new passphrase.
-- Note: This operation keeps corresponding public key and derived (child) keys unchanged.
changeEncPassphrase
:: (MonadRandom m)
=> PassPhrase
-> PassPhrase
-> EncryptedSecretKey
-> m (Maybe EncryptedSecretKey)
changeEncPassphrase oldPass newPass esk... | 507 | changeEncPassphrase
:: (MonadRandom m)
=> PassPhrase
-> PassPhrase
-> EncryptedSecretKey
-> m (Maybe EncryptedSecretKey)
changeEncPassphrase oldPass newPass esk@(EncryptedSecretKey sk _)
| isJust $ checkPassMatches oldPass esk =
Just <$> mkEncSecretUnsafe newPass (CC.xPrvChangePass oldPa... | 367 | changeEncPassphrase oldPass newPass esk@(EncryptedSecretKey sk _)
| isJust $ checkPassMatches oldPass esk =
Just <$> mkEncSecretUnsafe newPass (CC.xPrvChangePass oldPass newPass sk)
| otherwise = return Nothing | 226 | true | true | 0 | 11 | 96 | 109 | 53 | 56 | null | null |
monsanto/hie | Hie/Language/Haskell/Exts/Syntax.hs | gpl-3.0 | unit_con_name :: QName
unit_con_name = Special UnitCon | 54 | unit_con_name :: QName
unit_con_name = Special UnitCon | 54 | unit_con_name = Special UnitCon | 31 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
wskplho/stack | src/Stack/Options.hs | bsd-3-clause | abstractResolverOptsParser :: Parser AbstractResolver
abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 224 | abstractResolverOptsParser :: Parser AbstractResolver
abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 224 | abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 170 | false | true | 0 | 9 | 49 | 39 | 18 | 21 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | mONAD_FIX = mkBaseModule (fsLit "Control.Monad.Fix") | 58 | mONAD_FIX = mkBaseModule (fsLit "Control.Monad.Fix") | 58 | mONAD_FIX = mkBaseModule (fsLit "Control.Monad.Fix") | 58 | false | false | 1 | 7 | 10 | 18 | 7 | 11 | null | null |
daewon/til | haskell/haskell_by_example/bytesString.hs | mpl-2.0 | main :: IO ()
main = do
return () | 35 | main :: IO ()
main = do
return () | 35 | main = do
return () | 21 | false | true | 0 | 9 | 10 | 30 | 12 | 18 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT09.hs | gpl-3.0 | revflat ([]:xss) = revflat xss | 34 | revflat ([]:xss) = revflat xss | 34 | revflat ([]:xss) = revflat xss | 34 | false | false | 0 | 7 | 8 | 22 | 10 | 12 | null | null |
VictorDenisov/mongodb | Database/MongoDB/Connection.hs | apache-2.0 | connection :: ReplicaSet -> Maybe Pipe -> Host -> IO Pipe
-- ^ Return new or existing connection to member of replica set. If pipe is already known for host it is given, but we still test if it is open.
connection (ReplicaSet _ vMembers timeoutSecs transportSecurity) mPipe host' =
maybe conn (\p -> isClosed p >>= \... | 1,468 | connection :: ReplicaSet -> Maybe Pipe -> Host -> IO Pipe
connection (ReplicaSet _ vMembers timeoutSecs transportSecurity) mPipe host' =
maybe conn (\p -> isClosed p >>= \bad -> if bad then conn else return p) mPipe
where
conn = modifyMVar vMembers $ \members -> do
let (Host h p) = host'
let c... | 1,323 | connection (ReplicaSet _ vMembers timeoutSecs transportSecurity) mPipe host' =
maybe conn (\p -> isClosed p >>= \bad -> if bad then conn else return p) mPipe
where
conn = modifyMVar vMembers $ \members -> do
let (Host h p) = host'
let conn' = case transportSecurity of
... | 1,265 | true | true | 0 | 18 | 350 | 267 | 132 | 135 | null | null |
bezirg/hlogo | src/Language/Logo/Prim.hs | bsd-3-clause | splitTurtles :: Int -> [IM.IntMap Turtle] -> [IM.IntMap Turtle]
splitTurtles 1 acc = acc | 88 | splitTurtles :: Int -> [IM.IntMap Turtle] -> [IM.IntMap Turtle]
splitTurtles 1 acc = acc | 88 | splitTurtles 1 acc = acc | 24 | false | true | 0 | 9 | 13 | 40 | 20 | 20 | null | null |
rdnetto/persistent | persistent-sqlite/Database/Sqlite.hs | mit | -- | Sets and/or queries the soft limit on the amount of heap memory that may be
-- allocated by SQLite. If the argument is zero then the soft heap limit is disabled.
-- If the argument is negative then no change is made to the soft heap limit. Hence,
-- the current size of the soft heap limit can be determined by invo... | 483 | softHeapLimit :: Int64 -> IO Int64
softHeapLimit x = fromIntegral <$> softHeapLimit64C (CLLong x) | 97 | softHeapLimit x = fromIntegral <$> softHeapLimit64C (CLLong x) | 62 | true | true | 0 | 8 | 88 | 45 | 24 | 21 | null | null |
nakamuray/htig | HTIG/Channel/Timeline.hs | bsd-3-clause | friendsFetcher :: ChannelName -> HTIG ()
friendsFetcher cname = do
Just tok <- sToken <$> getLocal
Just nick <- sNick <$> getLocal
let nick' = s nick
resFriends <- liftIO $ getFriends tok nick'
case resFriends of
Ok friends ->
friendsFetcher' cname friends
Error e -> do
... | 503 | friendsFetcher :: ChannelName -> HTIG ()
friendsFetcher cname = do
Just tok <- sToken <$> getLocal
Just nick <- sNick <$> getLocal
let nick' = s nick
resFriends <- liftIO $ getFriends tok nick'
case resFriends of
Ok friends ->
friendsFetcher' cname friends
Error e -> do
... | 503 | friendsFetcher cname = do
Just tok <- sToken <$> getLocal
Just nick <- sNick <$> getLocal
let nick' = s nick
resFriends <- liftIO $ getFriends tok nick'
case resFriends of
Ok friends ->
friendsFetcher' cname friends
Error e -> do
writeServerCommand $ NoticeCmd... | 462 | false | true | 0 | 19 | 153 | 171 | 75 | 96 | null | null |
juliankopkalarsen/FpStats | GMM/src/Math.hs | mit | sub_scatter :: Int -> Matrix Double -> Vector Double -> Int -> Matrix Double -> Vector Double -> Matrix Double
sub_scatter 0 _ _ n _ _ = error "Nothing to subtract from." | 170 | sub_scatter :: Int -> Matrix Double -> Vector Double -> Int -> Matrix Double -> Vector Double -> Matrix Double
sub_scatter 0 _ _ n _ _ = error "Nothing to subtract from." | 170 | sub_scatter 0 _ _ n _ _ = error "Nothing to subtract from." | 59 | false | true | 0 | 12 | 32 | 70 | 31 | 39 | null | null |
kmate/imperative-edsl | src/Language/Embedded/Concurrent/Backend/C.hs | bsd-3-clause | compChanCMD cmd@(ReadChan c from to (ArrComp arr)) = do
ok <- freshVar (proxyPred cmd)
from' <- compExp from
to' <- compExp to
addStm [cstm| chan_read($id:c, sizeof(*$id:arr)*(($to')-($from')), &$id:arr[$from']); |]
addStm [cstm| $id:ok = chan_last_read_ok($id:c); |]
return ok | 289 | compChanCMD cmd@(ReadChan c from to (ArrComp arr)) = do
ok <- freshVar (proxyPred cmd)
from' <- compExp from
to' <- compExp to
addStm [cstm| chan_read($id:c, sizeof(*$id:arr)*(($to')-($from')), &$id:arr[$from']); |]
addStm [cstm| $id:ok = chan_last_read_ok($id:c); |]
return ok | 289 | compChanCMD cmd@(ReadChan c from to (ArrComp arr)) = do
ok <- freshVar (proxyPred cmd)
from' <- compExp from
to' <- compExp to
addStm [cstm| chan_read($id:c, sizeof(*$id:arr)*(($to')-($from')), &$id:arr[$from']); |]
addStm [cstm| $id:ok = chan_last_read_ok($id:c); |]
return ok | 289 | false | false | 0 | 10 | 47 | 92 | 44 | 48 | null | null |
pront/nemo-mpi | src/api/autogen/API.hs | gpl-2.0 | elapsedSimulation =
ApiFunction "elapsedSimulation" []
Nothing M.empty
[ApiArg "elapsed" (Just "number of milliseconds of simulation time elapsed since first simulation step (or last timer reset)") (Scalar ApiULong)] [] [] False | 248 | elapsedSimulation =
ApiFunction "elapsedSimulation" []
Nothing M.empty
[ApiArg "elapsed" (Just "number of milliseconds of simulation time elapsed since first simulation step (or last timer reset)") (Scalar ApiULong)] [] [] False | 248 | elapsedSimulation =
ApiFunction "elapsedSimulation" []
Nothing M.empty
[ApiArg "elapsed" (Just "number of milliseconds of simulation time elapsed since first simulation step (or last timer reset)") (Scalar ApiULong)] [] [] False | 248 | false | false | 0 | 9 | 49 | 53 | 26 | 27 | null | null |
conal/reification-rules | src/ReificationRules/Plugin.hs | bsd-3-clause | coercionTag SymCo {} = "SymCo" | 36 | coercionTag SymCo {} = "SymCo" | 36 | coercionTag SymCo {} = "SymCo" | 36 | false | false | 1 | 5 | 10 | 15 | 6 | 9 | null | null |
feliposz/learning-stuff | haskell/c9lectures-ch9.hs | mit | getCh :: IO Char
getCh =
do hSetEcho stdin False
c <- getChar
hSetEcho stdin True
return c | 116 | getCh :: IO Char
getCh =
do hSetEcho stdin False
c <- getChar
hSetEcho stdin True
return c | 116 | getCh =
do hSetEcho stdin False
c <- getChar
hSetEcho stdin True
return c | 99 | false | true | 0 | 8 | 43 | 49 | 19 | 30 | null | null |
jcristovao/units-attoparsec | Data/Units/SI/Units/Attoparsec/Text.hs | bsd-3-clause | teslaP :: Parser Tesla
teslaP = 'T' >~ Tesla | 44 | teslaP :: Parser Tesla
teslaP = 'T' >~ Tesla | 44 | teslaP = 'T' >~ Tesla | 21 | false | true | 1 | 6 | 8 | 22 | 9 | 13 | null | null |
nastya13/Akkerman-func | dist/build/autogen/Paths_Akkerman_func.hs | gpl-3.0 | getSysconfDir = catchIO (getEnv "Akkerman_func_sysconfdir") (\_ -> return sysconfdir) | 85 | getSysconfDir = catchIO (getEnv "Akkerman_func_sysconfdir") (\_ -> return sysconfdir) | 85 | getSysconfDir = catchIO (getEnv "Akkerman_func_sysconfdir") (\_ -> return sysconfdir) | 85 | false | false | 1 | 8 | 8 | 32 | 14 | 18 | null | null |
ryantm/ghc | compiler/main/DynFlags.hs | bsd-3-clause | defaultFlushErr :: FlushErr
defaultFlushErr = FlushErr $ hFlush stderr | 70 | defaultFlushErr :: FlushErr
defaultFlushErr = FlushErr $ hFlush stderr | 70 | defaultFlushErr = FlushErr $ hFlush stderr | 42 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
stevezhee/grm | Grm/Lex.hs | bsd-3-clause | qualify :: [String] -> String
qualify = concat . intersperse [qualChar] | 71 | qualify :: [String] -> String
qualify = concat . intersperse [qualChar] | 71 | qualify = concat . intersperse [qualChar] | 41 | false | true | 0 | 7 | 10 | 28 | 15 | 13 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F26.hs | bsd-3-clause | -- glTexParameterfv ------------------------------------------------------------
-- | Manual pages for <https://www.opengl.org/sdk/docs/man2/xhtml/glTexParameter.xml OpenGL 2.x> or <https://www.opengl.org/sdk/docs/man3/xhtml/glTexParameter.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glTexParameter.xh... | 741 | glTexParameterfv
:: MonadIO m
=> GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTarget).
-> GLenum -- ^ @pname@ of type [TextureParameterName](Graphics-GL-Groups.html#TextureParameterName).
-> Ptr GLfloat -- ^ @params@ pointing to @COMPSIZE(pname)@ elements of type @CheckedFloat32@.... | 404 | glTexParameterfv v1 v2 v3 = liftIO $ dyn139 ptr_glTexParameterfv v1 v2 v3 | 73 | true | true | 0 | 11 | 77 | 67 | 33 | 34 | null | null |
phischu/pem-images | src/ImageQuery/Parser.hs | bsd-3-clause | averageOfImageParser :: Parser TableQuery
averageOfImageParser = do
string "table_average_of_image"
return AverageOfImage | 129 | averageOfImageParser :: Parser TableQuery
averageOfImageParser = do
string "table_average_of_image"
return AverageOfImage | 129 | averageOfImageParser = do
string "table_average_of_image"
return AverageOfImage | 87 | false | true | 0 | 7 | 18 | 26 | 11 | 15 | null | null |
input-output-hk/rscoin-haskell | src/User/GUI/RSCoin/ContactsTab.hs | gpl-3.0 | createContactsTab :: GladeMainWindow -> ContactsTab
createContactsTab GladeMainWindow{..} =
ContactsTab gTreeViewContactsView gButtonAddContact
gButtonRemoveContact gLabelContactsNum | 194 | createContactsTab :: GladeMainWindow -> ContactsTab
createContactsTab GladeMainWindow{..} =
ContactsTab gTreeViewContactsView gButtonAddContact
gButtonRemoveContact gLabelContactsNum | 194 | createContactsTab GladeMainWindow{..} =
ContactsTab gTreeViewContactsView gButtonAddContact
gButtonRemoveContact gLabelContactsNum | 142 | false | true | 0 | 7 | 24 | 33 | 16 | 17 | null | null |
sebcrozet/falling | Physics/Falling/Shape/AABB.hs | bsd-3-clause | aabbFromBounds :: [ (Double, Double) ] -> AABB
aabbFromBounds bounds = aabbFromBoundsUnsafe $ map rearrange bounds
where
rearrange p@(a, b) = if b < a then (b, a) else p | 217 | aabbFromBounds :: [ (Double, Double) ] -> AABB
aabbFromBounds bounds = aabbFromBoundsUnsafe $ map rearrange bounds
where
rearrange p@(a, b) = if b < a then (b, a) else p | 217 | aabbFromBounds bounds = aabbFromBoundsUnsafe $ map rearrange bounds
where
rearrange p@(a, b) = if b < a then (b, a) else p | 170 | false | true | 0 | 9 | 77 | 73 | 41 | 32 | null | null |
aniketd/learn.haskell | RWH/5_json_library/PrettyJSON.hs | unlicense | series :: Char -> Char -> (a -> Doc) -> [a] -> Doc
series open close item = enclose open close . fsep . punctuate (char ',') . map item | 135 | series :: Char -> Char -> (a -> Doc) -> [a] -> Doc
series open close item = enclose open close . fsep . punctuate (char ',') . map item | 135 | series open close item = enclose open close . fsep . punctuate (char ',') . map item | 84 | false | true | 0 | 9 | 29 | 73 | 36 | 37 | null | null |
Th30n/hasgel | src/Hasgel/Input.hs | mit | mapSDLKey (SDL.Keysym SDL.ScancodeBackspace _ _) = KeyBackspace | 63 | mapSDLKey (SDL.Keysym SDL.ScancodeBackspace _ _) = KeyBackspace | 63 | mapSDLKey (SDL.Keysym SDL.ScancodeBackspace _ _) = KeyBackspace | 63 | false | false | 0 | 8 | 6 | 23 | 11 | 12 | null | null |
jbearer/hspl | src/Control/Hspl/Internal/Solver.hs | mit | -- | Zero-overhead version of 'tryIdentical'.
proveIdentical :: (TermEntry a, MonadSolver m) => Term a -> Term a -> m Theorem
proveIdentical t1 t2
| t1 == t2 = return $ Identical t1 t2
| otherwise = mzero | 208 | proveIdentical :: (TermEntry a, MonadSolver m) => Term a -> Term a -> m Theorem
proveIdentical t1 t2
| t1 == t2 = return $ Identical t1 t2
| otherwise = mzero | 162 | proveIdentical t1 t2
| t1 == t2 = return $ Identical t1 t2
| otherwise = mzero | 82 | true | true | 2 | 9 | 41 | 83 | 37 | 46 | null | null |
SeanRBurton/aeson | Data/Aeson/TH.hs | bsd-3-clause | valueConName (Number _) = "Number" | 34 | valueConName (Number _) = "Number" | 34 | valueConName (Number _) = "Number" | 34 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
DaMSL/K3 | examples/analysis/FusionHarness.hs | apache-2.0 | foldMapProg :: String
foldMapProg = "\
\ declare c : collection {a:int} @Collection \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.fold (\\acc -> \\r -> \
\ if true then (acc.insert {a:r.a+1}; acc) \
\ ... | 734 | foldMapProg :: String
foldMapProg = "\
\ declare c : collection {a:int} @Collection \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.fold (\\acc -> \\r -> \
\ if true then (acc.insert {a:r.a+1}; acc) \
\ ... | 734 | foldMapProg = "\
\ declare c : collection {a:int} @Collection \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.fold (\\acc -> \\r -> \
\ if true then (acc.insert {a:r.a+1}; acc) \
\ el... | 712 | false | true | 0 | 4 | 477 | 11 | 6 | 5 | null | null |
google/codeworld | codeworld-compiler/src/CodeWorld/Compile/Stages.hs | apache-2.0 | isParenthesizedOpExp (Con _ qname) = isOpQName qname | 52 | isParenthesizedOpExp (Con _ qname) = isOpQName qname | 52 | isParenthesizedOpExp (Con _ qname) = isOpQName qname | 52 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- LATIN CAPITAL LETTER H WITH CIRCUMFLEX
switch 'h' '>' = '\x0125' | 67 | switch 'h' '>' = '\x0125' | 25 | switch 'h' '>' = '\x0125' | 25 | true | false | 0 | 5 | 11 | 12 | 6 | 6 | null | null |
sopvop/heist | src/Heist/Common.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Sets the templateMap in a HeistState.
setTemplates :: HashMap TPath DocumentFile -> HeistState n -> HeistState n
setTemplates m ts = ts { _templateMap = m } | 240 | setTemplates :: HashMap TPath DocumentFile -> HeistState n -> HeistState n
setTemplates m ts = ts { _templateMap = m } | 118 | setTemplates m ts = ts { _templateMap = m } | 43 | true | true | 0 | 7 | 29 | 45 | 23 | 22 | null | null |
green-haskell/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | hasOverlappingFlag :: OverlapMode -> Bool
hasOverlappingFlag mode =
case mode of
Overlapping _ -> True
Overlaps _ -> True
Incoherent _ -> True
_ -> False | 191 | hasOverlappingFlag :: OverlapMode -> Bool
hasOverlappingFlag mode =
case mode of
Overlapping _ -> True
Overlaps _ -> True
Incoherent _ -> True
_ -> False | 191 | hasOverlappingFlag mode =
case mode of
Overlapping _ -> True
Overlaps _ -> True
Incoherent _ -> True
_ -> False | 149 | false | true | 5 | 5 | 63 | 51 | 26 | 25 | null | null |
yyotti/euler_haskell | test/P005Spec.hs | mit | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
brendanhay/gogol | gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Conversion/Patch.hs | mpl-2.0 | -- | Multipart request metadata.
cpPayload :: Lens' ConversionPatch ConversionList
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 141 | cpPayload :: Lens' ConversionPatch ConversionList
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 108 | cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a}) | 58 | true | true | 0 | 9 | 22 | 47 | 23 | 24 | null | null |
zenhack/phascal | src/Phascal/Arm.hs | gpl-3.0 | formatInstr (EorRI rd rs int) = formatApply "eor" [rd, rs, formatInt int] | 73 | formatInstr (EorRI rd rs int) = formatApply "eor" [rd, rs, formatInt int] | 73 | formatInstr (EorRI rd rs int) = formatApply "eor" [rd, rs, formatInt int] | 73 | false | false | 0 | 7 | 11 | 36 | 18 | 18 | null | null |
siphayne/CS381 | HW4/MiniMiniLogo.hs | mit | demo :: Prog
demo = box 7 3 ++ nix 6 6 4 3 ++ steps 3 2 4 | 57 | demo :: Prog
demo = box 7 3 ++ nix 6 6 4 3 ++ steps 3 2 4 | 57 | demo = box 7 3 ++ nix 6 6 4 3 ++ steps 3 2 4 | 44 | false | true | 0 | 7 | 18 | 40 | 19 | 21 | null | null |
astro/haskell-torrent | src/WireProtocol-cereal.hs | bsd-2-clause | getPiece = byte 7 *> (Piece <$> gw32
<*> gw32
<*> (remaining >>= getByteString)) | 151 | getPiece = byte 7 *> (Piece <$> gw32
<*> gw32
<*> (remaining >>= getByteString)) | 151 | getPiece = byte 7 *> (Piece <$> gw32
<*> gw32
<*> (remaining >>= getByteString)) | 151 | false | false | 0 | 9 | 84 | 35 | 18 | 17 | null | null |
oskimura/Lambda | src/Parser.hs | mit | lambdaExpr :: Parser (Lambda )
lambdaExpr =
do { (do {(parents abstract) <|> variable <|> aplly })
} | 113 | lambdaExpr :: Parser (Lambda )
lambdaExpr =
do { (do {(parents abstract) <|> variable <|> aplly })
} | 113 | lambdaExpr =
do { (do {(parents abstract) <|> variable <|> aplly })
} | 82 | false | true | 0 | 14 | 30 | 50 | 25 | 25 | null | null |
brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/WorkerPools/Get.hs | mpl-2.0 | -- | Creates a value of 'ProjectsLocationsWorkerPoolsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plwpgXgafv'
--
-- * 'plwpgUploadProtocol'
--
-- * 'plwpgAccessToken'
--
-- * 'plwpgUploadType'
--
-- * 'plwpgName'
--
-- * 'plwp... | 711 | projectsLocationsWorkerPoolsGet
:: Text -- ^ 'plwpgName'
-> ProjectsLocationsWorkerPoolsGet
projectsLocationsWorkerPoolsGet pPlwpgName_ =
ProjectsLocationsWorkerPoolsGet'
{ _plwpgXgafv = Nothing
, _plwpgUploadProtocol = Nothing
, _plwpgAccessToken = Nothing
, _plwpgUploadType = Nothing
, _... | 380 | projectsLocationsWorkerPoolsGet pPlwpgName_ =
ProjectsLocationsWorkerPoolsGet'
{ _plwpgXgafv = Nothing
, _plwpgUploadProtocol = Nothing
, _plwpgAccessToken = Nothing
, _plwpgUploadType = Nothing
, _plwpgName = pPlwpgName_
, _plwpgCallback = Nothing
} | 280 | true | true | 0 | 6 | 128 | 72 | 50 | 22 | null | null |
anton-dessiatov/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | dffvExpr _other = return () | 41 | dffvExpr _other = return () | 41 | dffvExpr _other = return () | 41 | false | false | 0 | 6 | 18 | 14 | 6 | 8 | null | null |
ennocramer/hindent | src/HIndent/Styles/Gibiansky.hs | bsd-3-clause | exprs :: Extend Exp
exprs exp@Let{} = letExpr exp | 49 | exprs :: Extend Exp
exprs exp@Let{} = letExpr exp | 49 | exprs exp@Let{} = letExpr exp | 29 | false | true | 0 | 7 | 8 | 27 | 13 | 14 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionDiskTypes/List.hs | mpl-2.0 | -- | A filter expression that filters resources listed in the response. The
-- expression must specify the field name, a comparison operator, and the
-- value that you want to use for filtering. The value must be a string, a
-- number, or a boolean. The comparison operator must be either \`=\`,
-- \`!=\`, \`>\`, or \`\... | 1,338 | rdtlFilter :: Lens' RegionDiskTypesList (Maybe Text)
rdtlFilter
= lens _rdtlFilter (\ s a -> s{_rdtlFilter = a}) | 114 | rdtlFilter
= lens _rdtlFilter (\ s a -> s{_rdtlFilter = a}) | 61 | true | true | 0 | 9 | 203 | 64 | 41 | 23 | null | null |
sol/hpack | src/Hpack/Render.hs | mit | renderCond :: Cond -> String
renderCond = \ case
CondExpression c -> c
CondBool True -> "true"
CondBool False -> "false" | 126 | renderCond :: Cond -> String
renderCond = \ case
CondExpression c -> c
CondBool True -> "true"
CondBool False -> "false" | 126 | renderCond = \ case
CondExpression c -> c
CondBool True -> "true"
CondBool False -> "false" | 97 | false | true | 4 | 5 | 26 | 42 | 21 | 21 | null | null |
nomeata/ghc | compiler/codeGen/CgPrimOp.hs | bsd-3-clause | doReadPtrArrayOp :: LocalReg -> CmmExpr -> CmmExpr -> Code
doReadPtrArrayOp res addr idx
= do dflags <- getDynFlags
mkBasicIndexedRead (arrPtrsHdrSize dflags) Nothing gcWord res addr idx | 197 | doReadPtrArrayOp :: LocalReg -> CmmExpr -> CmmExpr -> Code
doReadPtrArrayOp res addr idx
= do dflags <- getDynFlags
mkBasicIndexedRead (arrPtrsHdrSize dflags) Nothing gcWord res addr idx | 197 | doReadPtrArrayOp res addr idx
= do dflags <- getDynFlags
mkBasicIndexedRead (arrPtrsHdrSize dflags) Nothing gcWord res addr idx | 138 | false | true | 0 | 10 | 36 | 65 | 29 | 36 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Script/Place.hs | mit | initialFinal :: Place3
initialFinal = (IsInitial, NotMedial, IsFinal) | 69 | initialFinal :: Place3
initialFinal = (IsInitial, NotMedial, IsFinal) | 69 | initialFinal = (IsInitial, NotMedial, IsFinal) | 46 | false | true | 0 | 6 | 7 | 27 | 13 | 14 | null | null |
mightymoose/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs | bsd-3-clause | elemIndices :: Word8 -> ByteString -> [Int64]
elemIndices w cs0 = elemIndices_go 0 cs0
--LIQUID RENAME
{-@ Decrease elemIndices_go 2 @-}
where elemIndices_go _ Empty = []
elemIndices_go (n::Int64) (Chunk c cs) = --LIQUID CAST
L.map ((+n).fromIntegral) (S.elemIndices... | 650 | elemIndices :: Word8 -> ByteString -> [Int64]
elemIndices w cs0 = elemIndices_go 0 cs0
--LIQUID RENAME
{-@ Decrease elemIndices_go 2 @-}
where elemIndices_go _ Empty = []
elemIndices_go (n::Int64) (Chunk c cs) = --LIQUID CAST
L.map ((+n).fromIntegral) (S.elemIndices... | 650 | elemIndices w cs0 = elemIndices_go 0 cs0
--LIQUID RENAME
{-@ Decrease elemIndices_go 2 @-}
where elemIndices_go _ Empty = []
elemIndices_go (n::Int64) (Chunk c cs) = --LIQUID CAST
L.map ((+n).fromIntegral) (S.elemIndices w c)
++ elemIndices_go (n + fromI... | 604 | false | true | 1 | 12 | 163 | 132 | 72 | 60 | null | null |
pacak/cuddly-bassoon | unordered-containers-0.2.8.0/tests/HashMapProperties.hs | bsd-3-clause | pInsertWith :: Key -> [(Key, Int)] -> Bool
pInsertWith k = M.insertWith (+) k 1 `eq_` HM.insertWith (+) k 1 | 107 | pInsertWith :: Key -> [(Key, Int)] -> Bool
pInsertWith k = M.insertWith (+) k 1 `eq_` HM.insertWith (+) k 1 | 107 | pInsertWith k = M.insertWith (+) k 1 `eq_` HM.insertWith (+) k 1 | 64 | false | true | 0 | 9 | 19 | 64 | 34 | 30 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Patch.hs | mpl-2.0 | -- | RemarketingList ID.
rlspId :: Lens' RemarketingListSharesPatch Int64
rlspId
= lens _rlspId (\ s a -> s{_rlspId = a}) . _Coerce | 133 | rlspId :: Lens' RemarketingListSharesPatch Int64
rlspId
= lens _rlspId (\ s a -> s{_rlspId = a}) . _Coerce | 108 | rlspId
= lens _rlspId (\ s a -> s{_rlspId = a}) . _Coerce | 59 | true | true | 1 | 10 | 23 | 48 | 24 | 24 | null | null |
beni55/hspec | hspec-core/src/Test/Hspec/Options.hs | mit | formatHelp :: String
formatHelp = unlines (addLineBreaks "use a custom formatter; this can be one of:" ++ map ((" " ++) . fst) formatters) | 140 | formatHelp :: String
formatHelp = unlines (addLineBreaks "use a custom formatter; this can be one of:" ++ map ((" " ++) . fst) formatters) | 140 | formatHelp = unlines (addLineBreaks "use a custom formatter; this can be one of:" ++ map ((" " ++) . fst) formatters) | 119 | false | true | 0 | 11 | 25 | 47 | 22 | 25 | null | null |
jasonrbriggs/proton | haskell/src/Text/Proton/Xml.hs | apache-2.0 | containsAttribute :: String -> [Attribute] -> Bool
containsAttribute _ [] = False | 81 | containsAttribute :: String -> [Attribute] -> Bool
containsAttribute _ [] = False | 81 | containsAttribute _ [] = False | 30 | false | true | 0 | 7 | 11 | 29 | 15 | 14 | null | null |
razvan9310/barrelfish | hake/RuleDefs.hs | mit | --
-- Link an executable
--
linkExecutable :: Options -> [String] -> [String] -> String -> [RuleToken]
linkExecutable opts objs libs bin =
linker opts objs libs (applicationPath bin) | 186 | linkExecutable :: Options -> [String] -> [String] -> String -> [RuleToken]
linkExecutable opts objs libs bin =
linker opts objs libs (applicationPath bin) | 158 | linkExecutable opts objs libs bin =
linker opts objs libs (applicationPath bin) | 83 | true | true | 0 | 9 | 32 | 63 | 34 | 29 | null | null |
RAFIRAF/HASKELL | hehe.hs | mit | remFig :: Pos -> Board -> Board -- Removes (sets to E) a Figure at a given Position on the Board
remFig pos b = placeFig E b pos | 128 | remFig :: Pos -> Board -> Board
remFig pos b = placeFig E b pos | 63 | remFig pos b = placeFig E b pos | 31 | true | true | 0 | 8 | 28 | 40 | 17 | 23 | null | null |
rueshyna/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Locations/Get.hs | mpl-2.0 | -- | Part of \`name\`. Resource name for the location.
algAppsId :: Lens' AppsLocationsGet Text
algAppsId
= lens _algAppsId (\ s a -> s{_algAppsId = a}) | 154 | algAppsId :: Lens' AppsLocationsGet Text
algAppsId
= lens _algAppsId (\ s a -> s{_algAppsId = a}) | 99 | algAppsId
= lens _algAppsId (\ s a -> s{_algAppsId = a}) | 58 | true | true | 0 | 9 | 27 | 42 | 22 | 20 | null | null |
frantisekfarka/ghc-dsi | compiler/main/DynFlags.hs | bsd-3-clause | rawSettings :: DynFlags -> [(String, String)]
rawSettings dflags = sRawSettings (settings dflags) | 107 | rawSettings :: DynFlags -> [(String, String)]
rawSettings dflags = sRawSettings (settings dflags) | 107 | rawSettings dflags = sRawSettings (settings dflags) | 51 | false | true | 0 | 7 | 21 | 36 | 19 | 17 | null | null |
junjihashimoto/network-builder | network-builder.hs | bsd-3-clause | runCmd (CreateTunnel file) = runCmd'' file createTunnel createTunnel | 68 | runCmd (CreateTunnel file) = runCmd'' file createTunnel createTunnel | 68 | runCmd (CreateTunnel file) = runCmd'' file createTunnel createTunnel | 68 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
Happy0/snowdrift | Model/Project.hs | agpl-3.0 | summarizeProject :: Monad m => Entity Project -> [Entity Pledge] -> m ProjectSummary
summarizeProject project pledges = do
let share_value = projectShareValue $ entityVal project
share_count = ShareCount $ sum . map (pledgeFundedShares . entityVal) $ pledges
user_count = UserCount $ fromIntegral $ l... | 467 | summarizeProject :: Monad m => Entity Project -> [Entity Pledge] -> m ProjectSummary
summarizeProject project pledges = do
let share_value = projectShareValue $ entityVal project
share_count = ShareCount $ sum . map (pledgeFundedShares . entityVal) $ pledges
user_count = UserCount $ fromIntegral $ l... | 467 | summarizeProject project pledges = do
let share_value = projectShareValue $ entityVal project
share_count = ShareCount $ sum . map (pledgeFundedShares . entityVal) $ pledges
user_count = UserCount $ fromIntegral $ length pledges
return $ ProjectSummary (projectName $ entityVal project) (project... | 382 | false | true | 0 | 14 | 83 | 140 | 67 | 73 | null | null |
eddywestbrook/hobbits | archival/TermHack.hs | bsd-3-clause | mbPair :: Mb ctx (a, b) -> BPair ctx a b
mbPair = mbMatch Tag | 61 | mbPair :: Mb ctx (a, b) -> BPair ctx a b
mbPair = mbMatch Tag | 61 | mbPair = mbMatch Tag | 20 | false | true | 0 | 8 | 14 | 41 | 19 | 22 | null | null |
emwap/feldspar-compiler | lib/Feldspar/Compiler/Imperative/ExternalProgram.hs | bsd-3-clause | expToExpression' _ _ PreDec{} = error "expToExpression: No support for predec." | 79 | expToExpression' _ _ PreDec{} = error "expToExpression: No support for predec." | 79 | expToExpression' _ _ PreDec{} = error "expToExpression: No support for predec." | 79 | false | false | 0 | 6 | 10 | 20 | 9 | 11 | null | null |
5outh/wyas | Evaluator.hs | gpl-2.0 | cdr :: [LispVal] -> Either LispError LispVal
cdr [List (x:xs)] = return $ List xs | 89 | cdr :: [LispVal] -> Either LispError LispVal
cdr [List (x:xs)] = return $ List xs | 89 | cdr [List (x:xs)] = return $ List xs | 44 | false | true | 0 | 9 | 22 | 46 | 23 | 23 | null | null |
ChrisCoffey/rwh | src/RW/Chap8/TmpFile.hs | bsd-3-clause | escape :: Char -> String
escape c
| c `elem` regexChars = '\\':[c]
| otherwise = [c]
where regexChars = "\\+()^$.{}]|" | 138 | escape :: Char -> String
escape c
| c `elem` regexChars = '\\':[c]
| otherwise = [c]
where regexChars = "\\+()^$.{}]|" | 138 | escape c
| c `elem` regexChars = '\\':[c]
| otherwise = [c]
where regexChars = "\\+()^$.{}]|" | 113 | false | true | 1 | 8 | 40 | 56 | 29 | 27 | null | null |
tpsinnem/Idris-dev | src/Idris/Elab/Quasiquote.hs | bsd-3-clause | extractUnquotes n (PTactics tacs)
= do (tacs', exs) <- fmap unzip $ mapM (extractTUnquotes n) tacs
return (PTactics tacs', concat exs) | 143 | extractUnquotes n (PTactics tacs)
= do (tacs', exs) <- fmap unzip $ mapM (extractTUnquotes n) tacs
return (PTactics tacs', concat exs) | 143 | extractUnquotes n (PTactics tacs)
= do (tacs', exs) <- fmap unzip $ mapM (extractTUnquotes n) tacs
return (PTactics tacs', concat exs) | 143 | false | false | 0 | 11 | 29 | 68 | 31 | 37 | null | null |
lueck/standoff-tools | src/StandOff/XmlParsec.hs | gpl-3.0 | runXmlParser :: [Int] -> FilePath -> String -> IO [XML]
runXmlParser offsets location contents = do
return $ either (fail . (err++) . show) id $ runParser xmlDocument offsets location contents
where
err = "Error parsing XML input (" ++ location ++ "): "
-- | A simple xml parser that prints the positions of ta... | 381 | runXmlParser :: [Int] -> FilePath -> String -> IO [XML]
runXmlParser offsets location contents = do
return $ either (fail . (err++) . show) id $ runParser xmlDocument offsets location contents
where
err = "Error parsing XML input (" ++ location ++ "): "
-- | A simple xml parser that prints the positions of ta... | 381 | runXmlParser offsets location contents = do
return $ either (fail . (err++) . show) id $ runParser xmlDocument offsets location contents
where
err = "Error parsing XML input (" ++ location ++ "): "
-- | A simple xml parser that prints the positions of tags.
--
-- Usage:
-- > runhaskell XMLOffsets.hs < documen... | 325 | false | true | 0 | 13 | 74 | 99 | 52 | 47 | null | null |
nadirs/1HAD | exercises/HAD/Y2014/M03/D11/Exercise.hs | mit | -- | lcAlphabetFrom
-- Display the alaphabet in lower cas, starting from the letter given in
-- parameter.
-- If the parameter is not a lowercase letter, displays the alphabet from 'a'
--
-- Point-free is quite easy
--
-- Examples:
--
-- >>> lcAlphabetFrom 'a'
-- "abcdefghijklmnopqrstuvwxyz"
--
-- >>> lcAlphabetFrom 'e... | 536 | lcAlphabetFrom :: Char -> String
lcAlphabetFrom = undefined | 59 | lcAlphabetFrom = undefined | 26 | true | true | 0 | 7 | 77 | 42 | 29 | 13 | null | null |
capn-freako/lambda-ccc | src/LambdaCCC/ReifySimple.hs | bsd-3-clause | varPatS = "varPat#" | 19 | varPatS = "varPat#" | 19 | varPatS = "varPat#" | 19 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Phonology/Consonant.hs | mit | reifyBreathing (Abstract.C_κ, Nothing) = Just Rh_κ | 50 | reifyBreathing (Abstract.C_κ, Nothing) = Just Rh_κ | 50 | reifyBreathing (Abstract.C_κ, Nothing) = Just Rh_κ | 50 | false | false | 0 | 7 | 5 | 26 | 12 | 14 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.