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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rueshyna/gogol | gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs | mpl-2.0 | -- | Bytes in the data source that are not transferred because they already
-- exist in the data sink.
tcBytesFromSourceSkippedBySync :: Lens' TransferCounters (Maybe Int64)
tcBytesFromSourceSkippedBySync
= lens _tcBytesFromSourceSkippedBySync
(\ s a -> s{_tcBytesFromSourceSkippedBySync = a})
. mapping _C... | 325 | tcBytesFromSourceSkippedBySync :: Lens' TransferCounters (Maybe Int64)
tcBytesFromSourceSkippedBySync
= lens _tcBytesFromSourceSkippedBySync
(\ s a -> s{_tcBytesFromSourceSkippedBySync = a})
. mapping _Coerce | 222 | tcBytesFromSourceSkippedBySync
= lens _tcBytesFromSourceSkippedBySync
(\ s a -> s{_tcBytesFromSourceSkippedBySync = a})
. mapping _Coerce | 151 | true | true | 1 | 8 | 53 | 58 | 29 | 29 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | Inserts a newline and a section break at the end of the document body.
-- Section breaks cannot be inserted inside a footnote, header or footer.
-- Because section breaks can only be inserted inside the body, the segment
-- ID field must be empty.
isbrEndOfSegmentLocation :: Lens' InsertSectionBreakRequest (Maybe ... | 451 | isbrEndOfSegmentLocation :: Lens' InsertSectionBreakRequest (Maybe EndOfSegmentLocation)
isbrEndOfSegmentLocation
= lens _isbrEndOfSegmentLocation
(\ s a -> s{_isbrEndOfSegmentLocation = a}) | 198 | isbrEndOfSegmentLocation
= lens _isbrEndOfSegmentLocation
(\ s a -> s{_isbrEndOfSegmentLocation = a}) | 109 | true | true | 0 | 9 | 71 | 51 | 28 | 23 | null | null |
vTurbine/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData | 92 | mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData | 92 | mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData | 92 | false | false | 0 | 7 | 34 | 19 | 9 | 10 | null | null |
tobyp/bills | bills.hs | mit | comment = do
char '#'
many $ noneOf "\n"
-- [Transaction] | 67 | comment = do
char '#'
many $ noneOf "\n"
-- [Transaction] | 67 | comment = do
char '#'
many $ noneOf "\n"
-- [Transaction] | 67 | false | false | 1 | 9 | 20 | 27 | 10 | 17 | null | null |
githubkleon/ConvenientHDL | src/Language/Verilog/PrettyPrint.hs | bsd-3-clause | ppStatement (DeAssignStmt x)
= text "deassign" <+> ppLValue x <> semi | 71 | ppStatement (DeAssignStmt x)
= text "deassign" <+> ppLValue x <> semi | 71 | ppStatement (DeAssignStmt x)
= text "deassign" <+> ppLValue x <> semi | 71 | false | false | 0 | 7 | 12 | 29 | 13 | 16 | null | null |
solatis/haskell-network-attoparsec | src/Network/Attoparsec.hs | mit | parseOne :: ( MonadIO m
, MonadMask m
, Show a)
=> NS.Socket -- ^ Socket to read data from
-> ParseC a -- ^ Initial parser state
-> m a -- ^ Parsed value
parseOne s p0 = do
buf <- readAvailable s (Just 1)
(p1, value) <- parseBuffer p0 Single buf p0
case v... | 599 | parseOne :: ( MonadIO m
, MonadMask m
, Show a)
=> NS.Socket -- ^ Socket to read data from
-> ParseC a -- ^ Initial parser state
-> m a
parseOne s p0 = do
buf <- readAvailable s (Just 1)
(p1, value) <- parseBuffer p0 Single buf p0
case value of
-- We do not ... | 575 | parseOne s p0 = do
buf <- readAvailable s (Just 1)
(p1, value) <- parseBuffer p0 Single buf p0
case value of
-- We do not yet have enough data for a single item, let's request more
[] -> parseOne s p1
[x] -> return x
-- This is an internal error, since it means our single-object parser
-- return... | 387 | true | true | 0 | 10 | 191 | 140 | 70 | 70 | null | null |
dmbarbour/Sirea | src/Sirea/Internal/B0Impl.hs | bsd-3-clause | mkDisjFull cc l r@(LnkSig _) = mkDisjSigs cc l r | 48 | mkDisjFull cc l r@(LnkSig _) = mkDisjSigs cc l r | 48 | mkDisjFull cc l r@(LnkSig _) = mkDisjSigs cc l r | 48 | false | false | 0 | 8 | 9 | 29 | 14 | 15 | null | null |
nick-orton/euler | src/Euler/Numz.hs | gpl-3.0 | (!) 1 = 1 | 9 | (!) 1 = 1 | 9 | (!) 1 = 1 | 9 | false | false | 1 | 5 | 3 | 15 | 6 | 9 | null | null |
jwiegley/ghc-release | compiler/nativeGen/RegAlloc/Liveness.hs | gpl-3.0 | natCmmTopToLive
:: Instruction instr
=> NatCmmDecl statics instr
-> LiveCmmDecl statics instr
natCmmTopToLive (CmmData i d)
= CmmData i d | 170 | natCmmTopToLive
:: Instruction instr
=> NatCmmDecl statics instr
-> LiveCmmDecl statics instr
natCmmTopToLive (CmmData i d)
= CmmData i d | 169 | natCmmTopToLive (CmmData i d)
= CmmData i d | 51 | false | true | 0 | 10 | 52 | 53 | 23 | 30 | null | null |
google/codeworld | codeworld-prediction/src/CodeWorld/Prediction.hs | apache-2.0 | stepBy :: StepFun s -> Double -> TState s -> TState s
stepBy step diff (now, s) = (now + diff, step diff s) | 107 | stepBy :: StepFun s -> Double -> TState s -> TState s
stepBy step diff (now, s) = (now + diff, step diff s) | 107 | stepBy step diff (now, s) = (now + diff, step diff s) | 53 | false | true | 0 | 8 | 23 | 60 | 30 | 30 | null | null |
fmapfmapfmap/amazonka | amazonka-sdb/gen/Network/AWS/SDB/Types/Product.hs | mpl-2.0 | -- | Undocumented member.
diAttributes :: Lens' DeletableItem [Attribute]
diAttributes = lens _diAttributes (\ s a -> s{_diAttributes = a}) . _Default . _Coerce | 160 | diAttributes :: Lens' DeletableItem [Attribute]
diAttributes = lens _diAttributes (\ s a -> s{_diAttributes = a}) . _Default . _Coerce | 134 | diAttributes = lens _diAttributes (\ s a -> s{_diAttributes = a}) . _Default . _Coerce | 86 | true | true | 0 | 11 | 23 | 51 | 28 | 23 | null | null |
nevrenato/Hets_Fork | CASL/AS_Basic_CASL.der.hs | gpl-2.0 | args_OP_TYPE :: OP_TYPE -> [SORT]
args_OP_TYPE (Op_type _ args _ _) = args | 74 | args_OP_TYPE :: OP_TYPE -> [SORT]
args_OP_TYPE (Op_type _ args _ _) = args | 74 | args_OP_TYPE (Op_type _ args _ _) = args | 40 | false | true | 0 | 7 | 12 | 33 | 17 | 16 | null | null |
beni55/http-types | Network/HTTP/Types/Status.hs | bsd-3-clause | -- | Bad Gateway 502
status502 :: Status
status502 = mkStatus 502 "Bad Gateway" | 79 | status502 :: Status
status502 = mkStatus 502 "Bad Gateway" | 58 | status502 = mkStatus 502 "Bad Gateway" | 38 | true | true | 0 | 5 | 13 | 17 | 9 | 8 | null | null |
diku-dk/futhark | src/Futhark/Optimise/Simplify/Engine.hs | isc | cheapExp (BasicOp UnOp {}) = True | 33 | cheapExp (BasicOp UnOp {}) = True | 33 | cheapExp (BasicOp UnOp {}) = True | 33 | false | false | 0 | 8 | 5 | 19 | 9 | 10 | null | null |
kylcarte/qclib | src/.Db.hs | bsd-3-clause | fldPNumber = "number" | 27 | fldPNumber = "number" | 27 | fldPNumber = "number" | 27 | false | false | 0 | 4 | 8 | 6 | 3 | 3 | null | null |
DougBurke/swish | tests/GraphTest.hs | lgpl-2.1 | p312 = LV "p312" | 17 | p312 = LV "p312" | 17 | p312 = LV "p312" | 17 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
nevrenato/Hets_Fork | CspCASLProver/CspProverConsts.hs | gpl-2.0 | cspProver_general_parallelAltArgPrios :: [Int]
cspProver_general_parallelAltArgPrios = [76,0,77] | 96 | cspProver_general_parallelAltArgPrios :: [Int]
cspProver_general_parallelAltArgPrios = [76,0,77] | 96 | cspProver_general_parallelAltArgPrios = [76,0,77] | 49 | false | true | 0 | 5 | 5 | 23 | 14 | 9 | null | null |
chiyama/lucille | rnd/HaskellRSLCompiler/RSL/Typer.hs | bsd-3-clause | typingAST (x:xs) = [evalState (typing x) 0] ++ typingAST xs | 59 | typingAST (x:xs) = [evalState (typing x) 0] ++ typingAST xs | 59 | typingAST (x:xs) = [evalState (typing x) 0] ++ typingAST xs | 59 | false | false | 0 | 9 | 9 | 38 | 18 | 20 | null | null |
yesodweb/persistent | persistent/Database/Persist/Sql/Class.hs | mit | -- | @since 2.11.0
to14 :: ((a,b),(c,d),(e,f),(g,h),(i,j),(k,l),(m,n)) -> (a,b,c,d,e,f,g,h,i,j,k,l,m,n)
to14 ((a,b),(c,d),(e,f),(g,h),(i,j),(k,l),(m,n)) = (a,b,c,d,e,f,g,h,i,j,k,l,m,n) | 184 | to14 :: ((a,b),(c,d),(e,f),(g,h),(i,j),(k,l),(m,n)) -> (a,b,c,d,e,f,g,h,i,j,k,l,m,n)
to14 ((a,b),(c,d),(e,f),(g,h),(i,j),(k,l),(m,n)) = (a,b,c,d,e,f,g,h,i,j,k,l,m,n) | 165 | to14 ((a,b),(c,d),(e,f),(g,h),(i,j),(k,l),(m,n)) = (a,b,c,d,e,f,g,h,i,j,k,l,m,n) | 80 | true | true | 0 | 7 | 12 | 233 | 151 | 82 | null | null |
beni55/hspec | hspec-core/src/Test/Hspec/Core/Util.hs | mit | -- |
-- ensure that lines are not longer then given `n`, insert line breaks at word
-- boundaries
lineBreaksAt :: Int -> String -> [String]
lineBreaksAt n input = case words input of
[] -> []
x:xs -> go (x, xs)
where
go :: (String, [String]) -> [String]
go c = case c of
(s, []) -> [s]
(s, ... | 3,066 | lineBreaksAt :: Int -> String -> [String]
lineBreaksAt n input = case words input of
[] -> []
x:xs -> go (x, xs)
where
go :: (String, [String]) -> [String]
go c = case c of
(s, []) -> [s]
(s, y:ys) -> let r = s ++ " " ++ y in
if length r <= n
then go (r, ys)
els... | 2,968 | lineBreaksAt n input = case words input of
[] -> []
x:xs -> go (x, xs)
where
go :: (String, [String]) -> [String]
go c = case c of
(s, []) -> [s]
(s, y:ys) -> let r = s ++ " " ++ y in
if length r <= n
then go (r, ys)
else s : go (y, ys)
-- |
-- A `Path` represe... | 2,926 | true | true | 15 | 13 | 693 | 677 | 369 | 308 | null | null |
haskell/ghc-builder | common/Builder/Utils.hs | bsd-3-clause | catchInvalidArgument :: IO a -> (IOException -> IO a) -> IO a
catchInvalidArgument io f = io `catch` \e -> case ioeGetErrorType e of
InvalidArgument -> f e
_ -> throwIO e | 274 | catchInvalidArgument :: IO a -> (IOException -> IO a) -> IO a
catchInvalidArgument io f = io `catch` \e -> case ioeGetErrorType e of
InvalidArgument -> f e
_ -> throwIO e | 274 | catchInvalidArgument io f = io `catch` \e -> case ioeGetErrorType e of
InvalidArgument -> f e
_ -> throwIO e | 212 | false | true | 0 | 10 | 135 | 83 | 39 | 44 | null | null |
izgzhen/bbq-sg | src/BBQ/Import.hs | mit | eitherToMaybe :: forall t a. Either t a -> Maybe a
eitherToMaybe e = case e of
Left _ -> Nothing
Right x -> Just x | 123 | eitherToMaybe :: forall t a. Either t a -> Maybe a
eitherToMaybe e = case e of
Left _ -> Nothing
Right x -> Just x | 123 | eitherToMaybe e = case e of
Left _ -> Nothing
Right x -> Just x | 72 | false | true | 0 | 8 | 34 | 57 | 27 | 30 | null | null |
Mahdi89/eTeak | src/Dot.hs | bsd-3-clause | keyword :: String -> DotParser Pos
keyword word = matchToken eofReason match where
match (LA1Tokens [DotKeyword pos word2]) | word == word2 = return pos
match token = expectingError token ("expecting keyword `" ++ word ++ "'") | 246 | keyword :: String -> DotParser Pos
keyword word = matchToken eofReason match where
match (LA1Tokens [DotKeyword pos word2]) | word == word2 = return pos
match token = expectingError token ("expecting keyword `" ++ word ++ "'") | 242 | keyword word = matchToken eofReason match where
match (LA1Tokens [DotKeyword pos word2]) | word == word2 = return pos
match token = expectingError token ("expecting keyword `" ++ word ++ "'") | 207 | false | true | 0 | 11 | 56 | 90 | 42 | 48 | null | null |
brendanhay/gogol | gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'TransferSpec' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsGcsDataSource'
--
-- * 'tsObjectConditions'
--
-- * 'tsHTTPDataSource'
--
-- * 'tsAwsS3DataSource'
--
-- * 'tsGcsDataSink'
--
-- * 'tsTransferOpt... | 684 | transferSpec
:: TransferSpec
transferSpec =
TransferSpec'
{ _tsGcsDataSource = Nothing
, _tsObjectConditions = Nothing
, _tsHTTPDataSource = Nothing
, _tsAwsS3DataSource = Nothing
, _tsGcsDataSink = Nothing
, _tsTransferOptions = Nothing
, _tsAzureBlobStorageDataSource = Nothing
} | 319 | transferSpec =
TransferSpec'
{ _tsGcsDataSource = Nothing
, _tsObjectConditions = Nothing
, _tsHTTPDataSource = Nothing
, _tsAwsS3DataSource = Nothing
, _tsGcsDataSink = Nothing
, _tsTransferOptions = Nothing
, _tsAzureBlobStorageDataSource = Nothing
} | 286 | true | true | 1 | 7 | 130 | 79 | 53 | 26 | null | null |
DavidAlphaFox/sblog | src/Utils/Scotty/Cookie.hs | bsd-3-clause | getCookies :: (Monad m, ScottyError e) => ActionT e m (Map.Map T.Text T.Text)
getCookies =
liftM (Map.fromList . maybe [] parse) $ header "Cookie"
where
parse = parseCookiesText . BSL.toStrict . TL.encodeUtf8 | 220 | getCookies :: (Monad m, ScottyError e) => ActionT e m (Map.Map T.Text T.Text)
getCookies =
liftM (Map.fromList . maybe [] parse) $ header "Cookie"
where
parse = parseCookiesText . BSL.toStrict . TL.encodeUtf8 | 220 | getCookies =
liftM (Map.fromList . maybe [] parse) $ header "Cookie"
where
parse = parseCookiesText . BSL.toStrict . TL.encodeUtf8 | 142 | false | true | 1 | 10 | 43 | 102 | 47 | 55 | null | null |
sleepomeno/TForth | src/TF/WordsBuilder.hs | apache-2.0 | addInfo (INTERPRETATION_START c) = do
state .= INTERPRETATION
word._interpretation .= IntSemDefined (Sem def)
c | 117 | addInfo (INTERPRETATION_START c) = do
state .= INTERPRETATION
word._interpretation .= IntSemDefined (Sem def)
c | 117 | addInfo (INTERPRETATION_START c) = do
state .= INTERPRETATION
word._interpretation .= IntSemDefined (Sem def)
c | 117 | false | false | 0 | 10 | 19 | 44 | 19 | 25 | null | null |
tathougies/crane | src/Web/Crane/Wai.hs | gpl-2.0 | waiAppForApp :: CraneApp a => CraneSite -> a -> Application
waiAppForApp site app req respond =
case lookupActionForRoute app req of
Left (CouldNotMatchComponent _ _) -> notFound
Left (UnableToInterpret _) -> notFound
Left NoActionForRoute -> notFound
Left Empty -> notFound
Left NoHand... | 1,965 | waiAppForApp :: CraneApp a => CraneSite -> a -> Application
waiAppForApp site app req respond =
case lookupActionForRoute app req of
Left (CouldNotMatchComponent _ _) -> notFound
Left (UnableToInterpret _) -> notFound
Left NoActionForRoute -> notFound
Left Empty -> notFound
Left NoHand... | 1,965 | waiAppForApp site app req respond =
case lookupActionForRoute app req of
Left (CouldNotMatchComponent _ _) -> notFound
Left (UnableToInterpret _) -> notFound
Left NoActionForRoute -> notFound
Left Empty -> notFound
Left NoHandlerForMethod -> respond (responseLBS badRequest400 [] "Inval... | 1,905 | false | true | 0 | 25 | 740 | 432 | 210 | 222 | null | null |
xicesky/sky-haskell-playground | src/Sky/Learn/Comonads.hs | bsd-3-clause | down :: Thermostat a -> a
down (t, f) = f (t - 1) | 49 | down :: Thermostat a -> a
down (t, f) = f (t - 1) | 49 | down (t, f) = f (t - 1) | 23 | false | true | 0 | 7 | 13 | 37 | 19 | 18 | null | null |
tangboyun/miranda | src/MiRanda/BranchLen/Newick.hs | gpl-3.0 | -- | This counts only leaf nodes.
numLeaves :: NewickTree a -> Int
numLeaves (NTLeaf _ _) = 1 | 93 | numLeaves :: NewickTree a -> Int
numLeaves (NTLeaf _ _) = 1 | 59 | numLeaves (NTLeaf _ _) = 1 | 26 | true | true | 0 | 7 | 18 | 30 | 15 | 15 | null | null |
Hara-Laboratory/subleq-toolchain | Subleq.hs | gpl-3.0 | dec = 25 | 8 | dec = 25 | 8 | dec = 25 | 8 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
bergmark/haskell-opaleye | opaleye-sqlite/src/Opaleye/SQLite/Internal/HaskellDB/Sql/Default.hs | bsd-3-clause | showBinOp OpPlus = "+" | 29 | showBinOp OpPlus = "+" | 29 | showBinOp OpPlus = "+" | 29 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
rdnetto/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | id_ :: T.Text
id_ = "_id" | 25 | id_ :: T.Text
id_ = "_id" | 25 | id_ = "_id" | 11 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
ulan/hisp | level0/Hisp0.hs | unlicense | program :: Parser [Expr]
program = many (whitespace >> expr) | 60 | program :: Parser [Expr]
program = many (whitespace >> expr) | 60 | program = many (whitespace >> expr) | 35 | false | true | 0 | 7 | 9 | 27 | 14 | 13 | null | null |
sebfisch/haskell-barchart | src/Graphics/BarChart/Types.hs | bsd-3-clause | readColor :: ColorName -> SomeColor
readColor color = SomeColor . fromMaybe (error $ "ivalid color: " ++ color) $
readColourName color | 154 | readColor :: ColorName -> SomeColor
readColor color = SomeColor . fromMaybe (error $ "ivalid color: " ++ color) $
readColourName color | 154 | readColor color = SomeColor . fromMaybe (error $ "ivalid color: " ++ color) $
readColourName color | 118 | false | true | 0 | 10 | 40 | 43 | 21 | 22 | null | null |
conal/hermit | src/HERMIT/Dictionary/Local/Case.hs | bsd-2-clause | caseFloatInArgsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr
caseFloatInArgsR = prefixFailMsg "Case floating into arguments failed: " $
withPatFailMsg (wrongExprForm "Case s v t alts") $
do Case s bndr _ty alts <- idR
(vss, fs, argss) <- c... | 1,730 | caseFloatInArgsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, MonadCatch m) => Rewrite c m CoreExpr
caseFloatInArgsR = prefixFailMsg "Case floating into arguments failed: " $
withPatFailMsg (wrongExprForm "Case s v t alts") $
do Case s bndr _ty alts <- idR
(vss, fs, argss) <- c... | 1,730 | caseFloatInArgsR = prefixFailMsg "Case floating into arguments failed: " $
withPatFailMsg (wrongExprForm "Case s v t alts") $
do Case s bndr _ty alts <- idR
(vss, fs, argss) <- caseT mempty mempty mempty (\ _ -> altT mempty (\ _ -> idR) callT $ \ () vs (fn, args) -> (vs, fn, args))
... | 1,618 | false | true | 0 | 21 | 553 | 500 | 255 | 245 | null | null |
adz/real_world_haskell | edx-fp1/template-lab6.hs | mit | ex18 = unSum (mappend (mappend (foldMap (\x -> Sum x) xs) (Sum (unProduct (mappend (foldMap (\x -> Product x) . head . drop 2 . children $ xs) (Product 3))))) (foldMap (\x -> Sum x) . head . children $ xs)) | 206 | ex18 = unSum (mappend (mappend (foldMap (\x -> Sum x) xs) (Sum (unProduct (mappend (foldMap (\x -> Product x) . head . drop 2 . children $ xs) (Product 3))))) (foldMap (\x -> Sum x) . head . children $ xs)) | 206 | ex18 = unSum (mappend (mappend (foldMap (\x -> Sum x) xs) (Sum (unProduct (mappend (foldMap (\x -> Product x) . head . drop 2 . children $ xs) (Product 3))))) (foldMap (\x -> Sum x) . head . children $ xs)) | 206 | false | false | 1 | 24 | 40 | 138 | 68 | 70 | null | null |
onurzdg/clicklac | src/Clicklac/API.hs | bsd-3-clause | -- File handler examples
myfile :: AppConfig -> Server Raw
myfile _ _req send =
send $ responseFile status200 [(hContentType, "text/html")]
"index.html"
Nothing | 227 | myfile :: AppConfig -> Server Raw
myfile _ _req send =
send $ responseFile status200 [(hContentType, "text/html")]
"index.html"
Nothing | 202 | myfile _ _req send =
send $ responseFile status200 [(hContentType, "text/html")]
"index.html"
Nothing | 168 | true | true | 0 | 8 | 89 | 48 | 25 | 23 | null | null |
hferreiro/replay | testsuite/tests/typecheck/should_fail/FrozenErrorTests.hs | bsd-3-clause | bloh :: T Int -> ()
bloh x = case x of
MkT3 -> () | 63 | bloh :: T Int -> ()
bloh x = case x of
MkT3 -> () | 62 | bloh x = case x of
MkT3 -> () | 42 | false | true | 0 | 8 | 28 | 38 | 18 | 20 | null | null |
chetant/rbm | AI/Data/MNIST.hs | bsd-3-clause | getTestSet :: FilePath -> IO [(Image, Int)]
getTestSet = getSet getTestImgs getTestLabels | 89 | getTestSet :: FilePath -> IO [(Image, Int)]
getTestSet = getSet getTestImgs getTestLabels | 89 | getTestSet = getSet getTestImgs getTestLabels | 45 | false | true | 0 | 9 | 11 | 37 | 18 | 19 | null | null |
daleooo/barrelfish | build/hake/Config.hs | mit | libpci_debug :: Bool
libpci_debug = False | 41 | libpci_debug :: Bool
libpci_debug = False | 41 | libpci_debug = False | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
hvr/tar | htar/htar.hs | bsd-3-clause | die :: [String] -> IO a
die errs = do
mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs
hPutStrLn stderr "Try `htar --help' for more information."
exitFailure | 168 | die :: [String] -> IO a
die errs = do
mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs
hPutStrLn stderr "Try `htar --help' for more information."
exitFailure | 168 | die errs = do
mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs
hPutStrLn stderr "Try `htar --help' for more information."
exitFailure | 144 | false | true | 0 | 13 | 36 | 64 | 30 | 34 | null | null |
ecaustin/haskhol-deductive | src/HaskHOL/Lib/Equal.hs | bsd-2-clause | convNO :: Conversion cls thry
convNO = convFAIL "convNO" | 56 | convNO :: Conversion cls thry
convNO = convFAIL "convNO" | 56 | convNO = convFAIL "convNO" | 26 | false | true | 0 | 6 | 8 | 25 | 10 | 15 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The Y coordinate scaling element.
atScaleY :: Lens' AffineTransform (Maybe Double)
atScaleY
= lens _atScaleY (\ s a -> s{_atScaleY = a}) .
mapping _Coerce | 167 | atScaleY :: Lens' AffineTransform (Maybe Double)
atScaleY
= lens _atScaleY (\ s a -> s{_atScaleY = a}) .
mapping _Coerce | 128 | atScaleY
= lens _atScaleY (\ s a -> s{_atScaleY = a}) .
mapping _Coerce | 79 | true | true | 0 | 10 | 34 | 55 | 28 | 27 | null | null |
mfine/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | phaseInputExt LlvmOpt = "ll" | 40 | phaseInputExt LlvmOpt = "ll" | 40 | phaseInputExt LlvmOpt = "ll" | 40 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailEditor/RedoUndo.hs | mit | redo :: TAC.TextAreaContent -> TAC.Position -> IO TAC.Position
redo tac pos = do
redoqueue <- readIORef (TAC.redoQueue tac)
if not (null redoqueue)
then runRedoUndo tac Redo
else return pos | 217 | redo :: TAC.TextAreaContent -> TAC.Position -> IO TAC.Position
redo tac pos = do
redoqueue <- readIORef (TAC.redoQueue tac)
if not (null redoqueue)
then runRedoUndo tac Redo
else return pos | 213 | redo tac pos = do
redoqueue <- readIORef (TAC.redoQueue tac)
if not (null redoqueue)
then runRedoUndo tac Redo
else return pos | 150 | false | true | 0 | 12 | 56 | 83 | 38 | 45 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Component/Common/CompEvent.hs | bsd-3-clause | --------------------------------------------------------------------------------
{-
-- A Helper function to be used with 'mkRow' function. This is declared
-- in the 'TableConf', see tableRowEvFilter.
ceFilterMD ∷ forall t e r. (Reflex t, ActSelem e)
⇒ Event t (CompEvent t e r) → Event t e
-- ceFilterMD evT... | 1,461 | fromEither ∷ Either Bool Bool → Bool
fromEither (Left b) = b | 61 | fromEither (Left b) = b | 24 | true | true | 0 | 9 | 289 | 39 | 19 | 20 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromDouble_1.hs | mit | esEsMyInt :: MyInt -> MyInt -> MyBool
esEsMyInt = primEqInt | 63 | esEsMyInt :: MyInt -> MyInt -> MyBool
esEsMyInt = primEqInt | 63 | esEsMyInt = primEqInt | 21 | false | true | 0 | 8 | 13 | 26 | 11 | 15 | null | null |
silver-lang/silver | src/Silver/Compiler/Semantics.hs | bsd-3-clause | fromAst (RelationType f t) = TRelation (fromAst f) (fromAst t) | 62 | fromAst (RelationType f t) = TRelation (fromAst f) (fromAst t) | 62 | fromAst (RelationType f t) = TRelation (fromAst f) (fromAst t) | 62 | false | false | 0 | 7 | 9 | 34 | 16 | 18 | null | null |
meiersi-11ce/stack | src/Stack/Setup.hs | bsd-3-clause | getSetupInfo
:: (MonadIO m, MonadThrow m, MonadLogger m, MonadReader env m, HasConfig env)
=> String -> Manager -> m SetupInfo
getSetupInfo stackSetupYaml manager = do
config <- asks getConfig
setupInfos <-
mapM
loadSetupInfo
(SetupInfoFileOrURL stackSetupYaml :
... | 1,117 | getSetupInfo
:: (MonadIO m, MonadThrow m, MonadLogger m, MonadReader env m, HasConfig env)
=> String -> Manager -> m SetupInfo
getSetupInfo stackSetupYaml manager = do
config <- asks getConfig
setupInfos <-
mapM
loadSetupInfo
(SetupInfoFileOrURL stackSetupYaml :
... | 1,117 | getSetupInfo stackSetupYaml manager = do
config <- asks getConfig
setupInfos <-
mapM
loadSetupInfo
(SetupInfoFileOrURL stackSetupYaml :
configSetupInfoLocations config)
return (mconcat setupInfos)
where
loadSetupInfo (SetupInfoInline si) = return si
loa... | 982 | false | true | 0 | 18 | 434 | 294 | 135 | 159 | null | null |
urbanslug/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isFFILabelTy :: Type -> Validity
-- The type of a foreign label must be Ptr, FunPtr, or a newtype of either.
isFFILabelTy ty = checkRepTyCon ok ty
where
ok tc | tc `hasKey` funPtrTyConKey || tc `hasKey` ptrTyConKey
= IsValid
| otherwise
= NotValid (ptext (sLit "A foreign-imported add... | 375 | isFFILabelTy :: Type -> Validity
isFFILabelTy ty = checkRepTyCon ok ty
where
ok tc | tc `hasKey` funPtrTyConKey || tc `hasKey` ptrTyConKey
= IsValid
| otherwise
= NotValid (ptext (sLit "A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)")) | 299 | isFFILabelTy ty = checkRepTyCon ok ty
where
ok tc | tc `hasKey` funPtrTyConKey || tc `hasKey` ptrTyConKey
= IsValid
| otherwise
= NotValid (ptext (sLit "A foreign-imported address (via &foo) must have type (Ptr a) or (FunPtr a)")) | 266 | true | true | 0 | 10 | 94 | 92 | 43 | 49 | null | null |
bergmark/retry | src/Control/Retry.hs | bsd-3-clause | -------------------------------------------------------------------------------
-- | Add an upperbound to a policy such that once the given time-delay
-- amount has been reached or exceeded, the policy will stop retrying
-- and fail.
limitRetriesByDelay
:: Int
-- ^ Time-delay limit in microseconds.
-> Retr... | 629 | limitRetriesByDelay
:: Int
-- ^ Time-delay limit in microseconds.
-> RetryPolicy
-> RetryPolicy
limitRetriesByDelay i p = RetryPolicy $ \ n -> getRetryPolicy p n >>= limit
where
limit delay = if delay >= i then Nothing else Just delay
------------------------------------------------------------... | 395 | limitRetriesByDelay i p = RetryPolicy $ \ n -> getRetryPolicy p n >>= limit
where
limit delay = if delay >= i then Nothing else Just delay
-------------------------------------------------------------------------------
-- | Implement a constant delay with unlimited retries. | 282 | true | true | 0 | 8 | 104 | 80 | 42 | 38 | null | null |
opqdonut/riot | Ginsu/GenUtil.hs | gpl-2.0 | eadHexChar x = fail $ "not hex char: " ++ [x]
| 46 | readHexChar x = fail $ "not hex char: " ++ [x] | 46 | readHexChar x = fail $ "not hex char: " ++ [x] | 46 | false | false | 0 | 6 | 11 | 20 | 10 | 10 | null | null |
TOSPIO/yi | src/library/Yi/UI/Pango.hs | gpl-2.0 | -- | Convert point coordinates to offset in Yi window
pointToOffset :: (Double, Double) -> WinInfo -> IO Point
pointToOffset (x,y) w =
withMVar (winLayoutInfo w) $ \WinLayoutInfo{winLayout,tos,bufEnd} -> do
im <- readIORef (insertingMode w)
-- see Note [PangoLayout width]
(_, charOffsetX, extra) <- layou... | 466 | pointToOffset :: (Double, Double) -> WinInfo -> IO Point
pointToOffset (x,y) w =
withMVar (winLayoutInfo w) $ \WinLayoutInfo{winLayout,tos,bufEnd} -> do
im <- readIORef (insertingMode w)
-- see Note [PangoLayout width]
(_, charOffsetX, extra) <- layoutXYToIndex winLayout (max 0 (x-1)) y
return $ min ... | 412 | pointToOffset (x,y) w =
withMVar (winLayoutInfo w) $ \WinLayoutInfo{winLayout,tos,bufEnd} -> do
im <- readIORef (insertingMode w)
-- see Note [PangoLayout width]
(_, charOffsetX, extra) <- layoutXYToIndex winLayout (max 0 (x-1)) y
return $ min bufEnd (tos + fromIntegral
(char... | 355 | true | true | 0 | 16 | 108 | 162 | 85 | 77 | null | null |
NorfairKing/the-notes | src/Relations/Basics/Macro.hs | gpl-2.0 | -- * Inverse relation
-- | Inverse of a given relation
inv :: Note -> Note
inv n = n ^: (-1) | 93 | inv :: Note -> Note
inv n = n ^: (-1) | 37 | inv n = n ^: (-1) | 17 | true | true | 2 | 7 | 22 | 35 | 17 | 18 | null | null |
emmanueltouzery/slack-web | src/Web/Slack/Channel.hs | mit | mkCreateReq
:: Text
-> CreateReq
mkCreateReq name =
CreateReq
{ createReqName = name
, createReqValidate = Nothing
} | 134 | mkCreateReq
:: Text
-> CreateReq
mkCreateReq name =
CreateReq
{ createReqName = name
, createReqValidate = Nothing
} | 134 | mkCreateReq name =
CreateReq
{ createReqName = name
, createReqValidate = Nothing
} | 97 | false | true | 0 | 7 | 35 | 41 | 20 | 21 | null | null |
janrain/riak-haskell-client | tests/Properties.hs | apache-2.0 | cruft = unsafePerformIO $ newIORef [] | 37 | cruft = unsafePerformIO $ newIORef [] | 37 | cruft = unsafePerformIO $ newIORef [] | 37 | false | false | 0 | 7 | 5 | 15 | 7 | 8 | null | null |
CulpaBS/wbBach | src/Futhark/Analysis/Usage.hs | bsd-3-clause | usageInExp :: (Aliased lore, UsageInOp (Op lore)) => Exp lore -> UT.UsageTable
usageInExp (Apply _ args _) =
mconcat [ mconcat $ map UT.consumedUsage $
HS.toList $ subExpAliases arg
| (arg,d) <- args, d == Consume ] | 239 | usageInExp :: (Aliased lore, UsageInOp (Op lore)) => Exp lore -> UT.UsageTable
usageInExp (Apply _ args _) =
mconcat [ mconcat $ map UT.consumedUsage $
HS.toList $ subExpAliases arg
| (arg,d) <- args, d == Consume ] | 239 | usageInExp (Apply _ args _) =
mconcat [ mconcat $ map UT.consumedUsage $
HS.toList $ subExpAliases arg
| (arg,d) <- args, d == Consume ] | 160 | false | true | 0 | 11 | 60 | 104 | 52 | 52 | null | null |
vimster/text-classification | src/Main.hs | bsd-3-clause | wordCategoryCounts :: Category -> [Document] -> M.Map (Word, Category) Int
wordCategoryCounts category documents = foldr (flip (M.insertWith (+)) 1) M.empty joined
where joined = map (\word -> (word, category)) $ concat documents
------------------------------------------------------------------------
-- Score cal... | 401 | wordCategoryCounts :: Category -> [Document] -> M.Map (Word, Category) Int
wordCategoryCounts category documents = foldr (flip (M.insertWith (+)) 1) M.empty joined
where joined = map (\word -> (word, category)) $ concat documents
------------------------------------------------------------------------
-- Score cal... | 401 | wordCategoryCounts category documents = foldr (flip (M.insertWith (+)) 1) M.empty joined
where joined = map (\word -> (word, category)) $ concat documents
------------------------------------------------------------------------
-- Score calculation
------------------------------------------------------------------... | 326 | false | true | 0 | 10 | 41 | 102 | 55 | 47 | null | null |
expipiplus1/orbit | test/Test.hs | mit | main :: IO ()
main = do
let is = includingOptions [slowTestQCRatio] : defaultIngredients
defaultMainWithIngredients is $(testGroupGenerator)
----------------------------------------------------------------
-- Orbit utils
---------------------------------------------------------------- | 290 | main :: IO ()
main = do
let is = includingOptions [slowTestQCRatio] : defaultIngredients
defaultMainWithIngredients is $(testGroupGenerator)
----------------------------------------------------------------
-- Orbit utils
---------------------------------------------------------------- | 290 | main = do
let is = includingOptions [slowTestQCRatio] : defaultIngredients
defaultMainWithIngredients is $(testGroupGenerator)
----------------------------------------------------------------
-- Orbit utils
---------------------------------------------------------------- | 276 | false | true | 0 | 12 | 26 | 50 | 25 | 25 | null | null |
ml9951/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | ipDataConKey :: Unique
ipDataConKey = mkPreludeDataConUnique 38 | 90 | ipDataConKey :: Unique
ipDataConKey = mkPreludeDataConUnique 38 | 90 | ipDataConKey = mkPreludeDataConUnique 38 | 67 | false | true | 0 | 5 | 33 | 14 | 7 | 7 | null | null |
trygvis/hledger | tools/simplebench.hs | gpl-3.0 | options = [
Option "f" ["testsfile"] (ReqArg File "testsfile") "file containing tests, one per line, default: bench.tests"
,Option "n" ["iterations"] (ReqArg Num "iterations") "number of test iterations to run, default: 2"
,Option "p" ["precision"] (ReqArg Prec "precision") "show times with this precision, default:... | 447 | options = [
Option "f" ["testsfile"] (ReqArg File "testsfile") "file containing tests, one per line, default: bench.tests"
,Option "n" ["iterations"] (ReqArg Num "iterations") "number of test iterations to run, default: 2"
,Option "p" ["precision"] (ReqArg Prec "precision") "show times with this precision, default:... | 447 | options = [
Option "f" ["testsfile"] (ReqArg File "testsfile") "file containing tests, one per line, default: bench.tests"
,Option "n" ["iterations"] (ReqArg Num "iterations") "number of test iterations to run, default: 2"
,Option "p" ["precision"] (ReqArg Prec "precision") "show times with this precision, default:... | 447 | false | false | 0 | 8 | 67 | 117 | 61 | 56 | null | null |
HairyDude/pdxparse | src/EU4/Events.hs | mit | optionAddStatement opt stmt = do
-- Not a GenericLhs - presumably an effect.
effects_pp'd <- optionAddEffect (eu4opt_effects opt) stmt
return $ opt { eu4opt_effects = effects_pp'd }
-- | Append an effect to the effects of an option. | 245 | optionAddStatement opt stmt = do
-- Not a GenericLhs - presumably an effect.
effects_pp'd <- optionAddEffect (eu4opt_effects opt) stmt
return $ opt { eu4opt_effects = effects_pp'd }
-- | Append an effect to the effects of an option. | 245 | optionAddStatement opt stmt = do
-- Not a GenericLhs - presumably an effect.
effects_pp'd <- optionAddEffect (eu4opt_effects opt) stmt
return $ opt { eu4opt_effects = effects_pp'd }
-- | Append an effect to the effects of an option. | 245 | false | false | 1 | 10 | 50 | 51 | 23 | 28 | null | null |
keithodulaigh/Hets | SoftFOL/ParseTPTP.hs | gpl-2.0 | include :: Parser TPTP
include = do
key $ tryString "include"
oParen
a <- atomicWord
m <- optionL $ do
comma
sepBy1 aname comma
cDotParen
return $ Include (FileName a) m
-- | does not allow leading zeros | 224 | include :: Parser TPTP
include = do
key $ tryString "include"
oParen
a <- atomicWord
m <- optionL $ do
comma
sepBy1 aname comma
cDotParen
return $ Include (FileName a) m
-- | does not allow leading zeros | 224 | include = do
key $ tryString "include"
oParen
a <- atomicWord
m <- optionL $ do
comma
sepBy1 aname comma
cDotParen
return $ Include (FileName a) m
-- | does not allow leading zeros | 201 | false | true | 0 | 12 | 58 | 84 | 35 | 49 | null | null |
blitzcode/jacky | src/FontRendering.hs | mit | getFT2Version :: FontRenderer -> IO (Int, Int, Int)
getFT2Version fr = ft2ToFR fr FT2.getFT2Version | 107 | getFT2Version :: FontRenderer -> IO (Int, Int, Int)
getFT2Version fr = ft2ToFR fr FT2.getFT2Version | 107 | getFT2Version fr = ft2ToFR fr FT2.getFT2Version | 51 | false | true | 0 | 8 | 21 | 43 | 20 | 23 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | trymaybe :: IO () -> IO (Maybe SomeException)
trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e) | 122 | trymaybe :: IO () -> IO (Maybe SomeException)
trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e) | 122 | trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e) | 76 | false | true | 0 | 9 | 20 | 65 | 32 | 33 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT12.hs | gpl-3.0 | drop _ [] = [] | 22 | drop _ [] = [] | 22 | drop _ [] = [] | 22 | false | false | 0 | 6 | 12 | 19 | 8 | 11 | null | null |
olsner/ghc | libraries/base/Data/Bitraversable.hs | bsd-3-clause | bisequenceA :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
bisequenceA = bisequence | 102 | bisequenceA :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
bisequenceA = bisequence | 102 | bisequenceA = bisequence | 24 | false | true | 0 | 10 | 19 | 64 | 30 | 34 | null | null |
omgbebebe/Boom | src/Boom.hs | mit | knife_ cmd args = run_ "knife" (cmd:args) | 41 | knife_ cmd args = run_ "knife" (cmd:args) | 41 | knife_ cmd args = run_ "knife" (cmd:args) | 41 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
dolio/vector | Data/Vector/Storable.hs | bsd-3-clause | thaw = G.thaw | 13 | thaw = G.thaw | 13 | thaw = G.thaw | 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
brendanhay/gogol | gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Delete.hs | mpl-2.0 | -- | V1 error format.
todXgafv :: Lens' TransferOperationsDelete (Maybe Xgafv)
todXgafv = lens _todXgafv (\ s a -> s{_todXgafv = a}) | 132 | todXgafv :: Lens' TransferOperationsDelete (Maybe Xgafv)
todXgafv = lens _todXgafv (\ s a -> s{_todXgafv = a}) | 110 | todXgafv = lens _todXgafv (\ s a -> s{_todXgafv = a}) | 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
brendanhay/gogol | gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/CollectionGroups/Indexes/Delete.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pdcgidUploadProtocol :: Lens' ProjectsDatabasesCollectionGroupsIndexesDelete (Maybe Text)
pdcgidUploadProtocol
= lens _pdcgidUploadProtocol
(\ s a -> s{_pdcgidUploadProtocol = a}) | 249 | pdcgidUploadProtocol :: Lens' ProjectsDatabasesCollectionGroupsIndexesDelete (Maybe Text)
pdcgidUploadProtocol
= lens _pdcgidUploadProtocol
(\ s a -> s{_pdcgidUploadProtocol = a}) | 187 | pdcgidUploadProtocol
= lens _pdcgidUploadProtocol
(\ s a -> s{_pdcgidUploadProtocol = a}) | 97 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
urbanslug/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprStmtInCtxt ctxt stmt
= hang (ptext (sLit "In a stmt of") <+> pprAStmtContext ctxt <> colon)
2 (ppr_stmt stmt)
where
-- For Group and Transform Stmts, don't print the nested stmts!
ppr_stmt (TransStmt { trS_by = by, trS_using = using
, trS_form = form }) = pprTransStmt by us... | 361 | pprStmtInCtxt ctxt stmt
= hang (ptext (sLit "In a stmt of") <+> pprAStmtContext ctxt <> colon)
2 (ppr_stmt stmt)
where
-- For Group and Transform Stmts, don't print the nested stmts!
ppr_stmt (TransStmt { trS_by = by, trS_using = using
, trS_form = form }) = pprTransStmt by us... | 361 | pprStmtInCtxt ctxt stmt
= hang (ptext (sLit "In a stmt of") <+> pprAStmtContext ctxt <> colon)
2 (ppr_stmt stmt)
where
-- For Group and Transform Stmts, don't print the nested stmts!
ppr_stmt (TransStmt { trS_by = by, trS_using = using
, trS_form = form }) = pprTransStmt by us... | 361 | false | false | 0 | 11 | 101 | 101 | 51 | 50 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvKvmSpicePasswordFile :: String
hvKvmSpicePasswordFile = "spice_password_file" | 79 | hvKvmSpicePasswordFile :: String
hvKvmSpicePasswordFile = "spice_password_file" | 79 | hvKvmSpicePasswordFile = "spice_password_file" | 46 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
avh4/elm-format | elm-format-lib/src/Parse/ParsecAdapter.hs | bsd-3-clause | skipMany ::Parser a -> Parser ()
skipMany (P.Parser p) =
P.Parser $ \s cok _ cerr _ ->
let
skipMany_ s' =
p
s'
(\_ -> skipMany_)
parserDoesNotConsumeErr
cerr
(\_ _ _ -> cok () s')
in
skipMany_ s | 272 | skipMany ::Parser a -> Parser ()
skipMany (P.Parser p) =
P.Parser $ \s cok _ cerr _ ->
let
skipMany_ s' =
p
s'
(\_ -> skipMany_)
parserDoesNotConsumeErr
cerr
(\_ _ _ -> cok () s')
in
skipMany_ s | 272 | skipMany (P.Parser p) =
P.Parser $ \s cok _ cerr _ ->
let
skipMany_ s' =
p
s'
(\_ -> skipMany_)
parserDoesNotConsumeErr
cerr
(\_ _ _ -> cok () s')
in
skipMany_ s | 239 | false | true | 0 | 15 | 116 | 108 | 53 | 55 | null | null |
fffej/haskellprojects | fluidDynamics/Main.hs | bsd-2-clause | updateForce :: (Int,Int) -> (Double,Double) -> (Grid,Grid) -> IO ()
updateForce p (dx,dy) (u,v) = do
writeVal u p (force * dx)
writeVal v p (force * dy) | 156 | updateForce :: (Int,Int) -> (Double,Double) -> (Grid,Grid) -> IO ()
updateForce p (dx,dy) (u,v) = do
writeVal u p (force * dx)
writeVal v p (force * dy) | 156 | updateForce p (dx,dy) (u,v) = do
writeVal u p (force * dx)
writeVal v p (force * dy) | 88 | false | true | 0 | 10 | 31 | 104 | 54 | 50 | null | null |
billpmurphy/genetic-nock | NockUtils.hs | mit | branches :: Noun -> [Noun]
branches n = case n of
A x -> [n]
x :> y -> [n] ++ atoms x ++ atoms y | 123 | branches :: Noun -> [Noun]
branches n = case n of
A x -> [n]
x :> y -> [n] ++ atoms x ++ atoms y | 123 | branches n = case n of
A x -> [n]
x :> y -> [n] ++ atoms x ++ atoms y | 96 | false | true | 0 | 10 | 52 | 69 | 33 | 36 | null | null |
christiaanb/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | compileOne :: HscEnv
-> ModSummary -- ^ summary for module being compiled
-> Int -- ^ module N ...
-> Int -- ^ ... of M
-> Maybe ModIface -- ^ old interface, if we have one
-> Maybe Linkable -- ^ old linkable, if we have one
... | 465 | compileOne :: HscEnv
-> ModSummary -- ^ summary for module being compiled
-> Int -- ^ module N ...
-> Int -- ^ ... of M
-> Maybe ModIface -- ^ old interface, if we have one
-> Maybe Linkable -- ^ old linkable, if we have one
... | 417 | compileOne = compileOne' Nothing (Just batchMsg) | 48 | true | true | 0 | 12 | 176 | 65 | 34 | 31 | null | null |
royopa/pandoc | tests/Tests/Readers/Markdown.hs | gpl-2.0 | markdown :: String -> Pandoc
markdown = handleError . readMarkdown def | 70 | markdown :: String -> Pandoc
markdown = handleError . readMarkdown def | 70 | markdown = handleError . readMarkdown def | 41 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
thsutton/document-analysis | lib/Document/Analysis.hs | bsd-3-clause | -- | Inefficiently, and in memory, convert a list of documents into a
-- document-term matrix.
documentMatrix :: [(Word, Text)] -> Mat Int
documentMatrix = foldl' worker M.empty
where
worker :: Mat Int -> (Word, Text) -> Mat Int
worker mat (i, doc) =
let fs = map (\w -> (Key i . hashFeature $ w, 1)) $... | 410 | documentMatrix :: [(Word, Text)] -> Mat Int
documentMatrix = foldl' worker M.empty
where
worker :: Mat Int -> (Word, Text) -> Mat Int
worker mat (i, doc) =
let fs = map (\w -> (Key i . hashFeature $ w, 1)) $ T.words doc
mat' = foldl' (\m f -> m + M.fromList [f]) mat fs
in mat' | 315 | documentMatrix = foldl' worker M.empty
where
worker :: Mat Int -> (Word, Text) -> Mat Int
worker mat (i, doc) =
let fs = map (\w -> (Key i . hashFeature $ w, 1)) $ T.words doc
mat' = foldl' (\m f -> m + M.fromList [f]) mat fs
in mat' | 271 | true | true | 0 | 16 | 111 | 173 | 87 | 86 | null | null |
reinerp/hmatrix-static | Data/Packed/Static/Matrix.hs | gpl-3.0 | {- | Constructs a matrix from a list of columns.
@\> fromColumnsU [[$vec|1,2,3|],[$vec|4,5,6|]]
[$mat| 1.0, 4.0;
2.0, 5.0;
3.0, 6.0 |]@
-}
fromColumnsU :: (Element t) => [Vector n t] -> Matrix (n,Unknown) t
fromColumnsU = Matrix . H.fromColumns . map unVector | 274 | fromColumnsU :: (Element t) => [Vector n t] -> Matrix (n,Unknown) t
fromColumnsU = Matrix . H.fromColumns . map unVector | 120 | fromColumnsU = Matrix . H.fromColumns . map unVector | 52 | true | true | 0 | 8 | 56 | 57 | 30 | 27 | null | null |
reenberg/xmonad | XMonad/Core.hs | bsd-3-clause | -- | Ignore SIGPIPE to avoid termination when a pipe is full, and SIGCHLD to
-- avoid zombie processes, and clean up any extant zombie processes.
installSignalHandlers :: MonadIO m => m ()
installSignalHandlers = io $ do
noticeX "XMonad.Core.installSignalhandler" "Installed signal handlers, to ignore SIGPIPE and SI... | 579 | installSignalHandlers :: MonadIO m => m ()
installSignalHandlers = io $ do
noticeX "XMonad.Core.installSignalhandler" "Installed signal handlers, to ignore SIGPIPE and SIGCHLD"
installHandler openEndedPipe Ignore Nothing
installHandler sigCHLD Ignore Nothing
(try :: IO a -> IO (Either SomeException a))
... | 433 | installSignalHandlers = io $ do
noticeX "XMonad.Core.installSignalhandler" "Installed signal handlers, to ignore SIGPIPE and SIGCHLD"
installHandler openEndedPipe Ignore Nothing
installHandler sigCHLD Ignore Nothing
(try :: IO a -> IO (Either SomeException a))
$ fix $ \more -> do
x <- getA... | 390 | true | true | 0 | 14 | 123 | 131 | 60 | 71 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2011-Learn_You_a_Haskell/Learn_You_a_Haskell.hs | unlicense | take' _ [] = [] | 19 | take' _ [] = [] | 19 | take' _ [] = [] | 19 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
nevrenato/Hets_Fork | CASL_DL/PredefinedCASLAxioms.hs | gpl-2.0 | posInt :: SORT
posInt = stringToId positiveIntegerS | 51 | posInt :: SORT
posInt = stringToId positiveIntegerS | 51 | posInt = stringToId positiveIntegerS | 36 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
silky/react-haskell | src/React/Elements.hs | mit | exportClassLeaf :: ClassCtx ctx
=> ClassConfig props state insig exsig ctx
-> ExportedClass
exportClassLeaf conf =
castRef $ classForeign $ createClass conf | 192 | exportClassLeaf :: ClassCtx ctx
=> ClassConfig props state insig exsig ctx
-> ExportedClass
exportClassLeaf conf =
castRef $ classForeign $ createClass conf | 192 | exportClassLeaf conf =
castRef $ classForeign $ createClass conf | 68 | false | true | 0 | 7 | 57 | 47 | 22 | 25 | null | null |
TueHaulund/ROOPLC | src/CodeGenerator.hs | mit | cgSwap :: SIdentifier -> SIdentifier -> CodeGenerator [(Maybe Label, MInstruction)]
cgSwap n1 n2 = if n1 == n2 then return [] else
do (r1, l1, u1) <- loadForSwap n1
(r2, l2, u2) <- loadForSwap n2
u2 >> u1
let swap = [(Nothing, XOR r1 r2), (Nothing, XOR r2 r1), (Nothing, XOR r1 r2)]
retur... | 373 | cgSwap :: SIdentifier -> SIdentifier -> CodeGenerator [(Maybe Label, MInstruction)]
cgSwap n1 n2 = if n1 == n2 then return [] else
do (r1, l1, u1) <- loadForSwap n1
(r2, l2, u2) <- loadForSwap n2
u2 >> u1
let swap = [(Nothing, XOR r1 r2), (Nothing, XOR r2 r1), (Nothing, XOR r1 r2)]
retur... | 373 | cgSwap n1 n2 = if n1 == n2 then return [] else
do (r1, l1, u1) <- loadForSwap n1
(r2, l2, u2) <- loadForSwap n2
u2 >> u1
let swap = [(Nothing, XOR r1 r2), (Nothing, XOR r2 r1), (Nothing, XOR r1 r2)]
return $ l1 ++ l2 ++ swap ++ invertInstructions (l1 ++ l2) | 289 | false | true | 0 | 14 | 96 | 186 | 95 | 91 | null | null |
sol/pandoc | src/Text/Pandoc/Writers/OpenDocument.hs | gpl-2.0 | tableStyle :: Int -> [(Char,Double)] -> Doc
tableStyle num wcs =
let tableId = "Table" ++ show (num + 1)
table = inTags True "style:style"
[("style:name", tableId)] $
selfClosingTag "style:table-properties"
[("table:a... | 1,279 | tableStyle :: Int -> [(Char,Double)] -> Doc
tableStyle num wcs =
let tableId = "Table" ++ show (num + 1)
table = inTags True "style:style"
[("style:name", tableId)] $
selfClosingTag "style:table-properties"
[("table:a... | 1,279 | tableStyle num wcs =
let tableId = "Table" ++ show (num + 1)
table = inTags True "style:style"
[("style:name", tableId)] $
selfClosingTag "style:table-properties"
[("table:align" , "center")]
colStyle (c,0)... | 1,235 | false | true | 0 | 16 | 532 | 307 | 170 | 137 | null | null |
DanielSchiavini/ampersand | src/Database/Design/Ampersand/Test/TestScripts.hs | gpl-3.0 | models :: [FilePath]
models = [ baseDir </> "Atlasv2/RepoRap/Fspec.adl"
, baseDir </> "Bugs/Current/Other/Bug335_Kl0Kl1.adl"
, baseDir </> "Bugs/Current/SQL/ARM20-Test8.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug331_TotalInjective.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug302_Igno... | 7,712 | models :: [FilePath]
models = [ baseDir </> "Atlasv2/RepoRap/Fspec.adl"
, baseDir </> "Bugs/Current/Other/Bug335_Kl0Kl1.adl"
, baseDir </> "Bugs/Current/SQL/ARM20-Test8.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug331_TotalInjective.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug302_Igno... | 7,712 | models = [ baseDir </> "Atlasv2/RepoRap/Fspec.adl"
, baseDir </> "Bugs/Current/Other/Bug335_Kl0Kl1.adl"
, baseDir </> "Bugs/Current/SQL/ARM20-Test8.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug331_TotalInjective.adl"
, baseDir </> "Bugs/Current/SQLFail/Bug302_IgnoredV.adl"
, ... | 7,691 | false | true | 0 | 7 | 1,771 | 967 | 549 | 418 | null | null |
hvr/lens | tests/properties.hs | bsd-3-clause | -- Control.Lens.Type
prop_1 = isLens (_1 :: Lens' (Int,Double,()) Int) | 100 | prop_1 = isLens (_1 :: Lens' (Int,Double,()) Int) | 79 | prop_1 = isLens (_1 :: Lens' (Int,Double,()) Int) | 79 | true | false | 0 | 9 | 39 | 32 | 18 | 14 | null | null |
travitch/llvm-analysis | tests/ClassHierarchyTests.hs | bsd-3-clause | isCallInst :: Instruction -> Bool
isCallInst i =
case i of
CallInst {} -> True
_ -> False | 99 | isCallInst :: Instruction -> Bool
isCallInst i =
case i of
CallInst {} -> True
_ -> False | 99 | isCallInst i =
case i of
CallInst {} -> True
_ -> False | 65 | false | true | 2 | 5 | 27 | 34 | 19 | 15 | null | null |
dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/RegisterWorkflowType.hs | mpl-2.0 | -- | The default task priority to assign to the workflow type. If not assigned,
-- then "0" will be used. Valid values are integers that range from Java's 'Integer.MIN_VALUE' (-2147483648) to 'Integer.MAX_VALUE' (2147483647). Higher numbers indicate
-- higher priority.
--
-- For more information about setting task prio... | 658 | rwtDefaultTaskPriority :: Lens' RegisterWorkflowType (Maybe Text)
rwtDefaultTaskPriority =
lens _rwtDefaultTaskPriority (\s a -> s { _rwtDefaultTaskPriority = a }) | 167 | rwtDefaultTaskPriority =
lens _rwtDefaultTaskPriority (\s a -> s { _rwtDefaultTaskPriority = a }) | 101 | true | true | 0 | 9 | 84 | 51 | 30 | 21 | null | null |
massysett/quickpull | lib/Quickpull/Render.hs | bsd-3-clause | testModule
:: String
-- ^ Name to use for module
-> [(Meta, Qual)]
-> String
testModule name ls = topComments ++ rest
where
rest = concat . intersperse "\n" $
[ "module" <+> name <+> "where\n"
, "import Quickpull"
, imports . map (modDesc . fst) $ ls
, unlines
[ "decrees :... | 392 | testModule
:: String
-- ^ Name to use for module
-> [(Meta, Qual)]
-> String
testModule name ls = topComments ++ rest
where
rest = concat . intersperse "\n" $
[ "module" <+> name <+> "where\n"
, "import Quickpull"
, imports . map (modDesc . fst) $ ls
, unlines
[ "decrees :... | 392 | testModule name ls = topComments ++ rest
where
rest = concat . intersperse "\n" $
[ "module" <+> name <+> "where\n"
, "import Quickpull"
, imports . map (modDesc . fst) $ ls
, unlines
[ "decrees :: [Decree]"
, "decrees ="
]
, metaQuals ls
] | 307 | false | true | 0 | 12 | 136 | 116 | 60 | 56 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Projects/Instances/VerifyExternalSyncSettings.hs | mpl-2.0 | -- | JSONP
pivessCallback :: Lens' ProjectsInstancesVerifyExternalSyncSettings (Maybe Text)
pivessCallback
= lens _pivessCallback
(\ s a -> s{_pivessCallback = a}) | 171 | pivessCallback :: Lens' ProjectsInstancesVerifyExternalSyncSettings (Maybe Text)
pivessCallback
= lens _pivessCallback
(\ s a -> s{_pivessCallback = a}) | 160 | pivessCallback
= lens _pivessCallback
(\ s a -> s{_pivessCallback = a}) | 79 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
michalt/cvector | Data/CVector.hs | bsd-3-clause | --
-- Extracting subvectors (slicing)
--
slice :: Int -> Int -> CVector a -> CVector a
slice = G.slice | 103 | slice :: Int -> Int -> CVector a -> CVector a
slice = G.slice | 61 | slice = G.slice | 15 | true | true | 0 | 9 | 20 | 40 | 19 | 21 | null | null |
schell/scottys-crew | Web/Crew/Templates/Forms.hs | gpl-3.0 | validIf :: T.Text -> (T.Text -> Bool, T.Text) -> InputData
validIf t (f, msg) = if f t then ValidInputData t else InvalidInputData t msg | 136 | validIf :: T.Text -> (T.Text -> Bool, T.Text) -> InputData
validIf t (f, msg) = if f t then ValidInputData t else InvalidInputData t msg | 136 | validIf t (f, msg) = if f t then ValidInputData t else InvalidInputData t msg | 77 | false | true | 0 | 9 | 24 | 65 | 34 | 31 | null | null |
urbanslug/ghc | compiler/llvmGen/LlvmCodeGen.hs | bsd-3-clause | cmmUsedLlvmGens :: LlvmM ()
cmmUsedLlvmGens = do
-- LLVM would discard variables that are internal and not obviously
-- used if we didn't provide these hints. This will generate a
-- definition of the form
--
-- @llvm.used = appending global [42 x i8*] [i8* bitcast <var> to i8*, ...]
--
-- Which is the... | 829 | cmmUsedLlvmGens :: LlvmM ()
cmmUsedLlvmGens = do
-- LLVM would discard variables that are internal and not obviously
-- used if we didn't provide these hints. This will generate a
-- definition of the form
--
-- @llvm.used = appending global [42 x i8*] [i8* bitcast <var> to i8*, ...]
--
-- Which is the... | 829 | cmmUsedLlvmGens = do
-- LLVM would discard variables that are internal and not obviously
-- used if we didn't provide these hints. This will generate a
-- definition of the form
--
-- @llvm.used = appending global [42 x i8*] [i8* bitcast <var> to i8*, ...]
--
-- Which is the LLVM way of protecting them... | 801 | false | true | 0 | 14 | 192 | 185 | 95 | 90 | null | null |
dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/ListClosedWorkflowExecutions.hs | mpl-2.0 | -- | 'ListClosedWorkflowExecutions' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'lcweCloseStatusFilter' @::@ 'Maybe' 'CloseStatusFilter'
--
-- * 'lcweCloseTimeFilter' @::@ 'Maybe' 'ExecutionTimeFilter'
--
-- * 'lcweDomain' @::@ 'Text'
--
-- * 'lcweExecutionFilter' @::@ 'Maybe' 'Wo... | 1,236 | listClosedWorkflowExecutions :: Text -- ^ 'lcweDomain'
-> ListClosedWorkflowExecutions
listClosedWorkflowExecutions p1 = ListClosedWorkflowExecutions
{ _lcweDomain = p1
, _lcweStartTimeFilter = Nothing
, _lcweCloseTimeFilter = Nothing
, _lcweExecutionFilter ... | 569 | listClosedWorkflowExecutions p1 = ListClosedWorkflowExecutions
{ _lcweDomain = p1
, _lcweStartTimeFilter = Nothing
, _lcweCloseTimeFilter = Nothing
, _lcweExecutionFilter = Nothing
, _lcweCloseStatusFilter = Nothing
, _lcweTypeFilter = Nothing
, _lcweTagFilter ... | 453 | true | true | 0 | 7 | 251 | 109 | 76 | 33 | null | null |
zhiyuanshi/fcore | frontend/simplify/SimplifyImpl.hs | bsd-2-clause | transExpr i j (FI.PrimOp e1 op e2) = PrimOp (transExpr i j e1) op (transExpr i j e2) | 92 | transExpr i j (FI.PrimOp e1 op e2) = PrimOp (transExpr i j e1) op (transExpr i j e2) | 92 | transExpr i j (FI.PrimOp e1 op e2) = PrimOp (transExpr i j e1) op (transExpr i j e2) | 92 | false | false | 0 | 8 | 25 | 52 | 25 | 27 | null | null |
mocovenwitch/haskell-learning-notes | haskell/printWithFrame.hs | apache-2.0 | maxLength :: [String] -> Int
maxLength n = maximum (map length n) + 4 | 69 | maxLength :: [String] -> Int
maxLength n = maximum (map length n) + 4 | 69 | maxLength n = maximum (map length n) + 4 | 40 | false | true | 2 | 7 | 13 | 43 | 19 | 24 | null | null |
MerelyAPseudonym/cmdtheline | src/System/Console/CmdTheLine/Err.hs | mit | errHelp doc = text "term error, help requested for unknown command" <+> doc | 75 | errHelp doc = text "term error, help requested for unknown command" <+> doc | 75 | errHelp doc = text "term error, help requested for unknown command" <+> doc | 75 | false | false | 1 | 5 | 12 | 19 | 7 | 12 | null | null |
chwthewke/passman-hs | src/Passman/Engine/KeyDerivation/PBKDF2.hs | bsd-3-clause | baseSalt :: B.ByteString
baseSalt = B.pack [ 0x78, 0x94, 0xad, 0xf8, 0x2f, 0x7b, 0x07, 0x11, 0x85, 0xf9, 0x44, 0xbe, 0x25, 0x3b, 0x16, 0x57 ] | 141 | baseSalt :: B.ByteString
baseSalt = B.pack [ 0x78, 0x94, 0xad, 0xf8, 0x2f, 0x7b, 0x07, 0x11, 0x85, 0xf9, 0x44, 0xbe, 0x25, 0x3b, 0x16, 0x57 ] | 141 | baseSalt = B.pack [ 0x78, 0x94, 0xad, 0xf8, 0x2f, 0x7b, 0x07, 0x11, 0x85, 0xf9, 0x44, 0xbe, 0x25, 0x3b, 0x16, 0x57 ] | 116 | false | true | 0 | 6 | 23 | 66 | 41 | 25 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.