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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hesselink/regex-crossword | src/Crossword/Regex.hs | bsd-3-clause | ppr (Group r) = "(" ++ ppr r ++ ")" | 35 | ppr (Group r) = "(" ++ ppr r ++ ")" | 35 | ppr (Group r) = "(" ++ ppr r ++ ")" | 35 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
urbanslug/ghc | compiler/ghci/ByteCodeInstr.hs | bsd-3-clause | pprCoreExprShort (Let (Rec bs) _) = ptext (sLit "let {") <+> ppr (fst (head bs)) <+> ptext (sLit ("= ...; ... } in ...")) | 121 | pprCoreExprShort (Let (Rec bs) _) = ptext (sLit "let {") <+> ppr (fst (head bs)) <+> ptext (sLit ("= ...; ... } in ...")) | 121 | pprCoreExprShort (Let (Rec bs) _) = ptext (sLit "let {") <+> ppr (fst (head bs)) <+> ptext (sLit ("= ...; ... } in ...")) | 121 | false | false | 0 | 11 | 23 | 68 | 32 | 36 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Transforms/ANF.hs | bsd-3-clause | expandDefaultCase _ _ z
= return z | 37 | expandDefaultCase _ _ z
= return z | 37 | expandDefaultCase _ _ z
= return z | 37 | false | false | 0 | 5 | 9 | 16 | 7 | 9 | null | null |
Vhalesa/Poker | Aktionen.hs | mit | delegateBlind :: [Player] -> [Player]
delegateBlind [] = [] | 59 | delegateBlind :: [Player] -> [Player]
delegateBlind [] = [] | 59 | delegateBlind [] = [] | 21 | false | true | 0 | 8 | 8 | 34 | 16 | 18 | null | null |
Zankoku-Okuno/redo | test/test.hs | bsd-3-clause | echoDiamond_ :: Sh Bool
echoDiamond_ = withRedo ("test" </> "diamond") $ do
cmd "redo-ifchange" "out"
a <- length . filter catIn . T.lines <$> lastStderr
pure $ a == 1 | 179 | echoDiamond_ :: Sh Bool
echoDiamond_ = withRedo ("test" </> "diamond") $ do
cmd "redo-ifchange" "out"
a <- length . filter catIn . T.lines <$> lastStderr
pure $ a == 1 | 179 | echoDiamond_ = withRedo ("test" </> "diamond") $ do
cmd "redo-ifchange" "out"
a <- length . filter catIn . T.lines <$> lastStderr
pure $ a == 1 | 155 | false | true | 1 | 12 | 41 | 75 | 33 | 42 | null | null |
gleachkr/Carnap | Carnap-Server/Util/Database.hs | gpl-3.0 | checkUserData uid = do maybeData <- runDB $ getBy $ UniqueUserData uid
muser <- runDB $ get uid
case muser of
Nothing -> do setMessage "no user found"
redirect HomeR
Just u -> c... | 594 | checkUserData uid = do maybeData <- runDB $ getBy $ UniqueUserData uid
muser <- runDB $ get uid
case muser of
Nothing -> do setMessage "no user found"
redirect HomeR
Just u -> c... | 594 | checkUserData uid = do maybeData <- runDB $ getBy $ UniqueUserData uid
muser <- runDB $ get uid
case muser of
Nothing -> do setMessage "no user found"
redirect HomeR
Just u -> c... | 594 | false | false | 1 | 18 | 272 | 126 | 55 | 71 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Analysis/Match.hs | bsd-3-clause | hashPrimFun PrimBoolToInt = hash "PrimBoolToInt" | 62 | hashPrimFun PrimBoolToInt = hash "PrimBoolToInt" | 62 | hashPrimFun PrimBoolToInt = hash "PrimBoolToInt" | 62 | false | false | 0 | 5 | 18 | 13 | 5 | 8 | null | null |
ckw/matasano | set1/challenge2.hs | mit | --xor two hex strings, arg1 and arg2
main :: IO ()
main = do [lbs1, lbs2] <- fmap (fmap BL8.pack . take 2) $ getArgs
BL.putStr . hexToAscii $ lbsXOR (asciiToHex lbs1) (asciiToHex lbs2) | 194 | main :: IO ()
main = do [lbs1, lbs2] <- fmap (fmap BL8.pack . take 2) $ getArgs
BL.putStr . hexToAscii $ lbsXOR (asciiToHex lbs1) (asciiToHex lbs2) | 157 | main = do [lbs1, lbs2] <- fmap (fmap BL8.pack . take 2) $ getArgs
BL.putStr . hexToAscii $ lbsXOR (asciiToHex lbs1) (asciiToHex lbs2) | 143 | true | true | 1 | 14 | 43 | 86 | 40 | 46 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/Version.hs | bsd-3-clause | validVersion :: Version -> Bool
validVersion (Version [] _) = False | 67 | validVersion :: Version -> Bool
validVersion (Version [] _) = False | 67 | validVersion (Version [] _) = False | 35 | false | true | 0 | 8 | 10 | 28 | 14 | 14 | null | null |
kcsongor/generic-lens | generic-lens/test/Spec.hs | bsd-3-clause | sum1PrismB :: Prism Sum1 Sum1 Int Int
sum1PrismB = _Ctor @"B" | 61 | sum1PrismB :: Prism Sum1 Sum1 Int Int
sum1PrismB = _Ctor @"B" | 61 | sum1PrismB = _Ctor @"B" | 23 | false | true | 1 | 6 | 10 | 28 | 12 | 16 | null | null |
gcampax/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | prodTyConKey = mkPreludeTyConUnique 142 | 40 | prodTyConKey = mkPreludeTyConUnique 142 | 40 | prodTyConKey = mkPreludeTyConUnique 142 | 40 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Colors.hs | bsd-3-clause | marshalLightModelColorControl :: LightModelColorControl -> GLenum
marshalLightModelColorControl x = case x of
SingleColor -> 0x81f9
SeparateSpecularColor -> 0x81fa | 169 | marshalLightModelColorControl :: LightModelColorControl -> GLenum
marshalLightModelColorControl x = case x of
SingleColor -> 0x81f9
SeparateSpecularColor -> 0x81fa | 169 | marshalLightModelColorControl x = case x of
SingleColor -> 0x81f9
SeparateSpecularColor -> 0x81fa | 103 | false | true | 2 | 5 | 22 | 37 | 17 | 20 | null | null |
exercism/xhaskell | exercises/practice/atbash-cipher/.meta/examples/success-text/src/Atbash.hs | mit | encode :: Text -> Text
encode = T.unwords . T.chunksOf 5 . decode | 65 | encode :: Text -> Text
encode = T.unwords . T.chunksOf 5 . decode | 65 | encode = T.unwords . T.chunksOf 5 . decode | 42 | false | true | 0 | 8 | 12 | 30 | 15 | 15 | null | null |
acowley/ghc | compiler/types/TypeRep.hs | bsd-3-clause | ---------------
tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
tidyOpenKind = tidyOpenType | 94 | tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
tidyOpenKind = tidyOpenType | 78 | tidyOpenKind = tidyOpenType | 27 | true | true | 0 | 7 | 11 | 26 | 15 | 11 | null | null |
Heather/stack | src/Stack/Ghci.hs | bsd-3-clause | wantedPackageComponents :: BuildOpts -> SimpleTarget -> Package -> Set NamedComponent
wantedPackageComponents _ (STLocalComps cs) _ = cs | 136 | wantedPackageComponents :: BuildOpts -> SimpleTarget -> Package -> Set NamedComponent
wantedPackageComponents _ (STLocalComps cs) _ = cs | 136 | wantedPackageComponents _ (STLocalComps cs) _ = cs | 50 | false | true | 0 | 8 | 16 | 39 | 19 | 20 | null | null |
goldfirere/units | units/Data/Metrology/Parser.hs | bsd-3-clause | ----------------------------------------------------------------------
-- TH conversions
----------------------------------------------------------------------
parseUnitExp :: SymbolTable Name Name -> String -> Either String Exp
parseUnitExp tab s = to_exp `liftM` parseUnit tab s -- the Either monad
where
to_e... | 1,002 | parseUnitExp :: SymbolTable Name Name -> String -> Either String Exp
parseUnitExp tab s = to_exp `liftM` parseUnit tab s -- the Either monad
where
to_exp Unity = ConE 'Number
to_exp (Unit (Just pre) unit) = ConE '(:@) `AppE` of_type pre `AppE` of_type unit
to_exp (Unit Nothing unit) ... | 841 | parseUnitExp tab s = to_exp `liftM` parseUnit tab s -- the Either monad
where
to_exp Unity = ConE 'Number
to_exp (Unit (Just pre) unit) = ConE '(:@) `AppE` of_type pre `AppE` of_type unit
to_exp (Unit Nothing unit) = of_type unit
to_exp (Mult e1 e2) = ConE '(:*) `AppE` ... | 772 | true | true | 1 | 9 | 270 | 396 | 204 | 192 | null | null |
fmthoma/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | enumClass_RDR = nameRdrName enumClassName | 51 | enumClass_RDR = nameRdrName enumClassName | 51 | enumClass_RDR = nameRdrName enumClassName | 51 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
zhenyavinogradov/ml-labs | src/Lab1/Main.hs | gpl-3.0 | seed :: Int
seed = 4321 | 23 | seed :: Int
seed = 4321 | 23 | seed = 4321 | 11 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX :: GLenum
gl_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX = 0x8314 | 94 | gl_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX :: GLenum
gl_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX = 0x8314 | 94 | gl_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX = 0x8314 | 46 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
GaloisInc/hpb | src/Data/HPB.hs | apache-2.0 | shiftl_w32 :: Word32 -> Int -> Word32
shiftl_w32 = shiftL | 57 | shiftl_w32 :: Word32 -> Int -> Word32
shiftl_w32 = shiftL | 57 | shiftl_w32 = shiftL | 19 | false | true | 0 | 8 | 9 | 26 | 11 | 15 | null | null |
mtesseract/wosa | src/Nebelfiller/Datatypes.hs | bsd-3-clause | wordsetItem (Wordset _ item1 _ _) 1 = item1 | 43 | wordsetItem (Wordset _ item1 _ _) 1 = item1 | 43 | wordsetItem (Wordset _ item1 _ _) 1 = item1 | 43 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/PerformanceTiming.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming.requestStart Mozilla PerformanceTiming.requestStart documentation>
getRequestStart :: (MonadDOM m) => PerformanceTiming -> m Word64
getRequestStart self
= liftDOM (round <$> ((self ^. js "requestStart") >>= valToNumber)) | 296 | getRequestStart :: (MonadDOM m) => PerformanceTiming -> m Word64
getRequestStart self
= liftDOM (round <$> ((self ^. js "requestStart") >>= valToNumber)) | 155 | getRequestStart self
= liftDOM (round <$> ((self ^. js "requestStart") >>= valToNumber)) | 90 | true | true | 0 | 12 | 29 | 58 | 30 | 28 | null | null |
holdenlee/notebook | src/Utilities.hs | mit | listUpdateFun :: Int -> (a-> a) -> [a] -> [a]
listUpdateFun n f li = listUpdate n (f (li !! n)) li | 98 | listUpdateFun :: Int -> (a-> a) -> [a] -> [a]
listUpdateFun n f li = listUpdate n (f (li !! n)) li | 98 | listUpdateFun n f li = listUpdate n (f (li !! n)) li | 52 | false | true | 0 | 9 | 21 | 63 | 33 | 30 | null | null |
ababkin/qmuli | tests/Qi/Test/Ipret.hs | mit | genAction
:: Member (Writer Journal) effs
=> GenAction
-> Eff effs ()
genAction action = tell $ def{ genActions = [action]} | 129 | genAction
:: Member (Writer Journal) effs
=> GenAction
-> Eff effs ()
genAction action = tell $ def{ genActions = [action]} | 129 | genAction action = tell $ def{ genActions = [action]} | 53 | false | true | 0 | 9 | 26 | 60 | 29 | 31 | null | null |
feliposz/learning-stuff | haskell/learn_chapter4.hs | mit | :l C:\Local\Dev\haskell\learn_chapter4.hs
-- Syntax in Functions (Sintaxe em funções)
-- Pattern matching (correspondência de padrão)
lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lu | 206 | lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!" | 68 | lucky 7 = "LUCKY NUMBER SEVEN!" | 31 | true | true | 7 | 9 | 30 | 62 | 30 | 32 | null | null |
yav/alsa-haskell | Sound/Alsa/Sequencer/Queue.hs | mit | set_queue_info :: SndSeq -> Queue -> QueueInfo -> IO ()
set_queue_info (SndSeq h) p info =
check_error_ =<< with_queue_info info (snd_seq_set_queue_info h (exp_Queue p)) | 171 | set_queue_info :: SndSeq -> Queue -> QueueInfo -> IO ()
set_queue_info (SndSeq h) p info =
check_error_ =<< with_queue_info info (snd_seq_set_queue_info h (exp_Queue p)) | 171 | set_queue_info (SndSeq h) p info =
check_error_ =<< with_queue_info info (snd_seq_set_queue_info h (exp_Queue p)) | 115 | false | true | 0 | 10 | 25 | 64 | 31 | 33 | null | null |
mtraina/seven-languages-seven-weeks | week-7-haskell/day3/drunken_monad.hs | mit | crawl (Position d) = Position (d + 1) | 37 | crawl (Position d) = Position (d + 1) | 37 | crawl (Position d) = Position (d + 1) | 37 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
ekmett/text | tests/Tests/Properties.hs | bsd-2-clause | tl_Eq s = (s==) `eq` ((TL.pack s==) . TL.pack) | 59 | tl_Eq s = (s==) `eq` ((TL.pack s==) . TL.pack) | 59 | tl_Eq s = (s==) `eq` ((TL.pack s==) . TL.pack) | 59 | false | false | 0 | 10 | 21 | 37 | 21 | 16 | null | null |
kadoban/sgf | Canvas.hs | agpl-3.0 | drawMark p _ (m, ssz) =
do let (xp, yp) = m p
C.setAntialias C.AntialiasDefault
C.setLineWidth (if ssz > 14 then 2 else 1)
C.setSourceRGB 1 0 0
let drawSize = if ssz < 8 then 0.5 else ssz / 6
C.arc xp yp drawSize 0 (2 * pi)
C.stroke | 278 | drawMark p _ (m, ssz) =
do let (xp, yp) = m p
C.setAntialias C.AntialiasDefault
C.setLineWidth (if ssz > 14 then 2 else 1)
C.setSourceRGB 1 0 0
let drawSize = if ssz < 8 then 0.5 else ssz / 6
C.arc xp yp drawSize 0 (2 * pi)
C.stroke | 278 | drawMark p _ (m, ssz) =
do let (xp, yp) = m p
C.setAntialias C.AntialiasDefault
C.setLineWidth (if ssz > 14 then 2 else 1)
C.setSourceRGB 1 0 0
let drawSize = if ssz < 8 then 0.5 else ssz / 6
C.arc xp yp drawSize 0 (2 * pi)
C.stroke | 278 | false | false | 1 | 11 | 95 | 140 | 66 | 74 | null | null |
v0lkan/learning-haskell | numbers-to-words.hs | mit | teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"] | 118 | teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"] | 118 | teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"] | 118 | false | false | 0 | 5 | 11 | 36 | 23 | 13 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Resource/Vision/Projects/Locations/Images/AsyncBatchAnnotate.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
pliabaUploadType :: Lens' ProjectsLocationsImagesAsyncBatchAnnotate (Maybe Text)
pliabaUploadType
= lens _pliabaUploadType
(\ s a -> s{_pliabaUploadType = a}) | 237 | pliabaUploadType :: Lens' ProjectsLocationsImagesAsyncBatchAnnotate (Maybe Text)
pliabaUploadType
= lens _pliabaUploadType
(\ s a -> s{_pliabaUploadType = a}) | 166 | pliabaUploadType
= lens _pliabaUploadType
(\ s a -> s{_pliabaUploadType = a}) | 85 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
DaMSL/K3 | src/Language/K3/Transform/RemoveROBinds.hs | apache-2.0 | isROBAnno _ = False | 54 | isROBAnno _ = False | 54 | isROBAnno _ = False | 54 | false | false | 0 | 4 | 38 | 10 | 4 | 6 | null | null |
jlamothe/sortable-test | Daily.hs | gpl-3.0 | encodeBody :: ProcessedData -> CSV
encodeBody input = map encodeRecord recordList
where recordList = Map.toList $ processedRecords input | 138 | encodeBody :: ProcessedData -> CSV
encodeBody input = map encodeRecord recordList
where recordList = Map.toList $ processedRecords input | 138 | encodeBody input = map encodeRecord recordList
where recordList = Map.toList $ processedRecords input | 103 | false | true | 0 | 7 | 19 | 44 | 20 | 24 | null | null |
mainland/nikola | src/Data/Vector/UnboxedForeign.hs | bsd-3-clause | head = G.head | 13 | head = G.head | 13 | head = G.head | 13 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
sgillespie/ghc | compiler/basicTypes/Literal.hs | bsd-3-clause | litIsTrivial (LitInteger {}) = False | 37 | litIsTrivial (LitInteger {}) = False | 37 | litIsTrivial (LitInteger {}) = False | 37 | false | false | 0 | 7 | 5 | 16 | 8 | 8 | null | null |
imalsogreg/reffit | src/Reffit/FieldTag.hs | gpl-3.0 | fieldTagsToStringForest :: FieldTags -> Forest String
fieldTagsToStringForest [] = [] | 85 | fieldTagsToStringForest :: FieldTags -> Forest String
fieldTagsToStringForest [] = [] | 85 | fieldTagsToStringForest [] = [] | 31 | false | true | 0 | 6 | 9 | 29 | 13 | 16 | null | null |
jyp/Parsek | Text/ParserCombinators/Class.hs | gpl-3.0 | -- | Label a parser
(<?>) :: IsParser p => p a -> String -> p a
p <?> s = label s p | 83 | (<?>) :: IsParser p => p a -> String -> p a
p <?> s = label s p | 63 | p <?> s = label s p | 19 | true | true | 0 | 10 | 23 | 46 | 22 | 24 | null | null |
kawu/tagset-positional | Data/Tagset/Positional.hs | bsd-2-clause | attrName :: Parser (Attr, Optional)
attrName = optionalAttrName <|> plainAttrName <?> "attribute name" | 102 | attrName :: Parser (Attr, Optional)
attrName = optionalAttrName <|> plainAttrName <?> "attribute name" | 102 | attrName = optionalAttrName <|> plainAttrName <?> "attribute name" | 66 | false | true | 1 | 6 | 12 | 32 | 15 | 17 | null | null |
ku-fpg/ecc-ldpc | src/ECC/Code/LDPC/Fast/CachedMult.hs | bsd-3-clause | -- | The result of the multiplications,
-- excluding the "worst" value
absMinMax :: Double -> Double -> (Double, Double)
absMinMax x y
| abs x < abs y = (x, y)
| otherwise = (y, x) | 205 | absMinMax :: Double -> Double -> (Double, Double)
absMinMax x y
| abs x < abs y = (x, y)
| otherwise = (y, x) | 117 | absMinMax x y
| abs x < abs y = (x, y)
| otherwise = (y, x) | 67 | true | true | 1 | 9 | 61 | 68 | 36 | 32 | null | null |
KasperJanssens/yesod-tutorial | Handler/Worksheet.hs | mit | getWorksheetR :: Handler Html
getWorksheetR = do
(dateFormWidget, dateFormEnctype) <- generateFormPost dateForm
(companyFormWidget, companyFormEnctype) <- generateFormPost companyForm
defaultLayout $ do
setTitle "Welcome To Worksheets GETTED!"
$(widgetFile "worksheet") | 283 | getWorksheetR :: Handler Html
getWorksheetR = do
(dateFormWidget, dateFormEnctype) <- generateFormPost dateForm
(companyFormWidget, companyFormEnctype) <- generateFormPost companyForm
defaultLayout $ do
setTitle "Welcome To Worksheets GETTED!"
$(widgetFile "worksheet") | 283 | getWorksheetR = do
(dateFormWidget, dateFormEnctype) <- generateFormPost dateForm
(companyFormWidget, companyFormEnctype) <- generateFormPost companyForm
defaultLayout $ do
setTitle "Welcome To Worksheets GETTED!"
$(widgetFile "worksheet") | 253 | false | true | 0 | 12 | 40 | 69 | 32 | 37 | null | null |
icyfork/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | g_Fi = tryWordToken "fi" T_Fi | 29 | g_Fi = tryWordToken "fi" T_Fi | 29 | g_Fi = tryWordToken "fi" T_Fi | 29 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Retry.hs | mpl-2.0 | -- | Required. Build ID of the original build.
pbrId :: Lens' ProjectsBuildsRetry Text
pbrId = lens _pbrId (\ s a -> s{_pbrId = a}) | 131 | pbrId :: Lens' ProjectsBuildsRetry Text
pbrId = lens _pbrId (\ s a -> s{_pbrId = a}) | 84 | pbrId = lens _pbrId (\ s a -> s{_pbrId = a}) | 44 | true | true | 0 | 9 | 24 | 40 | 22 | 18 | null | null |
ganeti-github-testing/ganeti-test-1 | test/hs/Test/Ganeti/JSON.hs | bsd-2-clause | prop_arrayMaybeFromObjFail :: String -> String -> Property
prop_arrayMaybeFromObjFail t k =
case JSON.tryArrayMaybeFromObj t [] k of
BasicTypes.Ok r -> fail $
"Unexpected result, got: " ++ show (r::[Maybe Int])
BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True
... | 407 | prop_arrayMaybeFromObjFail :: String -> String -> Property
prop_arrayMaybeFromObjFail t k =
case JSON.tryArrayMaybeFromObj t [] k of
BasicTypes.Ok r -> fail $
"Unexpected result, got: " ++ show (r::[Maybe Int])
BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True
... | 407 | prop_arrayMaybeFromObjFail t k =
case JSON.tryArrayMaybeFromObj t [] k of
BasicTypes.Ok r -> fail $
"Unexpected result, got: " ++ show (r::[Maybe Int])
BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True
, Data.List.isInfixOf k e ==? True
... | 348 | false | true | 0 | 12 | 143 | 117 | 58 | 59 | null | null |
Shadytel/Computer | Emulator/Emulator.hs | bsd-3-clause | -- | Sets the 'Conditional' bit in the flags register
setConditional :: MachineInteger -> Bool -> MachineInteger
setConditional (MachineInteger i) b =
MachineInteger $ i .&. 0xffe .|. (if b then 1 else 0) | 208 | setConditional :: MachineInteger -> Bool -> MachineInteger
setConditional (MachineInteger i) b =
MachineInteger $ i .&. 0xffe .|. (if b then 1 else 0) | 154 | setConditional (MachineInteger i) b =
MachineInteger $ i .&. 0xffe .|. (if b then 1 else 0) | 95 | true | true | 0 | 7 | 37 | 54 | 29 | 25 | null | null |
input-output-hk/cardano-sl | explorer/src/Pos/Explorer/TestUtil.hs | apache-2.0 | produceSecretKeys :: MonadIO m => BlockNumber -> m [SecretKey]
produceSecretKeys blocksNumber = liftIO $ secretKeys
where
secretKeys :: IO [SecretKey]
secretKeys = replicateM (fromIntegral blocksNumber) generatedSecretKey
where
generatedSecretKey :: IO SecretKey
generatedSecretKey = gene... | 476 | produceSecretKeys :: MonadIO m => BlockNumber -> m [SecretKey]
produceSecretKeys blocksNumber = liftIO $ secretKeys
where
secretKeys :: IO [SecretKey]
secretKeys = replicateM (fromIntegral blocksNumber) generatedSecretKey
where
generatedSecretKey :: IO SecretKey
generatedSecretKey = gene... | 476 | produceSecretKeys blocksNumber = liftIO $ secretKeys
where
secretKeys :: IO [SecretKey]
secretKeys = replicateM (fromIntegral blocksNumber) generatedSecretKey
where
generatedSecretKey :: IO SecretKey
generatedSecretKey = generate arbitrary
-- | Factory to create an `Address`
-- | Frien... | 413 | false | true | 0 | 8 | 92 | 86 | 44 | 42 | null | null |
seereason/cabal | Cabal/Distribution/Simple/GHC.hs | bsd-3-clause | -- | Return the 'FilePath' to the global GHC package database.
getGlobalPackageDB :: Verbosity -> ConfiguredProgram -> IO FilePath
getGlobalPackageDB verbosity ghcProg =
dropWhileEndLE isSpace `fmap`
rawSystemProgramStdout verbosity ghcProg ["--print-global-package-db"] | 279 | getGlobalPackageDB :: Verbosity -> ConfiguredProgram -> IO FilePath
getGlobalPackageDB verbosity ghcProg =
dropWhileEndLE isSpace `fmap`
rawSystemProgramStdout verbosity ghcProg ["--print-global-package-db"] | 216 | getGlobalPackageDB verbosity ghcProg =
dropWhileEndLE isSpace `fmap`
rawSystemProgramStdout verbosity ghcProg ["--print-global-package-db"] | 148 | true | true | 0 | 7 | 38 | 47 | 24 | 23 | null | null |
mdsteele/fallback | src/Fallback/Scenario/Script/Attack.hs | gpl-3.0 | -- | The default set of attack modifiers. Note that this has 'amCanMiss' set
-- to 'False' (for the convenience of all the special abilities that never
-- miss), so this must be overriden for normal attacks, which /can/ miss.
baseAttackModifiers :: AttackModifiers
baseAttackModifiers = AttackModifiers
{ amCanBacksta... | 596 | baseAttackModifiers :: AttackModifiers
baseAttackModifiers = AttackModifiers
{ amCanBackstab = True,
amCanFinalBlow = True,
amCanMiss = False,
amCriticalHit = Sometimes,
amDamageMultiplier = 1,
amExtraEffects = [],
amHitSound = True,
amInstantKill = False,
amOffensive = True,
amSev... | 369 | baseAttackModifiers = AttackModifiers
{ amCanBackstab = True,
amCanFinalBlow = True,
amCanMiss = False,
amCriticalHit = Sometimes,
amDamageMultiplier = 1,
amExtraEffects = [],
amHitSound = True,
amInstantKill = False,
amOffensive = True,
amSeverity = HarshDamage,
amWeaponData =... | 330 | true | true | 0 | 8 | 123 | 88 | 56 | 32 | null | null |
aoanthony/independentfunctionalsemantics | src/Main.hs | bsd-3-clause | su3Fringe :: (Pos, (Pos, Pos)) -> [Pos]
su3Fringe (x1,(x2,x3)) = [x1,x2,x3] | 75 | su3Fringe :: (Pos, (Pos, Pos)) -> [Pos]
su3Fringe (x1,(x2,x3)) = [x1,x2,x3] | 75 | su3Fringe (x1,(x2,x3)) = [x1,x2,x3] | 35 | false | true | 0 | 7 | 10 | 54 | 33 | 21 | null | null |
fcostantini/QuickFuzz | src/Strings.hs | gpl-3.0 | mgenName = oneof $ map return ["a", "b", "c"] | 45 | mgenName = oneof $ map return ["a", "b", "c"] | 45 | mgenName = oneof $ map return ["a", "b", "c"] | 45 | false | false | 0 | 7 | 8 | 24 | 13 | 11 | null | null |
cameronbwhite/ComputationalStructures | Haskell/RegExp.hs | bsd-3-clause | toNand (Or a b) = (a' `Nand` a') `Nand` (b' `Nand` b')
where a' = toNand a;
b' = toNand b | 103 | toNand (Or a b) = (a' `Nand` a') `Nand` (b' `Nand` b')
where a' = toNand a;
b' = toNand b | 103 | toNand (Or a b) = (a' `Nand` a') `Nand` (b' `Nand` b')
where a' = toNand a;
b' = toNand b | 103 | false | false | 0 | 7 | 34 | 60 | 34 | 26 | null | null |
agrafix/hackage-server | Distribution/Server/Framework/AuthCrypt.hs | bsd-3-clause | md5HexDigest :: [String] -> String
md5HexDigest = show . md5 . BS.Lazy.pack . intercalate ":" | 93 | md5HexDigest :: [String] -> String
md5HexDigest = show . md5 . BS.Lazy.pack . intercalate ":" | 93 | md5HexDigest = show . md5 . BS.Lazy.pack . intercalate ":" | 58 | false | true | 0 | 7 | 14 | 36 | 19 | 17 | null | null |
dcreager/cabal | Distribution/Simple/Setup.hs | bsd-3-clause | haddockCommand :: CommandUI HaddockFlags
haddockCommand = makeCommand name shortDesc longDesc defaultHaddockFlags options
where
name = "haddock"
shortDesc = "Generate Haddock HTML documentation."
longDesc = Just $ \_ -> "Requires the program haddock, either version 0.x or 2.x.\n"
options show... | 2,163 | haddockCommand :: CommandUI HaddockFlags
haddockCommand = makeCommand name shortDesc longDesc defaultHaddockFlags options
where
name = "haddock"
shortDesc = "Generate Haddock HTML documentation."
longDesc = Just $ \_ -> "Requires the program haddock, either version 0.x or 2.x.\n"
options show... | 2,163 | haddockCommand = makeCommand name shortDesc longDesc defaultHaddockFlags options
where
name = "haddock"
shortDesc = "Generate Haddock HTML documentation."
longDesc = Just $ \_ -> "Requires the program haddock, either version 0.x or 2.x.\n"
options showOrParseArgs =
[optionVerbosity hadd... | 2,122 | false | true | 0 | 12 | 602 | 463 | 257 | 206 | null | null |
pparkkin/eta | compiler/ETA/StgSyn/StgSyn.hs | bsd-3-clause | pprStgRhs (StgRhsCon cc con args)
= hcat [ ppr cc,
space, ppr con, ptext (sLit "! "), brackets (interppSP args)] | 125 | pprStgRhs (StgRhsCon cc con args)
= hcat [ ppr cc,
space, ppr con, ptext (sLit "! "), brackets (interppSP args)] | 125 | pprStgRhs (StgRhsCon cc con args)
= hcat [ ppr cc,
space, ppr con, ptext (sLit "! "), brackets (interppSP args)] | 125 | false | false | 0 | 9 | 32 | 61 | 30 | 31 | null | null |
TikhonJelvis/TPL | src/TPL/Parse.hs | gpl-3.0 | keyword :: String -> Parser String
keyword str = try (string str) <* notFollowedBy idChar <* whitespace <?> str | 111 | keyword :: String -> Parser String
keyword str = try (string str) <* notFollowedBy idChar <* whitespace <?> str | 111 | keyword str = try (string str) <* notFollowedBy idChar <* whitespace <?> str | 76 | false | true | 0 | 10 | 18 | 45 | 21 | 24 | null | null |
apvanzanten/learningMeAHaskell | calc.hs | gpl-3.0 | parseExpression stack expression@(eh:et)
| not . isNothing $ operand' = parseExpression (push operand stack) et
| not . isNothing $ operator' = parseExpression (applyOperator operator stack) et
| otherwise = Nothing
where
operand' = readMaybe eh :: Maybe Double
operator' = lookup eh operators
... | 382 | parseExpression stack expression@(eh:et)
| not . isNothing $ operand' = parseExpression (push operand stack) et
| not . isNothing $ operator' = parseExpression (applyOperator operator stack) et
| otherwise = Nothing
where
operand' = readMaybe eh :: Maybe Double
operator' = lookup eh operators
... | 382 | parseExpression stack expression@(eh:et)
| not . isNothing $ operand' = parseExpression (push operand stack) et
| not . isNothing $ operator' = parseExpression (applyOperator operator stack) et
| otherwise = Nothing
where
operand' = readMaybe eh :: Maybe Double
operator' = lookup eh operators
... | 382 | false | false | 1 | 9 | 86 | 139 | 67 | 72 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/CLabel.hs | bsd-3-clause | externallyVisibleCLabel (CCS_Label _) = True | 54 | externallyVisibleCLabel (CCS_Label _) = True | 54 | externallyVisibleCLabel (CCS_Label _) = True | 54 | false | false | 0 | 7 | 14 | 15 | 7 | 8 | null | null |
nick8325/kbc | src/Twee/Index.hs | bsd-3-clause | -- | Return all elements of the index.
elems :: Index f a -> [a]
elems Nil = [] | 79 | elems :: Index f a -> [a]
elems Nil = [] | 40 | elems Nil = [] | 14 | true | true | 0 | 8 | 18 | 35 | 16 | 19 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | exprType (Cast _ co) = pSnd (coercionKind co) | 53 | exprType (Cast _ co) = pSnd (coercionKind co) | 53 | exprType (Cast _ co) = pSnd (coercionKind co) | 53 | false | false | 0 | 7 | 15 | 26 | 12 | 14 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Program/Builtin.hs | bsd-3-clause | haddockProgram :: Program
haddockProgram = (simpleProgram "haddock") {
programFindVersion = findProgramVersion "--version" $ \str ->
-- Invoking "haddock --version" gives a string like
-- "Haddock version 0.8, (c) Simon Marlow 2006"
case words str of
(_:_:ver:_) -> takeWhile (`elem` ('.':[... | 365 | haddockProgram :: Program
haddockProgram = (simpleProgram "haddock") {
programFindVersion = findProgramVersion "--version" $ \str ->
-- Invoking "haddock --version" gives a string like
-- "Haddock version 0.8, (c) Simon Marlow 2006"
case words str of
(_:_:ver:_) -> takeWhile (`elem` ('.':[... | 365 | haddockProgram = (simpleProgram "haddock") {
programFindVersion = findProgramVersion "--version" $ \str ->
-- Invoking "haddock --version" gives a string like
-- "Haddock version 0.8, (c) Simon Marlow 2006"
case words str of
(_:_:ver:_) -> takeWhile (`elem` ('.':['0'..'9'])) ver
_ ... | 339 | false | true | 0 | 16 | 94 | 96 | 53 | 43 | null | null |
phischu/fragnix | tests/packages/scotty/Text.PrettyPrint.Annotated.HughesPJ.hs | bsd-3-clause | -- ---------------------------------------------------------------------------
-- Vertical composition @$$@
-- | Above, except that if the last line of the first argument stops
-- at least one position before the first line of the second begins,
-- these two lines are overlapped. For example:
--
-- > text "hi" $$ ... | 630 | ($$) :: Doc a -> Doc a -> Doc a
p $$ q = above_ p False q | 58 | p $$ q = above_ p False q | 26 | true | true | 0 | 9 | 140 | 69 | 42 | 27 | null | null |
sergsr/algos-and-data-structs | haskell/misc/CalkinWilf.hs | mit | -- | Asymmetric unfold (children values generated by two different functions)
asymUnfold :: (a -> a) -> (a -> a) -> a -> Tree a
asymUnfold lf rf s = N s (asymUnfold lf rf (lf s)) (asymUnfold lf rf (rf s)) | 204 | asymUnfold :: (a -> a) -> (a -> a) -> a -> Tree a
asymUnfold lf rf s = N s (asymUnfold lf rf (lf s)) (asymUnfold lf rf (rf s)) | 126 | asymUnfold lf rf s = N s (asymUnfold lf rf (lf s)) (asymUnfold lf rf (rf s)) | 76 | true | true | 0 | 9 | 41 | 87 | 44 | 43 | null | null |
haskell/filepath | System/FilePath/Internal.hs | bsd-3-clause | isValid path =
not (any isBadCharacter x2) &&
not (any f $ splitDirectories x2) &&
not (isJust (readDriveShare x1) && all isPathSeparator x1) &&
not (isJust (readDriveUNC x1) && not (hasTrailingPathSeparator x1))
where
(x1,x2) = splitDrive path
f x = map toUpper (drop... | 1,188 | isValid path =
not (any isBadCharacter x2) &&
not (any f $ splitDirectories x2) &&
not (isJust (readDriveShare x1) && all isPathSeparator x1) &&
not (isJust (readDriveUNC x1) && not (hasTrailingPathSeparator x1))
where
(x1,x2) = splitDrive path
f x = map toUpper (drop... | 1,188 | isValid path =
not (any isBadCharacter x2) &&
not (any f $ splitDirectories x2) &&
not (isJust (readDriveShare x1) && all isPathSeparator x1) &&
not (isJust (readDriveUNC x1) && not (hasTrailingPathSeparator x1))
where
(x1,x2) = splitDrive path
f x = map toUpper (drop... | 1,188 | false | false | 2 | 10 | 218 | 178 | 90 | 88 | null | null |
urbanslug/ghc | testsuite/tests/arityanal/f8.hs | bsd-3-clause | f8 = f8f True 1 2 | 17 | f8 = f8f True 1 2 | 17 | f8 = f8f True 1 2 | 17 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Analysis/Match.hs | bsd-3-clause | matchArrays (ArraysRpair a1 b1) (ArraysRpair a2 b2) (arr1,brr1) (arr2,brr2)
| Just REFL <- matchArrays a1 a2 arr1 arr2
, Just REFL <- matchArrays b1 b2 brr1 brr2
= Just REFL | 179 | matchArrays (ArraysRpair a1 b1) (ArraysRpair a2 b2) (arr1,brr1) (arr2,brr2)
| Just REFL <- matchArrays a1 a2 arr1 arr2
, Just REFL <- matchArrays b1 b2 brr1 brr2
= Just REFL | 179 | matchArrays (ArraysRpair a1 b1) (ArraysRpair a2 b2) (arr1,brr1) (arr2,brr2)
| Just REFL <- matchArrays a1 a2 arr1 arr2
, Just REFL <- matchArrays b1 b2 brr1 brr2
= Just REFL | 179 | false | false | 0 | 9 | 35 | 93 | 43 | 50 | null | null |
1HaskellADay/1HAD | exercises/HAD/Y2014/M04/D04/Exercise.hs | mit | -- | countFigures count the different figures that composes a number
--
-- Examples:
--
-- >>> countFigures 1
-- 1
-- >>> countFigures 1000000
-- 2
-- >>> countFigures 123
-- 3
-- >>> countFigures (-12)
-- 2
-- >>> countFigures 1234567890
-- 10
-- >>> countFigures 00001
-- 1
-- >>> countFigures 0
-- 1
--
countFigures :... | 369 | countFigures :: Integral a => a -> Int
countFigures = undefined | 63 | countFigures = undefined | 24 | true | true | 0 | 8 | 68 | 48 | 31 | 17 | null | null |
mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Stream/Monadic.nocpp.hs | bsd-3-clause | foldl' f = foldlM' (\a b -> return (f a b)) | 43 | foldl' f = foldlM' (\a b -> return (f a b)) | 43 | foldl' f = foldlM' (\a b -> return (f a b)) | 43 | false | false | 1 | 10 | 10 | 37 | 16 | 21 | null | null |
raymoo/pins-ps | Pins/Handle.hs | gpl-3.0 | takeRank = fromMaybe ' ' . safeHead | 35 | takeRank = fromMaybe ' ' . safeHead | 35 | takeRank = fromMaybe ' ' . safeHead | 35 | false | false | 0 | 6 | 6 | 13 | 6 | 7 | null | null |
Ian-Stewart-Binks/courseography | hs/Svg/Parser.hs | gpl-3.0 | getName _ = "" | 14 | getName _ = "" | 14 | getName _ = "" | 14 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
vikraman/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | -- | Output a string debugging message at verbosity level of @-v@ or higher
debugTraceMsgS :: String -> CoreM ()
debugTraceMsgS = debugTraceMsg . text | 150 | debugTraceMsgS :: String -> CoreM ()
debugTraceMsgS = debugTraceMsg . text | 74 | debugTraceMsgS = debugTraceMsg . text | 37 | true | true | 0 | 7 | 24 | 25 | 13 | 12 | null | null |
dermesser/Waves | Waves/Tableout.hs | mit | printFlat :: WaveField -> Double -> Time -> Double -> B.ByteString
printFlat w@(WaveField (Medium c xdim ydim) exciters) step t threshold = B.concat . map xfunc $ xlist
where xlist = [0,0+step..xdim]
ylist = [0,0+step..ydim]
maxamp = (if threshold < 0 then (-1) else 1) * foldl (\a e -> a + (getA... | 752 | printFlat :: WaveField -> Double -> Time -> Double -> B.ByteString
printFlat w@(WaveField (Medium c xdim ydim) exciters) step t threshold = B.concat . map xfunc $ xlist
where xlist = [0,0+step..xdim]
ylist = [0,0+step..ydim]
maxamp = (if threshold < 0 then (-1) else 1) * foldl (\a e -> a + (getA... | 752 | printFlat w@(WaveField (Medium c xdim ydim) exciters) step t threshold = B.concat . map xfunc $ xlist
where xlist = [0,0+step..xdim]
ylist = [0,0+step..ydim]
maxamp = (if threshold < 0 then (-1) else 1) * foldl (\a e -> a + (getAmplitude e)) 0 exciters
ampCompare = if threshold < 0 the... | 685 | false | true | 27 | 10 | 256 | 313 | 166 | 147 | null | null |
DavidAlphaFox/ghc | libraries/bytestring/Data/ByteString.hs | bsd-3-clause | moduleError :: String -> String -> a
moduleError fun msg = error (moduleErrorMsg fun msg) | 89 | moduleError :: String -> String -> a
moduleError fun msg = error (moduleErrorMsg fun msg) | 89 | moduleError fun msg = error (moduleErrorMsg fun msg) | 52 | false | true | 0 | 8 | 14 | 41 | 18 | 23 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/NewTestament/SBL.hs | mit | runMakeSegments :: Element -> MilestoneState -> (Either SBLError [Segment], MilestoneState)
runMakeSegments e s = result & _1 %~ (fmap concat . sequence)
where
result = runState (sequence $ makeSegment <$> e ^. nodes) s | 225 | runMakeSegments :: Element -> MilestoneState -> (Either SBLError [Segment], MilestoneState)
runMakeSegments e s = result & _1 %~ (fmap concat . sequence)
where
result = runState (sequence $ makeSegment <$> e ^. nodes) s | 225 | runMakeSegments e s = result & _1 %~ (fmap concat . sequence)
where
result = runState (sequence $ makeSegment <$> e ^. nodes) s | 133 | false | true | 0 | 9 | 39 | 84 | 43 | 41 | null | null |
psibi/yesod | yesod-core/test/YesodCoreTest/ErrorHandling.hs | mit | getErrorR x = error $ "getErrorR: " ++ show x | 45 | getErrorR x = error $ "getErrorR: " ++ show x | 45 | getErrorR x = error $ "getErrorR: " ++ show x | 45 | false | false | 0 | 6 | 9 | 20 | 9 | 11 | null | null |
dylanmc/Haskell-PDF-Parsing-Library | Main.hs | bsd-3-clause | reversePagesInFile :: String -> String -> IO ()
reversePagesInFile inName outName = do
inString <- readFile inName
let filtered = filterPDF reversePages (PDFContents inString)
outFile <- openFile outName WriteMode
_ <- printFlatTree outFile filtered
hClose outFile | 290 | reversePagesInFile :: String -> String -> IO ()
reversePagesInFile inName outName = do
inString <- readFile inName
let filtered = filterPDF reversePages (PDFContents inString)
outFile <- openFile outName WriteMode
_ <- printFlatTree outFile filtered
hClose outFile | 289 | reversePagesInFile inName outName = do
inString <- readFile inName
let filtered = filterPDF reversePages (PDFContents inString)
outFile <- openFile outName WriteMode
_ <- printFlatTree outFile filtered
hClose outFile | 241 | false | true | 0 | 12 | 61 | 89 | 39 | 50 | null | null |
nimia/bottle | bottlelib/Data/Store/Transaction.hs | gpl-3.0 | readGuidDef :: (Monad m, Binary a) => a -> Guid -> Transaction t m a
readGuidDef = readGuidMb . return | 102 | readGuidDef :: (Monad m, Binary a) => a -> Guid -> Transaction t m a
readGuidDef = readGuidMb . return | 102 | readGuidDef = readGuidMb . return | 33 | false | true | 0 | 9 | 19 | 51 | 24 | 27 | null | null |
alpheccar/HaskellViewer | AIFF.hs | bsd-3-clause | encodeSound :: Double
-> [Double]
-> L.ByteString
encodeSound sampling samples =
let nbSamples = fromIntegral $ length samples
totalSize = 4 + cs commSize + cs (sndSize nbSamples) + cs verSize
r = string7 "FORM" <>
word32BE totalSize <>
string7 "AIFC" <>
... | 441 | encodeSound :: Double
-> [Double]
-> L.ByteString
encodeSound sampling samples =
let nbSamples = fromIntegral $ length samples
totalSize = 4 + cs commSize + cs (sndSize nbSamples) + cs verSize
r = string7 "FORM" <>
word32BE totalSize <>
string7 "AIFC" <>
... | 440 | encodeSound sampling samples =
let nbSamples = fromIntegral $ length samples
totalSize = 4 + cs commSize + cs (sndSize nbSamples) + cs verSize
r = string7 "FORM" <>
word32BE totalSize <>
string7 "AIFC" <>
verChunk <>
common sampling nbSamples <>
sound sa... | 366 | false | true | 0 | 14 | 153 | 126 | 59 | 67 | null | null |
tdidriksen/copatterns | src/findus/TerminationChecker.hs | mit | callGraph' f (TECase ty expr cases) = do
env <- ask
exprSize <- sizeOf' f expr
let exprType = getTypeAnno expr
let isRecType = (== exprType)
variant <- lift $ getVariantType exprType
caseGraphs <- forM cases $ \(id, (vars, caseExpr)) -> do
caseTypes <- case lookup id va... | 1,712 | callGraph' f (TECase ty expr cases) = do
env <- ask
exprSize <- sizeOf' f expr
let exprType = getTypeAnno expr
let isRecType = (== exprType)
variant <- lift $ getVariantType exprType
caseGraphs <- forM cases $ \(id, (vars, caseExpr)) -> do
caseTypes <- case lookup id va... | 1,712 | callGraph' f (TECase ty expr cases) = do
env <- ask
exprSize <- sizeOf' f expr
let exprType = getTypeAnno expr
let isRecType = (== exprType)
variant <- lift $ getVariantType exprType
caseGraphs <- forM cases $ \(id, (vars, caseExpr)) -> do
caseTypes <- case lookup id va... | 1,712 | false | false | 0 | 26 | 696 | 565 | 282 | 283 | null | null |
shlevy/ghc | compiler/basicTypes/Literal.hs | bsd-3-clause | mkMachInt :: DynFlags -> Integer -> Literal
mkMachInt dflags x = ASSERT2( inIntRange dflags x, integer x )
MachInt x | 142 | mkMachInt :: DynFlags -> Integer -> Literal
mkMachInt dflags x = ASSERT2( inIntRange dflags x, integer x )
MachInt x | 142 | mkMachInt dflags x = ASSERT2( inIntRange dflags x, integer x )
MachInt x | 98 | false | true | 0 | 7 | 45 | 49 | 23 | 26 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/ViolaPizzicato.hs | bsd-3-clause | note23 :: Note
note23 = Note
(Pitch 493.883 59 "b4")
24
(Range
(NoteRange
(NoteRangeAmplitude 8396.01 17 0.36)
(NoteRangeHarmonicFreq 1 493.88))
(NoteRange
(NoteRangeAmplitude 493.88 1 5070.0)
(NoteRangeHarmonicFreq 20 9877.66)))
[Harmonic ... | 918 | note23 :: Note
note23 = Note
(Pitch 493.883 59 "b4")
24
(Range
(NoteRange
(NoteRangeAmplitude 8396.01 17 0.36)
(NoteRangeHarmonicFreq 1 493.88))
(NoteRange
(NoteRangeAmplitude 493.88 1 5070.0)
(NoteRangeHarmonicFreq 20 9877.66)))
[Harmonic ... | 918 | note23 = Note
(Pitch 493.883 59 "b4")
24
(Range
(NoteRange
(NoteRangeAmplitude 8396.01 17 0.36)
(NoteRangeHarmonicFreq 1 493.88))
(NoteRange
(NoteRangeAmplitude 493.88 1 5070.0)
(NoteRangeHarmonicFreq 20 9877.66)))
[Harmonic 1 (-1.457) 5070... | 903 | false | true | 0 | 10 | 263 | 369 | 188 | 181 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/UX/Annotate.hs | bsd-3-clause | chopAltDBG y = {- traceShow ("chopAlts: " ++ y) $ -}
filter (/= "") $ concatMap (chopAlts [("{", ":"), ("|", "}")])
$ chopAlts [("<{", "}>"), ("{", "}")] y | 159 | chopAltDBG y = {- traceShow ("chopAlts: " ++ y) $ -}
filter (/= "") $ concatMap (chopAlts [("{", ":"), ("|", "}")])
$ chopAlts [("<{", "}>"), ("{", "}")] y | 159 | chopAltDBG y = {- traceShow ("chopAlts: " ++ y) $ -}
filter (/= "") $ concatMap (chopAlts [("{", ":"), ("|", "}")])
$ chopAlts [("<{", "}>"), ("{", "}")] y | 159 | false | false | 4 | 9 | 31 | 81 | 44 | 37 | null | null |
aeyakovenko/rbm | Test/RBM.hs | mit | prop_init :: Word8 -> Word8 -> Bool
prop_init ni nh = (fi ni) * (fi nh) == (M.elems rb)
where
seed = (fi ni) * (fi nh)
rb = R.new seed (fi ni) (fi nh)
fi :: Word8 -> Int
fi ww = 1 + (fromIntegral ww) | 227 | prop_init :: Word8 -> Word8 -> Bool
prop_init ni nh = (fi ni) * (fi nh) == (M.elems rb)
where
seed = (fi ni) * (fi nh)
rb = R.new seed (fi ni) (fi nh)
fi :: Word8 -> Int
fi ww = 1 + (fromIntegral ww) | 227 | prop_init ni nh = (fi ni) * (fi nh) == (M.elems rb)
where
seed = (fi ni) * (fi nh)
rb = R.new seed (fi ni) (fi nh)
fi :: Word8 -> Int
fi ww = 1 + (fromIntegral ww) | 191 | false | true | 0 | 9 | 74 | 128 | 65 | 63 | null | null |
pharaun/hGnucash | src/Types.hs | apache-2.0 | --
-- Leaky separation
-- Here because of Slots phantom type bits
--
xpSlot :: PU [XT.Node] Slot
xpSlot =
xpWrap
(\(sKey, (sType, sValue)) -> Slot sKey sType sValue)
(\(Slot sKey sType sValue) -> (sKey, (sType, sValue)))
(xpElemNodes "slot"
(xp2Tuple
(xpElemText (... | 431 | xpSlot :: PU [XT.Node] Slot
xpSlot =
xpWrap
(\(sKey, (sType, sValue)) -> Slot sKey sType sValue)
(\(Slot sKey sType sValue) -> (sKey, (sType, sValue)))
(xpElemNodes "slot"
(xp2Tuple
(xpElemText (slot "key"))
(xpElem (slot "value") (xpAttr "type" xp... | 362 | xpSlot =
xpWrap
(\(sKey, (sType, sValue)) -> Slot sKey sType sValue)
(\(Slot sKey sType sValue) -> (sKey, (sType, sValue)))
(xpElemNodes "slot"
(xp2Tuple
(xpElemText (slot "key"))
(xpElem (slot "value") (xpAttr "type" xpText) xpSlotValue)
... | 334 | true | true | 0 | 13 | 143 | 141 | 78 | 63 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M03/D15/Solution.hs | mit | {--
For #WomensHistoryMonth, let's look at the word-cloud of Grace Hopper's
wikipedia entry (see image, included).
The wikipedia entry is here:
--}
graceHopperDir :: FilePath
graceHopperDir = "Y2021/M03/D15" | 210 | graceHopperDir :: FilePath
graceHopperDir = "Y2021/M03/D15" | 59 | graceHopperDir = "Y2021/M03/D15" | 32 | true | true | 0 | 4 | 30 | 12 | 7 | 5 | null | null |
sdiehl/ghc | libraries/libiserv/src/Remote/Slave.hs | bsd-3-clause | acceptSocket :: Socket -> IO Socket
acceptSocket = fmap fst . accept | 68 | acceptSocket :: Socket -> IO Socket
acceptSocket = fmap fst . accept | 68 | acceptSocket = fmap fst . accept | 32 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
SKA-ScienceDataProcessor/RC | MS6/dna/core/ast/DNA/DSL.hs | apache-2.0 | -- | Try to respawn actor in case of crash.
respawnOnFail :: Spawn ()
respawnOnFail = Spawn $ tell [UseRespawn] | 111 | respawnOnFail :: Spawn ()
respawnOnFail = Spawn $ tell [UseRespawn] | 67 | respawnOnFail = Spawn $ tell [UseRespawn] | 41 | true | true | 0 | 7 | 19 | 27 | 14 | 13 | null | null |
brendanhay/gogol | gogol-consumersurveys/gen/Network/Google/ConsumerSurveys/Types/Product.hs | mpl-2.0 | srStatus :: Lens' SurveyResults (Maybe Text)
srStatus = lens _srStatus (\ s a -> s{_srStatus = a}) | 98 | srStatus :: Lens' SurveyResults (Maybe Text)
srStatus = lens _srStatus (\ s a -> s{_srStatus = a}) | 98 | srStatus = lens _srStatus (\ s a -> s{_srStatus = a}) | 53 | false | true | 0 | 9 | 16 | 45 | 24 | 21 | null | null |
bsummer4/logtoy | Main.hs | mit | mkAbsolute ∷ P.FilePath → P.FilePath → P.FilePath
mkAbsolute _ p | P.absolute p = p | 84 | mkAbsolute ∷ P.FilePath → P.FilePath → P.FilePath
mkAbsolute _ p | P.absolute p = p | 84 | mkAbsolute _ p | P.absolute p = p | 34 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
acharal/hopes | src/frontend/ParseUtils.hs | gpl-2.0 | withInput inp m = setInput inp >> m | 35 | withInput inp m = setInput inp >> m | 35 | withInput inp m = setInput inp >> m | 35 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
ksaveljev/hake-2 | src/Game/GClientT.hs | bsd-3-clause | newGClientT :: Int -> GClientT
newGClientT idx = GClientT
{ _gcPlayerState = newPlayerStateT
, _gcPing = 0
, _gcPers = newClientPersistantT
, _gcResp = newClientRespawnT
, _gcOldPMove = newPMoveStateT
, _gcShowScores = False
... | 2,160 | newGClientT :: Int -> GClientT
newGClientT idx = GClientT
{ _gcPlayerState = newPlayerStateT
, _gcPing = 0
, _gcPers = newClientPersistantT
, _gcResp = newClientRespawnT
, _gcOldPMove = newPMoveStateT
, _gcShowScores = False
... | 2,160 | newGClientT idx = GClientT
{ _gcPlayerState = newPlayerStateT
, _gcPing = 0
, _gcPers = newClientPersistantT
, _gcResp = newClientRespawnT
, _gcOldPMove = newPMoveStateT
, _gcShowScores = False
, _gcShowInventory = False... | 2,129 | false | true | 0 | 9 | 970 | 440 | 275 | 165 | null | null |
mitochon/hoosalind | src/problems/grph.hs | mit | -- | checks if the suffix of first node == prefix of second node
isMatch :: Eq a => Node a -> Node a -> Bool
isMatch (_, _,Suffix s) (_,Prefix p, _) = s == p | 157 | isMatch :: Eq a => Node a -> Node a -> Bool
isMatch (_, _,Suffix s) (_,Prefix p, _) = s == p | 92 | isMatch (_, _,Suffix s) (_,Prefix p, _) = s == p | 48 | true | true | 0 | 8 | 36 | 66 | 34 | 32 | null | null |
alanfalloon/git-calendar | Main.hs | gpl-3.0 | options :: [OptDescr Flag]
options =
[ Option ['h'] ["help"] (NoArg Help) "Show this help message"
, Option ['V'] ["version"] (NoArg Version) "show version number"
] | 203 | options :: [OptDescr Flag]
options =
[ Option ['h'] ["help"] (NoArg Help) "Show this help message"
, Option ['V'] ["version"] (NoArg Version) "show version number"
] | 203 | options =
[ Option ['h'] ["help"] (NoArg Help) "Show this help message"
, Option ['V'] ["version"] (NoArg Version) "show version number"
] | 176 | false | true | 0 | 9 | 63 | 72 | 36 | 36 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX43.hs | lgpl-2.1 | tSecureData :: FIXTag
tSecureData = FIXTag
{ tName = "SecureData"
, tnum = 91
, tparser = toFIXData
, arbitraryValue = FIXData <$> arbitrary } | 155 | tSecureData :: FIXTag
tSecureData = FIXTag
{ tName = "SecureData"
, tnum = 91
, tparser = toFIXData
, arbitraryValue = FIXData <$> arbitrary } | 155 | tSecureData = FIXTag
{ tName = "SecureData"
, tnum = 91
, tparser = toFIXData
, arbitraryValue = FIXData <$> arbitrary } | 133 | false | true | 0 | 8 | 37 | 45 | 26 | 19 | null | null |
nevrenato/HetsAlloy | Comorphisms/QVTR2CASL.hs | gpl-2.0 | getVarIdsFromOCLExpre varS (OrB exp1 exp2) = getVarIdsFromOCLExpre varS exp1
++ getVarIdsFromOCLExpre varS exp2 | 112 | getVarIdsFromOCLExpre varS (OrB exp1 exp2) = getVarIdsFromOCLExpre varS exp1
++ getVarIdsFromOCLExpre varS exp2 | 112 | getVarIdsFromOCLExpre varS (OrB exp1 exp2) = getVarIdsFromOCLExpre varS exp1
++ getVarIdsFromOCLExpre varS exp2 | 112 | false | false | 2 | 7 | 13 | 34 | 15 | 19 | null | null |
fhsjaagshs/niagra | src/Data/Niagra/Selector/Tags.hs | mit | textarea :: Selector
textarea = "textarea" | 42 | textarea :: Selector
textarea = "textarea" | 42 | textarea = "textarea" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
00tau/statistics | Statistics/Quantile.hs | bsd-2-clause | -- | California Department of Public Works definition, /a/=0, /b/=1.
-- Gives a linear interpolation of the empirical CDF. This
-- corresponds to method 4 in R and Mathematica.
cadpw :: ContParam
cadpw = ContParam 0 1 | 218 | cadpw :: ContParam
cadpw = ContParam 0 1 | 40 | cadpw = ContParam 0 1 | 21 | true | true | 0 | 5 | 37 | 19 | 11 | 8 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | -- SINGLETON BRANCH, NO DEFAULT: no case analysis to do
mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _
= mkBranch lbl | 126 | mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _
= mkBranch lbl | 70 | mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _
= mkBranch lbl | 70 | true | false | 2 | 7 | 20 | 37 | 16 | 21 | null | null |
janschulz/pandoc | src/Text/Pandoc/Readers/Txt2Tags.hs | gpl-2.0 | genericBlock :: Monoid a => T2T a -> (a -> Blocks) -> String -> T2T Blocks
genericBlock p f s = blockMarkupArea p f s <|> blockMarkupLine p f s | 143 | genericBlock :: Monoid a => T2T a -> (a -> Blocks) -> String -> T2T Blocks
genericBlock p f s = blockMarkupArea p f s <|> blockMarkupLine p f s | 143 | genericBlock p f s = blockMarkupArea p f s <|> blockMarkupLine p f s | 68 | false | true | 0 | 9 | 29 | 68 | 32 | 36 | null | null |
ejconlon/dxedrine | test/Spec.hs | bsd-3-clause | dxBulkDumpMsg :: DxBulkDump
dxBulkDumpMsg = DxBulkDump
{ _dbdManf = Word7 0x43
, _dbdDevice = Word7 0x00
, _dbdFormat = Word7 0x62
, _dbdData = BL.pack [0x03, 0x00, 0x01, 0x0C, 0x32]
} | 198 | dxBulkDumpMsg :: DxBulkDump
dxBulkDumpMsg = DxBulkDump
{ _dbdManf = Word7 0x43
, _dbdDevice = Word7 0x00
, _dbdFormat = Word7 0x62
, _dbdData = BL.pack [0x03, 0x00, 0x01, 0x0C, 0x32]
} | 198 | dxBulkDumpMsg = DxBulkDump
{ _dbdManf = Word7 0x43
, _dbdDevice = Word7 0x00
, _dbdFormat = Word7 0x62
, _dbdData = BL.pack [0x03, 0x00, 0x01, 0x0C, 0x32]
} | 170 | false | true | 0 | 9 | 44 | 76 | 40 | 36 | null | null |
b4winckler/sigscore | src/Main.hs | bsd-3-clause | main = withSystemRandom $ \gen -> do
as <- cmdArgs $ defaultArgs
-- Read lines from file or stdin (if no file is specified)
ls <- B.lines <$> case fname as of
Just fn -> B.readFile fn
_ -> B.getContents
-- Sanity check 'iter' argument
let maxIter = if iter a... | 1,558 | main = withSystemRandom $ \gen -> do
as <- cmdArgs $ defaultArgs
-- Read lines from file or stdin (if no file is specified)
ls <- B.lines <$> case fname as of
Just fn -> B.readFile fn
_ -> B.getContents
-- Sanity check 'iter' argument
let maxIter = if iter a... | 1,558 | main = withSystemRandom $ \gen -> do
as <- cmdArgs $ defaultArgs
-- Read lines from file or stdin (if no file is specified)
ls <- B.lines <$> case fname as of
Just fn -> B.readFile fn
_ -> B.getContents
-- Sanity check 'iter' argument
let maxIter = if iter a... | 1,558 | false | false | 3 | 19 | 440 | 441 | 210 | 231 | null | null |
samstokes/yesodoro-reboot | Util.hs | bsd-2-clause | maybeToEither :: e -> Maybe a -> Either e a
maybeToEither e Nothing = Left e | 76 | maybeToEither :: e -> Maybe a -> Either e a
maybeToEither e Nothing = Left e | 76 | maybeToEither e Nothing = Left e | 32 | false | true | 0 | 7 | 15 | 35 | 16 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.