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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
christiaanb/clash-compiler | examples/CochleaPlus.hs | bsd-2-clause | topEntity :: Signal (Vec 6 Integer) -> Signal (Vec 12 Integer)
topEntity = c_frm `mealy` (c_ws0,c_ts0,c_hist0) | 111 | topEntity :: Signal (Vec 6 Integer) -> Signal (Vec 12 Integer)
topEntity = c_frm `mealy` (c_ws0,c_ts0,c_hist0) | 110 | topEntity = c_frm `mealy` (c_ws0,c_ts0,c_hist0) | 47 | false | true | 2 | 6 | 16 | 48 | 27 | 21 | null | null |
KommuSoft/dep-software | Dep.Ui.hs | gpl-3.0 | clearAndExit :: IO Bool -- ^ The IO monad that handles the request to exit, always returns True.
clearAndExit = setCursorPosition 0 0 >> clearScreen >> exitSuccess >> return True | 178 | clearAndExit :: IO Bool
clearAndExit = setCursorPosition 0 0 >> clearScreen >> exitSuccess >> return True | 105 | clearAndExit = setCursorPosition 0 0 >> clearScreen >> exitSuccess >> return True | 81 | true | true | 0 | 8 | 29 | 35 | 17 | 18 | null | null |
RobinKrom/fasths | src/Codec/Fast/Encoder.hs | bsd-3-clause | field2Cop (ByteVecField (ByteVectorField f@(FieldInstrContent fname _ _ ) maybe_len )) = contramap (fmap fromValue . assertNameIs fname) (bytevecF2Cop f maybe_len :: FEncoder (Maybe B.ByteString)) | 196 | field2Cop (ByteVecField (ByteVectorField f@(FieldInstrContent fname _ _ ) maybe_len )) = contramap (fmap fromValue . assertNameIs fname) (bytevecF2Cop f maybe_len :: FEncoder (Maybe B.ByteString)) | 196 | field2Cop (ByteVecField (ByteVectorField f@(FieldInstrContent fname _ _ ) maybe_len )) = contramap (fmap fromValue . assertNameIs fname) (bytevecF2Cop f maybe_len :: FEncoder (Maybe B.ByteString)) | 196 | false | false | 0 | 11 | 23 | 77 | 37 | 40 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/DataCollectors/Drbd.hs | gpl-2.0 | -- | The name of this data collector.
dcName :: String
dcName = "drbd" | 70 | dcName :: String
dcName = "drbd" | 32 | dcName = "drbd" | 15 | true | true | 0 | 4 | 13 | 12 | 7 | 5 | null | null |
arekfu/project_euler | p0079/p0079.hs | mit | shortest input = (solution, checkSolution solution input)
where solution = (reverse . charSeq . makeMap) input | 114 | shortest input = (solution, checkSolution solution input)
where solution = (reverse . charSeq . makeMap) input | 114 | shortest input = (solution, checkSolution solution input)
where solution = (reverse . charSeq . makeMap) input | 114 | false | false | 0 | 10 | 19 | 41 | 21 | 20 | null | null |
kfish/hogg | Codec/Container/Ogg/MessageHeaders.hs | bsd-3-clause | readMHlines :: MessageHeaders -> [String] -> [(MessageHeaders, String)]
readMHlines mhdrs [] = [(mhdrs, "")] | 108 | readMHlines :: MessageHeaders -> [String] -> [(MessageHeaders, String)]
readMHlines mhdrs [] = [(mhdrs, "")] | 108 | readMHlines mhdrs [] = [(mhdrs, "")] | 36 | false | true | 0 | 8 | 13 | 47 | 27 | 20 | null | null |
kawamuray/ganeti | test/hs/Test/Ganeti/Utils.hs | gpl-2.0 | prop_parseUnit :: NonNegative Int -> Property
prop_parseUnit (NonNegative n) =
conjoin
[ parseUnit (show n) ==? (Ok n::Result Int)
, parseUnit (show n ++ "m") ==? (Ok n::Result Int)
, parseUnit (show n ++ "M") ==? (Ok (truncate n_mb)::Result Int)
, parseUnit (show n ++ "g") ==? (Ok (n*1024)::Result Int)
, p... | 788 | prop_parseUnit :: NonNegative Int -> Property
prop_parseUnit (NonNegative n) =
conjoin
[ parseUnit (show n) ==? (Ok n::Result Int)
, parseUnit (show n ++ "m") ==? (Ok n::Result Int)
, parseUnit (show n ++ "M") ==? (Ok (truncate n_mb)::Result Int)
, parseUnit (show n ++ "g") ==? (Ok (n*1024)::Result Int)
, p... | 788 | prop_parseUnit (NonNegative n) =
conjoin
[ parseUnit (show n) ==? (Ok n::Result Int)
, parseUnit (show n ++ "m") ==? (Ok n::Result Int)
, parseUnit (show n ++ "M") ==? (Ok (truncate n_mb)::Result Int)
, parseUnit (show n ++ "g") ==? (Ok (n*1024)::Result Int)
, parseUnit (show n ++ "G") ==? (Ok (truncate n_g... | 742 | false | true | 5 | 13 | 174 | 413 | 202 | 211 | null | null |
harlanhaskins/Letter | Haskell/src/Letter/Compiler/Core.hs | mit | funDecl :: String -> [String] -> String
funDecl id args = "long " ++ cleanedFunName id ++ (inParens . intercalate ", " . map (("long " ++) . cleanedExpName)) args | 162 | funDecl :: String -> [String] -> String
funDecl id args = "long " ++ cleanedFunName id ++ (inParens . intercalate ", " . map (("long " ++) . cleanedExpName)) args | 162 | funDecl id args = "long " ++ cleanedFunName id ++ (inParens . intercalate ", " . map (("long " ++) . cleanedExpName)) args | 122 | false | true | 2 | 12 | 29 | 75 | 36 | 39 | null | null |
ben-schulz/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | pprintErr' i (UniqueError _ n) = text "Unique name" <+> annName' n (showbasic n)
<+> text "is used more than once" | 148 | pprintErr' i (UniqueError _ n) = text "Unique name" <+> annName' n (showbasic n)
<+> text "is used more than once" | 148 | pprintErr' i (UniqueError _ n) = text "Unique name" <+> annName' n (showbasic n)
<+> text "is used more than once" | 148 | false | false | 0 | 9 | 54 | 44 | 20 | 24 | null | null |
henrytill/hecate | src/Hecate/Configuration.hs | apache-2.0 | getAllowMultipleKeys :: [(T.Text, TOML.Value)] -> Maybe Bool
getAllowMultipleKeys tbl
= tbl ^? tableAt "entries" . lup "allow_multiple_keys" . _Just . _Bool | 158 | getAllowMultipleKeys :: [(T.Text, TOML.Value)] -> Maybe Bool
getAllowMultipleKeys tbl
= tbl ^? tableAt "entries" . lup "allow_multiple_keys" . _Just . _Bool | 158 | getAllowMultipleKeys tbl
= tbl ^? tableAt "entries" . lup "allow_multiple_keys" . _Just . _Bool | 97 | false | true | 2 | 9 | 22 | 62 | 29 | 33 | null | null |
dschalk/score3 | Main.hs | mit | get4 _ = [-1,-1,-1,-1] | 22 | get4 _ = [-1,-1,-1,-1] | 22 | get4 _ = [-1,-1,-1,-1] | 22 | false | false | 0 | 6 | 3 | 29 | 16 | 13 | null | null |
UCSD-PL/230-web | static/lec-intro.hs | mit | areaCircle :: CircleT -> Double
areaCircle (Circle _ _ r) = pi * r * r | 70 | areaCircle :: CircleT -> Double
areaCircle (Circle _ _ r) = pi * r * r | 70 | areaCircle (Circle _ _ r) = pi * r * r | 38 | false | true | 0 | 7 | 15 | 36 | 18 | 18 | null | null |
green-haskell/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | mkBuiltInPrimTc :: FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc fs unique tycon
= mkWiredInName gHC_PRIM (mkTcOccFS fs)
unique
(ATyCon tycon) -- Relevant TyCon
BuiltInSyntax | 245 | mkBuiltInPrimTc :: FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc fs unique tycon
= mkWiredInName gHC_PRIM (mkTcOccFS fs)
unique
(ATyCon tycon) -- Relevant TyCon
BuiltInSyntax | 245 | mkBuiltInPrimTc fs unique tycon
= mkWiredInName gHC_PRIM (mkTcOccFS fs)
unique
(ATyCon tycon) -- Relevant TyCon
BuiltInSyntax | 188 | false | true | 0 | 7 | 87 | 54 | 27 | 27 | null | null |
snoyberg/ghc | libraries/base/GHC/IO/Handle.hs | bsd-3-clause | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_semiclosedHandle
htype -> return (isReadableHandleType htype) | 266 | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_semiclosedHandle
htype -> return (isReadableHandleType htype) | 266 | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_semiclosedHandle
htype -> return (isReadableHandleType htype) | 266 | false | false | 0 | 14 | 78 | 60 | 28 | 32 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/S3BucketDataExport.hs | mit | s3BucketDataExport
:: S3BucketDestination -- ^ 'sbdeDestination'
-> Val Text -- ^ 'sbdeOutputSchemaVersion'
-> S3BucketDataExport
s3BucketDataExport destinationarg outputSchemaVersionarg =
S3BucketDataExport
{ _s3BucketDataExportDestination = destinationarg
, _s3BucketDataExportOutputSchemaVersion = outputS... | 339 | s3BucketDataExport
:: S3BucketDestination -- ^ 'sbdeDestination'
-> Val Text -- ^ 'sbdeOutputSchemaVersion'
-> S3BucketDataExport
s3BucketDataExport destinationarg outputSchemaVersionarg =
S3BucketDataExport
{ _s3BucketDataExportDestination = destinationarg
, _s3BucketDataExportOutputSchemaVersion = outputS... | 339 | s3BucketDataExport destinationarg outputSchemaVersionarg =
S3BucketDataExport
{ _s3BucketDataExportDestination = destinationarg
, _s3BucketDataExportOutputSchemaVersion = outputSchemaVersionarg
} | 203 | false | true | 0 | 8 | 41 | 52 | 26 | 26 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsUtils.hs | bsd-3-clause | mkLHsPatTup [lpat] = lpat | 25 | mkLHsPatTup [lpat] = lpat | 25 | mkLHsPatTup [lpat] = lpat | 25 | false | false | 0 | 5 | 3 | 13 | 6 | 7 | null | null |
stefan-hoeck/labeled-graph | Data/Graph/Graphs.hs | bsd-3-clause | neopentane = fromList 5 [0 <-> 1,1 <-> 2,1 <-> 3,1 <-> 4] | 57 | neopentane = fromList 5 [0 <-> 1,1 <-> 2,1 <-> 3,1 <-> 4] | 57 | neopentane = fromList 5 [0 <-> 1,1 <-> 2,1 <-> 3,1 <-> 4] | 57 | false | false | 0 | 7 | 12 | 39 | 21 | 18 | null | null |
rahulmutt/ghcvm | eta/Eta/REPL/UI/Tags.hs | bsd-3-clause | collateAndWriteTags ETags file tagInfos = do -- etags style, Emacs/XEmacs
tagInfoGroups <- makeTagGroupsWithSrcInfo $filter tagExported tagInfos
let tagGroups = map processGroup tagInfoGroups
tryIO (writeTagsSafely file $ concat tagGroups)
where
processGroup [] = throwGhcException (CmdLineError "empty tag ... | 499 | collateAndWriteTags ETags file tagInfos = do -- etags style, Emacs/XEmacs
tagInfoGroups <- makeTagGroupsWithSrcInfo $filter tagExported tagInfos
let tagGroups = map processGroup tagInfoGroups
tryIO (writeTagsSafely file $ concat tagGroups)
where
processGroup [] = throwGhcException (CmdLineError "empty tag ... | 499 | collateAndWriteTags ETags file tagInfos = do -- etags style, Emacs/XEmacs
tagInfoGroups <- makeTagGroupsWithSrcInfo $filter tagExported tagInfos
let tagGroups = map processGroup tagInfoGroups
tryIO (writeTagsSafely file $ concat tagGroups)
where
processGroup [] = throwGhcException (CmdLineError "empty tag ... | 499 | false | false | 0 | 12 | 92 | 154 | 71 | 83 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/Opcode.hs | apache-2.0 | ifne = Opcode 0x9a | 18 | ifne = Opcode 0x9a | 18 | ifne = Opcode 0x9a | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ekmett/text | tests/Tests/Properties.hs | bsd-2-clause | t_findContains (NotEmpty s) = all (T.isPrefixOf s . snd) . T.breakOnAll s .
T.intercalate s | 121 | t_findContains (NotEmpty s) = all (T.isPrefixOf s . snd) . T.breakOnAll s .
T.intercalate s | 121 | t_findContains (NotEmpty s) = all (T.isPrefixOf s . snd) . T.breakOnAll s .
T.intercalate s | 121 | false | false | 0 | 11 | 44 | 48 | 22 | 26 | null | null |
HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen.hs | isc | compileOutParam MemArray {} =
pure (Nothing, ArrayDestination Nothing) | 72 | compileOutParam MemArray {} =
pure (Nothing, ArrayDestination Nothing) | 72 | compileOutParam MemArray {} =
pure (Nothing, ArrayDestination Nothing) | 72 | false | false | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
SKA-ScienceDataProcessor/RC | MS5/programs/imaging.hs | apache-2.0 | gcfKernel :: GridPar -> Flow Tag -> Flow Vis -> Kernel GCFs
gcfKernel _ = halideWrapper "gcfs" (planRepr :. visRepr :. Z) gcfsRepr | 130 | gcfKernel :: GridPar -> Flow Tag -> Flow Vis -> Kernel GCFs
gcfKernel _ = halideWrapper "gcfs" (planRepr :. visRepr :. Z) gcfsRepr | 130 | gcfKernel _ = halideWrapper "gcfs" (planRepr :. visRepr :. Z) gcfsRepr | 70 | false | true | 0 | 8 | 22 | 53 | 25 | 28 | null | null |
jabaraster/first-heroku | Application.hs | bsd-2-clause | -- This function allocates resources (such as a database connection pool),
-- performs initialization and creates a WAI application. This is also the
-- place to put your migrate statements to have automatic database
-- migrations handled by Yesod.
withJabaraster :: AppConfig DefaultEnv () -> Logger -> (Application -> ... | 921 | withJabaraster :: AppConfig DefaultEnv () -> Logger -> (Application -> IO ()) -> IO ()
withJabaraster conf logger f = do
s <- staticSite
dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf)
$ either error return . Database.Persist.Base.loadConfig
Database.Persist.Base.withPool (dbconf... | 672 | withJabaraster conf logger f = do
s <- staticSite
dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf)
$ either error return . Database.Persist.Base.loadConfig
Database.Persist.Base.withPool (dbconf :: Settings.PersistConfig) $ \p -> do
Database.Persist.Base.runPool dbconf (ru... | 585 | true | true | 1 | 14 | 182 | 223 | 110 | 113 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x2F888' = "\x3862" | 34 | decomposeChar '\x2F888' = "\x3862" | 34 | decomposeChar '\x2F888' = "\x3862" | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
porglezomp/learn-languages | haskell/Parsec2.hs | unlicense | parseJSON :: String -> Either ParseError JSON
parseJSON = parse jsonFile "(unknown)" | 84 | parseJSON :: String -> Either ParseError JSON
parseJSON = parse jsonFile "(unknown)" | 84 | parseJSON = parse jsonFile "(unknown)" | 38 | false | true | 0 | 7 | 11 | 31 | 13 | 18 | null | null |
castaway/pandoc | src/Tests/Old.hs | gpl-2.0 | lhsWriterTests :: String -> [Test]
lhsWriterTests format
= [ t "lhs to normal" format
, t "lhs to lhs" (format ++ "+lhs")
]
where
t n f = test n ["--columns=78", "-r", "native", "-s", "-w", f]
"lhs-test.native" ("lhs-test" <.> f) | 261 | lhsWriterTests :: String -> [Test]
lhsWriterTests format
= [ t "lhs to normal" format
, t "lhs to lhs" (format ++ "+lhs")
]
where
t n f = test n ["--columns=78", "-r", "native", "-s", "-w", f]
"lhs-test.native" ("lhs-test" <.> f) | 261 | lhsWriterTests format
= [ t "lhs to normal" format
, t "lhs to lhs" (format ++ "+lhs")
]
where
t n f = test n ["--columns=78", "-r", "native", "-s", "-w", f]
"lhs-test.native" ("lhs-test" <.> f) | 226 | false | true | 0 | 8 | 71 | 90 | 49 | 41 | null | null |
wilbowma/accelerate | accelerate-examples/tests/primitives/Backpermute.hs | bsd-3-clause | reverseRef :: UArray Int Float -> UArray Int Float
reverseRef xs = listArray (bounds xs) (reverse (elems xs)) | 109 | reverseRef :: UArray Int Float -> UArray Int Float
reverseRef xs = listArray (bounds xs) (reverse (elems xs)) | 109 | reverseRef xs = listArray (bounds xs) (reverse (elems xs)) | 58 | false | true | 0 | 9 | 17 | 51 | 24 | 27 | null | null |
clintonmead/indextype | codegen/SourceGen.hs | mit | genClass constraintName className = f "class" ++ f "instance" ++ "\n" where
f s = s ++ " (" ++ constraintName ++ " n " ++ typeVar ++ ") => " ++ className ++ " n " ++ typeVar ++ "\n" | 183 | genClass constraintName className = f "class" ++ f "instance" ++ "\n" where
f s = s ++ " (" ++ constraintName ++ " n " ++ typeVar ++ ") => " ++ className ++ " n " ++ typeVar ++ "\n" | 183 | genClass constraintName className = f "class" ++ f "instance" ++ "\n" where
f s = s ++ " (" ++ constraintName ++ " n " ++ typeVar ++ ") => " ++ className ++ " n " ++ typeVar ++ "\n" | 183 | false | false | 0 | 15 | 42 | 76 | 35 | 41 | null | null |
mathologist/hTestMaker | testmaker/src/TestMaker/SageTex.hs | gpl-3.0 | findMatch' _ pos "" = pos | 25 | findMatch' _ pos "" = pos | 25 | findMatch' _ pos "" = pos | 25 | false | false | 2 | 5 | 5 | 19 | 6 | 13 | null | null |
gridaphobe/hpc | tests/ghc_ghci/A.hs | bsd-3-clause | a :: Char
a = 'z' | 17 | a :: Char
a = 'z' | 17 | a = 'z' | 7 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
badi/super-user-spark | src/Constants.hs | mit | whitespaceChars :: [Char]
whitespaceChars = linespaceChars ++ endOfLineChars | 76 | whitespaceChars :: [Char]
whitespaceChars = linespaceChars ++ endOfLineChars | 76 | whitespaceChars = linespaceChars ++ endOfLineChars | 50 | false | true | 0 | 5 | 7 | 18 | 10 | 8 | null | null |
colah/ImplicitCAD | Graphics/Implicit/ExtOpenScad/Util/StateC.hs | agpl-3.0 | warnC :: SourcePosition -> Text -> StateC ()
warnC = addMessage Warning | 71 | warnC :: SourcePosition -> Text -> StateC ()
warnC = addMessage Warning | 71 | warnC = addMessage Warning | 26 | false | true | 0 | 8 | 11 | 27 | 13 | 14 | null | null |
edsko/cabal | Cabal/src/Distribution/ParseUtils.hs | bsd-3-clause | catchParseError :: ParseResult a -> (PError -> ParseResult a)
-> ParseResult a
p@(ParseOk _ _) `catchParseError` _ = p | 134 | catchParseError :: ParseResult a -> (PError -> ParseResult a)
-> ParseResult a
p@(ParseOk _ _) `catchParseError` _ = p | 134 | p@(ParseOk _ _) `catchParseError` _ = p | 39 | false | true | 1 | 9 | 34 | 57 | 27 | 30 | null | null |
da-eto-ya/trash | haskell/simplest/lists.hs | mit | main :: IO ()
main = putStrLn "lists" | 37 | main :: IO ()
main = putStrLn "lists" | 37 | main = putStrLn "lists" | 23 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
kishoredbn/barrelfish | tools/sockeye/SockeyeBackendLISA.hs | mit | generateInstantiation :: String -> Maybe AuxData -> SPAST.Definition -> [SPAST.Module] -> String
generateInstantiation moduleName auxData (SPAST.Instantiates meta inst mod args) modules = let
params = case find (((==) mod) . SPAST.moduleName) modules of
Nothing -> error $ "Module parameters not found for " ... | 1,351 | generateInstantiation :: String -> Maybe AuxData -> SPAST.Definition -> [SPAST.Module] -> String
generateInstantiation moduleName auxData (SPAST.Instantiates meta inst mod args) modules = let
params = case find (((==) mod) . SPAST.moduleName) modules of
Nothing -> error $ "Module parameters not found for " ... | 1,351 | generateInstantiation moduleName auxData (SPAST.Instantiates meta inst mod args) modules = let
params = case find (((==) mod) . SPAST.moduleName) modules of
Nothing -> error $ "Module parameters not found for " ++ mod ++ " : " ++ (show meta)
Just x -> map SPAST.paramName (SPAST.parameters x)
map... | 1,254 | false | true | 2 | 20 | 294 | 528 | 271 | 257 | null | null |
danr/hipspec | examples/old-examples/quickspec/ProductiveUseOfFailure2.hs | gpl-3.0 | isort (x:xs) = insert x (isort xs) | 34 | isort (x:xs) = insert x (isort xs) | 34 | isort (x:xs) = insert x (isort xs) | 34 | false | false | 0 | 7 | 6 | 28 | 13 | 15 | null | null |
mathhun/stack | src/Path/IO.hs | bsd-3-clause | -- | Move a dir. Optimistically assumes it exists. If it doesn't,
-- doesn't complain.
moveDirIfExists :: MonadIO m => Path b1 Dir -> Path b2 Dir -> m ()
moveDirIfExists from to = ignoreDoesNotExist (moveDir from to) | 216 | moveDirIfExists :: MonadIO m => Path b1 Dir -> Path b2 Dir -> m ()
moveDirIfExists from to = ignoreDoesNotExist (moveDir from to) | 129 | moveDirIfExists from to = ignoreDoesNotExist (moveDir from to) | 62 | true | true | 0 | 9 | 37 | 59 | 28 | 31 | null | null |
dservgun/haskell_test_code | src/Main.hs | gpl-2.0 | insert a (x: xs)
| a <= x = a : x : xs
| otherwise = x : (insert a xs) | 87 | insert a (x: xs)
| a <= x = a : x : xs
| otherwise = x : (insert a xs) | 87 | insert a (x: xs)
| a <= x = a : x : xs
| otherwise = x : (insert a xs) | 87 | false | false | 0 | 8 | 38 | 57 | 27 | 30 | null | null |
manyoo/reflex-dom | src-ghcjs/Reflex/Dom/Xhr/Foreign.hs | bsd-3-clause | xmlHttpRequestGetResponseType :: XMLHttpRequest -> IO (Maybe XhrResponseType)
xmlHttpRequestGetResponseType = fmap toResponseType . getResponseType | 147 | xmlHttpRequestGetResponseType :: XMLHttpRequest -> IO (Maybe XhrResponseType)
xmlHttpRequestGetResponseType = fmap toResponseType . getResponseType | 147 | xmlHttpRequestGetResponseType = fmap toResponseType . getResponseType | 69 | false | true | 0 | 8 | 12 | 31 | 15 | 16 | null | null |
nomeata/codeworld | codeworld-prediction/tests/prediction.hs | apache-2.0 | -- decimal display
-- Generation of random schedules
-- The actual check:
-- Exhaustively search the order in which these events could happen
-- Memoize every initial segment
-- Ensure that all possible ways reach the same conclusion.
failedChecks :: EventSchedule -> [CheckReport]
failedChecks schedule = map mkRepo... | 1,859 | failedChecks :: EventSchedule -> [CheckReport]
failedChecks schedule = map mkReport $ filter (not . check) allChecks
where
allDone :: [EventsDone]
allDone = do
let (tss,em) = schedule
tss' <- inits tss
em' <- traverse inits em -- wow!
return (tss', em')
allChecks :: [Check... | 1,620 | failedChecks schedule = map mkReport $ filter (not . check) allChecks
where
allDone :: [EventsDone]
allDone = do
let (tss,em) = schedule
tss' <- inits tss
em' <- traverse inits em -- wow!
return (tss', em')
allChecks :: [Check]
allChecks = allDone >>= prevs
prevs ... | 1,573 | true | true | 36 | 12 | 540 | 657 | 351 | 306 | null | null |
acowley/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | rationalTyConKey = mkPreludeTyConUnique 33 | 65 | rationalTyConKey = mkPreludeTyConUnique 33 | 65 | rationalTyConKey = mkPreludeTyConUnique 33 | 65 | false | false | 0 | 5 | 26 | 9 | 4 | 5 | null | null |
guilt/webify | src/TTF.hs | mit | cmapEnd CmapFormat12{c12Groups = groups} = fromIntegral $ f12EndCharCode $ last groups | 86 | cmapEnd CmapFormat12{c12Groups = groups} = fromIntegral $ f12EndCharCode $ last groups | 86 | cmapEnd CmapFormat12{c12Groups = groups} = fromIntegral $ f12EndCharCode $ last groups | 86 | false | false | 0 | 8 | 10 | 29 | 14 | 15 | null | null |
LukaHorvat/Echo | src/Common/Prelude.hs | mit | startsWith :: Eq a => [a] -> [a] -> Bool
startsWith list prefix = take (length prefix) list == prefix | 101 | startsWith :: Eq a => [a] -> [a] -> Bool
startsWith list prefix = take (length prefix) list == prefix | 101 | startsWith list prefix = take (length prefix) list == prefix | 60 | false | true | 0 | 9 | 19 | 59 | 27 | 32 | null | null |
leshchevds/ganeti | src/Ganeti/HTools/Tags.hs | bsd-2-clause | stripFirstPrefix (':':_) = Just "" | 34 | stripFirstPrefix (':':_) = Just "" | 34 | stripFirstPrefix (':':_) = Just "" | 34 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
garetxe/cabal | cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/DSL.hs | bsd-3-clause | exInstPkgId :: ExampleInstalled -> C.PackageIdentifier
exInstPkgId ex = C.PackageIdentifier {
pkgName = C.PackageName (exInstName ex)
, pkgVersion = Version [exInstVersion ex, 0, 0] []
} | 203 | exInstPkgId :: ExampleInstalled -> C.PackageIdentifier
exInstPkgId ex = C.PackageIdentifier {
pkgName = C.PackageName (exInstName ex)
, pkgVersion = Version [exInstVersion ex, 0, 0] []
} | 203 | exInstPkgId ex = C.PackageIdentifier {
pkgName = C.PackageName (exInstName ex)
, pkgVersion = Version [exInstVersion ex, 0, 0] []
} | 148 | false | true | 0 | 9 | 41 | 66 | 35 | 31 | null | null |
yliu120/K3 | src/Language/K3/Utils/Pretty/Syntax.hs | apache-2.0 | typ' (tag -> TInt) = return $ text "int" | 47 | typ' (tag -> TInt) = return $ text "int" | 47 | typ' (tag -> TInt) = return $ text "int" | 47 | false | false | 0 | 7 | 15 | 23 | 11 | 12 | null | null |
profan/mal | haskell/Core.hs | mpl-2.0 | _pairup (MalString x:y:xs) = do
rest <- _pairup xs
return $ (x,y):rest | 78 | _pairup (MalString x:y:xs) = do
rest <- _pairup xs
return $ (x,y):rest | 78 | _pairup (MalString x:y:xs) = do
rest <- _pairup xs
return $ (x,y):rest | 78 | false | false | 0 | 9 | 19 | 50 | 24 | 26 | null | null |
foreverbell/parakeet | src/Parakeet/Parser/Stage1.hs | mit | separator :: Parser ()
separator = void $ try $ do
spaces
char M.separator
notFollowedBy (char M.separator) | 113 | separator :: Parser ()
separator = void $ try $ do
spaces
char M.separator
notFollowedBy (char M.separator) | 113 | separator = void $ try $ do
spaces
char M.separator
notFollowedBy (char M.separator) | 90 | false | true | 4 | 11 | 22 | 57 | 23 | 34 | null | null |
ekmett/promises | src/Data/Promise.hs | bsd-2-clause | -- | Run a lazy computation. The final answer is given in the form of a promise to be fulfilled.
-- If the promise is unfulfilled then a user supplied default value will be returned.
runLazy :: (forall s. Promise s a -> Lazy s b) -> a -> a
runLazy f d = unsafePerformIO (runLazyIO f d) | 285 | runLazy :: (forall s. Promise s a -> Lazy s b) -> a -> a
runLazy f d = unsafePerformIO (runLazyIO f d) | 102 | runLazy f d = unsafePerformIO (runLazyIO f d) | 45 | true | true | 0 | 9 | 57 | 63 | 31 | 32 | null | null |
mumuki/mulang | src/Language/Mulang/Inspector/Literal.hs | gpl-3.0 | isMath :: Inspection
isMath (Primitive Plus) = True | 55 | isMath :: Inspection
isMath (Primitive Plus) = True | 55 | isMath (Primitive Plus) = True | 34 | false | true | 0 | 7 | 11 | 20 | 10 | 10 | null | null |
joelburget/interplanetary-computation | src/Planetary/Library/FrankExamples.hs | bsd-3-clause | charHandler1 _ = throwError (FailedForeignFun "charHandler1") | 61 | charHandler1 _ = throwError (FailedForeignFun "charHandler1") | 61 | charHandler1 _ = throwError (FailedForeignFun "charHandler1") | 61 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
ducis/haAni | hs/common/Graphics/Rendering/OpenGL/GL/Framebuffer.hs | gpl-2.0 | -- | 'True' if left and right buffers exist.
stereoBuffer :: GettableStateVar Bool
stereoBuffer =
makeGettableStateVar $ getBoolean1 unmarshalGLboolean GetStereo | 166 | stereoBuffer :: GettableStateVar Bool
stereoBuffer =
makeGettableStateVar $ getBoolean1 unmarshalGLboolean GetStereo | 120 | stereoBuffer =
makeGettableStateVar $ getBoolean1 unmarshalGLboolean GetStereo | 82 | true | true | 0 | 6 | 24 | 24 | 12 | 12 | null | null |
FranklinChen/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Output.hs | mit | appendOutput :: IHaskellDisplay a => OutputWidget -> a -> IO ()
appendOutput widget out = do
disp <- display out
widgetPublishDisplay widget disp
-- | Clear the output widget immediately | 191 | appendOutput :: IHaskellDisplay a => OutputWidget -> a -> IO ()
appendOutput widget out = do
disp <- display out
widgetPublishDisplay widget disp
-- | Clear the output widget immediately | 191 | appendOutput widget out = do
disp <- display out
widgetPublishDisplay widget disp
-- | Clear the output widget immediately | 127 | false | true | 0 | 9 | 34 | 55 | 25 | 30 | null | null |
Heather/hackport | Portage/Dependency/Types.hs | gpl-3.0 | dep_is_case_of _ _ = False | 26 | dep_is_case_of _ _ = False | 26 | dep_is_case_of _ _ = False | 26 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
tphyahoo/haskoin | haskoin-core/Network/Haskoin/Script/Evaluator.hs | unlicense | eval OP_VERIFY = popBool >>= \case
True -> return ()
False -> programError "OP_VERIFY failed" | 102 | eval OP_VERIFY = popBool >>= \case
True -> return ()
False -> programError "OP_VERIFY failed" | 102 | eval OP_VERIFY = popBool >>= \case
True -> return ()
False -> programError "OP_VERIFY failed" | 102 | false | false | 1 | 11 | 23 | 39 | 16 | 23 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/StoredInfoTypes/Delete.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
psitdUploadType :: Lens' ProjectsStoredInfoTypesDelete (Maybe Text)
psitdUploadType
= lens _psitdUploadType
(\ s a -> s{_psitdUploadType = a}) | 221 | psitdUploadType :: Lens' ProjectsStoredInfoTypesDelete (Maybe Text)
psitdUploadType
= lens _psitdUploadType
(\ s a -> s{_psitdUploadType = a}) | 150 | psitdUploadType
= lens _psitdUploadType
(\ s a -> s{_psitdUploadType = a}) | 82 | true | true | 1 | 9 | 34 | 51 | 25 | 26 | null | null |
romanb/amazonka | amazonka-datapipeline/gen/Network/AWS/DataPipeline/PollForTask.hs | mpl-2.0 | -- | Identity information for the EC2 instance that is hosting the task runner.
-- You can get this value from the instance using 'http://169.254.169.254/latest/meta-data/instance-id'. For more information, see <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html Instance Metadata> in the... | 696 | pftInstanceIdentity :: Lens' PollForTask (Maybe InstanceIdentity)
pftInstanceIdentity =
lens _pftInstanceIdentity (\s a -> s { _pftInstanceIdentity = a }) | 158 | pftInstanceIdentity =
lens _pftInstanceIdentity (\s a -> s { _pftInstanceIdentity = a }) | 92 | true | true | 0 | 9 | 92 | 49 | 28 | 21 | null | null |
simonmichael/hledger | hledger-lib/Hledger/Query.hs | gpl-3.0 | matchesPosting (Real v) p = v == isReal p | 41 | matchesPosting (Real v) p = v == isReal p | 41 | matchesPosting (Real v) p = v == isReal p | 41 | false | false | 2 | 6 | 8 | 29 | 11 | 18 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCodeSize DoubleCosOp = primOpCodeSizeForeignCall | 55 | primOpCodeSize DoubleCosOp = primOpCodeSizeForeignCall | 55 | primOpCodeSize DoubleCosOp = primOpCodeSizeForeignCall | 55 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
cgswords/Grift | Compiler/EnforceConventions.hs | mit | effects (Nop:es) tail binds = effects es tail binds | 66 | effects (Nop:es) tail binds = effects es tail binds | 66 | effects (Nop:es) tail binds = effects es tail binds | 66 | false | false | 0 | 7 | 23 | 27 | 13 | 14 | null | null |
MaartenFaddegon/libgraph | Data/Graph/Libgraph/Dagify.hs | bsd-3-clause | dagify :: (Ord v, Eq a, Show v) => ([v]->v) -> Graph v a -> Graph v a
dagify merge = {-# SCC "dagify" #-} (collapse merge) . remove | 132 | dagify :: (Ord v, Eq a, Show v) => ([v]->v) -> Graph v a -> Graph v a
dagify merge = {-# SCC "dagify" #-} (collapse merge) . remove | 132 | dagify merge = {-# SCC "dagify" #-} (collapse merge) . remove | 61 | false | true | 0 | 9 | 29 | 74 | 38 | 36 | null | null |
rueshyna/gogol | gogol-billing/gen/Network/Google/Resource/CloudBilling/Projects/GetBillingInfo.hs | mpl-2.0 | -- | OAuth access token.
pgbiAccessToken :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiAccessToken
= lens _pgbiAccessToken
(\ s a -> s{_pgbiAccessToken = a}) | 168 | pgbiAccessToken :: Lens' ProjectsGetBillingInfo (Maybe Text)
pgbiAccessToken
= lens _pgbiAccessToken
(\ s a -> s{_pgbiAccessToken = a}) | 143 | pgbiAccessToken
= lens _pgbiAccessToken
(\ s a -> s{_pgbiAccessToken = a}) | 82 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Trafo/Fusion.hs | bsd-3-clause | aletD :: (Arrays a, Arrays b)
=> OpenAcc aenv a
-> OpenAcc (aenv, a) b
-> DelayedAcc aenv b
aletD bndAcc bodyAcc =
case delayOpenAcc bndAcc of
-- If the binding is marked as "done" (i.e. needs to be computed now), add
-- it to the extended environment of the delayed body and ... | 12,964 | aletD :: (Arrays a, Arrays b)
=> OpenAcc aenv a
-> OpenAcc (aenv, a) b
-> DelayedAcc aenv b
aletD bndAcc bodyAcc =
case delayOpenAcc bndAcc of
-- If the binding is marked as "done" (i.e. needs to be computed now), add
-- it to the extended environment of the delayed body and ... | 12,964 | aletD bndAcc bodyAcc =
case delayOpenAcc bndAcc of
-- If the binding is marked as "done" (i.e. needs to be computed now), add
-- it to the extended environment of the delayed body and continue. Since
-- manifest arrays also fall into this category, this elegantly handles
-- let-floating.
--
Do... | 12,838 | false | true | 319 | 19 | 4,990 | 3,971 | 2,039 | 1,932 | null | null |
michaelmp/chess | src/Chess/Board.hs | agpl-3.0 | e8 = AlgebraicSquare (File 'e') (Rank 8) | 40 | e8 = AlgebraicSquare (File 'e') (Rank 8) | 40 | e8 = AlgebraicSquare (File 'e') (Rank 8) | 40 | false | false | 1 | 7 | 6 | 26 | 11 | 15 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M02/D22/Exercise.hs | mit | -- removeExactMatches is a Set.removeBy-function
{--
>>> let smgwss = removeExactMatches em gwss
>>> Set.size smgwss
16836
>>> let smwwbcs = removeExactMatches em wwbcs
>>> Set.size smwwbcs
481
Okay. Now let's remove any aliased wineries, ... that we will eventually be
having.
--}
aliasedWineriesQuery :: Cypher
a... | 451 | aliasedWineriesQuery :: Cypher
aliasedWineriesQuery = T.concat ["MATCH (aw:AliasedWinery)--(w:Winery) ",
"RETURN aw.name, w.name"] | 163 | aliasedWineriesQuery = T.concat ["MATCH (aw:AliasedWinery)--(w:Winery) ",
"RETURN aw.name, w.name"] | 132 | true | true | 0 | 6 | 93 | 30 | 15 | 15 | null | null |
ribag/ganeti-experiments | src/Ganeti/WConfd/Core.hs | gpl-2.0 | -- * Functions available to the RPC module
-- Just a test function
echo :: String -> WConfdMonad String
echo = return | 118 | echo :: String -> WConfdMonad String
echo = return | 50 | echo = return | 13 | true | true | 0 | 7 | 22 | 26 | 12 | 14 | null | null |
javgh/mtgoxapi | Network/MtGoxAPI/CurlWrapper.hs | bsd-3-clause | -- | Will start a thread which will execute cURL requests that are passed to it
-- using 'performCurlRequest'. Internally only a single cURL handle is opened,
-- which means that keep-alive connections are automatically reused.
initCurlWrapper :: IO CurlHandle
initCurlWrapper = do
chan <- newChan :: IO (Chan CurlDa... | 386 | initCurlWrapper :: IO CurlHandle
initCurlWrapper = do
chan <- newChan :: IO (Chan CurlData)
_ <- forkIO $ curlThread chan
return $ CurlHandle chan | 158 | initCurlWrapper = do
chan <- newChan :: IO (Chan CurlData)
_ <- forkIO $ curlThread chan
return $ CurlHandle chan | 125 | true | true | 0 | 10 | 71 | 60 | 29 | 31 | null | null |
kmate/HaRe | old/refactorer/RefacInstantiate.hs | bsd-3-clause | addMatch x _ = error "You can only instantiate patterns on the LHS of a match!" | 79 | addMatch x _ = error "You can only instantiate patterns on the LHS of a match!" | 79 | addMatch x _ = error "You can only instantiate patterns on the LHS of a match!" | 79 | false | false | 0 | 4 | 15 | 16 | 6 | 10 | null | null |
jtdaugherty/vty | src/Data/Terminfo/Eval.hs | bsd-3-clause | writeCapOp (PushValue v) = do
push v | 40 | writeCapOp (PushValue v) = do
push v | 40 | writeCapOp (PushValue v) = do
push v | 40 | false | false | 0 | 7 | 10 | 22 | 9 | 13 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Runtime/Foreign.hs | mit | wrapBuiltin :: forall f. BuiltinForeign f => f -> Foreign
wrapBuiltin x = Wrap r x
where
Tagged r = foreignRef :: Tagged f Reference | 136 | wrapBuiltin :: forall f. BuiltinForeign f => f -> Foreign
wrapBuiltin x = Wrap r x
where
Tagged r = foreignRef :: Tagged f Reference | 136 | wrapBuiltin x = Wrap r x
where
Tagged r = foreignRef :: Tagged f Reference | 78 | false | true | 0 | 7 | 28 | 55 | 26 | 29 | null | null |
HJvT/com | System/Win32/Com/Server.hs | bsd-3-clause | getTypeInfoCount :: Ptr () -> Ptr Word32 -> IO HRESULT
getTypeInfoCount iptr pctInfo = do
-- putMessage "getTypeInfoCount"
writeWord32 pctInfo 1
return s_OK | 161 | getTypeInfoCount :: Ptr () -> Ptr Word32 -> IO HRESULT
getTypeInfoCount iptr pctInfo = do
-- putMessage "getTypeInfoCount"
writeWord32 pctInfo 1
return s_OK | 161 | getTypeInfoCount iptr pctInfo = do
-- putMessage "getTypeInfoCount"
writeWord32 pctInfo 1
return s_OK | 106 | false | true | 0 | 7 | 27 | 50 | 22 | 28 | null | null |
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["gray61"]@
--
-- R156 G156 B156, 0x9c9c9c
gray61 :: Color
gray61 = RGB 156 156 156 | 96 | gray61 :: Color
gray61 = RGB 156 156 156 | 40 | gray61 = RGB 156 156 156 | 24 | true | true | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
GaloisInc/mistral | src/Mistral/TypeCheck/AST.hs | bsd-3-clause | -- | Assert equality between two types. This boils down to solving via
-- unification.
(~~) :: Type -> Type -> Prop
a ~~ b = tapp eqPropCon [a,b] | 146 | (~~) :: Type -> Type -> Prop
a ~~ b = tapp eqPropCon [a,b] | 58 | a ~~ b = tapp eqPropCon [a,b] | 29 | true | true | 0 | 9 | 29 | 41 | 22 | 19 | null | null |
stevely/hspirv | src/SpirV/Builder.hs | bsd-3-clause | -- Id 1: Result type
-- Id 2: Value to add to group
groupIAdd :: TypeId -> ExecutionScope -> GroupOperation -> Id -> Builder Id
groupIAdd (TypeId i) = R.groupIAdd i | 164 | groupIAdd :: TypeId -> ExecutionScope -> GroupOperation -> Id -> Builder Id
groupIAdd (TypeId i) = R.groupIAdd i | 112 | groupIAdd (TypeId i) = R.groupIAdd i | 36 | true | true | 0 | 12 | 30 | 51 | 24 | 27 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGPURenderPipelineDescriptor.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGPURenderPipelineDescriptor.fragmentFunction Mozilla WebGPURenderPipelineDescriptor.fragmentFunction documentation>
getFragmentFunction ::
(MonadDOM m) =>
WebGPURenderPipelineDescriptor -> m (Maybe WebGPUFunction)
getFr... | 399 | getFragmentFunction ::
(MonadDOM m) =>
WebGPURenderPipelineDescriptor -> m (Maybe WebGPUFunction)
getFragmentFunction self
= liftDOM ((self ^. js "fragmentFunction") >>= fromJSVal) | 224 | getFragmentFunction self
= liftDOM ((self ^. js "fragmentFunction") >>= fromJSVal) | 84 | true | true | 0 | 10 | 70 | 57 | 29 | 28 | null | null |
typelead/epm | epm/Distribution/Client/BuildReports/Anonymous.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Description of the fields, for parsing/printing
fieldDescrs :: [FieldDescr BuildReport]
fieldDescrs =
[ simpleField "package" Text.disp Text.parse
package (\v r -> r { package = v }... | 1,558 | fieldDescrs :: [FieldDescr BuildReport]
fieldDescrs =
[ simpleField "package" Text.disp Text.parse
package (\v r -> r { package = v })
, simpleField "os" Text.disp Text.parse
os (\v r -> r { os = v })
... | 1,425 | fieldDescrs =
[ simpleField "package" Text.disp Text.parse
package (\v r -> r { package = v })
, simpleField "os" Text.disp Text.parse
os (\v r -> r { os = v })
, simpleField "arch" Text.dis... | 1,385 | true | true | 0 | 11 | 678 | 382 | 210 | 172 | null | null |
michaelficarra/purescript | src/Language/PureScript/Sugar/TypeClasses/Deriving.hs | mit | mkSpineFunction _ _ = internalError "mkSpineFunction: expected DataDeclaration" | 79 | mkSpineFunction _ _ = internalError "mkSpineFunction: expected DataDeclaration" | 79 | mkSpineFunction _ _ = internalError "mkSpineFunction: expected DataDeclaration" | 79 | false | false | 0 | 5 | 7 | 14 | 6 | 8 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | {-
The input is divided into a local environment, which is a flat tuple
(unless it's too big), and a stack, which is a right-nested pair.
In general, the input has the form
((x1,...,xn), (s1,...(sk,())...))
where xi are the environment values, and si the ones on the stack,
with s1 being the "top", the first o... | 466 | envStackType :: [Id] -> Type -> Type
envStackType ids stack_ty = mkCorePairTy (mkBigCoreVarTupTy ids) stack_ty | 110 | envStackType ids stack_ty = mkCorePairTy (mkBigCoreVarTupTy ids) stack_ty | 73 | true | true | 0 | 7 | 88 | 39 | 20 | 19 | null | null |
jsavatgy/talvipaivanseisauksen-ajanlasku | bmt-test-03.hs | gpl-3.0 | timeParsed :: String -> UTCTime
timeParsed line =
fromJust t where
t = parseTime defaultTimeLocale "%Y-%m-%d %H:%M" line | 126 | timeParsed :: String -> UTCTime
timeParsed line =
fromJust t where
t = parseTime defaultTimeLocale "%Y-%m-%d %H:%M" line | 126 | timeParsed line =
fromJust t where
t = parseTime defaultTimeLocale "%Y-%m-%d %H:%M" line | 94 | false | true | 0 | 7 | 23 | 35 | 17 | 18 | null | null |
egison/egison | hs-src/Language/Egison/PrettyMath/Mathematica.hs | mit | showMathExpr (Partial f xs) = showMathExpr f ++ "_" ++ showMathExprs "_" xs | 75 | showMathExpr (Partial f xs) = showMathExpr f ++ "_" ++ showMathExprs "_" xs | 75 | showMathExpr (Partial f xs) = showMathExpr f ++ "_" ++ showMathExprs "_" xs | 75 | false | false | 2 | 6 | 12 | 35 | 15 | 20 | null | null |
rahulmutt/ghcvm | compiler/Eta/DeSugar/DsArrows.hs | bsd-3-clause | dsCmdLStmt :: DsCmdEnv -> IdSet -> [Id] -> CmdLStmt Id -> [Id]
-> DsM (CoreExpr, IdSet)
dsCmdLStmt ids local_vars out_ids cmd env_ids
= dsCmdStmt ids local_vars out_ids (unLoc cmd) env_ids | 201 | dsCmdLStmt :: DsCmdEnv -> IdSet -> [Id] -> CmdLStmt Id -> [Id]
-> DsM (CoreExpr, IdSet)
dsCmdLStmt ids local_vars out_ids cmd env_ids
= dsCmdStmt ids local_vars out_ids (unLoc cmd) env_ids | 201 | dsCmdLStmt ids local_vars out_ids cmd env_ids
= dsCmdStmt ids local_vars out_ids (unLoc cmd) env_ids | 102 | false | true | 0 | 11 | 42 | 77 | 39 | 38 | null | null |
jstolarek/ghc | compiler/vectorise/Vectorise/Type/Classify.hs | bsd-3-clause | -- Compute mutually recursive groups of tycons in topological order.
--
tyConGroups :: [TyCon] -> [TyConGroup]
tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges)
where
edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs
, let ds = tyConsOfTyCon tc]
mk_grp... | 542 | tyConGroups :: [TyCon] -> [TyConGroup]
tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges)
where
edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs
, let ds = tyConsOfTyCon tc]
mk_grp (AcyclicSCC (tc, ds)) = ([tc], ds)
mk_grp (CyclicSCC els) = (... | 470 | tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges)
where
edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs
, let ds = tyConsOfTyCon tc]
mk_grp (AcyclicSCC (tc, ds)) = ([tc], ds)
mk_grp (CyclicSCC els) = (tcs, unionManyUniqSets dss)
where... | 431 | true | true | 0 | 10 | 143 | 158 | 87 | 71 | null | null |
mikeizbicki/HLearn | src/HLearn/Optimization/Univariate.hs | bsd-3-clause | fminuncM_bracketed_dbrent ::
( OrdField a
, cxt a
) => StopCondition (Iterator_dbrent a) -- ^ controls when to stop
-> LineBracket a -- ^ search for the solution within this range
-> (a -> History cxt a) -- ^ monadic function we're minimizing
... | 4,956 | fminuncM_bracketed_dbrent ::
( OrdField a
, cxt a
) => StopCondition (Iterator_dbrent a) -- ^ controls when to stop
-> LineBracket a -- ^ search for the solution within this range
-> (a -> History cxt a) -- ^ monadic function we're minimizing
... | 4,917 | fminuncM_bracketed_dbrent stop (LineBracket ax bx cx fa fb fc) f df = beginFunction "dbrent" $ do
fbx <- f bx
dfx <- df bx
iterate (step_dbrent f df) stop $ Iterator_dbrent
{ _dbrent_a = min ax cx
, _dbrent_b = max ax cx
, _dbrent_d = zero
, _dbrent_e = zero
, _dbrent... | 4,464 | true | true | 3 | 28 | 2,746 | 1,411 | 780 | 631 | null | null |
scottgw/language-eiffel | Language/Eiffel/Parser/Expr.hs | bsd-3-clause | resultVar :: Parser UnPosExpr
resultVar = keyword TokResult >> return ResultVar | 79 | resultVar :: Parser UnPosExpr
resultVar = keyword TokResult >> return ResultVar | 79 | resultVar = keyword TokResult >> return ResultVar | 49 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
marmutro/console-calendar | Calendar.hs | bsd-2-clause | byMonth = groupBy (\a b -> (monthOfDate a) == (monthOfDate b)) | 62 | byMonth = groupBy (\a b -> (monthOfDate a) == (monthOfDate b)) | 62 | byMonth = groupBy (\a b -> (monthOfDate a) == (monthOfDate b)) | 62 | false | false | 1 | 10 | 10 | 39 | 18 | 21 | null | null |
spechub/Hets | Persistence/Reasoning.hs | gpl-2.0 | setOmsConsistencyCheckStatus :: MonadIO m
=> Entity DatabaseSchema.LocIdBase
-> ConsistencyStatusType.ConsistencyStatusType
-> DBMonad m ()
setOmsConsistencyCheckStatus (Entity omsKey _) consistencyCheckStatus = do
E.update $ \ oms... | 457 | setOmsConsistencyCheckStatus :: MonadIO m
=> Entity DatabaseSchema.LocIdBase
-> ConsistencyStatusType.ConsistencyStatusType
-> DBMonad m ()
setOmsConsistencyCheckStatus (Entity omsKey _) consistencyCheckStatus = do
E.update $ \ oms... | 457 | setOmsConsistencyCheckStatus (Entity omsKey _) consistencyCheckStatus = do
E.update $ \ oms -> do
set oms [OMSConsistencyStatus E.=. val consistencyCheckStatus]
where_ $ coerceId (oms ^. OMSId) ==. val omsKey
return () | 230 | false | true | 0 | 15 | 141 | 119 | 55 | 64 | null | null |
sinjar666/fbthrift | thrift/compiler/test/fixtures/qualified/gen-hs/Module2_Types.hs | apache-2.0 | to_BigStruct _ = error "not a struct" | 37 | to_BigStruct _ = error "not a struct" | 37 | to_BigStruct _ = error "not a struct" | 37 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
DaMSL/K3 | test/Language/K3/Interpreter/Values.hs | apache-2.0 | packCollection :: [Test]
packCollection = [] | 44 | packCollection :: [Test]
packCollection = [] | 44 | packCollection = [] | 19 | false | true | 0 | 7 | 5 | 23 | 10 | 13 | null | null |
ghorn/dynobud | dynobud/src/Dyno/NlpSolver.hs | lgpl-3.0 | toOutput ::
View xg
=> (ScaleFuns x g DM -> (J xg (Vector Double) -> J xg (Vector Double)))
-> String -> NlpSol x p g -> M.Map String (Vector Double) -> J xg (Vector Double)
toOutput scaleFun name nlpSol dmMap = case M.lookup name dmMap of
Nothing -> error $ "couldn't find output " ++ show name ++ " in outputs ... | 422 | toOutput ::
View xg
=> (ScaleFuns x g DM -> (J xg (Vector Double) -> J xg (Vector Double)))
-> String -> NlpSol x p g -> M.Map String (Vector Double) -> J xg (Vector Double)
toOutput scaleFun name nlpSol dmMap = case M.lookup name dmMap of
Nothing -> error $ "couldn't find output " ++ show name ++ " in outputs ... | 422 | toOutput scaleFun name nlpSol dmMap = case M.lookup name dmMap of
Nothing -> error $ "couldn't find output " ++ show name ++ " in outputs " ++ show (M.keys dmMap)
Just r -> scaleFun (isScale nlpSol) (mkM r)
-- (d2v used to be dnonzeros) | 242 | false | true | 0 | 14 | 92 | 192 | 91 | 101 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/ASM/Code.hs | apache-2.0 | if_fcmpne = floatInvBranch jfloat OP.fcmpl ifeq | 47 | if_fcmpne = floatInvBranch jfloat OP.fcmpl ifeq | 47 | if_fcmpne = floatInvBranch jfloat OP.fcmpl ifeq | 47 | false | false | 1 | 6 | 5 | 18 | 7 | 11 | null | null |
mattias-lundell/timber-llvm | src/Kindle.hs | bsd-3-clause | tFloat = tId Float | 51 | tFloat = tId Float | 51 | tFloat = tId Float | 51 | false | false | 0 | 5 | 36 | 9 | 4 | 5 | null | null |
c0deaddict/project-euler | src/Part2/Problem46.hs | bsd-3-clause | --
-- Problem 46: Goldbach's other conjecture
--
-- It was proposed by Christian Goldbach that every odd composite number can be
-- written as the sum of a prime and twice a square.
--
-- 9 = 7 + 2×1^2
-- 15 = 7 + 2×2^2
-- 21 = 3 + 2×3^2
-- 25 = 7 + 2×3^2
-- 27 = 19 + 2×2^2
-- 33 = 31 + 2×1^2
--
-- It turns out that th... | 526 | problem46 :: Maybe Int
problem46 = find (not . isGoldbach) oddComposites | 72 | problem46 = find (not . isGoldbach) oddComposites | 49 | true | true | 0 | 7 | 115 | 49 | 31 | 18 | null | null |
armoredsoftware/protocol | tpm/mainline/src/TPM/Const.hs | bsd-3-clause | tpm_ord_convertmigrationblob = (0x0000002a :: Word32) | 53 | tpm_ord_convertmigrationblob = (0x0000002a :: Word32) | 53 | tpm_ord_convertmigrationblob = (0x0000002a :: Word32) | 53 | false | false | 0 | 5 | 4 | 12 | 7 | 5 | null | null |
diegomachadosoares/hcomp | Parser.hs | gpl-3.0 | statement :: Parser Com
statement = parens statement
<|> statement' | 81 | statement :: Parser Com
statement = parens statement
<|> statement' | 81 | statement = parens statement
<|> statement' | 57 | false | true | 0 | 6 | 23 | 21 | 10 | 11 | null | null |
danr/hipspec | examples/old-examples/hip/Expr.hs | gpl-3.0 | mirror :: Expr -> Expr
mirror (Add e1 e2) = Add (mirror e2) (mirror e1) | 71 | mirror :: Expr -> Expr
mirror (Add e1 e2) = Add (mirror e2) (mirror e1) | 71 | mirror (Add e1 e2) = Add (mirror e2) (mirror e1) | 48 | false | true | 0 | 9 | 14 | 49 | 22 | 27 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_11_my_note.hs | mit | _succ :: Integer -> Integer
_succ a = a + 1 | 46 | _succ :: Integer -> Integer
_succ a = a + 1 | 46 | _succ a = a + 1 | 18 | false | true | 0 | 7 | 13 | 28 | 12 | 16 | null | null |
ulricha/dsh | src/Database/DSH/SL/Opt/Properties/VectorType.hs | bsd-3-clause | inferVectorTypeUnOp :: VectorProp VectorType -> UnOp -> Either String (VectorProp VectorType)
inferVectorTypeUnOp s op =
case op of
WinFun _ -> do
VTDataVec w <- unpack s
return $ VProp $ VTDataVec $ w + 1
Unique -> VProp <$> unpack s
UnboxKey -> Right $ VProp $ VTNA
Segment -> VProp <... | 1,465 | inferVectorTypeUnOp :: VectorProp VectorType -> UnOp -> Either String (VectorProp VectorType)
inferVectorTypeUnOp s op =
case op of
WinFun _ -> do
VTDataVec w <- unpack s
return $ VProp $ VTDataVec $ w + 1
Unique -> VProp <$> unpack s
UnboxKey -> Right $ VProp $ VTNA
Segment -> VProp <... | 1,465 | inferVectorTypeUnOp s op =
case op of
WinFun _ -> do
VTDataVec w <- unpack s
return $ VProp $ VTDataVec $ w + 1
Unique -> VProp <$> unpack s
UnboxKey -> Right $ VProp $ VTNA
Segment -> VProp <$> unpack s
Unsegment -> VProp <$> unpack s
Reverse -> liftM2 VPropPair (unpack s) (Ri... | 1,371 | false | true | 26 | 12 | 519 | 557 | 248 | 309 | null | null |
scast/bigbrother | src/TypeChecking.hs | gpl-2.0 | boperator ">=" Bool Bool = Just Bool | 36 | boperator ">=" Bool Bool = Just Bool | 36 | boperator ">=" Bool Bool = Just Bool | 36 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
creichert/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | opToText :: MongoUpdateOperator -> Text
opToText MongoPush = "$push" | 72 | opToText :: MongoUpdateOperator -> Text
opToText MongoPush = "$push" | 72 | opToText MongoPush = "$push" | 32 | false | true | 0 | 5 | 12 | 18 | 9 | 9 | null | null |
MgaMPKAy/language-sh | Language/Sh/Parser/Internal.hs | bsd-3-clause | mkRedir ">>" (Just s) t = return $ s :>> t | 43 | mkRedir ">>" (Just s) t = return $ s :>> t | 43 | mkRedir ">>" (Just s) t = return $ s :>> t | 43 | false | false | 1 | 6 | 11 | 32 | 13 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.