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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mightymoose/liquidhaskell | benchmarks/containers-0.5.0.0/Data/Sequence.hs | bsd-3-clause | addDigits1 m1 (One a) b (Four c d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 93 | addDigits1 m1 (One a) b (Four c d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 93 | addDigits1 m1 (One a) b (Four c d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 93 | false | false | 1 | 7 | 26 | 73 | 31 | 42 | null | null |
maurer/ptrace | src/System/PTrace/Types.hs | bsd-3-clause | -- | A null pointer to anything (essentially the equivalent of the C NULL
traceNull :: PTracePtr a
traceNull = PTP nullPtr | 122 | traceNull :: PTracePtr a
traceNull = PTP nullPtr | 48 | traceNull = PTP nullPtr | 23 | true | true | 0 | 5 | 21 | 18 | 9 | 9 | null | null |
jsavatgy/talvipaivanseisauksen-ajanlasku | bmt-year.hs | gpl-3.0 | getddays t1 t2 = diffDays (lod t1) (lod t2)
where
lod = (localDay . zonedTimeToLocalTime) | 95 | getddays t1 t2 = diffDays (lod t1) (lod t2)
where
lod = (localDay . zonedTimeToLocalTime) | 95 | getddays t1 t2 = diffDays (lod t1) (lod t2)
where
lod = (localDay . zonedTimeToLocalTime) | 95 | false | false | 2 | 7 | 20 | 52 | 21 | 31 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Attrs/Attrs.hs | bsd-3-clause | btButton = attrSetButtonType BTbutton | 37 | btButton = attrSetButtonType BTbutton | 37 | btButton = attrSetButtonType BTbutton | 37 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
AlbinTheander/oden | test/Oden/Backend/GoBackendSpec.hs | mit | gen :: MonomorphedPackage -> Either CodegenError AST.SourceFile
gen pkg = runExcept (runReaderT (genPackage pkg) pkg) | 117 | gen :: MonomorphedPackage -> Either CodegenError AST.SourceFile
gen pkg = runExcept (runReaderT (genPackage pkg) pkg) | 117 | gen pkg = runExcept (runReaderT (genPackage pkg) pkg) | 53 | false | true | 0 | 9 | 14 | 42 | 20 | 22 | null | null |
jtdaugherty/vty-ui-builder-xml | src/Graphics/Vty/Widgets/Builder/Reader/XML/TH.hs | bsd-3-clause | doQuoteDec :: String -> Q [Dec]
doQuoteDec src = do
result <- runIO $ readDoc xmlReader "fixme" src
case result of
Left es -> do
forM_ es $ \(msg, _) -> report True $ msg
fail "Could not parse input document due to previous errors"
Right doc -> do
-- This may ... | 1,154 | doQuoteDec :: String -> Q [Dec]
doQuoteDec src = do
result <- runIO $ readDoc xmlReader "fixme" src
case result of
Left es -> do
forM_ es $ \(msg, _) -> report True $ msg
fail "Could not parse input document due to previous errors"
Right doc -> do
-- This may ... | 1,154 | doQuoteDec src = do
result <- runIO $ readDoc xmlReader "fixme" src
case result of
Left es -> do
forM_ es $ \(msg, _) -> report True $ msg
fail "Could not parse input document due to previous errors"
Right doc -> do
-- This may be the default config already, b... | 1,122 | false | true | 0 | 19 | 505 | 225 | 108 | 117 | null | null |
orion-42/cellular-automata-2d | Test.hs | mit | getIndex :: Index -> (Int, Int)
getIndex (a, b) = (getNonNegative a, getNonNegative b) | 86 | getIndex :: Index -> (Int, Int)
getIndex (a, b) = (getNonNegative a, getNonNegative b) | 86 | getIndex (a, b) = (getNonNegative a, getNonNegative b) | 54 | false | true | 0 | 6 | 13 | 42 | 23 | 19 | null | null |
andir/ganeti | test/hs/Test/Ganeti/JQueue/Objects.hs | bsd-2-clause | -- | Generates an static, empty job.
emptyJob :: (Monad m) => m QueuedJob
emptyJob = do
jid0 <- makeJobId 0
return $ QueuedJob jid0 [] justNoTs justNoTs justNoTs Nothing Nothing
-- | Generates a job ID. | 207 | emptyJob :: (Monad m) => m QueuedJob
emptyJob = do
jid0 <- makeJobId 0
return $ QueuedJob jid0 [] justNoTs justNoTs justNoTs Nothing Nothing
-- | Generates a job ID. | 170 | emptyJob = do
jid0 <- makeJobId 0
return $ QueuedJob jid0 [] justNoTs justNoTs justNoTs Nothing Nothing
-- | Generates a job ID. | 133 | true | true | 0 | 9 | 41 | 59 | 29 | 30 | null | null |
green-haskell/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | -- |Exception handling within STM actions.
catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
catchSTM (STM m) handler = STM $ catchSTM# m handler'
where
handler' e = case fromException e of
Just e' -> unSTM (handler e')
Nothing -> raiseIO# e
-- | Low-level pr... | 597 | catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
catchSTM (STM m) handler = STM $ catchSTM# m handler'
where
handler' e = case fromException e of
Just e' -> unSTM (handler e')
Nothing -> raiseIO# e
-- | Low-level primitive on which always and alwaysSucceeds ... | 554 | catchSTM (STM m) handler = STM $ catchSTM# m handler'
where
handler' e = case fromException e of
Just e' -> unSTM (handler e')
Nothing -> raiseIO# e
-- | Low-level primitive on which always and alwaysSucceeds are built.
-- checkInv differs form these in that (i) the ... | 496 | true | true | 0 | 12 | 151 | 112 | 55 | 57 | null | null |
mrb/tee-io | src/Handler/Output.hs | mit | sendTextDataAck :: MonadIO m => Text -> WebSocketsT m ()
sendTextDataAck msg = do
sendTextData msg
void receiveTextData
-- Just fixing the type to Text | 160 | sendTextDataAck :: MonadIO m => Text -> WebSocketsT m ()
sendTextDataAck msg = do
sendTextData msg
void receiveTextData
-- Just fixing the type to Text | 160 | sendTextDataAck msg = do
sendTextData msg
void receiveTextData
-- Just fixing the type to Text | 103 | false | true | 0 | 9 | 33 | 50 | 21 | 29 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/Pretty/Maple.hs | bsd-3-clause | mapleMeasureOp Beta = \(e1 :* e2 :* End) -> app2 "BetaD" e1 e2 | 72 | mapleMeasureOp Beta = \(e1 :* e2 :* End) -> app2 "BetaD" e1 e2 | 72 | mapleMeasureOp Beta = \(e1 :* e2 :* End) -> app2 "BetaD" e1 e2 | 72 | false | false | 0 | 8 | 22 | 32 | 16 | 16 | null | null |
ezyang/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprAddr (AddrRegImm r1 (ImmInteger i))
= hcat [ integer i, char '(', pprReg r1, char ')' ] | 92 | pprAddr (AddrRegImm r1 (ImmInteger i))
= hcat [ integer i, char '(', pprReg r1, char ')' ] | 92 | pprAddr (AddrRegImm r1 (ImmInteger i))
= hcat [ integer i, char '(', pprReg r1, char ')' ] | 92 | false | false | 0 | 9 | 18 | 50 | 24 | 26 | null | null |
kawu/feature-structure | src/NLP/FeatureStructure/Join.hs | bsd-2-clause | -- | Merge two nodes under the given identifiers and populate
-- queue with new node-pairs which need to be joined.
merge
:: (Functor m, Monad m, Ord i, Ord f, Eq a)
=> i -> i -> JoinT i f a m ()
merge i j = do
n <- getNode i
m <- getNode j
doit n m
where
doit (Interior p) (Interior q) = do
... | 1,190 | merge
:: (Functor m, Monad m, Ord i, Ord f, Eq a)
=> i -> i -> JoinT i f a m ()
merge i j = do
n <- getNode i
m <- getNode j
doit n m
where
doit (Interior p) (Interior q) = do
-- TODO: We could probably speed it up by checking if some
-- of the pairs have not been already joine... | 1,074 | merge i j = do
n <- getNode i
m <- getNode j
doit n m
where
doit (Interior p) (Interior q) = do
-- TODO: We could probably speed it up by checking if some
-- of the pairs have not been already joined.
mapM_ push $ joint p q
setNode i $ Interior $ M.union p q
rem... | 986 | true | true | 0 | 9 | 336 | 379 | 183 | 196 | null | null |
urbanslug/ghc | compiler/cmm/CmmExpr.hs | bsd-3-clause | cmmLitType dflags (CmmLabelOff lbl _) = cmmLabelType dflags lbl | 64 | cmmLitType dflags (CmmLabelOff lbl _) = cmmLabelType dflags lbl | 64 | cmmLitType dflags (CmmLabelOff lbl _) = cmmLabelType dflags lbl | 64 | false | false | 0 | 7 | 9 | 24 | 11 | 13 | null | null |
redfish64/IrcScanner | src/IrcScanner/KeywordRulesParser.hs | bsd-3-clause | listEitherToEitherLists :: [Either a b] -> a -> Either [a] [b]
listEitherToEitherLists lns placeholder = case doit lns (Right []) of
Left x -> Left (reverse x)
Right y -> Right (reverse y)
where
doit (Right x : xs) (Right ys) = doit xs (Right (x : ys))
doit (Left y : ys) (Right xs) = doit ys (Left $ y : (... | 496 | listEitherToEitherLists :: [Either a b] -> a -> Either [a] [b]
listEitherToEitherLists lns placeholder = case doit lns (Right []) of
Left x -> Left (reverse x)
Right y -> Right (reverse y)
where
doit (Right x : xs) (Right ys) = doit xs (Right (x : ys))
doit (Left y : ys) (Right xs) = doit ys (Left $ y : (... | 496 | listEitherToEitherLists lns placeholder = case doit lns (Right []) of
Left x -> Left (reverse x)
Right y -> Right (reverse y)
where
doit (Right x : xs) (Right ys) = doit xs (Right (x : ys))
doit (Left y : ys) (Right xs) = doit ys (Left $ y : (fmap (const placeholder) xs))
doit (Right _ : xs) (Left ys)... | 433 | false | true | 0 | 11 | 126 | 296 | 145 | 151 | null | null |
cawinkelmann/api-server | test/Api/Mappers/ResourceSpec.hs | mit | spec :: Spec
spec = beforeAll resetDb $ do
describe "find" $ do
it "finds a Resource by its ID" $ withRollback $ \q -> do
found <- q $ do
resource <- fromJust <$> Resource.insert mockResFields
Resource.find $ res_id resource
res_fields (fromJust found) `shouldBe` mockResFields
... | 2,210 | spec :: Spec
spec = beforeAll resetDb $ do
describe "find" $ do
it "finds a Resource by its ID" $ withRollback $ \q -> do
found <- q $ do
resource <- fromJust <$> Resource.insert mockResFields
Resource.find $ res_id resource
res_fields (fromJust found) `shouldBe` mockResFields
... | 2,210 | spec = beforeAll resetDb $ do
describe "find" $ do
it "finds a Resource by its ID" $ withRollback $ \q -> do
found <- q $ do
resource <- fromJust <$> Resource.insert mockResFields
Resource.find $ res_id resource
res_fields (fromJust found) `shouldBe` mockResFields
it "returns N... | 2,197 | false | true | 0 | 22 | 575 | 651 | 306 | 345 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Kinds.hs | bsd-3-clause | mguCoeffectTypesFromCoeffects :: (?globals :: Globals)
=> Span -> Coeffect -> Coeffect -> Checker (Type, (Coeffect -> Coeffect, Coeffect -> Coeffect))
mguCoeffectTypesFromCoeffects s c1 c2 = do
coeffTy1 <- inferCoeffectType s c1
coeffTy2 <- inferCoeffectType s c2
mguCoeffectTypes s coeffTy1 coeff... | 550 | mguCoeffectTypesFromCoeffects :: (?globals :: Globals)
=> Span -> Coeffect -> Coeffect -> Checker (Type, (Coeffect -> Coeffect, Coeffect -> Coeffect))
mguCoeffectTypesFromCoeffects s c1 c2 = do
coeffTy1 <- inferCoeffectType s c1
coeffTy2 <- inferCoeffectType s c2
mguCoeffectTypes s coeffTy1 coeff... | 550 | mguCoeffectTypesFromCoeffects s c1 c2 = do
coeffTy1 <- inferCoeffectType s c1
coeffTy2 <- inferCoeffectType s c2
mguCoeffectTypes s coeffTy1 coeffTy2
-- Given a type term, works out if its kind is actually an effect type (promoted)
-- if so, returns `Right effTy` where `effTy` is the effect type
-- otherwise, re... | 382 | false | true | 0 | 12 | 106 | 99 | 51 | 48 | null | null |
ecaustin/haskhol-core | src/HaskHOL/Core/Basics/Stateful.hs | bsd-2-clause | {-|
Constructor for boolean conjunctions. Throws a 'HOLException' if the internal
call to 'mkBinary' fails.
-}
mkConj :: (MonadCatch m, ?constsFun :: m (Map Text HOLTerm))
=> HOLTerm -> HOLTerm -> m HOLTerm
mkConj = mkBinary "/\\" | 243 | mkConj :: (MonadCatch m, ?constsFun :: m (Map Text HOLTerm))
=> HOLTerm -> HOLTerm -> m HOLTerm
mkConj = mkBinary "/\\" | 127 | mkConj = mkBinary "/\\" | 23 | true | true | 0 | 9 | 49 | 52 | 27 | 25 | null | null |
eklavya/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processFnInfo :: Archive -> Idris ()
processFnInfo ar = do
ds <- getEntry [] "ibc_fninfo" ar
mapM_ (\ (n, a) -> setFnInfo n a) ds | 137 | processFnInfo :: Archive -> Idris ()
processFnInfo ar = do
ds <- getEntry [] "ibc_fninfo" ar
mapM_ (\ (n, a) -> setFnInfo n a) ds | 137 | processFnInfo ar = do
ds <- getEntry [] "ibc_fninfo" ar
mapM_ (\ (n, a) -> setFnInfo n a) ds | 100 | false | true | 0 | 11 | 32 | 71 | 33 | 38 | null | null |
RyanBeatty/Falcon | test/TestConnectFour/TestBoard.hs | gpl-2.0 | --testPlaceSquareInColumn = testGroup "placeSquareInColumn: HUnit Tests" $
-- [ testCase "Tests that placeSquareInColumn n times filles up Column" $
-- ((!! numRows) . iterate (placeSquareInColumn blackSquare)) (replicate numRows emptySquare) @?= replicate numRows blackSquare
-- ]
-- where
-- | HUnit ... | 2,344 | testCheckWonDiagonals = testGroup "checkWonDiagonals: HUnit Tests" $
[ testCase "Check that an empty board is not won on the diagonals" $
checkWonDiagonals redSquare initialBoard @?= False
, testCase "check that the board is won if there is four-in-a-row on a main diagonal" $
checkWonDiagonals ... | 1,934 | testCheckWonDiagonals = testGroup "checkWonDiagonals: HUnit Tests" $
[ testCase "Check that an empty board is not won on the diagonals" $
checkWonDiagonals redSquare initialBoard @?= False
, testCase "check that the board is won if there is four-in-a-row on a main diagonal" $
checkWonDiagonals ... | 1,934 | true | false | 0 | 9 | 725 | 307 | 185 | 122 | null | null |
forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_fail/T8044.hs | bsd-3-clause | frob _ = XChar | 17 | frob _ = XChar | 17 | frob _ = XChar | 17 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
erikd/hs-tls | core/Network/TLS/Extra/Cipher.hs | bsd-3-clause | cipher_ECDHE_RSA_AES128CBC_SHA256 :: Cipher
cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher
{ cipherID = 0xC027
, cipherName = "ECDHE-RSA-AES128CBC-SHA256"
, cipherBulk = bulk_aes128
, cipherHash = SHA256
, cipherPRFHash = Just SHA256
, cipherKeyExchange = Ciph... | 405 | cipher_ECDHE_RSA_AES128CBC_SHA256 :: Cipher
cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher
{ cipherID = 0xC027
, cipherName = "ECDHE-RSA-AES128CBC-SHA256"
, cipherBulk = bulk_aes128
, cipherHash = SHA256
, cipherPRFHash = Just SHA256
, cipherKeyExchange = Ciph... | 405 | cipher_ECDHE_RSA_AES128CBC_SHA256 = Cipher
{ cipherID = 0xC027
, cipherName = "ECDHE-RSA-AES128CBC-SHA256"
, cipherBulk = bulk_aes128
, cipherHash = SHA256
, cipherPRFHash = Just SHA256
, cipherKeyExchange = CipherKeyExchange_ECDHE_RSA
, cipherMinVer ... | 361 | false | true | 0 | 8 | 119 | 66 | 39 | 27 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * HTools tag prefixes
exTagsPrefix :: String
exTagsPrefix = Tags.exTagsPrefix | 81 | exTagsPrefix :: String
exTagsPrefix = Tags.exTagsPrefix | 55 | exTagsPrefix = Tags.exTagsPrefix | 32 | true | true | 0 | 5 | 11 | 14 | 8 | 6 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec") | 66 | showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec") | 66 | showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec") | 66 | false | false | 1 | 7 | 15 | 20 | 8 | 12 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Compiler.hs | bsd-3-clause | compileExpr (SinhFloat e) = compileSubExpr "sinh" e | 51 | compileExpr (SinhFloat e) = compileSubExpr "sinh" e | 51 | compileExpr (SinhFloat e) = compileSubExpr "sinh" e | 51 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/Message.hs | bsd-3-clause | -- The following are internal failures. They should not occur. In the
-- interest of not crashing unnecessarily, we still just print an error
-- message though.
showFR _ (MalformedFlagChoice qfn) = " (INTERNAL ERROR: MALFORMED FLAG CHOICE: " ++ showQFN qfn ++ ")" | 270 | showFR _ (MalformedFlagChoice qfn) = " (INTERNAL ERROR: MALFORMED FLAG CHOICE: " ++ showQFN qfn ++ ")" | 109 | showFR _ (MalformedFlagChoice qfn) = " (INTERNAL ERROR: MALFORMED FLAG CHOICE: " ++ showQFN qfn ++ ")" | 109 | true | false | 1 | 7 | 50 | 34 | 16 | 18 | null | null |
ndmitchell/hlint | src/Hint/List.hs | bsd-3-clause | suggestExpr :: LHsExpr GhcPs -> LHsExpr GhcPs -> [Refactoring R.SrcSpan]
suggestExpr o o2 = [Replace Expr (toSSA o) [] (unsafePrettyPrint o2)] | 142 | suggestExpr :: LHsExpr GhcPs -> LHsExpr GhcPs -> [Refactoring R.SrcSpan]
suggestExpr o o2 = [Replace Expr (toSSA o) [] (unsafePrettyPrint o2)] | 142 | suggestExpr o o2 = [Replace Expr (toSSA o) [] (unsafePrettyPrint o2)] | 69 | false | true | 0 | 9 | 20 | 64 | 31 | 33 | null | null |
mboes/hs-asn1 | parse/Data/ASN1/Parse.hs | bsd-3-clause | -- | run the parse monad over a stream and returns the result and the remaining ASN1 Stream.
runParseASN1State :: ParseASN1 a -> [ASN1] -> Either String (a,[ASN1])
runParseASN1State f s =
case runState (runErrT (runP f)) s of
(Left err, _) -> Left err
(Right r, l) -> Right (r,l)
-- | run the parse... | 462 | runParseASN1State :: ParseASN1 a -> [ASN1] -> Either String (a,[ASN1])
runParseASN1State f s =
case runState (runErrT (runP f)) s of
(Left err, _) -> Left err
(Right r, l) -> Right (r,l)
-- | run the parse monad over a stream and returns the result.
--
-- If there's still some asn1 object in the s... | 369 | runParseASN1State f s =
case runState (runErrT (runP f)) s of
(Left err, _) -> Left err
(Right r, l) -> Right (r,l)
-- | run the parse monad over a stream and returns the result.
--
-- If there's still some asn1 object in the state after calling f,
-- an error will be raised. | 298 | true | true | 0 | 10 | 105 | 116 | 61 | 55 | null | null |
hvr/vector | Data/Vector/Storable.hs | bsd-3-clause | foldr = G.foldr | 15 | foldr = G.foldr | 15 | foldr = G.foldr | 15 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
spencerjanssen/cabal2nix | generate-cabal-file.hs | bsd-3-clause | mkExecutable :: NonEmptyString -> [ExecutableField] -> Section
mkExecutable exe opt = executable exe $ mainIs (exe++".hs") : opt ++ commonBuildOptions | 150 | mkExecutable :: NonEmptyString -> [ExecutableField] -> Section
mkExecutable exe opt = executable exe $ mainIs (exe++".hs") : opt ++ commonBuildOptions | 150 | mkExecutable exe opt = executable exe $ mainIs (exe++".hs") : opt ++ commonBuildOptions | 87 | false | true | 0 | 10 | 19 | 52 | 26 | 26 | null | null |
dmuneras/LambdaMethods | src/FuncionesInterfaz.hs | gpl-2.0 | acercaDe :: IO ()
acercaDe = do
initGUI
windowAyuda <- windowNew
set windowAyuda [windowTitle := "Acerca de", windowDefaultWidth := 400,
windowDefaultHeight := 400 ]
contentPrincipal <- vBoxNew True 10
containerAdd windowAyuda contentPrincipal
contentAyuda <- vBoxNew Fals... | 596 | acercaDe :: IO ()
acercaDe = do
initGUI
windowAyuda <- windowNew
set windowAyuda [windowTitle := "Acerca de", windowDefaultWidth := 400,
windowDefaultHeight := 400 ]
contentPrincipal <- vBoxNew True 10
containerAdd windowAyuda contentPrincipal
contentAyuda <- vBoxNew False ... | 594 | acercaDe = do
initGUI
windowAyuda <- windowNew
set windowAyuda [windowTitle := "Acerca de", windowDefaultWidth := 400,
windowDefaultHeight := 400 ]
contentPrincipal <- vBoxNew True 10
containerAdd windowAyuda contentPrincipal
contentAyuda <- vBoxNew False 0
boxPackStart ... | 576 | false | true | 0 | 10 | 147 | 154 | 65 | 89 | null | null |
giorgidze/HCodecs | src/Codec/Midi.hs | bsd-3-clause | isProgramChange _ = False | 25 | isProgramChange _ = False | 25 | isProgramChange _ = False | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
prowdsponsor/esqueleto | src/Database/Esqueleto/Internal/Sql.hs | bsd-3-clause | makeWhere :: IdentInfo -> WhereClause -> (TLB.Builder, [PersistValue])
makeWhere _ NoWhere = mempty | 120 | makeWhere :: IdentInfo -> WhereClause -> (TLB.Builder, [PersistValue])
makeWhere _ NoWhere = mempty | 120 | makeWhere _ NoWhere = mempty | 49 | false | true | 0 | 8 | 33 | 35 | 19 | 16 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | {-!
deriving instance Binary SyntaxInfo
!-}
defaultSyntax = Syn [] [] [] [] [] id False False False Nothing 0 initDSL 0 True True | 130 | defaultSyntax = Syn [] [] [] [] [] id False False False Nothing 0 initDSL 0 True True | 85 | defaultSyntax = Syn [] [] [] [] [] id False False False Nothing 0 initDSL 0 True True | 85 | true | false | 1 | 6 | 24 | 55 | 24 | 31 | null | null |
HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen/GPU/ToOpenCL.hs | isc | genCUDAPrelude :: T.Text
genCUDAPrelude =
[untrimming|
#define FUTHARK_CUDA
#define FUTHARK_F64_ENABLED
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long... | 2,627 | genCUDAPrelude :: T.Text
genCUDAPrelude =
[untrimming|
#define FUTHARK_CUDA
#define FUTHARK_F64_ENABLED
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long... | 2,627 | genCUDAPrelude =
[untrimming|
#define FUTHARK_CUDA
#define FUTHARK_F64_ENABLED
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef uint8_... | 2,602 | false | true | 0 | 7 | 474 | 29 | 17 | 12 | null | null |
alexander-at-github/eta | compiler/ETA/HsSyn/HsTypes.hs | bsd-3-clause | ppr_mono_ty :: (OutputableBndr name) => TyPrec -> HsType name -> SDoc
ppr_mono_ty ctxt_prec (HsForAllTy exp extra tvs ctxt ty)
= maybeParen ctxt_prec FunPrec $
sep [pprHsForAllExtra exp extra tvs ctxt, ppr_mono_lty TopPrec ty] | 232 | ppr_mono_ty :: (OutputableBndr name) => TyPrec -> HsType name -> SDoc
ppr_mono_ty ctxt_prec (HsForAllTy exp extra tvs ctxt ty)
= maybeParen ctxt_prec FunPrec $
sep [pprHsForAllExtra exp extra tvs ctxt, ppr_mono_lty TopPrec ty] | 232 | ppr_mono_ty ctxt_prec (HsForAllTy exp extra tvs ctxt ty)
= maybeParen ctxt_prec FunPrec $
sep [pprHsForAllExtra exp extra tvs ctxt, ppr_mono_lty TopPrec ty] | 162 | false | true | 0 | 8 | 38 | 88 | 41 | 47 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateRoute.hs | mpl-2.0 | -- | The ID of a NAT instance in your VPC. The operation fails if you specify
-- an instance ID unless exactly one network interface is attached.
crInstanceId :: Lens' CreateRoute (Maybe Text)
crInstanceId = lens _crInstanceId (\ s a -> s{_crInstanceId = a}) | 258 | crInstanceId :: Lens' CreateRoute (Maybe Text)
crInstanceId = lens _crInstanceId (\ s a -> s{_crInstanceId = a}) | 112 | crInstanceId = lens _crInstanceId (\ s a -> s{_crInstanceId = a}) | 65 | true | true | 0 | 9 | 44 | 47 | 26 | 21 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/LambdaFunction.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
lfDeadLetterConfig :: Lens' LambdaFunction (Maybe LambdaFunctionDeadLetterConfig)
lfDeadLetterConfig = lens _lambdaFunctionDeadLetterConfig (\s a -> s { _lambdaFunctionDeadLetterConf... | 329 | lfDeadLetterConfig :: Lens' LambdaFunction (Maybe LambdaFunctionDeadLetterConfig)
lfDeadLetterConfig = lens _lambdaFunctionDeadLetterConfig (\s a -> s { _lambdaFunctionDeadLetterConfig = a }) | 191 | lfDeadLetterConfig = lens _lambdaFunctionDeadLetterConfig (\s a -> s { _lambdaFunctionDeadLetterConfig = a }) | 109 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
Purview/purview | src/Graphics/Forensics/Analyser/LocalCFA.hs | gpl-3.0 | getDiagonalVariances :: (Source r1 Float) =>
Array r1 DIM2 Float -> Vector Float
getDiagonalVariances !arr =
getDiagonals $ w + h - 1
where
(Z :. w :. h) = extent arr
{- Get the variance of all diagonals in the array -}
{-# INLINE getDiagonals #-}
getDiagonals :: Int -> Vector... | 926 | getDiagonalVariances :: (Source r1 Float) =>
Array r1 DIM2 Float -> Vector Float
getDiagonalVariances !arr =
getDiagonals $ w + h - 1
where
(Z :. w :. h) = extent arr
{- Get the variance of all diagonals in the array -}
{-# INLINE getDiagonals #-}
getDiagonals :: Int -> Vector... | 926 | getDiagonalVariances !arr =
getDiagonals $ w + h - 1
where
(Z :. w :. h) = extent arr
{- Get the variance of all diagonals in the array -}
{-# INLINE getDiagonals #-}
getDiagonals :: Int -> Vector Float
getDiagonals s = V.generate s $ variance . getDiagonalAt
{- Get a single diagonal at pos... | 822 | false | true | 10 | 10 | 292 | 295 | 139 | 156 | null | null |
olsner/ghc | compiler/main/GhcMake.hs | bsd-3-clause | typecheckLoop :: DynFlags -> HscEnv -> [ModuleName] -> IO HscEnv
typecheckLoop dflags hsc_env mods = do
debugTraceMsg dflags 2 $
text "Re-typechecking loop: " <> ppr mods
new_hpt <-
fixIO $ \new_hpt -> do
let new_hsc_env = hsc_env{ hsc_HPT = new_hpt }
mds <- initIfaceCheck (text "typecheckLoop"... | 732 | typecheckLoop :: DynFlags -> HscEnv -> [ModuleName] -> IO HscEnv
typecheckLoop dflags hsc_env mods = do
debugTraceMsg dflags 2 $
text "Re-typechecking loop: " <> ppr mods
new_hpt <-
fixIO $ \new_hpt -> do
let new_hsc_env = hsc_env{ hsc_HPT = new_hpt }
mds <- initIfaceCheck (text "typecheckLoop"... | 732 | typecheckLoop dflags hsc_env mods = do
debugTraceMsg dflags 2 $
text "Re-typechecking loop: " <> ppr mods
new_hpt <-
fixIO $ \new_hpt -> do
let new_hsc_env = hsc_env{ hsc_HPT = new_hpt }
mds <- initIfaceCheck (text "typecheckLoop") new_hsc_env $
mapM (typecheckIface . hm_iface) ... | 667 | false | true | 0 | 21 | 221 | 231 | 112 | 119 | null | null |
nomeata/incredible | logic/Rules.hs | mit | renameRule :: Rule -> Rule
renameRule r = rule'
where
allVars :: [Var]
allVars = S.toList $ S.fromList $
freeVars r ++ localVars r ++
concat [ portScopes p ++ fv (portProp p) | p <- M.elems (ports r) ]
(toRename, takenNames) =
second (S.fromList . map name2String) $
partiti... | 1,154 | renameRule :: Rule -> Rule
renameRule r = rule'
where
allVars :: [Var]
allVars = S.toList $ S.fromList $
freeVars r ++ localVars r ++
concat [ portScopes p ++ fv (portProp p) | p <- M.elems (ports r) ]
(toRename, takenNames) =
second (S.fromList . map name2String) $
partiti... | 1,154 | renameRule r = rule'
where
allVars :: [Var]
allVars = S.toList $ S.fromList $
freeVars r ++ localVars r ++
concat [ portScopes p ++ fv (portProp p) | p <- M.elems (ports r) ]
(toRename, takenNames) =
second (S.fromList . map name2String) $
partition (\n -> name2Integer n > ... | 1,127 | false | true | 2 | 14 | 382 | 507 | 257 | 250 | null | null |
Enamex/Idris-dev | src/Idris/Core/Unify.hs | bsd-3-clause | recoverable (TType _) (P (TCon _ _) y _) = False | 48 | recoverable (TType _) (P (TCon _ _) y _) = False | 48 | recoverable (TType _) (P (TCon _ _) y _) = False | 48 | false | false | 1 | 8 | 10 | 38 | 17 | 21 | null | null |
GaloisInc/halvm-ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | xtE (D env (Tick t e)) f m = m { cm_tick = cm_tick m |> xtG (D env e)
|>> xtTickish t f } | 148 | xtE (D env (Tick t e)) f m = m { cm_tick = cm_tick m |> xtG (D env e)
|>> xtTickish t f } | 148 | xtE (D env (Tick t e)) f m = m { cm_tick = cm_tick m |> xtG (D env e)
|>> xtTickish t f } | 148 | false | false | 0 | 11 | 83 | 64 | 31 | 33 | null | null |
vlopezj/genifunctors | Data/Generics/Genifunctors.hs | bsd-3-clause | traversePrimitive :: Exp -> Exp
traversePrimitive e = VarE 'pure `AppE` e | 73 | traversePrimitive :: Exp -> Exp
traversePrimitive e = VarE 'pure `AppE` e | 73 | traversePrimitive e = VarE 'pure `AppE` e | 41 | false | true | 0 | 6 | 11 | 28 | 15 | 13 | null | null |
karamellpelle/grid | designer/source/Game/LevelPuzzleMode/Iteration.hs | gpl-3.0 | --------------------------------------------------------------------------------
-- iterationPlay
-- | setup and play current level
iterationBeginPlay :: Iteration LevelPuzzleWorld RunWorld
iterationBeginPlay =
makeIteration $ \lvl run -> do
(lvl', run') <- outputBeginPlay lvl run
case levelpuz... | 692 | iterationBeginPlay :: Iteration LevelPuzzleWorld RunWorld
iterationBeginPlay =
makeIteration $ \lvl run -> do
(lvl', run') <- outputBeginPlay lvl run
case levelpuzzleIsComplete lvl' of
False -> do
lvl'' <- levelpuzzleBeginLevel lvl'
-- set tick to world ... | 556 | iterationBeginPlay =
makeIteration $ \lvl run -> do
(lvl', run') <- outputBeginPlay lvl run
case levelpuzzleIsComplete lvl' of
False -> do
lvl'' <- levelpuzzleBeginLevel lvl'
-- set tick to world tick of LevelPuzzleWorld
tickClockLevelPuz... | 498 | true | true | 0 | 15 | 216 | 108 | 52 | 56 | null | null |
Jonplussed/midi-free | src/Sound/MIDI/Values/Note.hs | gpl-3.0 | b4 = Note 59 | 18 | b4 = Note 59 | 18 | b4 = Note 59 | 18 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
lfritz/python-type-inference | python-type-inference/src/Language/Python/TypeInference/CFG/ToFragment.hs | bsd-3-clause | newFragment :: ProgramPoint -> SrcSpan
-> StateT ConversionState TypeInferenceMonad (Label, Fragment)
newFragment pp srcSpan =
do l <- newLabel
pos <- lift $ toPosition srcSpan
let f = fragment (Map.singleton l (pp, pos))
Set.empty
(Set.singl... | 444 | newFragment :: ProgramPoint -> SrcSpan
-> StateT ConversionState TypeInferenceMonad (Label, Fragment)
newFragment pp srcSpan =
do l <- newLabel
pos <- lift $ toPosition srcSpan
let f = fragment (Map.singleton l (pp, pos))
Set.empty
(Set.singl... | 444 | newFragment pp srcSpan =
do l <- newLabel
pos <- lift $ toPosition srcSpan
let f = fragment (Map.singleton l (pp, pos))
Set.empty
(Set.singleton l)
(Set.singleton l)
return (l, f)
-- | Like 'newFragment', but don't return ... | 330 | false | true | 0 | 13 | 159 | 123 | 61 | 62 | null | null |
krisajenkins/BellRinger | src/Render.hs | epl-1.0 | marketDataView _ NotFound = span "Data not found. Sadness." | 59 | marketDataView _ NotFound = span "Data not found. Sadness." | 59 | marketDataView _ NotFound = span "Data not found. Sadness." | 59 | false | false | 1 | 5 | 8 | 16 | 6 | 10 | null | null |
jgoerzen/dfsbuild | Actions/ConfigFiles.hs | gpl-2.0 | getidstring :: DFSEnv -> String
getidstring env =
printf "DFS: %s %s (%s)" (eget env "name") (eget env "version")
(datestr env) | 143 | getidstring :: DFSEnv -> String
getidstring env =
printf "DFS: %s %s (%s)" (eget env "name") (eget env "version")
(datestr env) | 143 | getidstring env =
printf "DFS: %s %s (%s)" (eget env "name") (eget env "version")
(datestr env) | 111 | false | true | 0 | 7 | 36 | 49 | 24 | 25 | null | null |
music-suite/music-score | src/Music/Time/Types.hs | bsd-3-clause | -- |
-- Reflect a span through an arbitrary point.
--
reflectSpan :: Time -> Span -> Span
reflectSpan p = over (onsetAndOffset . both) (reflectThrough p) | 153 | reflectSpan :: Time -> Span -> Span
reflectSpan p = over (onsetAndOffset . both) (reflectThrough p) | 99 | reflectSpan p = over (onsetAndOffset . both) (reflectThrough p) | 63 | true | true | 0 | 8 | 26 | 49 | 24 | 25 | null | null |
danr/hipspec | examples/old-examples/MergeSort.hs | gpl-3.0 | msort (NCons x NNil) = NCons x NNil | 35 | msort (NCons x NNil) = NCons x NNil | 35 | msort (NCons x NNil) = NCons x NNil | 35 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
mfs/hsdf | Main.hs | gpl-3.0 | main = do
b <- readFile "/etc/mtab"
let d = filter (\a -> "/dev/" `isPrefixOf` (a !! 0)) [words x | x <- lines b]
let s = map (take 3) (sortBy (\a b -> compare (a !! 1) (b !! 1)) d)
printf "%-25s %-18s %18s %18s %18s %s\n"
(color "Mount" 0 33)
(color "Type" 0 33)
(color... | 449 | main = do
b <- readFile "/etc/mtab"
let d = filter (\a -> "/dev/" `isPrefixOf` (a !! 0)) [words x | x <- lines b]
let s = map (take 3) (sortBy (\a b -> compare (a !! 1) (b !! 1)) d)
printf "%-25s %-18s %18s %18s %18s %s\n"
(color "Mount" 0 33)
(color "Type" 0 33)
(color... | 449 | main = do
b <- readFile "/etc/mtab"
let d = filter (\a -> "/dev/" `isPrefixOf` (a !! 0)) [words x | x <- lines b]
let s = map (take 3) (sortBy (\a b -> compare (a !! 1) (b !! 1)) d)
printf "%-25s %-18s %18s %18s %18s %s\n"
(color "Mount" 0 33)
(color "Type" 0 33)
(color... | 449 | false | false | 1 | 18 | 163 | 215 | 104 | 111 | null | null |
rubik/stack | src/Stack/Docker.hs | bsd-3-clause | -- | Directory where 'stack' executable is bind-mounted in Docker container
hostBinDir :: FilePath
hostBinDir = "/opt/host/bin" | 127 | hostBinDir :: FilePath
hostBinDir = "/opt/host/bin" | 51 | hostBinDir = "/opt/host/bin" | 28 | true | true | 0 | 4 | 16 | 12 | 7 | 5 | null | null |
nkartashov/haskell | hw08/Combinators.hs | gpl-2.0 | invEndBy :: Parser a -> Parser b -> Parser [b]
invEndBy p1 p2 = many $ p1 *> p2 | 79 | invEndBy :: Parser a -> Parser b -> Parser [b]
invEndBy p1 p2 = many $ p1 *> p2 | 79 | invEndBy p1 p2 = many $ p1 *> p2 | 32 | false | true | 4 | 9 | 18 | 52 | 23 | 29 | null | null |
aavogt/HListPlugin | HListPlugin.hs | mit | ini = do
Found _loc hlist <- findImportedModule (mkModuleName "HList") Nothing
let hlistTC :: String -> TcPluginM TyCon
hlistTC str = tcLookupTyCon =<< lookupOrig hlist (mkTcOcc str)
hlength <- hlistTC "HLength"
sameLength <- hlistTC "SameLength"
hNat <- hlistTC "HNat"
hlist <- hlistTC "HList"
mapC... | 561 | ini = do
Found _loc hlist <- findImportedModule (mkModuleName "HList") Nothing
let hlistTC :: String -> TcPluginM TyCon
hlistTC str = tcLookupTyCon =<< lookupOrig hlist (mkTcOcc str)
hlength <- hlistTC "HLength"
sameLength <- hlistTC "SameLength"
hNat <- hlistTC "HNat"
hlist <- hlistTC "HList"
mapC... | 561 | ini = do
Found _loc hlist <- findImportedModule (mkModuleName "HList") Nothing
let hlistTC :: String -> TcPluginM TyCon
hlistTC str = tcLookupTyCon =<< lookupOrig hlist (mkTcOcc str)
hlength <- hlistTC "HLength"
sameLength <- hlistTC "SameLength"
hNat <- hlistTC "HNat"
hlist <- hlistTC "HList"
mapC... | 561 | false | false | 1 | 14 | 150 | 183 | 85 | 98 | null | null |
michael-sloma/panRNA | src/Main.hs | gpl-2.0 | getResult (Left e) = error $ "parse error: " ++ show e | 54 | getResult (Left e) = error $ "parse error: " ++ show e | 54 | getResult (Left e) = error $ "parse error: " ++ show e | 54 | false | false | 0 | 7 | 11 | 26 | 12 | 14 | null | null |
lih/Alpha | src/Syntax/Parse.hs | bsd-2-clause | mkNode = return . Group . concat | 32 | mkNode = return . Group . concat | 32 | mkNode = return . Group . concat | 32 | false | false | 0 | 6 | 6 | 14 | 7 | 7 | null | null |
lpeterse/koka | src/Common/Error.hs | apache-2.0 | addWarnings ws err
= case err of
Error msg ws2 -> Error msg (ws ++ ws2)
Ok x ws2 -> Ok x (ws ++ ws2) | 119 | addWarnings ws err
= case err of
Error msg ws2 -> Error msg (ws ++ ws2)
Ok x ws2 -> Ok x (ws ++ ws2) | 119 | addWarnings ws err
= case err of
Error msg ws2 -> Error msg (ws ++ ws2)
Ok x ws2 -> Ok x (ws ++ ws2) | 119 | false | false | 1 | 10 | 43 | 65 | 29 | 36 | null | null |
scravy/simplex | src/simplex.hs | gpl-3.0 | dirtyExts = [".toc", ".aux", ".log", ".tex", ".out", ".lof", ".ent"] | 68 | dirtyExts = [".toc", ".aux", ".log", ".tex", ".out", ".lof", ".ent"] | 68 | dirtyExts = [".toc", ".aux", ".log", ".tex", ".out", ".lof", ".ent"] | 68 | false | false | 1 | 5 | 8 | 30 | 17 | 13 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/program-structure/juno/app/Main.hs | unlicense | main :: IO ()
main = run | 24 | main :: IO ()
main = run | 24 | main = run | 10 | false | true | 0 | 7 | 6 | 22 | 9 | 13 | null | null |
mrakgr/futhark | src/Language/Futhark/Attributes.hs | bsd-3-clause | typeOf (UnOp Abs e _) = typeOf e | 32 | typeOf (UnOp Abs e _) = typeOf e | 32 | typeOf (UnOp Abs e _) = typeOf e | 32 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-dns/gen/Network/Google/DNS/Types/Product.hs | mpl-2.0 | -- | The presence of this field indicates that this is a managed reverse
-- lookup zone and Cloud DNS will resolve reverse lookup queries using
-- automatically configured records for VPC resources. This only applies to
-- networks listed under private_visibility_config.
mzReverseLookupConfig :: Lens' ManagedZone (Mayb... | 454 | mzReverseLookupConfig :: Lens' ManagedZone (Maybe ManagedZoneReverseLookupConfig)
mzReverseLookupConfig
= lens _mzReverseLookupConfig
(\ s a -> s{_mzReverseLookupConfig = a}) | 182 | mzReverseLookupConfig
= lens _mzReverseLookupConfig
(\ s a -> s{_mzReverseLookupConfig = a}) | 100 | true | true | 0 | 8 | 66 | 52 | 28 | 24 | null | null |
snoyberg/ghc | libraries/base/GHC/Int.hs | bsd-3-clause | (I16# x) `geInt16` (I16# y) = isTrue# (x >=# y) | 47 | (I16# x) `geInt16` (I16# y) = isTrue# (x >=# y) | 47 | (I16# x) `geInt16` (I16# y) = isTrue# (x >=# y) | 47 | false | false | 0 | 7 | 9 | 36 | 18 | 18 | null | null |
vladfi1/hs-misc | JavaDAG.hs | mit | main = do
encodeParams' <- encodeParams
decodeParams' <- decodeParams
let params = concat $ collapse_NP (liftA_NP (K . getNodes) encodeParams') ++ collapse_NP (liftA_NP (K . getNodes) decodeParams')
let decoder = makeDecoder javaComplete decodeParams' primDecoders
let autoEncoder = makeAutoEncoder ja... | 903 | main = do
encodeParams' <- encodeParams
decodeParams' <- decodeParams
let params = concat $ collapse_NP (liftA_NP (K . getNodes) encodeParams') ++ collapse_NP (liftA_NP (K . getNodes) decodeParams')
let decoder = makeDecoder javaComplete decodeParams' primDecoders
let autoEncoder = makeAutoEncoder ja... | 903 | main = do
encodeParams' <- encodeParams
decodeParams' <- decodeParams
let params = concat $ collapse_NP (liftA_NP (K . getNodes) encodeParams') ++ collapse_NP (liftA_NP (K . getNodes) decodeParams')
let decoder = makeDecoder javaComplete decodeParams' primDecoders
let autoEncoder = makeAutoEncoder ja... | 903 | false | false | 1 | 17 | 201 | 286 | 123 | 163 | null | null |
seanhess/serials | server/Serials/Lib/JWT.hs | mit | claimSet :: JWT a -> JWTClaimsSet
claimSet = claims | 51 | claimSet :: JWT a -> JWTClaimsSet
claimSet = claims | 51 | claimSet = claims | 17 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
bergmark/purescript | hierarchy/Main.hs | mit | compile :: FilePath -> Maybe FilePath -> IO ()
compile input mOutput = do
modules <- readInput input
case modules of
Left err -> U.print err >> exitFailure
Right ms -> do
for_ ms $ \(P.Module moduleName decls _) ->
let name = runModuleName moduleName
tcs = filter P.isTypeClassDecla... | 860 | compile :: FilePath -> Maybe FilePath -> IO ()
compile input mOutput = do
modules <- readInput input
case modules of
Left err -> U.print err >> exitFailure
Right ms -> do
for_ ms $ \(P.Module moduleName decls _) ->
let name = runModuleName moduleName
tcs = filter P.isTypeClassDecla... | 860 | compile input mOutput = do
modules <- readInput input
case modules of
Left err -> U.print err >> exitFailure
Right ms -> do
for_ ms $ \(P.Module moduleName decls _) ->
let name = runModuleName moduleName
tcs = filter P.isTypeClassDeclaration decls
supers = sort . nub . ... | 813 | false | true | 0 | 27 | 280 | 305 | 144 | 161 | null | null |
mpickering/hackage-server | Distribution/Server/Features/ReverseDependencies/State.hs | bsd-3-clause | -- | Given a dependency (a package name and a version range), find all versions
-- in the current package index that satisfy it.
selectVersions :: VersionRange -> [Version] -> [Version]
selectVersions range versions= filter (flip withinRange range) versions | 257 | selectVersions :: VersionRange -> [Version] -> [Version]
selectVersions range versions= filter (flip withinRange range) versions | 128 | selectVersions range versions= filter (flip withinRange range) versions | 71 | true | true | 0 | 7 | 38 | 45 | 24 | 21 | null | null |
Cubesoup/Othello | GoodOthello.hs | bsd-2-clause | -- we also need the ability to make a move on the board. We will asuume
-- any move given to this function as input is a legal move.
make_move :: Board -> Colour -> Posn -> Board
make_move brd col pos = foldr consf (replace brd col pos) directions
where
consf = (\dir board -> flip board col pos dir) | 307 | make_move :: Board -> Colour -> Posn -> Board
make_move brd col pos = foldr consf (replace brd col pos) directions
where
consf = (\dir board -> flip board col pos dir) | 173 | make_move brd col pos = foldr consf (replace brd col pos) directions
where
consf = (\dir board -> flip board col pos dir) | 127 | true | true | 0 | 7 | 67 | 76 | 39 | 37 | null | null |
j-rock/strat | src/Game/Lib/Units/Instances.hs | mit | transport :: Defense -> Attacks -> Mobility -> String -> UnitT
transport d a m = Unit d a m can'tCapture defTurn defExperience (defTroopers d) ExtraLarge Air | 157 | transport :: Defense -> Attacks -> Mobility -> String -> UnitT
transport d a m = Unit d a m can'tCapture defTurn defExperience (defTroopers d) ExtraLarge Air | 157 | transport d a m = Unit d a m can'tCapture defTurn defExperience (defTroopers d) ExtraLarge Air | 94 | false | true | 0 | 8 | 26 | 59 | 29 | 30 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Response.hs | gpl-3.0 | elementInvoice_status :: XMLParser Xsd.XsdString
elementInvoice_status = parseSchemaType "invoice-status" | 105 | elementInvoice_status :: XMLParser Xsd.XsdString
elementInvoice_status = parseSchemaType "invoice-status" | 105 | elementInvoice_status = parseSchemaType "invoice-status" | 56 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
mparusinski/Haskell-number-theory-library | Factoring/Lenstra.hs | gpl-3.0 | findHighestPower n p
= findHighestPowerAccum bound p 1
where bound = floor $ (fromIntegral n :: Double) / (fromIntegral p :: Double)
findHighestPowerAccum bound p accum
| accum > bound = accum
| otherwise = findHighestPowerAccum bound p (accum * p) | 299 | findHighestPower n p
= findHighestPowerAccum bound p 1
where bound = floor $ (fromIntegral n :: Double) / (fromIntegral p :: Double)
findHighestPowerAccum bound p accum
| accum > bound = accum
| otherwise = findHighestPowerAccum bound p (accum * p) | 299 | findHighestPower n p
= findHighestPowerAccum bound p 1
where bound = floor $ (fromIntegral n :: Double) / (fromIntegral p :: Double)
findHighestPowerAccum bound p accum
| accum > bound = accum
| otherwise = findHighestPowerAccum bound p (accum * p) | 299 | false | false | 3 | 10 | 91 | 98 | 47 | 51 | null | null |
kishoredbn/barrelfish | tools/flounder/Local.hs | mit | local_connect_handler_proto :: String -> C.Unit
local_connect_handler_proto ifn = C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") local_connect_handler_params)
(drv_connect_handler_name drvname ifn) Nothing | 243 | local_connect_handler_proto :: String -> C.Unit
local_connect_handler_proto ifn = C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") local_connect_handler_params)
(drv_connect_handler_name drvname ifn) Nothing | 243 | local_connect_handler_proto ifn = C.GVarDecl C.Extern C.NonConst
(C.Function C.NoScope (C.TypeName "errval_t") local_connect_handler_params)
(drv_connect_handler_name drvname ifn) Nothing | 195 | false | true | 0 | 10 | 27 | 67 | 33 | 34 | null | null |
marcellussiegburg/autotool | yesod/Handler/AufgabeEinstellungen.hs | gpl-2.0 | aufgabeForm :: AufgabeTyp -> Maybe AufgabeFormDaten -> AForm Handler AufgabeFormDaten
aufgabeForm aTyp maufgabe = AufgabeFormDaten
<$> areq nameField (bfs MsgAufgabeName) (name <$> maufgabe)
<*> (fmap unTextarea <$> aopt textareaField (bfs MsgAufgabeHinweis) (fmap Textarea . hinweis <$> maufgabe))
<*> areq ... | 1,365 | aufgabeForm :: AufgabeTyp -> Maybe AufgabeFormDaten -> AForm Handler AufgabeFormDaten
aufgabeForm aTyp maufgabe = AufgabeFormDaten
<$> areq nameField (bfs MsgAufgabeName) (name <$> maufgabe)
<*> (fmap unTextarea <$> aopt textareaField (bfs MsgAufgabeHinweis) (fmap Textarea . hinweis <$> maufgabe))
<*> areq ... | 1,365 | aufgabeForm aTyp maufgabe = AufgabeFormDaten
<$> areq nameField (bfs MsgAufgabeName) (name <$> maufgabe)
<*> (fmap unTextarea <$> aopt textareaField (bfs MsgAufgabeHinweis) (fmap Textarea . hinweis <$> maufgabe))
<*> areq (selectFieldList highscores) (bfs MsgAufgabeHighscore) (highscore <$> maufgabe)
<*... | 1,279 | false | true | 19 | 17 | 258 | 449 | 225 | 224 | null | null |
wereHamster/nauva | pkg/hs/nauvad/src/Settings.hs | mit | toRoute :: MonadSnap m => (FilePath, ByteString) -> (ByteString, m ())
toRoute (path, content) =
( BS8.pack path, do
-- modifyResponse $ addHeader "Content-Type" "text/html; charset=UTF-8"
writeBS content
) | 230 | toRoute :: MonadSnap m => (FilePath, ByteString) -> (ByteString, m ())
toRoute (path, content) =
( BS8.pack path, do
-- modifyResponse $ addHeader "Content-Type" "text/html; charset=UTF-8"
writeBS content
) | 230 | toRoute (path, content) =
( BS8.pack path, do
-- modifyResponse $ addHeader "Content-Type" "text/html; charset=UTF-8"
writeBS content
) | 159 | false | true | 0 | 9 | 52 | 66 | 35 | 31 | null | null |
olsner/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | isOneOcc :: OccInfo -> Bool
isOneOcc (OneOcc {}) = True | 55 | isOneOcc :: OccInfo -> Bool
isOneOcc (OneOcc {}) = True | 55 | isOneOcc (OneOcc {}) = True | 27 | false | true | 0 | 7 | 9 | 25 | 13 | 12 | null | null |
ajjaic/Problems99 | src/Probs21to30.hs | mit | helper :: [a] -> Maybe (a, [a])
helper [] = Nothing | 51 | helper :: [a] -> Maybe (a, [a])
helper [] = Nothing | 51 | helper [] = Nothing | 19 | false | true | 0 | 8 | 10 | 35 | 19 | 16 | null | null |
ghc-android/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | wiredInNameTyThing_maybe _ = Nothing | 70 | wiredInNameTyThing_maybe _ = Nothing | 70 | wiredInNameTyThing_maybe _ = Nothing | 70 | false | false | 0 | 5 | 37 | 9 | 4 | 5 | null | null |
plaprade/haskoin | haskoin-core/src/Network/Haskoin/Crypto/ExtendedKeys.hs | unlicense | pathToStr :: DerivPathI t -> String
pathToStr p =
case p of
next :| i -> concat [ pathToStr next, "/", show i, "'" ]
next :/ i -> concat [ pathToStr next, "/", show i ]
Deriv -> "" | 212 | pathToStr :: DerivPathI t -> String
pathToStr p =
case p of
next :| i -> concat [ pathToStr next, "/", show i, "'" ]
next :/ i -> concat [ pathToStr next, "/", show i ]
Deriv -> "" | 212 | pathToStr p =
case p of
next :| i -> concat [ pathToStr next, "/", show i, "'" ]
next :/ i -> concat [ pathToStr next, "/", show i ]
Deriv -> "" | 176 | false | true | 0 | 10 | 71 | 96 | 46 | 50 | null | null |
leksah/yi | src/library/Yi/Editor.hs | gpl-2.0 | -- | Swap focused window with the previous one
moveWinPrevE :: EditorM ()
moveWinPrevE = windowsA %= swapFocus PL.previous | 122 | moveWinPrevE :: EditorM ()
moveWinPrevE = windowsA %= swapFocus PL.previous | 75 | moveWinPrevE = windowsA %= swapFocus PL.previous | 48 | true | true | 1 | 7 | 18 | 29 | 13 | 16 | null | null |
lwchkg/sunlight-x | test/code-snippets/haskell.hs | apache-2.0 | sepNB g Empty k ys = oneLiner (nilBeside g (reduceDoc rest))
`mkUnion`
nilAboveNest False k (reduceDoc (vcat ys))
where
rest | g = hsep ys
| otherwise = hcat... | 323 | sepNB g Empty k ys = oneLiner (nilBeside g (reduceDoc rest))
`mkUnion`
nilAboveNest False k (reduceDoc (vcat ys))
where
rest | g = hsep ys
| otherwise = hcat... | 323 | sepNB g Empty k ys = oneLiner (nilBeside g (reduceDoc rest))
`mkUnion`
nilAboveNest False k (reduceDoc (vcat ys))
where
rest | g = hsep ys
| otherwise = hcat... | 323 | false | false | 0 | 10 | 192 | 86 | 40 | 46 | null | null |
google/ghc-source-gen | src/GHC/SourceGen/Expr.hs | bsd-3-clause | arithSeq :: ArithSeqInfo GhcPs -> HsExpr'
arithSeq =
#if MIN_VERSION_ghc(8,6,0)
withEpAnnNotUsed ArithSeq Nothing | 117 | arithSeq :: ArithSeqInfo GhcPs -> HsExpr'
arithSeq =
#if MIN_VERSION_ghc(8,6,0)
withEpAnnNotUsed ArithSeq Nothing | 117 | arithSeq =
#if MIN_VERSION_ghc(8,6,0)
withEpAnnNotUsed ArithSeq Nothing | 75 | false | true | 0 | 6 | 16 | 24 | 12 | 12 | null | null |
jameshales/voltorb-flip | src/Board.hs | bsd-3-clause | isValidBoard :: Board -> Bool
isValidBoard b = bounds (unBoard b) == (minBound, maxBound) | 89 | isValidBoard :: Board -> Bool
isValidBoard b = bounds (unBoard b) == (minBound, maxBound) | 89 | isValidBoard b = bounds (unBoard b) == (minBound, maxBound) | 59 | false | true | 0 | 8 | 13 | 37 | 19 | 18 | null | null |
jshholland/savannah-wit | src/Board.hs | bsd-3-clause | showFile FileF = 'f' | 20 | showFile FileF = 'f' | 20 | showFile FileF = 'f' | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
soscpd/bee | root/tests/zguide/examples/Haskell/MDPDef.hs | mit | mdpwRequest = pack "02" | 23 | mdpwRequest = pack "02" | 23 | mdpwRequest = pack "02" | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Backends/LaTeX.hs | gpl-3.0 | string_txt :: TextDetails -> String -> String
string_txt (Chr c) s = c:s | 75 | string_txt :: TextDetails -> String -> String
string_txt (Chr c) s = c:s | 75 | string_txt (Chr c) s = c:s | 29 | false | true | 0 | 7 | 15 | 34 | 17 | 17 | null | null |
HIPERFIT/futhark | src/Futhark/IR/Primitive.hs | isc | -- | A mapping from names of primitive functions to their parameter
-- types, their result type, and a function for evaluating them.
primFuns ::
M.Map
String
( [PrimType],
PrimType,
[PrimValue] -> Maybe PrimValue
)
primFuns =
M.fromList
[ f16 "sqrt16" sqrt,
f32 "sqrt32" sqrt,
... | 13,265 | primFuns ::
M.Map
String
( [PrimType],
PrimType,
[PrimValue] -> Maybe PrimValue
)
primFuns =
M.fromList
[ f16 "sqrt16" sqrt,
f32 "sqrt32" sqrt,
f64 "sqrt64" sqrt,
--
f16 "log16" log,
f32 "log32" log,
f64 "log64" log,
--
f16 "log10_16" (logB... | 13,132 | primFuns =
M.fromList
[ f16 "sqrt16" sqrt,
f32 "sqrt32" sqrt,
f64 "sqrt64" sqrt,
--
f16 "log16" log,
f32 "log32" log,
f64 "log64" log,
--
f16 "log10_16" (logBase 10),
f32 "log10_32" (logBase 10),
f64 "log10_64" (logBase 10),
--
f16 "log2_16" ... | 13,024 | true | true | 54 | 14 | 4,948 | 4,495 | 2,296 | 2,199 | null | null |
ahmadsalim/p3-tool | p3-tool/TVL/Pretty.hs | gpl-3.0 | prettyPresence PNone = empty | 28 | prettyPresence PNone = empty | 28 | prettyPresence PNone = empty | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jaapweel/piffle | src/IrPiffle.hs | gpl-2.0 | tExp env (ForIn p i@(Ident _) a c b) =
do thisPosition p
a <- tExp env a
(n,t) <- array (ty a)
(g, env) <- gensym i "count" (Atomic U32) env
(h, env) <- gensym i "range" (ty a) env
c <- tExp (insertVar i t env) c
b <- tExp (insertVar i t env) b
return (I.ForIn p Voi... | 593 | tExp env (ForIn p i@(Ident _) a c b) =
do thisPosition p
a <- tExp env a
(n,t) <- array (ty a)
(g, env) <- gensym i "count" (Atomic U32) env
(h, env) <- gensym i "range" (ty a) env
c <- tExp (insertVar i t env) c
b <- tExp (insertVar i t env) b
return (I.ForIn p Voi... | 593 | tExp env (ForIn p i@(Ident _) a c b) =
do thisPosition p
a <- tExp env a
(n,t) <- array (ty a)
(g, env) <- gensym i "count" (Atomic U32) env
(h, env) <- gensym i "range" (ty a) env
c <- tExp (insertVar i t env) c
b <- tExp (insertVar i t env) b
return (I.ForIn p Voi... | 593 | false | false | 0 | 10 | 177 | 215 | 104 | 111 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/Tuple.hs | mit | deTupleDeclHead (DHApp l declHead tyVarBind) = DHApp (id l) (deTupleDeclHead declHead) (deTupleTyVarBind tyVarBind) | 115 | deTupleDeclHead (DHApp l declHead tyVarBind) = DHApp (id l) (deTupleDeclHead declHead) (deTupleTyVarBind tyVarBind) | 115 | deTupleDeclHead (DHApp l declHead tyVarBind) = DHApp (id l) (deTupleDeclHead declHead) (deTupleTyVarBind tyVarBind) | 115 | false | false | 0 | 7 | 12 | 45 | 21 | 24 | null | null |
diku-dk/futhark | src/Futhark/Test.hs | isc | getValuesBS _ _ (ScriptValues e) =
fail $ "Cannot get values from FutharkScript expression: " <> prettyOneLine e | 114 | getValuesBS _ _ (ScriptValues e) =
fail $ "Cannot get values from FutharkScript expression: " <> prettyOneLine e | 114 | getValuesBS _ _ (ScriptValues e) =
fail $ "Cannot get values from FutharkScript expression: " <> prettyOneLine e | 114 | false | false | 0 | 7 | 19 | 30 | 14 | 16 | null | null |
iansullivan88/stock-ticker | Main.hs | mit | main :: IO ()
main = do
chan <- newChan
forkIO (notifyClients chan)
runServer "127.0.0.1" 3000 $ \pc -> do
conn <- acceptRequest pc
c <- dupChan chan
handleConnection conn c | 191 | main :: IO ()
main = do
chan <- newChan
forkIO (notifyClients chan)
runServer "127.0.0.1" 3000 $ \pc -> do
conn <- acceptRequest pc
c <- dupChan chan
handleConnection conn c | 191 | main = do
chan <- newChan
forkIO (notifyClients chan)
runServer "127.0.0.1" 3000 $ \pc -> do
conn <- acceptRequest pc
c <- dupChan chan
handleConnection conn c | 177 | false | true | 1 | 13 | 48 | 84 | 35 | 49 | null | null |
gibiansky/nvim-hs | library/Neovim/API/Parser.hs | apache-2.0 | extractCustomTypes :: Object -> Either String [(String, Int64)]
extractCustomTypes objAPI =
extractTypeNameAndID =<< oLookup (ObjectBinary "types") objAPI | 158 | extractCustomTypes :: Object -> Either String [(String, Int64)]
extractCustomTypes objAPI =
extractTypeNameAndID =<< oLookup (ObjectBinary "types") objAPI | 158 | extractCustomTypes objAPI =
extractTypeNameAndID =<< oLookup (ObjectBinary "types") objAPI | 94 | false | true | 0 | 8 | 20 | 47 | 24 | 23 | null | null |
wangwangwar/cis194 | src/ch3/Ch3.hs | bsd-3-clause | keepOnlyEven (Cons x xs)
| even x = Cons x (keepOnlyEven xs)
| otherwise = keepOnlyEven xs | 94 | keepOnlyEven (Cons x xs)
| even x = Cons x (keepOnlyEven xs)
| otherwise = keepOnlyEven xs | 94 | keepOnlyEven (Cons x xs)
| even x = Cons x (keepOnlyEven xs)
| otherwise = keepOnlyEven xs | 94 | false | false | 1 | 8 | 20 | 47 | 21 | 26 | null | null |
mightybyte/reflex-dom-stubs | GenCode.hs | bsd-3-clause | cpp :: FilePath -> IO String
cpp file = do
let ins = [file]
opts = defaultCpphsOptions
{ defines =
[
-- ("WEBKIT_CHECK_VERSION(2,2,2)", "1")
("ghcjs_HOST_OS", "1")
, ("USE_JAVASCRIPTFFI", "1")
-- ... | 534 | cpp :: FilePath -> IO String
cpp file = do
let ins = [file]
opts = defaultCpphsOptions
{ defines =
[
-- ("WEBKIT_CHECK_VERSION(2,2,2)", "1")
("ghcjs_HOST_OS", "1")
, ("USE_JAVASCRIPTFFI", "1")
-- ... | 534 | cpp file = do
let ins = [file]
opts = defaultCpphsOptions
{ defines =
[
-- ("WEBKIT_CHECK_VERSION(2,2,2)", "1")
("ghcjs_HOST_OS", "1")
, ("USE_JAVASCRIPTFFI", "1")
-- , ("USE_WEBKIT", "1")
... | 505 | false | true | 0 | 14 | 262 | 97 | 51 | 46 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc
pprGlobalRdrEnv locals_only env
= vcat [ text "GlobalRdrEnv" <+> ppWhen locals_only (ptext (sLit "(locals only)"))
<+> lbrace
, nest 2 (vcat [ pp (remove_locals gre_list) | gre_list <- occEnvElts env ]
<+> rbrace) ]
where
remove_... | 667 | pprGlobalRdrEnv :: Bool -> GlobalRdrEnv -> SDoc
pprGlobalRdrEnv locals_only env
= vcat [ text "GlobalRdrEnv" <+> ppWhen locals_only (ptext (sLit "(locals only)"))
<+> lbrace
, nest 2 (vcat [ pp (remove_locals gre_list) | gre_list <- occEnvElts env ]
<+> rbrace) ]
where
remove_... | 667 | pprGlobalRdrEnv locals_only env
= vcat [ text "GlobalRdrEnv" <+> ppWhen locals_only (ptext (sLit "(locals only)"))
<+> lbrace
, nest 2 (vcat [ pp (remove_locals gre_list) | gre_list <- occEnvElts env ]
<+> rbrace) ]
where
remove_locals gres | locals_only = filter isLocalGRE gr... | 619 | false | true | 0 | 14 | 236 | 227 | 108 | 119 | null | null |
suhailshergill/liboleg | Control/CCCxe.hs | bsd-3-clause | -- | Create the initial bubble
takeSubCont :: Monad m =>
Prompt p m w -> CCT p m x w -> CC p m x
takeSubCont p@(inj,_) body = CC $ \ki kd -> kd id (inj body) | 172 | takeSubCont :: Monad m =>
Prompt p m w -> CCT p m x w -> CC p m x
takeSubCont p@(inj,_) body = CC $ \ki kd -> kd id (inj body) | 141 | takeSubCont p@(inj,_) body = CC $ \ki kd -> kd id (inj body) | 60 | true | true | 0 | 9 | 53 | 86 | 43 | 43 | null | null |
hectorhon/autotrace2 | app/Blc/Views.hs | bsd-3-clause | blcLabelsPage :: [Entity BlcLabel] -> Html
blcLabelsPage blcLabels = layout "View controller labels" $ do
h1 "Controller labels"
ul $ forM_ blcLabels (\ (Entity lid blcLabel) -> li $
a ! href (viewBlcLabelLink lid) $ toHtml (blcLabelName blcLabel)) | 256 | blcLabelsPage :: [Entity BlcLabel] -> Html
blcLabelsPage blcLabels = layout "View controller labels" $ do
h1 "Controller labels"
ul $ forM_ blcLabels (\ (Entity lid blcLabel) -> li $
a ! href (viewBlcLabelLink lid) $ toHtml (blcLabelName blcLabel)) | 256 | blcLabelsPage blcLabels = layout "View controller labels" $ do
h1 "Controller labels"
ul $ forM_ blcLabels (\ (Entity lid blcLabel) -> li $
a ! href (viewBlcLabelLink lid) $ toHtml (blcLabelName blcLabel)) | 213 | false | true | 0 | 16 | 45 | 95 | 45 | 50 | null | null |
olsner/ghc | compiler/basicTypes/Module.hs | bsd-3-clause | -- Note [UnitId to InstalledUnitId improvement]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Just because a UnitId is definite (has no holes) doesn't
-- mean it's necessarily a InstalledUnitId; it could just be
-- that over the course of renaming UnitIds on the fly
-- while typechecking an indefinite library, we
-- ... | 1,459 | unitIdFreeHoles :: UnitId -> UniqDSet ModuleName
unitIdFreeHoles (IndefiniteUnitId x) = indefUnitIdFreeHoles x | 110 | unitIdFreeHoles (IndefiniteUnitId x) = indefUnitIdFreeHoles x | 61 | true | true | 0 | 7 | 252 | 54 | 38 | 16 | null | null |
simonmichael/hledger | hledger-lib/Hledger/Read/CsvReader.hs | gpl-3.0 | parseCassava :: Char -> FilePath -> Text -> Either String CSV
parseCassava separator path content =
either (Left . errorBundlePretty) (Right . parseResultToCsv) <$>
CassavaMP.decodeWith (decodeOptions separator) Cassava.NoHeader path $
BL.fromStrict $ T.encodeUtf8 content | 278 | parseCassava :: Char -> FilePath -> Text -> Either String CSV
parseCassava separator path content =
either (Left . errorBundlePretty) (Right . parseResultToCsv) <$>
CassavaMP.decodeWith (decodeOptions separator) Cassava.NoHeader path $
BL.fromStrict $ T.encodeUtf8 content | 278 | parseCassava separator path content =
either (Left . errorBundlePretty) (Right . parseResultToCsv) <$>
CassavaMP.decodeWith (decodeOptions separator) Cassava.NoHeader path $
BL.fromStrict $ T.encodeUtf8 content | 216 | false | true | 0 | 10 | 39 | 90 | 44 | 46 | null | null |
siddhanathan/ghc | libraries/base/Data/List/NonEmpty.hs | bsd-3-clause | -- | 'uncons' produces the first element of the stream, and a stream of the
-- remaining elements, if any.
uncons :: NonEmpty a -> (a, Maybe (NonEmpty a))
uncons ~(a :| as) = (a, nonEmpty as) | 191 | uncons :: NonEmpty a -> (a, Maybe (NonEmpty a))
uncons ~(a :| as) = (a, nonEmpty as) | 84 | uncons ~(a :| as) = (a, nonEmpty as) | 36 | true | true | 0 | 9 | 36 | 55 | 29 | 26 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.