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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
facebookincubator/duckling | Duckling/AmountOfMoney/RO/Rules.hs | bsd-3-clause | ruleUnitAmount :: Rule
ruleUnitAmount = Rule
{ name = "<unit> <amount>"
, pattern =
[ Predicate isCurrencyOnly
, Predicate isPositive
]
, prod = \case
(Token AmountOfMoney AmountOfMoneyData{TAmountOfMoney.currency = c}:
Token Numeral NumeralData{TNumeral.value = v}:
_) -> Just . To... | 391 | ruleUnitAmount :: Rule
ruleUnitAmount = Rule
{ name = "<unit> <amount>"
, pattern =
[ Predicate isCurrencyOnly
, Predicate isPositive
]
, prod = \case
(Token AmountOfMoney AmountOfMoneyData{TAmountOfMoney.currency = c}:
Token Numeral NumeralData{TNumeral.value = v}:
_) -> Just . To... | 391 | ruleUnitAmount = Rule
{ name = "<unit> <amount>"
, pattern =
[ Predicate isCurrencyOnly
, Predicate isPositive
]
, prod = \case
(Token AmountOfMoney AmountOfMoneyData{TAmountOfMoney.currency = c}:
Token Numeral NumeralData{TNumeral.value = v}:
_) -> Just . Token AmountOfMoney . wit... | 368 | false | true | 0 | 17 | 96 | 125 | 64 | 61 | null | null |
svenssonjoel/GCDObsidian | Obsidian/GCDObsidian/AddOn/SortLang.hs | bsd-3-clause | sklansky :: Int
-> (Exp Int -> Exp Int -> Exp Int)
-> (Array (Exp Int) :-> Array (Exp Int))
sklansky 0 op = Pure id | 142 | sklansky :: Int
-> (Exp Int -> Exp Int -> Exp Int)
-> (Array (Exp Int) :-> Array (Exp Int))
sklansky 0 op = Pure id | 141 | sklansky 0 op = Pure id | 23 | false | true | 0 | 11 | 52 | 72 | 34 | 38 | null | null |
music-suite/music-preludes | tests/tests.hs | bsd-3-clause | testMusicFilesCheckSum =
goldenVsFile
"Original file checksums"
"tests/originals_ref.sha"
"tests/originals_check.sha"
(system "shasum tests/*.music | shasum > tests/originals_check.sha" >> return ()) | 225 | testMusicFilesCheckSum =
goldenVsFile
"Original file checksums"
"tests/originals_ref.sha"
"tests/originals_check.sha"
(system "shasum tests/*.music | shasum > tests/originals_check.sha" >> return ()) | 225 | testMusicFilesCheckSum =
goldenVsFile
"Original file checksums"
"tests/originals_ref.sha"
"tests/originals_check.sha"
(system "shasum tests/*.music | shasum > tests/originals_check.sha" >> return ()) | 225 | false | false | 1 | 9 | 43 | 37 | 14 | 23 | null | null |
snowleopard/shaking-up-ghc | src/Hadrian/Builder.hs | bsd-3-clause | -- | Print out information about the command being executed.
runInfo :: Show b => Target c b -> Action ()
runInfo t = putProgressInfo =<< renderAction
("Run " ++ show (builder t)) -- TODO: Bring back contextInfo.
(digest $ inputs t)
(digest $ outputs t)
where
digest [] = "none"
digest [x] = x
... | 382 | runInfo :: Show b => Target c b -> Action ()
runInfo t = putProgressInfo =<< renderAction
("Run " ++ show (builder t)) -- TODO: Bring back contextInfo.
(digest $ inputs t)
(digest $ outputs t)
where
digest [] = "none"
digest [x] = x
digest (x:xs) = x ++ " (and " ++ show (length xs) ++ " more)... | 321 | runInfo t = putProgressInfo =<< renderAction
("Run " ++ show (builder t)) -- TODO: Bring back contextInfo.
(digest $ inputs t)
(digest $ outputs t)
where
digest [] = "none"
digest [x] = x
digest (x:xs) = x ++ " (and " ++ show (length xs) ++ " more)" | 276 | true | true | 0 | 9 | 96 | 146 | 71 | 75 | null | null |
DavidAlphaFox/ghc | libraries/haskeline/System/Console/Haskeline/Completion.hs | bsd-3-clause | simpleCompletion :: String -> Completion
simpleCompletion = completion | 70 | simpleCompletion :: String -> Completion
simpleCompletion = completion | 70 | simpleCompletion = completion | 29 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
mdietz94/haskellgame | src/Base/GraphicsManager.hs | mit | loadFont :: String -> Int -> IO SDL.Font
loadFont = SDL.openFont | 64 | loadFont :: String -> Int -> IO SDL.Font
loadFont = SDL.openFont | 64 | loadFont = SDL.openFont | 23 | false | true | 0 | 8 | 10 | 26 | 13 | 13 | null | null |
sampou-org/pfad | Code/Code17.hs | bsd-3-clause | right us [] = Null | 22 | right us [] = Null | 22 | right us [] = Null | 22 | false | false | 1 | 5 | 8 | 18 | 6 | 12 | null | null |
marcinmrotek/hsqml-fork | src/Graphics/QML/Engine.hs | bsd-3-clause | statusException HsqmlEvloopPostShutdown = Just EventLoopPostShutdown | 68 | statusException HsqmlEvloopPostShutdown = Just EventLoopPostShutdown | 68 | statusException HsqmlEvloopPostShutdown = Just EventLoopPostShutdown | 68 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
TomMD/friday | src/Vision/Image/Type.hs | lgpl-3.0 | -- | Forces an image to be in its manifest represenation. Does nothing.
manifest :: Manifest p -> Manifest p
manifest = id | 122 | manifest :: Manifest p -> Manifest p
manifest = id | 50 | manifest = id | 13 | true | true | 0 | 6 | 22 | 22 | 11 | 11 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | Indicates if there was a suggested change to first_page_footer_id.
dsssFirstPageFooterIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssFirstPageFooterIdSuggested
= lens _dsssFirstPageFooterIdSuggested
(\ s a -> s{_dsssFirstPageFooterIdSuggested = a}) | 281 | dsssFirstPageFooterIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssFirstPageFooterIdSuggested
= lens _dsssFirstPageFooterIdSuggested
(\ s a -> s{_dsssFirstPageFooterIdSuggested = a}) | 209 | dsssFirstPageFooterIdSuggested
= lens _dsssFirstPageFooterIdSuggested
(\ s a -> s{_dsssFirstPageFooterIdSuggested = a}) | 127 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
muspellsson/hiccup | Expr/Parse.hs | lgpl-2.1 | getOpName = B.unpack . opName . getOp | 37 | getOpName = B.unpack . opName . getOp | 37 | getOpName = B.unpack . opName . getOp | 37 | false | false | 1 | 7 | 6 | 20 | 8 | 12 | null | null |
frantisekfarka/ghc-dsi | includes/CodeGen.Platform.hs | bsd-3-clause | globalRegMaybe _ = Nothing | 49 | globalRegMaybe _ = Nothing | 49 | globalRegMaybe _ = Nothing | 49 | false | false | 0 | 5 | 26 | 9 | 4 | 5 | null | null |
danidiaz/lens | src/Control/Exception/Lens.hs | bsd-3-clause | -- | Handle arithmetic loss of precision.
--
-- @
-- '_LossOfPrecision' ≡ '_ArithException' '.' '_LossOfPrecision'
-- @
--
-- @
-- '_LossOfPrecision' :: 'Prism'' 'ArithException' 'ArithException'
-- '_LossOfPrecision' :: 'Prism'' 'SomeException' 'ArithException'
-- @
_LossOfPrecision :: AsArithException t => Prism' t ... | 496 | _LossOfPrecision :: AsArithException t => Prism' t ()
_LossOfPrecision = _ArithException . dimap seta (either id id) . right' . rmap (LossOfPrecision <$) where
seta LossOfPrecision = Right ()
seta t = Left (pure t)
| 227 | _LossOfPrecision = _ArithException . dimap seta (either id id) . right' . rmap (LossOfPrecision <$) where
seta LossOfPrecision = Right ()
seta t = Left (pure t)
| 173 | true | true | 0 | 10 | 83 | 98 | 53 | 45 | null | null |
yanatan16/doczen-generator | src/Language/Doczen/Parser.hs | mit | endsWith a end = ((try end) *> pure []) <|> (a <:> endsWith a end) | 66 | endsWith a end = ((try end) *> pure []) <|> (a <:> endsWith a end) | 66 | endsWith a end = ((try end) *> pure []) <|> (a <:> endsWith a end) | 66 | false | false | 0 | 9 | 14 | 45 | 22 | 23 | null | null |
anthony-coble/Mixpanel | Mixpanel.hs | mit | mixpanel :: (MixpanelQuery a, FromJSON b) => MixpanelConfig -> a -> IO (Maybe b)
mixpanel conf query = do
response <- mixpanelRequest conf query $ endPoint query
let json = decode $ response ^. responseBody
return json | 227 | mixpanel :: (MixpanelQuery a, FromJSON b) => MixpanelConfig -> a -> IO (Maybe b)
mixpanel conf query = do
response <- mixpanelRequest conf query $ endPoint query
let json = decode $ response ^. responseBody
return json | 227 | mixpanel conf query = do
response <- mixpanelRequest conf query $ endPoint query
let json = decode $ response ^. responseBody
return json | 146 | false | true | 0 | 12 | 45 | 95 | 43 | 52 | null | null |
alpicola/mel | src/Frontend/Elaborate.hs | mit | tcDecl (MLTupleDecl bs e) = do
vs <- mapM (const genVar) bs
(t, e') <- tcExpr e
unify t (TupleType vs)
sc <- if isValue e' then generalize t
else return $ TypeScheme [] t
let bs' = case sc of
TypeScheme vs' (TupleType ts) ->
zip bs $ map (TypeScheme vs') ts
... | 353 | tcDecl (MLTupleDecl bs e) = do
vs <- mapM (const genVar) bs
(t, e') <- tcExpr e
unify t (TupleType vs)
sc <- if isValue e' then generalize t
else return $ TypeScheme [] t
let bs' = case sc of
TypeScheme vs' (TupleType ts) ->
zip bs $ map (TypeScheme vs') ts
... | 353 | tcDecl (MLTupleDecl bs e) = do
vs <- mapM (const genVar) bs
(t, e') <- tcExpr e
unify t (TupleType vs)
sc <- if isValue e' then generalize t
else return $ TypeScheme [] t
let bs' = case sc of
TypeScheme vs' (TupleType ts) ->
zip bs $ map (TypeScheme vs') ts
... | 353 | false | false | 0 | 16 | 121 | 162 | 75 | 87 | null | null |
acowley/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gen_Data_binds :: DynFlags
-> SrcSpan
-> TyCon -- For data families, this is the
-- *representation* TyCon
-> (LHsBinds RdrName, -- The method bindings
BagDerivStuff) -- Auxiliary bindings
g... | 5,541 | gen_Data_binds :: DynFlags
-> SrcSpan
-> TyCon -- For data families, this is the
-- *representation* TyCon
-> (LHsBinds RdrName, -- The method bindings
BagDerivStuff)
gen_Data_binds dflags loc rep... | 5,513 | gen_Data_binds dflags loc rep_tc
= (listToBag [gfoldl_bind, gunfold_bind, toCon_bind, dataTypeOf_bind]
`unionBags` gcast_binds,
-- Auxiliary definitions: the data type and constructors
listToBag ( DerivHsBind (genDataTyCon)
: map (DerivHsBind . genDataDataCon) data_cons))
wh... | 5,222 | true | true | 14 | 13 | 2,037 | 1,111 | 578 | 533 | null | null |
rueshyna/gogol | gogol-dns/gen/Network/Google/DNS/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ManagedZonesDeleteResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mzdrHeader'
managedZonesDeleteResponse
:: ManagedZonesDeleteResponse
managedZonesDeleteResponse =
ManagedZonesDeleteResponse'... | 354 | managedZonesDeleteResponse
:: ManagedZonesDeleteResponse
managedZonesDeleteResponse =
ManagedZonesDeleteResponse'
{ _mzdrHeader = Nothing
} | 155 | managedZonesDeleteResponse =
ManagedZonesDeleteResponse'
{ _mzdrHeader = Nothing
} | 94 | true | true | 0 | 7 | 60 | 34 | 18 | 16 | null | null |
cspollard/bcalib | app/bcalibRun.hs | bsd-3-clause | fillFile
:: [(TreeName, TR IO (M.Map SystName Double))]
-> Maybe (Int, Double, SystMap YodaFolder)
-> String
-> IO (Maybe (Int, Double, SystMap YodaFolder))
fillFile systs m fn = do
putStrLn ("analyzing file " ++ fn) >> hFlush stdout
-- check whether or not this is a data file
let (dsid :: Int) =
... | 1,901 | fillFile
:: [(TreeName, TR IO (M.Map SystName Double))]
-> Maybe (Int, Double, SystMap YodaFolder)
-> String
-> IO (Maybe (Int, Double, SystMap YodaFolder))
fillFile systs m fn = do
putStrLn ("analyzing file " ++ fn) >> hFlush stdout
-- check whether or not this is a data file
let (dsid :: Int) =
... | 1,901 | fillFile systs m fn = do
putStrLn ("analyzing file " ++ fn) >> hFlush stdout
-- check whether or not this is a data file
let (dsid :: Int) =
if "data15_13TeV" `isInfixOf` fn || "data16_13TeV" `isInfixOf` fn
then 0
-- this works on files of the form
-- /blah/blah/blah/blah.bl... | 1,736 | false | true | 5 | 21 | 635 | 644 | 316 | 328 | null | null |
frerich/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | getListingsLanguage (x:xs) = toListingsLanguage x <|> getListingsLanguage xs | 76 | getListingsLanguage (x:xs) = toListingsLanguage x <|> getListingsLanguage xs | 76 | getListingsLanguage (x:xs) = toListingsLanguage x <|> getListingsLanguage xs | 76 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
urbanslug/ghc | testsuite/tests/rename/should_compile/timing003.hs | bsd-3-clause | a085 = [] | 9 | a085 = [] | 9 | a085 = [] | 9 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
ardumont/haskell-lab | src/learn-you-a-haskell-for-great-good/type.hs | gpl-2.0 | removeNonUpperCase :: [Char] -> [Char]
removeNonUpperCase cs = [ c | c <- cs, c `elem` ['A'..'Z'] ] | 99 | removeNonUpperCase :: [Char] -> [Char]
removeNonUpperCase cs = [ c | c <- cs, c `elem` ['A'..'Z'] ] | 99 | removeNonUpperCase cs = [ c | c <- cs, c `elem` ['A'..'Z'] ] | 60 | false | true | 0 | 8 | 17 | 50 | 28 | 22 | null | null |
yuroyoro/stashh | src/Stashh/Command.hs | bsd-3-clause | dispatch :: AppT IO ()
dispatch = do
env <- ask
args <- liftIO $ removeEnvArgs <$> getArgs
debugout env ["-- Args --", show args, ""]
case removeOptArgs args of
("projects" : []) ->
{- ("projects" : projectId : []) -> -}
parseAndRun args modeProjects id
("projects" : prjKeyg : "repos" : []) ... | 2,279 | dispatch :: AppT IO ()
dispatch = do
env <- ask
args <- liftIO $ removeEnvArgs <$> getArgs
debugout env ["-- Args --", show args, ""]
case removeOptArgs args of
("projects" : []) ->
{- ("projects" : projectId : []) -> -}
parseAndRun args modeProjects id
("projects" : prjKeyg : "repos" : []) ... | 2,279 | dispatch = do
env <- ask
args <- liftIO $ removeEnvArgs <$> getArgs
debugout env ["-- Args --", show args, ""]
case removeOptArgs args of
("projects" : []) ->
{- ("projects" : projectId : []) -> -}
parseAndRun args modeProjects id
("projects" : prjKeyg : "repos" : []) ->
parseAndRun ar... | 2,256 | false | true | 1 | 19 | 469 | 682 | 338 | 344 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'VolumeVolumeInfoImageLinks' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vviilThumbnail'
--
-- * 'vviilSmall'
--
-- * 'vviilExtraLarge'
--
-- * 'vviilLarge'
--
-- * 'vviilMedium'
--
-- * 'vviilSmallThumbnai... | 637 | volumeVolumeInfoImageLinks
:: VolumeVolumeInfoImageLinks
volumeVolumeInfoImageLinks =
VolumeVolumeInfoImageLinks'
{ _vviilThumbnail = Nothing
, _vviilSmall = Nothing
, _vviilExtraLarge = Nothing
, _vviilLarge = Nothing
, _vviilMedium = Nothing
, _vviilSmallThumbnail = Nothing
} | 314 | volumeVolumeInfoImageLinks =
VolumeVolumeInfoImageLinks'
{ _vviilThumbnail = Nothing
, _vviilSmall = Nothing
, _vviilExtraLarge = Nothing
, _vviilLarge = Nothing
, _vviilMedium = Nothing
, _vviilSmallThumbnail = Nothing
} | 253 | true | true | 1 | 7 | 120 | 71 | 47 | 24 | null | null |
paulrzcz/takusen-oracle | Database/Oracle/Test/Enumerator.hs | bsd-3-clause | keFixtureMultiResultSet2 = "CREATE OR REPLACE VIEW t_natural as"
++ " select n from"
++ " ( select t1.n + 10 * t10.n + 100 * t100.n as n"
++ " from t_whole t1, t_whole t10, t_whole t100"
++ " ) t where n > 0 order by 1"
| 235 | makeFixtureMultiResultSet2 = "CREATE OR REPLACE VIEW t_natural as"
++ " select n from"
++ " ( select t1.n + 10 * t10.n + 100 * t100.n as n"
++ " from t_whole t1, t_whole t10, t_whole t100"
++ " ) t where n > 0 order by 1" | 235 | makeFixtureMultiResultSet2 = "CREATE OR REPLACE VIEW t_natural as"
++ " select n from"
++ " ( select t1.n + 10 * t10.n + 100 * t100.n as n"
++ " from t_whole t1, t_whole t10, t_whole t100"
++ " ) t where n > 0 order by 1" | 235 | false | false | 8 | 4 | 63 | 26 | 11 | 15 | null | null |
rootmos/economy | src/Main.hs | gpl-3.0 | getDefaultFilePath :: IO FilePath
getDefaultFilePath = do
home <- getHomeDirectory
return $ home </> ".config" </> "economy.json" | 137 | getDefaultFilePath :: IO FilePath
getDefaultFilePath = do
home <- getHomeDirectory
return $ home </> ".config" </> "economy.json" | 137 | getDefaultFilePath = do
home <- getHomeDirectory
return $ home </> ".config" </> "economy.json" | 103 | false | true | 0 | 9 | 24 | 36 | 17 | 19 | null | null |
sopvop/cabal | Cabal/Distribution/ParseUtils.hs | bsd-3-clause | ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs'
fs''' <- ifelse fs
return (Section n s a fs'' : fs''') | 179 | ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs'
fs''' <- ifelse fs
return (Section n s a fs'' : fs''') | 179 | ifelse (Section n s a fs':fs) = do fs'' <- ifelse fs'
fs''' <- ifelse fs
return (Section n s a fs'' : fs''') | 179 | false | false | 0 | 10 | 94 | 67 | 30 | 37 | null | null |
forste/haReFork | refactorer/RefacMerge.hs | bsd-3-clause | replaceInE :: (Monad m, MonadPlus m) => PNT -> String -> HsExpP -> m HsExpP
replaceInE origName newName e
= applyTP (once_tdTP (adhocTP idTP rename')) e
where
rename' (e'@(Exp (HsId (HsVar x)))::HsExpP)
| pNTtoName x == pNTtoName origName = return (Exp (HsId (HsVar (nameToPNT newName) )))
... | 524 | replaceInE :: (Monad m, MonadPlus m) => PNT -> String -> HsExpP -> m HsExpP
replaceInE origName newName e
= applyTP (once_tdTP (adhocTP idTP rename')) e
where
rename' (e'@(Exp (HsId (HsVar x)))::HsExpP)
| pNTtoName x == pNTtoName origName = return (Exp (HsId (HsVar (nameToPNT newName) )))
... | 524 | replaceInE origName newName e
= applyTP (once_tdTP (adhocTP idTP rename')) e
where
rename' (e'@(Exp (HsId (HsVar x)))::HsExpP)
| pNTtoName x == pNTtoName origName = return (Exp (HsId (HsVar (nameToPNT newName) )))
| otherwise = return e'
rename' e@(Exp (HsApp e1 e2))
= ... | 448 | false | true | 0 | 16 | 161 | 236 | 112 | 124 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp ObjectArrayNewOp = _ILIT(1105) | 43 | tagOf_PrimOp ObjectArrayNewOp = _ILIT(1105) | 43 | tagOf_PrimOp ObjectArrayNewOp = _ILIT(1105) | 43 | false | false | 0 | 6 | 3 | 16 | 7 | 9 | null | null |
phischu/fragnix | builtins/base/Control.Monad.ST.Lazy.Imp.hs | bsd-3-clause | -- ---------------------------------------------------------------------------
-- Strict <--> Lazy
unsafeInterleaveST :: ST s a -> ST s a
unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST | 215 | unsafeInterleaveST :: ST s a -> ST s a
unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST | 115 | unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST | 76 | true | true | 0 | 7 | 22 | 43 | 20 | 23 | null | null |
urbanslug/ghc | compiler/types/TyCon.hs | bsd-3-clause | primElemRepSizeB Int64ElemRep = 8 | 34 | primElemRepSizeB Int64ElemRep = 8 | 34 | primElemRepSizeB Int64ElemRep = 8 | 34 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
martin-kolinek/some-board-game-rules | src/Building.hs | mit | isWorkerOccupant :: BuildingOccupant -> Bool
isWorkerOccupant (WorkerOccupant _) = True | 87 | isWorkerOccupant :: BuildingOccupant -> Bool
isWorkerOccupant (WorkerOccupant _) = True | 87 | isWorkerOccupant (WorkerOccupant _) = True | 42 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
urbanslug/ghc | compiler/deSugar/DsGRHSs.hs | bsd-3-clause | matchGuards (LastStmt {} : _) _ _ _ = panic "matchGuards LastStmt" | 67 | matchGuards (LastStmt {} : _) _ _ _ = panic "matchGuards LastStmt" | 67 | matchGuards (LastStmt {} : _) _ _ _ = panic "matchGuards LastStmt" | 67 | false | false | 1 | 7 | 12 | 27 | 13 | 14 | null | null |
acowley/ghc | compiler/prelude/THNames.hs | bsd-3-clause | normalBName = libFun (fsLit "normalB") normalBIdKey | 53 | normalBName = libFun (fsLit "normalB") normalBIdKey | 53 | normalBName = libFun (fsLit "normalB") normalBIdKey | 53 | false | false | 0 | 7 | 7 | 17 | 8 | 9 | null | null |
phischu/fragnix | tests/packages/scotty/Data.UUID.Types.Internal.hs | bsd-3-clause | -- | Convert a UUID into a hyphentated string using lower-case letters, packed
-- as ASCII bytes into `B.ByteString`.
--
-- This should be equivalent to `toString` with `Data.ByteString.Char8.pack`.
toASCIIBytes :: UUID -> B.ByteString
toASCIIBytes uuid = BI.unsafeCreate 36 (pokeASCII uuid) | 295 | toASCIIBytes :: UUID -> B.ByteString
toASCIIBytes uuid = BI.unsafeCreate 36 (pokeASCII uuid) | 92 | toASCIIBytes uuid = BI.unsafeCreate 36 (pokeASCII uuid) | 55 | true | true | 0 | 7 | 44 | 37 | 20 | 17 | null | null |
bflyblue/parse-quote | Datalink.hs | unlicense | ethernet :: Get Datalink
ethernet = Ethernet <$> get | 52 | ethernet :: Get Datalink
ethernet = Ethernet <$> get | 52 | ethernet = Ethernet <$> get | 27 | false | true | 2 | 6 | 8 | 25 | 10 | 15 | null | null |
olsner/ghc | libraries/compact/tests/compact_loop.hs | bsd-3-clause | test x = do
let a = Node Nil x b
b = Node a Nil Nil
str <- compactSized 4096 True a
-- check the value in the compact
assertEquals a (getCompact str)
performMajorGC
-- check again the value in the compact
assertEquals a (getCompact str) | 257 | test x = do
let a = Node Nil x b
b = Node a Nil Nil
str <- compactSized 4096 True a
-- check the value in the compact
assertEquals a (getCompact str)
performMajorGC
-- check again the value in the compact
assertEquals a (getCompact str) | 257 | test x = do
let a = Node Nil x b
b = Node a Nil Nil
str <- compactSized 4096 True a
-- check the value in the compact
assertEquals a (getCompact str)
performMajorGC
-- check again the value in the compact
assertEquals a (getCompact str) | 257 | false | false | 0 | 10 | 67 | 84 | 38 | 46 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall-openapi/openapi-to-dhall/Main.hs | bsd-3-clause | parsePrefixMap :: Options.Applicative.ReadM (Data.Map.Map Prefix Dhall.Import)
parsePrefixMap =
Options.Applicative.eitherReader $ \s ->
bimap errorBundlePretty Data.Map.fromList $ result (pack s)
where
parser = do
prefix <- some (alphaNumChar <|> char '.')
char '='
e <- Dhall.Parser.expr
... | 472 | parsePrefixMap :: Options.Applicative.ReadM (Data.Map.Map Prefix Dhall.Import)
parsePrefixMap =
Options.Applicative.eitherReader $ \s ->
bimap errorBundlePretty Data.Map.fromList $ result (pack s)
where
parser = do
prefix <- some (alphaNumChar <|> char '.')
char '='
e <- Dhall.Parser.expr
... | 472 | parsePrefixMap =
Options.Applicative.eitherReader $ \s ->
bimap errorBundlePretty Data.Map.fromList $ result (pack s)
where
parser = do
prefix <- some (alphaNumChar <|> char '.')
char '='
e <- Dhall.Parser.expr
imp <- parseImport prefix e
return (pack prefix, imp)
result = ... | 393 | false | true | 0 | 11 | 100 | 169 | 84 | 85 | null | null |
haskell-distributed/distributed-process-extras | tests/TestTimer.hs | bsd-3-clause | testTimerFlush :: TestResult Bool -> Process ()
testTimerFlush result = do
let delay = seconds 1
self <- getSelfPid
ref <- ticker delay self
-- sleep so we *should* have a message in our 'mailbox'
sleep $ milliSeconds 2
-- flush it out if it's there
flushTimer ref Tick (Delay $ seconds 3)
m <- expec... | 418 | testTimerFlush :: TestResult Bool -> Process ()
testTimerFlush result = do
let delay = seconds 1
self <- getSelfPid
ref <- ticker delay self
-- sleep so we *should* have a message in our 'mailbox'
sleep $ milliSeconds 2
-- flush it out if it's there
flushTimer ref Tick (Delay $ seconds 3)
m <- expec... | 418 | testTimerFlush result = do
let delay = seconds 1
self <- getSelfPid
ref <- ticker delay self
-- sleep so we *should* have a message in our 'mailbox'
sleep $ milliSeconds 2
-- flush it out if it's there
flushTimer ref Tick (Delay $ seconds 3)
m <- expectTimeout 10
case m of
Nothing -> stash... | 370 | false | true | 0 | 10 | 106 | 131 | 58 | 73 | null | null |
jbapple/unique | draft/Kickstart.hs | mit | next hl hr (Kids lhs (p,q) rhs) =
let (lp,lq) = hl lhs
(rp,rq) = hr rhs
in (Kids lp p rp, Kids lq q rq) | 113 | next hl hr (Kids lhs (p,q) rhs) =
let (lp,lq) = hl lhs
(rp,rq) = hr rhs
in (Kids lp p rp, Kids lq q rq) | 113 | next hl hr (Kids lhs (p,q) rhs) =
let (lp,lq) = hl lhs
(rp,rq) = hr rhs
in (Kids lp p rp, Kids lq q rq) | 113 | false | false | 0 | 9 | 35 | 85 | 43 | 42 | null | null |
thomie/haskell-platform | hptool/src/OS/Win/WinRules.hs | bsd-3-clause | copyInstExtras :: Rules ()
copyInstExtras = do
let setup = makeDirectory $ installerPartsDir </> "icons"
copyFilesRules setup winExtrasSrc installerPartsDir winInstExtrasFiles | 183 | copyInstExtras :: Rules ()
copyInstExtras = do
let setup = makeDirectory $ installerPartsDir </> "icons"
copyFilesRules setup winExtrasSrc installerPartsDir winInstExtrasFiles | 183 | copyInstExtras = do
let setup = makeDirectory $ installerPartsDir </> "icons"
copyFilesRules setup winExtrasSrc installerPartsDir winInstExtrasFiles | 156 | false | true | 0 | 11 | 27 | 45 | 21 | 24 | null | null |
alistair/omnisharp-hs | src/Omnisharp/Neovim/Lib.hs | bsd-3-clause | getWorkingDirectory :: Neovim r st String
getWorkingDirectory = do
(Right d) <- vim_call_function "getcwd" []
case fromObject d of Right a -> return a
-- Interestingly buffer_get_name seems to get the full path of the file.... | 235 | getWorkingDirectory :: Neovim r st String
getWorkingDirectory = do
(Right d) <- vim_call_function "getcwd" []
case fromObject d of Right a -> return a
-- Interestingly buffer_get_name seems to get the full path of the file.... | 235 | getWorkingDirectory = do
(Right d) <- vim_call_function "getcwd" []
case fromObject d of Right a -> return a
-- Interestingly buffer_get_name seems to get the full path of the file.... | 193 | false | true | 0 | 11 | 44 | 67 | 29 | 38 | null | null |
awto/chr2sql | CHR2/Parser.hs | bsd-3-clause | prefix :: (DeltaParsing m) => String -> P.Operator m Term
prefix n = P.Prefix (mkUn n <$ reservedOp n) | 103 | prefix :: (DeltaParsing m) => String -> P.Operator m Term
prefix n = P.Prefix (mkUn n <$ reservedOp n) | 103 | prefix n = P.Prefix (mkUn n <$ reservedOp n) | 45 | false | true | 0 | 8 | 19 | 52 | 25 | 27 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelSections/Update.hs | mpl-2.0 | -- | V1 error format.
csuXgafv :: Lens' ChannelSectionsUpdate (Maybe Xgafv)
csuXgafv = lens _csuXgafv (\ s a -> s{_csuXgafv = a}) | 129 | csuXgafv :: Lens' ChannelSectionsUpdate (Maybe Xgafv)
csuXgafv = lens _csuXgafv (\ s a -> s{_csuXgafv = a}) | 107 | csuXgafv = lens _csuXgafv (\ s a -> s{_csuXgafv = a}) | 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
AmpersandTarski/ampersand | src/Ampersand/FSpec/ToFSpec/NormalForms.hs | gpl-3.0 | vars (RCps rs) = foldr (Set.union . vars) Set.empty rs | 58 | vars (RCps rs) = foldr (Set.union . vars) Set.empty rs | 58 | vars (RCps rs) = foldr (Set.union . vars) Set.empty rs | 58 | false | false | 0 | 8 | 13 | 33 | 16 | 17 | null | null |
kim/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/Types.hs | mpl-2.0 | -- | This response element indicates the current status of the distribution. When
-- the status is Deployed, the distribution's information is fully propagated
-- throughout the Amazon CloudFront system.
dsStatus :: Lens' DistributionSummary Text
dsStatus = lens _dsStatus (\s a -> s { _dsStatus = a }) | 302 | dsStatus :: Lens' DistributionSummary Text
dsStatus = lens _dsStatus (\s a -> s { _dsStatus = a }) | 98 | dsStatus = lens _dsStatus (\s a -> s { _dsStatus = a }) | 55 | true | true | 0 | 9 | 47 | 42 | 24 | 18 | null | null |
haskell-faceted/haskell-faceted | Faceted/FIO.hs | apache-2.0 | -- | With an empty context it is safe to run
secureRunFIO fio = runFIO fio [] | 77 | secureRunFIO fio = runFIO fio [] | 32 | secureRunFIO fio = runFIO fio [] | 32 | true | false | 0 | 6 | 16 | 17 | 8 | 9 | null | null |
kqr/lexigen | Main.hs | bsd-2-clause | alternative :: Parser (Text, [RefText])
alternative = do
name <- char '|' *> pureText <* openBlock
desc <- option [] paragraph
closeBlock
return (name, desc) | 165 | alternative :: Parser (Text, [RefText])
alternative = do
name <- char '|' *> pureText <* openBlock
desc <- option [] paragraph
closeBlock
return (name, desc) | 165 | alternative = do
name <- char '|' *> pureText <* openBlock
desc <- option [] paragraph
closeBlock
return (name, desc) | 125 | false | true | 0 | 10 | 32 | 70 | 34 | 36 | null | null |
olsner/ghc | compiler/codeGen/StgCmmExtCode.hs | bsd-3-clause | thenExtFC :: CmmParse a -> (a -> CmmParse b) -> CmmParse b
thenExtFC (EC m) k = EC $ \c e s -> do (s',r) <- m c e s; unEC (k r) c e s' | 134 | thenExtFC :: CmmParse a -> (a -> CmmParse b) -> CmmParse b
thenExtFC (EC m) k = EC $ \c e s -> do (s',r) <- m c e s; unEC (k r) c e s' | 134 | thenExtFC (EC m) k = EC $ \c e s -> do (s',r) <- m c e s; unEC (k r) c e s' | 75 | false | true | 0 | 11 | 35 | 98 | 48 | 50 | null | null |
Solumin/ScriptNScribe | src/BreveEval.hs | mit | evalBinOp Add (Vn n1 l1) (Vn n2 l2) = Vn (n1 + n2) (TrOp Add l1 l2) | 67 | evalBinOp Add (Vn n1 l1) (Vn n2 l2) = Vn (n1 + n2) (TrOp Add l1 l2) | 67 | evalBinOp Add (Vn n1 l1) (Vn n2 l2) = Vn (n1 + n2) (TrOp Add l1 l2) | 67 | false | false | 0 | 7 | 16 | 51 | 25 | 26 | null | null |
xldenis/hliquid | src/HLiquid/Parser.hs | bsd-3-clause | layoutTag :: Parser Statement
layoutTag = simpleTag "layout"
(Layout <$> filteredExpression) | 94 | layoutTag :: Parser Statement
layoutTag = simpleTag "layout"
(Layout <$> filteredExpression) | 94 | layoutTag = simpleTag "layout"
(Layout <$> filteredExpression) | 64 | false | true | 0 | 6 | 12 | 27 | 13 | 14 | null | null |
feumilieu/sicp-haskell | src/SICP/DB.hs | bsd-3-clause | flattenInterleave (x : xs) = interleave x $ flattenInterleave xs | 64 | flattenInterleave (x : xs) = interleave x $ flattenInterleave xs | 64 | flattenInterleave (x : xs) = interleave x $ flattenInterleave xs | 64 | false | false | 0 | 6 | 9 | 27 | 12 | 15 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexOffAddrOp_Int8 args = doIndexOffAddrOp (Just (mo_s_8ToWord dflags)) b8 res args | 121 | emitPrimOp dflags res IndexOffAddrOp_Int8 args = doIndexOffAddrOp (Just (mo_s_8ToWord dflags)) b8 res args | 121 | emitPrimOp dflags res IndexOffAddrOp_Int8 args = doIndexOffAddrOp (Just (mo_s_8ToWord dflags)) b8 res args | 121 | false | false | 0 | 9 | 27 | 40 | 17 | 23 | null | null |
ideas-edu/ideas | src/Ideas/Main/Default.hs | apache-2.0 | defaultMain :: DomainReasoner -> IO ()
defaultMain = defaultMainWith mempty | 76 | defaultMain :: DomainReasoner -> IO ()
defaultMain = defaultMainWith mempty | 75 | defaultMain = defaultMainWith mempty | 36 | false | true | 0 | 8 | 10 | 28 | 12 | 16 | null | null |
jacekszymanski/wxHaskell | samples/wx/FileBrowse.hs | lgpl-2.1 | getRootDir :: IO (FilePath,FilePath)
getRootDir
= do current <- getCurrentDirectory
let rootName = takeWhile (not . isPathSeparator) current
rootPath = rootName ++ "/"
exist <- swallowIOExceptions False $ doesDirectoryExist rootPath
if exist
then return (rootPath,rootName)
... | 417 | getRootDir :: IO (FilePath,FilePath)
getRootDir
= do current <- getCurrentDirectory
let rootName = takeWhile (not . isPathSeparator) current
rootPath = rootName ++ "/"
exist <- swallowIOExceptions False $ doesDirectoryExist rootPath
if exist
then return (rootPath,rootName)
... | 417 | getRootDir
= do current <- getCurrentDirectory
let rootName = takeWhile (not . isPathSeparator) current
rootPath = rootName ++ "/"
exist <- swallowIOExceptions False $ doesDirectoryExist rootPath
if exist
then return (rootPath,rootName)
else return (current ++ "/", re... | 380 | false | true | 0 | 15 | 98 | 137 | 67 | 70 | null | null |
jdubrule/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | idlType BT_Double = pure "double" | 33 | idlType BT_Double = pure "double" | 33 | idlType BT_Double = pure "double" | 33 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
cutsea110/kabu | Main.hs | bsd-3-clause | int :: Parser Int
int = fmap fromInteger decimal | 48 | int :: Parser Int
int = fmap fromInteger decimal | 48 | int = fmap fromInteger decimal | 30 | false | true | 1 | 5 | 8 | 22 | 9 | 13 | null | null |
brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Scores/Get.hs | mpl-2.0 | -- | The maximum number of leaderboard scores to return in the response. For
-- any response, the actual number of leaderboard scores returned may be
-- less than the specified \`maxResults\`.
sMaxResults :: Lens' ScoresGet (Maybe Int32)
sMaxResults
= lens _sMaxResults (\ s a -> s{_sMaxResults = a}) .
mapping _... | 326 | sMaxResults :: Lens' ScoresGet (Maybe Int32)
sMaxResults
= lens _sMaxResults (\ s a -> s{_sMaxResults = a}) .
mapping _Coerce | 133 | sMaxResults
= lens _sMaxResults (\ s a -> s{_sMaxResults = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 59 | 57 | 30 | 27 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_293 x = happyTcHack x happyReduce_354 | 44 | action_293 x = happyTcHack x happyReduce_354 | 44 | action_293 x = happyTcHack x happyReduce_354 | 44 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
kjslag/hTensor | lib/Numeric/LinearAlgebra/Exterior.hs | bsd-3-clause | -- | The full antisymmetric tensor of order n (contravariant version).
leviCivita :: Int -> Tensor Double
leviCivita = (map levi [0..] !!) | 138 | leviCivita :: Int -> Tensor Double
leviCivita = (map levi [0..] !!) | 67 | leviCivita = (map levi [0..] !!) | 32 | true | true | 0 | 7 | 22 | 31 | 17 | 14 | null | null |
acowley/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
-- See Outputable.pprPrefixVar, pprInfixVar;
-- add parens or back-quotes as appropriate
pprInfixName n = pprInfixVar (isSymOcc (getOccName n)) (ppr n) | 210 | pprInfixName :: (Outputable a, NamedThing a) => a -> SDoc
pprInfixName n = pprInfixVar (isSymOcc (getOccName n)) (ppr n) | 121 | pprInfixName n = pprInfixVar (isSymOcc (getOccName n)) (ppr n) | 63 | true | true | 0 | 9 | 30 | 58 | 30 | 28 | null | null |
WawerOS/Chessotron2000 | src/Main.hs | mit | maybeOrDefault Nothing a = a | 28 | maybeOrDefault Nothing a = a | 28 | maybeOrDefault Nothing a = a | 28 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
stevedonnelly/haskell | code/Algebra/Vector.hs | mit | fromArray = ((.) Algebra.Vector.fromList Map.elems) | 51 | fromArray = ((.) Algebra.Vector.fromList Map.elems) | 51 | fromArray = ((.) Algebra.Vector.fromList Map.elems) | 51 | false | false | 0 | 7 | 4 | 21 | 12 | 9 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Util.hs | mit | -- | Time format used in API. Corresponds to ISO-8601.
-- Example of time: "2018-03-07T16:20:27.477318"
--
-- Note: there is more neat support of time formats in time-1.9,
-- Data.Time.Format.ISO8601 module, but that version is barely applicable with
-- current LTS-9.1.
apiTimeFormat :: String
apiTimeFormat = Time.iso8... | 353 | apiTimeFormat :: String
apiTimeFormat = Time.iso8601DateFormat (Just "%H:%M:%S%Q") | 82 | apiTimeFormat = Time.iso8601DateFormat (Just "%H:%M:%S%Q") | 58 | true | true | 0 | 7 | 48 | 28 | 17 | 11 | null | null |
batterseapower/edit-distance | Text/EditDistance/Bits.hs | bsd-3-clause | sizedComplement :: (Num bv, Bits bv) => bv -> bv -> bv
sizedComplement vector_mask vect = vector_mask `xor` vect | 112 | sizedComplement :: (Num bv, Bits bv) => bv -> bv -> bv
sizedComplement vector_mask vect = vector_mask `xor` vect | 112 | sizedComplement vector_mask vect = vector_mask `xor` vect | 57 | false | true | 0 | 7 | 18 | 45 | 24 | 21 | null | null |
prb/perpubplat | src/Utilities.hs | bsd-3-clause | range :: (a->b) -> [a] -> [(b,a)]
range f is = zip (map f is) is | 64 | range :: (a->b) -> [a] -> [(b,a)]
range f is = zip (map f is) is | 64 | range f is = zip (map f is) is | 30 | false | true | 0 | 8 | 15 | 56 | 30 | 26 | null | null |
nurpax/aeson | Data/Aeson/Types/Internal.hs | bsd-3-clause | -- | Converts from CamelCase to another lower case, interspersing
-- the character between all capital letters and their previous
-- entries, except those capital letters that appear together,
-- like 'API'.
--
-- For use by Aeson template haskell calls.
--
-- > camelTo '_' 'CamelCaseAPI' == "camel_case_api"
... | 897 | camelTo :: Char -> String -> String
camelTo c = lastWasCap True
where
lastWasCap :: Bool -- ^ Previous was a capital letter
-> String -- ^ The remaining string
-> String
lastWasCap _ [] = []
lastWasCap prev (x : xs) = if isUpper x
... | 577 | camelTo c = lastWasCap True
where
lastWasCap :: Bool -- ^ Previous was a capital letter
-> String -- ^ The remaining string
-> String
lastWasCap _ [] = []
lastWasCap prev (x : xs) = if isUpper x
then if prev
... | 541 | true | true | 4 | 10 | 358 | 139 | 73 | 66 | null | null |
mightybyte/reflex-dom-stubs | src/GHCJS/DOM/HTMLInputElement.hs | bsd-3-clause | ghcjs_dom_html_input_element_set_pattern = undefined | 52 | ghcjs_dom_html_input_element_set_pattern = undefined | 52 | ghcjs_dom_html_input_element_set_pattern = undefined | 52 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
SKA-ScienceDataProcessor/RC | MS6/dna/core/DNA/DSL.hs | apache-2.0 | startCollectorTree
:: (Serializable a)
=> Spawn (Closure (CollectActor a a))
-- ^ Actor to spawn
-> DNA (Shell (Grp a) (Val a))
-- ^ Handle to spawned actor
startCollectorTree child =
DNA $ singleton $ SpawnCollectorTree child | 256 | startCollectorTree
:: (Serializable a)
=> Spawn (Closure (CollectActor a a))
-- ^ Actor to spawn
-> DNA (Shell (Grp a) (Val a))
startCollectorTree child =
DNA $ singleton $ SpawnCollectorTree child | 220 | startCollectorTree child =
DNA $ singleton $ SpawnCollectorTree child | 73 | true | true | 0 | 11 | 66 | 80 | 40 | 40 | null | null |
suhailshergill/liboleg | Language/CBAny.hs | bsd-3-clause | runName :: S Name m a -> m a
runName x = unS x | 46 | runName :: S Name m a -> m a
runName x = unS x | 46 | runName x = unS x | 17 | false | true | 0 | 6 | 13 | 31 | 14 | 17 | null | null |
forste/haReFork | refactorer/RefacDupTrans.hs | bsd-3-clause | repOcc (Just dec) es t
= do
-- get the expression on the RHS of Abstraction,
-- and abstraction name for the call.
let (name, rhs) = getNameAndRHS dec
newT <- repOcc' name rhs es t
return newT
where
getNameAndRHS (Dec (HsFunBind _ [HsMatch _ name _ (HsBody e) _]))
... | 340 | repOcc (Just dec) es t
= do
-- get the expression on the RHS of Abstraction,
-- and abstraction name for the call.
let (name, rhs) = getNameAndRHS dec
newT <- repOcc' name rhs es t
return newT
where
getNameAndRHS (Dec (HsFunBind _ [HsMatch _ name _ (HsBody e) _]))
... | 340 | repOcc (Just dec) es t
= do
-- get the expression on the RHS of Abstraction,
-- and abstraction name for the call.
let (name, rhs) = getNameAndRHS dec
newT <- repOcc' name rhs es t
return newT
where
getNameAndRHS (Dec (HsFunBind _ [HsMatch _ name _ (HsBody e) _]))
... | 340 | false | false | 1 | 12 | 116 | 120 | 55 | 65 | null | null |
eigengrau/hlint | data/Test.hs | bsd-3-clause | error "Test4" = foldl ==> foldl | 31 | error "Test4" = foldl ==> foldl | 31 | error "Test4" = foldl ==> foldl | 31 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
beni55/HaskellNet | src/Network/HaskellNet/IMAP/Parsers.hs | bsd-3-clause | pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])])
Parser pFetch =
do untagged <- many (pFetchLine <|> pOtherLine)
resp <- Parser pDone
let (mboxUp, fetchRes) = mkMboxUpdate untagged
return (resp, mboxUp, fetchRes) | 292 | pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])])
Parser pFetch =
do untagged <- many (pFetchLine <|> pOtherLine)
resp <- Parser pDone
let (mboxUp, fetchRes) = mkMboxUpdate untagged
return (resp, mboxUp, fetchRes) | 292 | Parser pFetch =
do untagged <- many (pFetchLine <|> pOtherLine)
resp <- Parser pDone
let (mboxUp, fetchRes) = mkMboxUpdate untagged
return (resp, mboxUp, fetchRes) | 188 | false | true | 0 | 12 | 59 | 116 | 59 | 57 | null | null |
phadej/generics-sop | src/Generics/SOP/NP.hs | bsd-3-clause | hcliftA3' p = hcliftA3 (allP p) | 31 | hcliftA3' p = hcliftA3 (allP p) | 31 | hcliftA3' p = hcliftA3 (allP p) | 31 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types.hs | mpl-2.0 | mtMetricValue :: Lens' MetricTransformation Text
mtMetricValue = lens _mtMetricValue (\s a -> s { _mtMetricValue = a }) | 119 | mtMetricValue :: Lens' MetricTransformation Text
mtMetricValue = lens _mtMetricValue (\s a -> s { _mtMetricValue = a }) | 119 | mtMetricValue = lens _mtMetricValue (\s a -> s { _mtMetricValue = a }) | 70 | false | true | 0 | 9 | 17 | 39 | 21 | 18 | null | null |
rahulmutt/ghcvm | libraries/base/Data/Data.hs | bsd-3-clause | wordType :: DataType
wordType = mkIntType "Data.Word.Word" | 58 | wordType :: DataType
wordType = mkIntType "Data.Word.Word" | 58 | wordType = mkIntType "Data.Word.Word" | 37 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
pepijnkokke/Dep2Con | src/Language/Structure/Constituency.hs | bsd-3-clause | -- |Compare two trees, first by their distance to their governor, and
-- second by their index in the sentence (from the left). /O(n+m)/
nearestThenLeftMost :: Int -> Tree -> Tree -> Ordering
nearestThenLeftMost i x y = byDistanceToGovernor <> byIndex
where
byDistanceToGovernor = minDistance i x `compare` minDis... | 465 | nearestThenLeftMost :: Int -> Tree -> Tree -> Ordering
nearestThenLeftMost i x y = byDistanceToGovernor <> byIndex
where
byDistanceToGovernor = minDistance i x `compare` minDistance i y
byIndex = leftMostIndex x `compare` leftMostIndex y
-- |Convert the tree to an instance of `Data.Tree` and d... | 327 | nearestThenLeftMost i x y = byDistanceToGovernor <> byIndex
where
byDistanceToGovernor = minDistance i x `compare` minDistance i y
byIndex = leftMostIndex x `compare` leftMostIndex y
-- |Convert the tree to an instance of `Data.Tree` and draw it. | 272 | true | true | 0 | 7 | 96 | 78 | 41 | 37 | null | null |
armoredsoftware/protocol | tpm/mainline/src/TPM/Const.hs | bsd-3-clause | tpm_ord_setredirection = (0x0000009a :: Word32) | 47 | tpm_ord_setredirection = (0x0000009a :: Word32) | 47 | tpm_ord_setredirection = (0x0000009a :: Word32) | 47 | false | false | 0 | 5 | 4 | 12 | 7 | 5 | null | null |
moonKimura/aeson-0.6.2.1 | Data/Aeson/Generic.hs | bsd-3-clause | toJSON_generic :: (Data a) => a -> Value
toJSON_generic = generic
where
-- Generic encoding of an algebraic data type.
generic a =
case dataTypeRep (dataTypeOf a) of
-- No constructor, so it must be an error value. Code
-- it anyway as Null.
... | 1,638 | toJSON_generic :: (Data a) => a -> Value
toJSON_generic = generic
where
-- Generic encoding of an algebraic data type.
generic a =
case dataTypeRep (dataTypeOf a) of
-- No constructor, so it must be an error value. Code
-- it anyway as Null.
... | 1,638 | toJSON_generic = generic
where
-- Generic encoding of an algebraic data type.
generic a =
case dataTypeRep (dataTypeOf a) of
-- No constructor, so it must be an error value. Code
-- it anyway as Null.
AlgRep [] -> Null
-- El... | 1,597 | false | true | 5 | 12 | 596 | 214 | 125 | 89 | null | null |
codygman/Frames | demo/Plot.hs | bsd-3-clause | mkPlots :: [Record [LBXTR, LBDLDL]] -> EC (Layout Double Double) ()
mkPlots xs = do layout_title .= "Distributions"
layout_x_axis . laxis_title .= "mg/dL"
layout_all_font_styles . font_size *= 2
mkPlot "LDL" ldls
mkPlot "Triglycerides" tris
where ldls = ... | 375 | mkPlots :: [Record [LBXTR, LBDLDL]] -> EC (Layout Double Double) ()
mkPlots xs = do layout_title .= "Distributions"
layout_x_axis . laxis_title .= "mg/dL"
layout_all_font_styles . font_size *= 2
mkPlot "LDL" ldls
mkPlot "Triglycerides" tris
where ldls = ... | 375 | mkPlots xs = do layout_title .= "Distributions"
layout_x_axis . laxis_title .= "mg/dL"
layout_all_font_styles . font_size *= 2
mkPlot "LDL" ldls
mkPlot "Triglycerides" tris
where ldls = map (view lBDLDL) xs
tris = map (view lBXTR) xs | 307 | false | true | 1 | 8 | 120 | 125 | 59 | 66 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Update.hs | mpl-2.0 | -- | OAuth access token.
pzcuAccessToken :: Lens' ProjectsZonesClustersUpdate (Maybe Text)
pzcuAccessToken
= lens _pzcuAccessToken
(\ s a -> s{_pzcuAccessToken = a}) | 173 | pzcuAccessToken :: Lens' ProjectsZonesClustersUpdate (Maybe Text)
pzcuAccessToken
= lens _pzcuAccessToken
(\ s a -> s{_pzcuAccessToken = a}) | 148 | pzcuAccessToken
= lens _pzcuAccessToken
(\ s a -> s{_pzcuAccessToken = a}) | 82 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
apoco/wave-machine | src/WaveMachine/Audio/Voices.hs | unlicense | addHarmonic :: Int -> WaveFunction
addHarmonic n = addHarmonics [n] | 67 | addHarmonic :: Int -> WaveFunction
addHarmonic n = addHarmonics [n] | 67 | addHarmonic n = addHarmonics [n] | 32 | false | true | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
roberth/uu-helium | src/Helium/Utils/Utils.hs | gpl-3.0 | commaList [x] = x | 17 | commaList [x] = x | 17 | commaList [x] = x | 17 | false | false | 0 | 6 | 3 | 12 | 6 | 6 | null | null |
fmapfmapfmap/amazonka | amazonka-ecs/test/Test/AWS/Gen/ECS.hs | mpl-2.0 | testStopTask :: StopTask -> TestTree
testStopTask = req
"StopTask"
"fixture/StopTask.yaml" | 98 | testStopTask :: StopTask -> TestTree
testStopTask = req
"StopTask"
"fixture/StopTask.yaml" | 98 | testStopTask = req
"StopTask"
"fixture/StopTask.yaml" | 61 | false | true | 0 | 7 | 17 | 28 | 11 | 17 | null | null |
ekmett/indexed | src/Indexed/Map.hs | bsd-3-clause | toList :: IMap k v -> [KV k v]
toList x0 = go x0 [] where
go !(Bin _ kx x l r) xs = go l (KV kx x : go r xs)
go !Tip xs = xs
| 129 | toList :: IMap k v -> [KV k v]
toList x0 = go x0 [] where
go !(Bin _ kx x l r) xs = go l (KV kx x : go r xs)
go !Tip xs = xs
| 129 | toList x0 = go x0 [] where
go !(Bin _ kx x l r) xs = go l (KV kx x : go r xs)
go !Tip xs = xs
| 98 | false | true | 0 | 10 | 43 | 98 | 46 | 52 | null | null |
brendanhay/gogol | gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs | mpl-2.0 | -- | Properties of the object. Contains field \'type with type URL.
sisfiAddtional :: Lens' SourceInfoSourceFilesItem (HashMap Text JSONValue)
sisfiAddtional
= lens _sisfiAddtional
(\ s a -> s{_sisfiAddtional = a})
. _Coerce | 238 | sisfiAddtional :: Lens' SourceInfoSourceFilesItem (HashMap Text JSONValue)
sisfiAddtional
= lens _sisfiAddtional
(\ s a -> s{_sisfiAddtional = a})
. _Coerce | 170 | sisfiAddtional
= lens _sisfiAddtional
(\ s a -> s{_sisfiAddtional = a})
. _Coerce | 95 | true | true | 0 | 10 | 45 | 54 | 28 | 26 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Exclusions/List.hs | mpl-2.0 | -- | JSONP
oelCallback :: Lens' OrganizationsExclusionsList (Maybe Text)
oelCallback
= lens _oelCallback (\ s a -> s{_oelCallback = a}) | 137 | oelCallback :: Lens' OrganizationsExclusionsList (Maybe Text)
oelCallback
= lens _oelCallback (\ s a -> s{_oelCallback = a}) | 126 | oelCallback
= lens _oelCallback (\ s a -> s{_oelCallback = a}) | 64 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
berewt/J2S | examples/nim/src/Nim/Types.hs | mit | allEmpty :: (F.Foldable t, Num a, Eq a) => t a -> Bool
allEmpty = F.all (== 0) | 78 | allEmpty :: (F.Foldable t, Num a, Eq a) => t a -> Bool
allEmpty = F.all (== 0) | 78 | allEmpty = F.all (== 0) | 23 | false | true | 0 | 8 | 17 | 57 | 27 | 30 | null | null |
nevrenato/Hets_Fork | Maude/Sign.hs | gpl-2.0 | -- ** Auxiliary construction
-- | Insert a 'Sort' into a 'Sign'ature.
insertSort :: Sort -> Sign -> Sign
insertSort sort sign = let
insert = Set.insert . asSymbol
in sign {sorts = insert sort (sorts sign)} | 214 | insertSort :: Sort -> Sign -> Sign
insertSort sort sign = let
insert = Set.insert . asSymbol
in sign {sorts = insert sort (sorts sign)} | 143 | insertSort sort sign = let
insert = Set.insert . asSymbol
in sign {sorts = insert sort (sorts sign)} | 108 | true | true | 0 | 11 | 45 | 62 | 32 | 30 | null | null |
np/ling | Ling/Session/Core.hs | bsd-3-clause | termS :: SessionOp -> Term -> Session
termS o (TSession s) = sessionOp o s | 74 | termS :: SessionOp -> Term -> Session
termS o (TSession s) = sessionOp o s | 74 | termS o (TSession s) = sessionOp o s | 36 | false | true | 0 | 10 | 14 | 40 | 18 | 22 | null | null |
johnpmayer/elm-compiler | src/Generate/JavaScript.hs | bsd-3-clause | collectLeftAssoc :: Var.Canonical -> Opt.Expr -> Opt.Expr -> [Opt.Expr]
collectLeftAssoc desiredOp left right =
collectLeftAssocHelp desiredOp [right] left | 157 | collectLeftAssoc :: Var.Canonical -> Opt.Expr -> Opt.Expr -> [Opt.Expr]
collectLeftAssoc desiredOp left right =
collectLeftAssocHelp desiredOp [right] left | 157 | collectLeftAssoc desiredOp left right =
collectLeftAssocHelp desiredOp [right] left | 85 | false | true | 0 | 9 | 19 | 51 | 26 | 25 | null | null |
snoyberg/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprInstr (CLRRI fmt reg1 reg2 n) = hcat [
text "\tclrr",
pprFormat fmt,
text "i ",
pprReg reg1,
text ", ",
pprReg reg2,
text ", ",
int n
] | 206 | pprInstr (CLRRI fmt reg1 reg2 n) = hcat [
text "\tclrr",
pprFormat fmt,
text "i ",
pprReg reg1,
text ", ",
pprReg reg2,
text ", ",
int n
] | 206 | pprInstr (CLRRI fmt reg1 reg2 n) = hcat [
text "\tclrr",
pprFormat fmt,
text "i ",
pprReg reg1,
text ", ",
pprReg reg2,
text ", ",
int n
] | 206 | false | false | 0 | 7 | 96 | 73 | 35 | 38 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | termSmallerThan x (App _ f a) = termSmallerThan (x-1) f && termSmallerThan (x-1) a | 82 | termSmallerThan x (App _ f a) = termSmallerThan (x-1) f && termSmallerThan (x-1) a | 82 | termSmallerThan x (App _ f a) = termSmallerThan (x-1) f && termSmallerThan (x-1) a | 82 | false | false | 0 | 8 | 13 | 51 | 24 | 27 | null | null |
foreverbell/project-euler-solutions | src/71.hs | bsd-3-clause | calculate d = n % d where
n = d * 3 `div` 7 | 48 | calculate d = n % d where
n = d * 3 `div` 7 | 48 | calculate d = n % d where
n = d * 3 `div` 7 | 48 | false | false | 0 | 8 | 18 | 30 | 16 | 14 | null | null |
eggzilla/RNAlien | Biobase/cmsearchToBED.hs | gpl-3.0 | orderBedEntry :: BedEntry -> BedEntry -> Ordering
orderBedEntry firstHit secondHit
| start1 > start2 = GT
| start1 < start2 = LT
| otherwise = orderBedEntryEnd firstHit secondHit
where start1 = chromStart firstHit
start2 = chromStart secondHit | 263 | orderBedEntry :: BedEntry -> BedEntry -> Ordering
orderBedEntry firstHit secondHit
| start1 > start2 = GT
| start1 < start2 = LT
| otherwise = orderBedEntryEnd firstHit secondHit
where start1 = chromStart firstHit
start2 = chromStart secondHit | 263 | orderBedEntry firstHit secondHit
| start1 > start2 = GT
| start1 < start2 = LT
| otherwise = orderBedEntryEnd firstHit secondHit
where start1 = chromStart firstHit
start2 = chromStart secondHit | 213 | false | true | 3 | 8 | 56 | 78 | 37 | 41 | null | null |
p-implies-q/dotfiles | dotfiles/.config/taffybar/taffybar.hs | unlicense | myLayoutConfig = defaultLayoutConfig
{ formatLayout = \s -> return $ case s of
"ResizableTall" -> ">>"
"Spacing ResizableTall" -> "> >"
"Full" -> "| |"
s -> s
} | 235 | myLayoutConfig = defaultLayoutConfig
{ formatLayout = \s -> return $ case s of
"ResizableTall" -> ">>"
"Spacing ResizableTall" -> "> >"
"Full" -> "| |"
s -> s
} | 235 | myLayoutConfig = defaultLayoutConfig
{ formatLayout = \s -> return $ case s of
"ResizableTall" -> ">>"
"Spacing ResizableTall" -> "> >"
"Full" -> "| |"
s -> s
} | 235 | false | false | 0 | 11 | 103 | 54 | 28 | 26 | null | null |
keithodulaigh/Hets | CSL/Parse_AS_Basic.hs | gpl-2.0 | truefalseFormula :: OperatorState st => CharParser st EXPRESSION
truefalseFormula =
do
lexemeParser (Lexer.keyWord (tryString $ show OP_true))
return (mkPredefOp OP_true [])
<|>
do
lexemeParser (Lexer.keyWord (tryString $ show OP_false))
return (mkPredefOp OP_false [])
<|> quantF... | 356 | truefalseFormula :: OperatorState st => CharParser st EXPRESSION
truefalseFormula =
do
lexemeParser (Lexer.keyWord (tryString $ show OP_true))
return (mkPredefOp OP_true [])
<|>
do
lexemeParser (Lexer.keyWord (tryString $ show OP_false))
return (mkPredefOp OP_false [])
<|> quantF... | 356 | truefalseFormula =
do
lexemeParser (Lexer.keyWord (tryString $ show OP_true))
return (mkPredefOp OP_true [])
<|>
do
lexemeParser (Lexer.keyWord (tryString $ show OP_false))
return (mkPredefOp OP_false [])
<|> quantFormula OP_ex <|> quantFormula OP_all | 291 | false | true | 6 | 12 | 78 | 127 | 59 | 68 | null | null |
stillinbeta/pleasecaption | src/Web/Twitter/PleaseCaption/Client.hs | mit | sCallCursor :: (MonadBase IO m,
Aeson.FromJSON responseType,
CursorKey ck,
HasCursorParam (APIRequest apiName (WithCursor ck responseType)),
HasClient c, MonadReader c m
)
=> APIRequest apiName (WithCursor ck responseType)
-> m [response... | 440 | sCallCursor :: (MonadBase IO m,
Aeson.FromJSON responseType,
CursorKey ck,
HasCursorParam (APIRequest apiName (WithCursor ck responseType)),
HasClient c, MonadReader c m
)
=> APIRequest apiName (WithCursor ck responseType)
-> m [response... | 440 | sCallCursor req = do
Client twinfo mgr <- asks getClient
sourceWithCursor twinfo mgr req Conduit.$$ CL.consume | 114 | false | true | 0 | 11 | 132 | 136 | 64 | 72 | null | null |
DavidAlphaFox/yesod | yesod-test/test/main.hs | mit | app :: LiteApp
app = liteApp $ do
dispatchTo $ do
mfoo <- lookupGetParam "foo"
case mfoo of
Nothing -> return "Hello world!"
Just foo -> return $ "foo=" <> foo
onStatic "dynamic1" $ withDynamic $ \d -> dispatchTo $ return (d :: Text)
onStatic "dynamic2" $ onStatic "של... | 1,266 | app :: LiteApp
app = liteApp $ do
dispatchTo $ do
mfoo <- lookupGetParam "foo"
case mfoo of
Nothing -> return "Hello world!"
Just foo -> return $ "foo=" <> foo
onStatic "dynamic1" $ withDynamic $ \d -> dispatchTo $ return (d :: Text)
onStatic "dynamic2" $ onStatic "של... | 1,266 | app = liteApp $ do
dispatchTo $ do
mfoo <- lookupGetParam "foo"
case mfoo of
Nothing -> return "Hello world!"
Just foo -> return $ "foo=" <> foo
onStatic "dynamic1" $ withDynamic $ \d -> dispatchTo $ return (d :: Text)
onStatic "dynamic2" $ onStatic "שלום" $ dispatchT... | 1,251 | false | true | 0 | 16 | 423 | 348 | 160 | 188 | null | null |
jesboat/173tourney | server-src/CS173/NormalizeSubmissions.hs | bsd-3-clause | pltWsLine ('\r':'\n':rest) = rest | 33 | pltWsLine ('\r':'\n':rest) = rest | 33 | pltWsLine ('\r':'\n':rest) = rest | 33 | false | false | 0 | 7 | 3 | 16 | 8 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.