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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs | mpl-2.0 | -- | User profile ID associated with this request.
cfvpProFileId :: Lens' CreativeFieldValuesPatch Int64
cfvpProFileId
= lens _cfvpProFileId
(\ s a -> s{_cfvpProFileId = a})
. _Coerce | 197 | cfvpProFileId :: Lens' CreativeFieldValuesPatch Int64
cfvpProFileId
= lens _cfvpProFileId
(\ s a -> s{_cfvpProFileId = a})
. _Coerce | 146 | cfvpProFileId
= lens _cfvpProFileId
(\ s a -> s{_cfvpProFileId = a})
. _Coerce | 92 | true | true | 0 | 10 | 40 | 46 | 24 | 22 | null | null |
teleshoes/taffybar | src/System/Taffybar/Information/EWMHDesktopInfo.hs | bsd-3-clause | ewmhStateHidden = "_NET_WM_STATE_HIDDEN" | 40 | ewmhStateHidden = "_NET_WM_STATE_HIDDEN" | 40 | ewmhStateHidden = "_NET_WM_STATE_HIDDEN" | 40 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
evansb/sacred | sacred/Logic.hs | mit | diff p (SLeaf txt1 _) (SLeaf txt2 _)
| txt1 == txt2 = S.empty
| otherwise = S.singleton (Change p (hash txt1) (hash txt2)) | 133 | diff p (SLeaf txt1 _) (SLeaf txt2 _)
| txt1 == txt2 = S.empty
| otherwise = S.singleton (Change p (hash txt1) (hash txt2)) | 133 | diff p (SLeaf txt1 _) (SLeaf txt2 _)
| txt1 == txt2 = S.empty
| otherwise = S.singleton (Change p (hash txt1) (hash txt2)) | 133 | false | false | 0 | 10 | 34 | 82 | 37 | 45 | null | null |
stevezhee/pec | Language/Pds/Abs.hs | bsd-3-clause | ppCxt x = case x of
Cxt v1 v2 -> ppUident v1 <+> ppVarList v2 | 64 | ppCxt x = case x of
Cxt v1 v2 -> ppUident v1 <+> ppVarList v2 | 64 | ppCxt x = case x of
Cxt v1 v2 -> ppUident v1 <+> ppVarList v2 | 64 | false | false | 1 | 9 | 17 | 37 | 15 | 22 | null | null |
zerokarmaleft/krom | src/Main.hs | bsd-3-clause | registrationMessages :: KromConfig -> [Message]
registrationMessages config =
let configuredPassword = CharBS.pack $ config ^. kromRemotePassword
configuredNickName = CharBS.pack $ config ^. kromNickName
joinChanMessages = map (joinChan . CharBS.pack) $ config ^. kromJoinChannels
in [ password configu... | 455 | registrationMessages :: KromConfig -> [Message]
registrationMessages config =
let configuredPassword = CharBS.pack $ config ^. kromRemotePassword
configuredNickName = CharBS.pack $ config ^. kromNickName
joinChanMessages = map (joinChan . CharBS.pack) $ config ^. kromJoinChannels
in [ password configu... | 455 | registrationMessages config =
let configuredPassword = CharBS.pack $ config ^. kromRemotePassword
configuredNickName = CharBS.pack $ config ^. kromNickName
joinChanMessages = map (joinChan . CharBS.pack) $ config ^. kromJoinChannels
in [ password configuredPassword
, nick configuredNickName
... | 407 | false | true | 0 | 14 | 89 | 110 | 56 | 54 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | ------------------------------------------------------------------------------
sourceRepoFieldDescrs :: [FieldDescr SourceRepo]
sourceRepoFieldDescrs =
[ simpleField "type"
(maybe empty disp) (fmap Just parse)
repoType (\val repo -> repo { repoType = val })
, simpleFie... | 1,123 | sourceRepoFieldDescrs :: [FieldDescr SourceRepo]
sourceRepoFieldDescrs =
[ simpleField "type"
(maybe empty disp) (fmap Just parse)
repoType (\val repo -> repo { repoType = val })
, simpleField "location"
(maybe empty showFreeText) (fmap Just parseFreeText)
... | 1,043 | sourceRepoFieldDescrs =
[ simpleField "type"
(maybe empty disp) (fmap Just parse)
repoType (\val repo -> repo { repoType = val })
, simpleField "location"
(maybe empty showFreeText) (fmap Just parseFreeText)
repoLocation (\val repo -> repo ... | 994 | true | true | 0 | 10 | 362 | 306 | 166 | 140 | null | null |
DanielWaterworth/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | ideslaveProcess fn _ = iPrintError "command not recognized or not supported" | 76 | ideslaveProcess fn _ = iPrintError "command not recognized or not supported" | 76 | ideslaveProcess fn _ = iPrintError "command not recognized or not supported" | 76 | false | false | 0 | 5 | 10 | 14 | 6 | 8 | null | null |
isomorphism/hackage2 | Distribution/Server/Packages/PackageIndex.hs | bsd-3-clause | insertWith :: Package pkg => (pkg -> pkg -> pkg) -> pkg -> PackageIndex pkg -> PackageIndex pkg
insertWith mergeFunc pkg (PackageIndex index) = mkPackageIndex $
Map.insertWith (\_ -> insertMerge) (packageName pkg) [pkg] index
where
pkgid = packageId pkg
insertMerge [] = [pkg]
insertMerge pkgs@(pkg':pk... | 634 | insertWith :: Package pkg => (pkg -> pkg -> pkg) -> pkg -> PackageIndex pkg -> PackageIndex pkg
insertWith mergeFunc pkg (PackageIndex index) = mkPackageIndex $
Map.insertWith (\_ -> insertMerge) (packageName pkg) [pkg] index
where
pkgid = packageId pkg
insertMerge [] = [pkg]
insertMerge pkgs@(pkg':pk... | 634 | insertWith mergeFunc pkg (PackageIndex index) = mkPackageIndex $
Map.insertWith (\_ -> insertMerge) (packageName pkg) [pkg] index
where
pkgid = packageId pkg
insertMerge [] = [pkg]
insertMerge pkgs@(pkg':pkgs') = case compare pkgid (packageId pkg') of
LT -> pkg : pkgs
EQ -> let merged ... | 538 | false | true | 0 | 12 | 190 | 219 | 110 | 109 | null | null |
mstksg/expr-gadt | src/Data/ExprGADT/Eval.hs | bsd-3-clause | -- maybe can do the same trick with Either to get rid of EStar?
evalWithP :: forall vs a. HList vs -> ExprP vs a -> a
evalWithP vs = go
where
go :: forall b. ExprP vs b -> b
go e = case e of
VP ix -> subIndexor vs ix
TP o ts -> tOp o $ map' (go . getComp) ts
... | 8,881 | evalWithP :: forall vs a. HList vs -> ExprP vs a -> a
evalWithP vs = go
where
go :: forall b. ExprP vs b -> b
go e = case e of
VP ix -> subIndexor vs ix
TP o ts -> tOp o $ map' (go . getComp) ts
OP o _ es -> op o $ map' (Identity . go) es
Lamb... | 8,817 | evalWithP vs = go
where
go :: forall b. ExprP vs b -> b
go e = case e of
VP ix -> subIndexor vs ix
TP o ts -> tOp o $ map' (go . getComp) ts
OP o _ es -> op o $ map' (Identity . go) es
LambdaP _ eλ -> \x -> evalWithP (x :<- vs) eλ
-- fromExpr... | 8,763 | true | true | 0 | 11 | 4,544 | 320 | 228 | 92 | null | null |
massysett/penny | penny/lib/Penny/Copper/Grammar.hs | bsd-3-clause | -- Digit from 0 through 9
d0'9 = union "D0'9"
[ zero, one, two, three, four, five, six, seven, eight, nine ] | 110 | d0'9 = union "D0'9"
[ zero, one, two, three, four, five, six, seven, eight, nine ] | 84 | d0'9 = union "D0'9"
[ zero, one, two, three, four, five, six, seven, eight, nine ] | 84 | true | false | 0 | 5 | 23 | 43 | 26 | 17 | null | null |
lally/libmet | src/Ppt/Agent/Command.hs | bsd-3-clause | writeBufferToFile :: (Storable a, Show a, Integral a, FiniteBits a) => Handle -> VM.IOVector a -> Int -> Int -> Int -> IO ()
writeBufferToFile h vec startIndex nelements verb = do
let hexList [] = []
hexList xs = (L.concatMap hex thisWord) ++ (' ':(hexList rest))
where hex n = (L.take (countLeadingZeros... | 1,671 | writeBufferToFile :: (Storable a, Show a, Integral a, FiniteBits a) => Handle -> VM.IOVector a -> Int -> Int -> Int -> IO ()
writeBufferToFile h vec startIndex nelements verb = do
let hexList [] = []
hexList xs = (L.concatMap hex thisWord) ++ (' ':(hexList rest))
where hex n = (L.take (countLeadingZeros... | 1,671 | writeBufferToFile h vec startIndex nelements verb = do
let hexList [] = []
hexList xs = (L.concatMap hex thisWord) ++ (' ':(hexList rest))
where hex n = (L.take (countLeadingZeros n `div` 4) $ L.repeat '0') ++ (showHex n " ")
(thisWord, rest) = L.splitAt 4 xs
readFn :: (Storable a, I... | 1,546 | false | true | 0 | 24 | 623 | 588 | 283 | 305 | null | null |
haskell-pkg-janitors/feed | Text/Feed/Query.hs | bsd-3-clause | getItemPublishDate :: ItemGetter DateText
getItemPublishDate it =
case it of
Feed.AtomItem i -> Just $ Atom.entryUpdated i
Feed.RSSItem i -> RSS.rssItemPubDate i
Feed.RSS1Item i ->
case filter isDate $ RSS1.itemDC i of
(dci:_) -> Just (dcText dci)
_ -> Nothing
-- ToDo: look for... | 505 | getItemPublishDate :: ItemGetter DateText
getItemPublishDate it =
case it of
Feed.AtomItem i -> Just $ Atom.entryUpdated i
Feed.RSSItem i -> RSS.rssItemPubDate i
Feed.RSS1Item i ->
case filter isDate $ RSS1.itemDC i of
(dci:_) -> Just (dcText dci)
_ -> Nothing
-- ToDo: look for... | 505 | getItemPublishDate it =
case it of
Feed.AtomItem i -> Just $ Atom.entryUpdated i
Feed.RSSItem i -> RSS.rssItemPubDate i
Feed.RSS1Item i ->
case filter isDate $ RSS1.itemDC i of
(dci:_) -> Just (dcText dci)
_ -> Nothing
-- ToDo: look for it in Atom \/ RSS1 like-content as well i... | 463 | false | true | 5 | 10 | 124 | 137 | 66 | 71 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | happyReduction_21 _ = notHappyAtAll | 36 | happyReduction_21 _ = notHappyAtAll | 36 | happyReduction_21 _ = notHappyAtAll | 36 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
RakNoel/INF122 | src/Oblig1.hs | gpl-3.0 | varCheck :: Ast -> [String] -> [String]
varCheck ast p = case ast of
(If var t f) -> varCheckEx var ++ varCheckEx t ++ varCheckEx f
(Let s a b) -> varCheckEx a ++ varCheck b (s:p)
(Var s) -> if s `elem` p then [] else [s]
(Sum a b) -> varCheckEx a ++ varCheckEx b
(Mul a b) -> varCheckEx ... | 431 | varCheck :: Ast -> [String] -> [String]
varCheck ast p = case ast of
(If var t f) -> varCheckEx var ++ varCheckEx t ++ varCheckEx f
(Let s a b) -> varCheckEx a ++ varCheck b (s:p)
(Var s) -> if s `elem` p then [] else [s]
(Sum a b) -> varCheckEx a ++ varCheckEx b
(Mul a b) -> varCheckEx ... | 431 | varCheck ast p = case ast of
(If var t f) -> varCheckEx var ++ varCheckEx t ++ varCheckEx f
(Let s a b) -> varCheckEx a ++ varCheck b (s:p)
(Var s) -> if s `elem` p then [] else [s]
(Sum a b) -> varCheckEx a ++ varCheckEx b
(Mul a b) -> varCheckEx a ++ varCheckEx b
(Min a) -> va... | 391 | false | true | 0 | 11 | 137 | 225 | 111 | 114 | null | null |
taktoa/TestGL | test-suite/HPC.hs | mit | match :: String -> [Int]
match = fmap read . concat . catMaybes . fmap (matchRegex pattern) . lines
where
pattern = mkRegex "^ *([0-9]*)% " | 145 | match :: String -> [Int]
match = fmap read . concat . catMaybes . fmap (matchRegex pattern) . lines
where
pattern = mkRegex "^ *([0-9]*)% " | 145 | match = fmap read . concat . catMaybes . fmap (matchRegex pattern) . lines
where
pattern = mkRegex "^ *([0-9]*)% " | 120 | false | true | 2 | 9 | 31 | 55 | 28 | 27 | null | null |
drpowell/XMPP | Network/XMPP/Stanzas.hs | bsd-3-clause | -- |Get cdata from xmlelem.
cdata :: XMLElem -> Text
cdata = maybe "" id . getCdata | 83 | cdata :: XMLElem -> Text
cdata = maybe "" id . getCdata | 55 | cdata = maybe "" id . getCdata | 30 | true | true | 1 | 7 | 16 | 34 | 14 | 20 | null | null |
oldmanmike/ghc | compiler/main/Packages.hs | bsd-3-clause | -- | Find all the link options in these and the preload packages,
-- returning (package hs lib options, extra library options, other flags)
getPackageLinkOpts :: DynFlags -> [UnitId] -> IO ([String], [String], [String])
getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 318 | getPackageLinkOpts :: DynFlags -> [UnitId] -> IO ([String], [String], [String])
getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 178 | getPackageLinkOpts dflags pkgs =
collectLinkOpts dflags `fmap` getPreloadPackagesAnd dflags pkgs | 98 | true | true | 0 | 9 | 45 | 64 | 36 | 28 | null | null |
Athas/banko | barc/Barc/CCodeGen.hs | bsd-2-clause | codeBoolExp :: ExpBool -> T.Text
codeBoolExp e = T.append (codeBoolExp' e) "\n" | 79 | codeBoolExp :: ExpBool -> T.Text
codeBoolExp e = T.append (codeBoolExp' e) "\n" | 79 | codeBoolExp e = T.append (codeBoolExp' e) "\n" | 46 | false | true | 0 | 7 | 11 | 33 | 16 | 17 | null | null |
dfoxfranke/llvm-general-util | LLVM/General/Util/Module.hs | mit | pss :: (MonadBaseControl IO m) => PassSetSpec -> L b m LL.PassSetSpec
pss spec =
do c <- getC
let dl = fromBackendMaybe (lDataLayout c)
let tli = Just $ lLibraryInfo c
let tm = fromBackendMaybe (lTargetMachine c)
case spec of
(PassSetSpec t) ->
return $ LL.PassSetSpec t dl tli tm
... | 433 | pss :: (MonadBaseControl IO m) => PassSetSpec -> L b m LL.PassSetSpec
pss spec =
do c <- getC
let dl = fromBackendMaybe (lDataLayout c)
let tli = Just $ lLibraryInfo c
let tm = fromBackendMaybe (lTargetMachine c)
case spec of
(PassSetSpec t) ->
return $ LL.PassSetSpec t dl tli tm
... | 433 | pss spec =
do c <- getC
let dl = fromBackendMaybe (lDataLayout c)
let tli = Just $ lLibraryInfo c
let tm = fromBackendMaybe (lTargetMachine c)
case spec of
(PassSetSpec t) ->
return $ LL.PassSetSpec t dl tli tm
(CuratedPassSetSpec ol sl uaat slc uiwt) ->
return $ LL... | 363 | false | true | 0 | 12 | 120 | 170 | 80 | 90 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | Additional properties to set if sourceFormat is set to CSV.
edcCSVOptions :: Lens' ExternalDataConfiguration (Maybe CSVOptions)
edcCSVOptions
= lens _edcCSVOptions
(\ s a -> s{_edcCSVOptions = a}) | 209 | edcCSVOptions :: Lens' ExternalDataConfiguration (Maybe CSVOptions)
edcCSVOptions
= lens _edcCSVOptions
(\ s a -> s{_edcCSVOptions = a}) | 144 | edcCSVOptions
= lens _edcCSVOptions
(\ s a -> s{_edcCSVOptions = a}) | 76 | true | true | 0 | 9 | 36 | 48 | 25 | 23 | null | null |
yan-ac/bbq.yan.ac | BBQ/Sitemap.hs | mit | --problemIdParams :: Router () (ProblemId :- ())
problemIdParams :: Router r (ProblemId :- r)
problemIdParams = xmaph (ProblemId) pidToInt int
where pidToInt (ProblemId x) = if and [x >= 1, x <= 9]
then Just x
else Nothing | 290 | problemIdParams :: Router r (ProblemId :- r)
problemIdParams = xmaph (ProblemId) pidToInt int
where pidToInt (ProblemId x) = if and [x >= 1, x <= 9]
then Just x
else Nothing | 241 | problemIdParams = xmaph (ProblemId) pidToInt int
where pidToInt (ProblemId x) = if and [x >= 1, x <= 9]
then Just x
else Nothing | 196 | true | true | 0 | 8 | 105 | 78 | 41 | 37 | null | null |
fmthoma/ghc | compiler/types/Type.hs | bsd-3-clause | cmpTypesX _ _ [] = GT | 38 | cmpTypesX _ _ [] = GT | 38 | cmpTypesX _ _ [] = GT | 38 | false | false | 0 | 6 | 22 | 15 | 7 | 8 | null | null |
ilyasergey/GHC-XAppFix | compiler/main/DynFlags.hs | bsd-3-clause | setVerboseCore2Core :: DynP ()
setVerboseCore2Core = do forceRecompile
setDynFlag Opt_D_verbose_core2core
upd (\dfs -> dfs { shouldDumpSimplPhase = Nothing }) | 208 | setVerboseCore2Core :: DynP ()
setVerboseCore2Core = do forceRecompile
setDynFlag Opt_D_verbose_core2core
upd (\dfs -> dfs { shouldDumpSimplPhase = Nothing }) | 208 | setVerboseCore2Core = do forceRecompile
setDynFlag Opt_D_verbose_core2core
upd (\dfs -> dfs { shouldDumpSimplPhase = Nothing }) | 177 | false | true | 1 | 12 | 68 | 51 | 23 | 28 | null | null |
dblia/nosql-ganeti | src/Ganeti/HTools/Backend/Luxi.hs | gpl-2.0 | -- | Parse an overall query result and get the [(status, value)] list
-- for each element queried.
parseQueryResult :: (Monad m) => JSValue -> m [[(JSValue, JSValue)]]
parseQueryResult (JSArray arr) = mapM parseQueryRow arr | 223 | parseQueryResult :: (Monad m) => JSValue -> m [[(JSValue, JSValue)]]
parseQueryResult (JSArray arr) = mapM parseQueryRow arr | 124 | parseQueryResult (JSArray arr) = mapM parseQueryRow arr | 55 | true | true | 0 | 10 | 34 | 55 | 30 | 25 | null | null |
A1kmm/motocse | motocse.hs | agpl-3.0 | appendListCrossProduct l (xs:x) y = (appendListCrossProduct (mapAndPrepend ((,)xs) y l) x y) | 92 | appendListCrossProduct l (xs:x) y = (appendListCrossProduct (mapAndPrepend ((,)xs) y l) x y) | 92 | appendListCrossProduct l (xs:x) y = (appendListCrossProduct (mapAndPrepend ((,)xs) y l) x y) | 92 | false | false | 0 | 11 | 11 | 49 | 25 | 24 | null | null |
zhiyuanshi/fcore | frontend/SymbolicEvaluator.hs | bsd-2-clause | eval g@(Fix _ _ f _ _) = VFun $ eval . f (eval g) | 49 | eval g@(Fix _ _ f _ _) = VFun $ eval . f (eval g) | 49 | eval g@(Fix _ _ f _ _) = VFun $ eval . f (eval g) | 49 | false | false | 1 | 10 | 14 | 48 | 21 | 27 | null | null |
mydaum/cabal | cabal-testsuite/PackageTests/InternalLibraries/cabal.test.hs | bsd-3-clause | main = cabalTest $ do
cabal "new-build" ["p"] | 49 | main = cabalTest $ do
cabal "new-build" ["p"] | 49 | main = cabalTest $ do
cabal "new-build" ["p"] | 49 | false | false | 1 | 10 | 11 | 25 | 10 | 15 | null | null |
flyrry/tictactoe | test/Test.hs | mit | testBoard = forAll arbitrary $ \board@(Board _ m) ->
forAll arbitrary $ \pos ->
if M.member pos m then True
else takeBack (move board pos) == board | 193 | testBoard = forAll arbitrary $ \board@(Board _ m) ->
forAll arbitrary $ \pos ->
if M.member pos m then True
else takeBack (move board pos) == board | 193 | testBoard = forAll arbitrary $ \board@(Board _ m) ->
forAll arbitrary $ \pos ->
if M.member pos m then True
else takeBack (move board pos) == board | 193 | false | false | 1 | 13 | 72 | 75 | 36 | 39 | null | null |
aquatir/remember_java_api | code-sample-haskell/hello_world/func_magic/dont_turn.hs | mit | turnRight turns
| turns + 1 == 4 = Nothing
| otherwise = Just $ turns + 1 | 87 | turnRight turns
| turns + 1 == 4 = Nothing
| otherwise = Just $ turns + 1 | 87 | turnRight turns
| turns + 1 == 4 = Nothing
| otherwise = Just $ turns + 1 | 87 | false | false | 0 | 9 | 31 | 46 | 20 | 26 | null | null |
yang-wei/elm-lang.org | src/backend/Init/Compiler.hs | bsd-3-clause | toElmSource :: [(N.Name, V.Version, [Module.Name])] -> String
toElmSource deps =
let toImportList (_, _, exposedModules) =
concatMap toImport exposedModules
toImport name =
"import " ++ Module.nameToString name ++ "\n"
in
concatMap toImportList deps ++ "\nfortyTwo = 40 + 2" | 311 | toElmSource :: [(N.Name, V.Version, [Module.Name])] -> String
toElmSource deps =
let toImportList (_, _, exposedModules) =
concatMap toImport exposedModules
toImport name =
"import " ++ Module.nameToString name ++ "\n"
in
concatMap toImportList deps ++ "\nfortyTwo = 40 + 2" | 311 | toElmSource deps =
let toImportList (_, _, exposedModules) =
concatMap toImport exposedModules
toImport name =
"import " ++ Module.nameToString name ++ "\n"
in
concatMap toImportList deps ++ "\nfortyTwo = 40 + 2" | 249 | false | true | 0 | 12 | 75 | 104 | 51 | 53 | null | null |
rhennigan/code | haskell/pcdSimplification/src/paperFunctions.hs | gpl-2.0 | acc' [] (yh:yt) = acc' [yh] yt | 30 | acc' [] (yh:yt) = acc' [yh] yt | 30 | acc' [] (yh:yt) = acc' [yh] yt | 30 | false | false | 0 | 6 | 6 | 31 | 14 | 17 | null | null |
bitemyapp/blacktip | src/Database/Blacktip.hs | apache-2.0 | getUnixMillis :: IO Milliseconds
getUnixMillis = fmap (round . (*1000)) PSX.getPOSIXTime | 88 | getUnixMillis :: IO Milliseconds
getUnixMillis = fmap (round . (*1000)) PSX.getPOSIXTime | 88 | getUnixMillis = fmap (round . (*1000)) PSX.getPOSIXTime | 55 | false | true | 0 | 8 | 10 | 32 | 17 | 15 | null | null |
23Skidoo/heist | src/Heist/Internal/Types.hs | bsd-3-clause | scLoadTimeSplices
:: Functor f
=> (Splices (I.Splice IO) -> f (Splices (I.Splice IO)))
-> SpliceConfig m -> f (SpliceConfig m)
scLoadTimeSplices = lens _scLoadTimeSplices setter
where
setter sc v = sc { _scLoadTimeSplices = v }
------------------------------------------------------------------------... | 415 | scLoadTimeSplices
:: Functor f
=> (Splices (I.Splice IO) -> f (Splices (I.Splice IO)))
-> SpliceConfig m -> f (SpliceConfig m)
scLoadTimeSplices = lens _scLoadTimeSplices setter
where
setter sc v = sc { _scLoadTimeSplices = v }
------------------------------------------------------------------------... | 415 | scLoadTimeSplices = lens _scLoadTimeSplices setter
where
setter sc v = sc { _scLoadTimeSplices = v }
------------------------------------------------------------------------------
-- | Lens for complied splices
-- :: Simple Lens (SpliceConfig m) (Splices (C.Splice m)) | 276 | false | true | 0 | 15 | 71 | 109 | 52 | 57 | null | null |
dnvriend/study-category-theory | haskell/learn_a_haskell/ch3/pattern-matching.hs | apache-2.0 | addTuples :: (Enum a, Num a) => [(a, a)] -> [a]
addTuples xs = [a + b | (a, b) <- xs] | 85 | addTuples :: (Enum a, Num a) => [(a, a)] -> [a]
addTuples xs = [a + b | (a, b) <- xs] | 85 | addTuples xs = [a + b | (a, b) <- xs] | 37 | false | true | 0 | 9 | 21 | 72 | 38 | 34 | null | null |
alonho/bottle | src/Graphics/UI/Bottle/Widgets/Grid.hs | gpl-3.0 | mkNavEventmap :: [[Widget.MEnter f]] -> Cursor -> Widget.EventHandlers f
mkNavEventmap mEnterChildren cursor@(Vector2 cursorX cursorY) =
mconcat . catMaybes $ [
movement "left" GLFW.KeyLeft fromRight leftOfCursor,
movement "right" GLFW.KeyRight fromLeft rightOfCursor,
movement "up" ... | 1,685 | mkNavEventmap :: [[Widget.MEnter f]] -> Cursor -> Widget.EventHandlers f
mkNavEventmap mEnterChildren cursor@(Vector2 cursorX cursorY) =
mconcat . catMaybes $ [
movement "left" GLFW.KeyLeft fromRight leftOfCursor,
movement "right" GLFW.KeyRight fromLeft rightOfCursor,
movement "up" ... | 1,685 | mkNavEventmap mEnterChildren cursor@(Vector2 cursorX cursorY) =
mconcat . catMaybes $ [
movement "left" GLFW.KeyLeft fromRight leftOfCursor,
movement "right" GLFW.KeyRight fromLeft rightOfCursor,
movement "up" GLFW.KeyUp fromBelow aboveCursor,
movement "down" GLFW... | 1,612 | false | true | 20 | 10 | 432 | 503 | 230 | 273 | null | null |
sru-systems/protobuf-simple | src/Parser/GeneratorUtils.hs | mit | isEnum :: FileDesc -> FieldDesc -> GenState -> Bool
isEnum f fd state = Set.member fqTypeName (enumSet state)
where
fqTypeName = getNamespace f ++ "." ++ FieldDesc.getTypeName fd | 184 | isEnum :: FileDesc -> FieldDesc -> GenState -> Bool
isEnum f fd state = Set.member fqTypeName (enumSet state)
where
fqTypeName = getNamespace f ++ "." ++ FieldDesc.getTypeName fd | 184 | isEnum f fd state = Set.member fqTypeName (enumSet state)
where
fqTypeName = getNamespace f ++ "." ++ FieldDesc.getTypeName fd | 132 | false | true | 3 | 9 | 33 | 77 | 33 | 44 | null | null |
tolysz/dsp | DSP/Multirate/Polyphase.hs | gpl-2.0 | poly_interp :: (Num a, Eq a) => Int -- ^ L
-> Array Int a -- ^ h[n]
-> [a] -- ^ x[n]
-> [a] -- ^ y[n]
poly_interp l h x = concat $ transpose y
where g = map (fir . mkpoly h l) [0..(l-1)]
y = map ($ x) g
{-
gZipWith :: Eq a => (a -> a -> a) -> [[a]] -> [a]
gZipWith f ... | 667 | poly_interp :: (Num a, Eq a) => Int -- ^ L
-> Array Int a -- ^ h[n]
-> [a] -- ^ x[n]
-> [a]
poly_interp l h x = concat $ transpose y
where g = map (fir . mkpoly h l) [0..(l-1)]
y = map ($ x) g
{-
gZipWith :: Eq a => (a -> a -> a) -> [[a]] -> [a]
gZipWith f xs | any (=... | 656 | poly_interp l h x = concat $ transpose y
where g = map (fir . mkpoly h l) [0..(l-1)]
y = map ($ x) g
{-
gZipWith :: Eq a => (a -> a -> a) -> [[a]] -> [a]
gZipWith f xs | any (== []) xs = []
| otherwise = foldl1 f (map head xs) : gZipWith f (map tail xs)
poly_decim :: Num a => Int -> Array... | 528 | true | true | 1 | 9 | 228 | 119 | 64 | 55 | null | null |
danstiner/dupes | src/Dupes/Actions.hs | mit | removeMatching'' :: Monad m => forall r. Producer FilePath m r -> Producer DuplicateAction m r
removeMatching'' = undefined | 123 | removeMatching'' :: Monad m => forall r. Producer FilePath m r -> Producer DuplicateAction m r
removeMatching'' = undefined | 123 | removeMatching'' = undefined | 28 | false | true | 0 | 8 | 18 | 41 | 20 | 21 | null | null |
rkoeninger/GameCom | src/lib/Memory.hs | mit | backgroundPatternTableAddr state = if testBit (controlReg state) 4 then 0x1000 else 0x0000 :: Word16 | 100 | backgroundPatternTableAddr state = if testBit (controlReg state) 4 then 0x1000 else 0x0000 :: Word16 | 100 | backgroundPatternTableAddr state = if testBit (controlReg state) 4 then 0x1000 else 0x0000 :: Word16 | 100 | false | false | 0 | 8 | 13 | 31 | 16 | 15 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.8/base/GHC/IO/Handle/FD.hs | bsd-3-clause | stdHandleFinalizer :: FilePath -> MVar Handle__ -> IO ()
stdHandleFinalizer fp m = do
h_ <- takeMVar m
flushWriteBuffer h_
case haType h_ of
ClosedHandle -> return ()
_other -> closeTextCodecs h_
putMVar m (ioe_finalizedHandle fp)
-- We have to put the FDs into binary mode on Windows to avoi... | 378 | stdHandleFinalizer :: FilePath -> MVar Handle__ -> IO ()
stdHandleFinalizer fp m = do
h_ <- takeMVar m
flushWriteBuffer h_
case haType h_ of
ClosedHandle -> return ()
_other -> closeTextCodecs h_
putMVar m (ioe_finalizedHandle fp)
-- We have to put the FDs into binary mode on Windows to avoi... | 378 | stdHandleFinalizer fp m = do
h_ <- takeMVar m
flushWriteBuffer h_
case haType h_ of
ClosedHandle -> return ()
_other -> closeTextCodecs h_
putMVar m (ioe_finalizedHandle fp)
-- We have to put the FDs into binary mode on Windows to avoid the newline
-- translation that the CRT IO library does... | 321 | false | true | 0 | 11 | 87 | 94 | 42 | 52 | null | null |
ezyang/ghc | compiler/typecheck/TcGenGenerics.hs | bsd-3-clause | mkProd_E :: GenericKind_DC -- Generic or Generic1?
-> US -- Base for unique names
-> [(RdrName, Type)]
-- List of variables matched on the lhs and their types
-> LHsExpr GhcPs -- Resulting product expression
mkProd_E _ _ [] = mkM1_E (nlHsVar u1... | 332 | mkProd_E :: GenericKind_DC -- Generic or Generic1?
-> US -- Base for unique names
-> [(RdrName, Type)]
-- List of variables matched on the lhs and their types
-> LHsExpr GhcPs
mkProd_E _ _ [] = mkM1_E (nlHsVar u1DataCon_RDR) | 298 | mkProd_E _ _ [] = mkM1_E (nlHsVar u1DataCon_RDR) | 54 | true | true | 0 | 9 | 118 | 57 | 31 | 26 | null | null |
tibbe/ghc | compiler/cmm/PprC.hs | bsd-3-clause | pprWordArray :: CLabel -> [CmmStatic] -> SDoc
pprWordArray lbl ds
= sdocWithDynFlags $ \dflags ->
hcat [ pprLocalness lbl, ptext (sLit "StgWord")
, space, ppr lbl, ptext (sLit "[] = {") ]
$$ nest 8 (commafy (pprStatics dflags ds))
$$ ptext (sLit "};") | 274 | pprWordArray :: CLabel -> [CmmStatic] -> SDoc
pprWordArray lbl ds
= sdocWithDynFlags $ \dflags ->
hcat [ pprLocalness lbl, ptext (sLit "StgWord")
, space, ppr lbl, ptext (sLit "[] = {") ]
$$ nest 8 (commafy (pprStatics dflags ds))
$$ ptext (sLit "};") | 274 | pprWordArray lbl ds
= sdocWithDynFlags $ \dflags ->
hcat [ pprLocalness lbl, ptext (sLit "StgWord")
, space, ppr lbl, ptext (sLit "[] = {") ]
$$ nest 8 (commafy (pprStatics dflags ds))
$$ ptext (sLit "};") | 228 | false | true | 4 | 11 | 65 | 116 | 57 | 59 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Folders/MoveEntitiesToFolder.hs | mpl-2.0 | -- | Creates a value of 'AccountsContainersWorkspacesFoldersMoveEntitiesToFolder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acwfmetfXgafv'
--
-- * 'acwfmetfUploadProtocol'
--
-- * 'acwfmetfPath'
--
-- * 'acwfmetfTriggerId'
--
--... | 1,183 | accountsContainersWorkspacesFoldersMoveEntitiesToFolder
:: Text -- ^ 'acwfmetfPath'
-> Folder -- ^ 'acwfmetfPayload'
-> AccountsContainersWorkspacesFoldersMoveEntitiesToFolder
accountsContainersWorkspacesFoldersMoveEntitiesToFolder pAcwfmetfPath_ pAcwfmetfPayload_ =
AccountsContainersWorkspacesFoldersMove... | 703 | accountsContainersWorkspacesFoldersMoveEntitiesToFolder pAcwfmetfPath_ pAcwfmetfPayload_ =
AccountsContainersWorkspacesFoldersMoveEntitiesToFolder'
{ _acwfmetfXgafv = Nothing
, _acwfmetfUploadProtocol = Nothing
, _acwfmetfPath = pAcwfmetfPath_
, _acwfmetfTriggerId = Nothing
, _acwfmetfAccessToken ... | 515 | true | true | 0 | 8 | 186 | 120 | 80 | 40 | null | null |
input-output-hk/cardano-sl | core/test/Test/Pos/Core/ExampleHelpers.hs | apache-2.0 | feedEpochSlots :: (SlotCount -> H.Gen a) -> H.Gen a
feedEpochSlots genA = genA =<< pcEpochSlots <$> genProtocolConstants | 120 | feedEpochSlots :: (SlotCount -> H.Gen a) -> H.Gen a
feedEpochSlots genA = genA =<< pcEpochSlots <$> genProtocolConstants | 120 | feedEpochSlots genA = genA =<< pcEpochSlots <$> genProtocolConstants | 68 | false | true | 0 | 9 | 16 | 43 | 21 | 22 | null | null |
bitemyapp/ganeti | src/Ganeti/Query/Query.hs | bsd-2-clause | getSelectedFields :: FieldMap a b -- ^ Defined fields
-> [String] -- ^ Requested fields
-> FieldList a b -- ^ Selected fields
getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 271 | getSelectedFields :: FieldMap a b -- ^ Defined fields
-> [String] -- ^ Requested fields
-> FieldList a b
getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 250 | getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 103 | true | true | 0 | 12 | 79 | 70 | 37 | 33 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | -- Clear the list of variables not to unify, and try to solve them
unify_all :: Elab' aux ()
unify_all = processTactic' UnifyAll | 128 | unify_all :: Elab' aux ()
unify_all = processTactic' UnifyAll | 61 | unify_all = processTactic' UnifyAll | 35 | true | true | 0 | 7 | 22 | 27 | 12 | 15 | null | null |
nau/lasca-compiler | src/lib/Lasca/EmitStatic.hs | bsd-3-clause | getArithOp code tpe = case (code, tpe) of
(10, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Add False False lhs rhs []
(10, TypeFloat) -> Just $ \lhs rhs -> I.FAdd I.noFastMathFlags lhs rhs []
(11, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Sub False False lhs rhs []
(11, TypeFloat) -> Just $ \l... | 700 | getArithOp code tpe = case (code, tpe) of
(10, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Add False False lhs rhs []
(10, TypeFloat) -> Just $ \lhs rhs -> I.FAdd I.noFastMathFlags lhs rhs []
(11, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Sub False False lhs rhs []
(11, TypeFloat) -> Just $ \l... | 700 | getArithOp code tpe = case (code, tpe) of
(10, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Add False False lhs rhs []
(10, TypeFloat) -> Just $ \lhs rhs -> I.FAdd I.noFastMathFlags lhs rhs []
(11, _) | isIntegralType tpe -> Just $ \lhs rhs -> I.Sub False False lhs rhs []
(11, TypeFloat) -> Just $ \l... | 700 | false | false | 18 | 8 | 165 | 364 | 185 | 179 | null | null |
23Skidoo/heist | src/Heist/Splices/Markdown.hs | bsd-3-clause | readProcessWithExitCode'
:: FilePath -- ^ command to run
-> [String] -- ^ any arguments
-> ByteString -- ^ standard input
-> IO (ExitCode,ByteString,ByteString) -- ^ exitcode, stdout, stderr
readProcessWithExitCode' cmd args input = do
(Just inh, Just ou... | 1,285 | readProcessWithExitCode'
:: FilePath -- ^ command to run
-> [String] -- ^ any arguments
-> ByteString -- ^ standard input
-> IO (ExitCode,ByteString,ByteString)
readProcessWithExitCode' cmd args input = do
(Just inh, Just outh, Just errh, pid) <-
... | 1,255 | readProcessWithExitCode' cmd args input = do
(Just inh, Just outh, Just errh, pid) <-
createProcess (proc cmd args){ std_in = CreatePipe,
std_out = CreatePipe,
std_err = CreatePipe }
outMVar <- newEmptyMVar
outM <- newEm... | 1,032 | true | true | 0 | 14 | 454 | 332 | 156 | 176 | null | null |
duncanburke/toliman-core | src/Game/Toliman/Internal/Sodium.hs | mpl-2.0 | pushEvent :: Reactive (PushEvent a)
pushEvent = do
(_naev_event, _naev_push) <- newEvent
return PushEvent {..} | 114 | pushEvent :: Reactive (PushEvent a)
pushEvent = do
(_naev_event, _naev_push) <- newEvent
return PushEvent {..} | 114 | pushEvent = do
(_naev_event, _naev_push) <- newEvent
return PushEvent {..} | 78 | false | true | 0 | 9 | 18 | 50 | 23 | 27 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Writers/Haddock.hs | gpl-2.0 | inlineToHaddock opts SoftBreak =
case writerWrapText opts of
WrapAuto -> return space
WrapNone -> return space
WrapPreserve -> return cr | 167 | inlineToHaddock opts SoftBreak =
case writerWrapText opts of
WrapAuto -> return space
WrapNone -> return space
WrapPreserve -> return cr | 167 | inlineToHaddock opts SoftBreak =
case writerWrapText opts of
WrapAuto -> return space
WrapNone -> return space
WrapPreserve -> return cr | 167 | false | false | 0 | 8 | 50 | 45 | 20 | 25 | null | null |
sdiehl/ghc | compiler/prelude/THNames.hs | bsd-3-clause | listKName = libFun (fsLit "listK") listKIdKey | 58 | listKName = libFun (fsLit "listK") listKIdKey | 58 | listKName = libFun (fsLit "listK") listKIdKey | 58 | false | false | 0 | 7 | 18 | 17 | 8 | 9 | null | null |
rueshyna/gogol | gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs | mpl-2.0 | -- | The comment creator\'s avatar URL.
caiURL :: Lens' CommentAuthorImage (Maybe Text)
caiURL = lens _caiURL (\ s a -> s{_caiURL = a}) | 135 | caiURL :: Lens' CommentAuthorImage (Maybe Text)
caiURL = lens _caiURL (\ s a -> s{_caiURL = a}) | 95 | caiURL = lens _caiURL (\ s a -> s{_caiURL = a}) | 47 | true | true | 1 | 9 | 23 | 52 | 25 | 27 | null | null |
george-steel/maxent-learner | maxent-learner-hw/src/Text/PhonotacticLearner/DFST.hs | gpl-2.0 | -- | Get the total expectations over each length of string up to a maximum
expsByLengthVec :: (Ix sigma) => ExpVecDFST sigma -> Int -> Array Int (Expectation Vec)
expsByLengthVec (ExpVecDFST ns q0 cbound dims tm tpm tvm fpm fvm) maxlen = unsafePerformIO $ do
let nc = rangeSize cbound
dims' = fromIntegral di... | 1,064 | expsByLengthVec :: (Ix sigma) => ExpVecDFST sigma -> Int -> Array Int (Expectation Vec)
expsByLengthVec (ExpVecDFST ns q0 cbound dims tm tpm tvm fpm fvm) maxlen = unsafePerformIO $ do
let nc = rangeSize cbound
dims' = fromIntegral dims
ns' = fromIntegral ns
lpm <- SVM.new (ns'*(maxlen+1))
lv... | 989 | expsByLengthVec (ExpVecDFST ns q0 cbound dims tm tpm tvm fpm fvm) maxlen = unsafePerformIO $ do
let nc = rangeSize cbound
dims' = fromIntegral dims
ns' = fromIntegral ns
lpm <- SVM.new (ns'*(maxlen+1))
lvm <- SVM.new (dims'*ns'*(maxlen+1))
SV.unsafeWith tm $ \ptm -> SV.unsafeWith tpm $ \... | 901 | true | true | 0 | 24 | 244 | 414 | 204 | 210 | null | null |
truls/language-vhdl-quote | src/Language/VHDL/Lexer.hs | mpl-2.0 | number, hexNumber :: Parser String
number = number' digitChar | 61 | number, hexNumber :: Parser String
number = number' digitChar | 61 | number = number' digitChar | 26 | false | true | 2 | 6 | 8 | 25 | 10 | 15 | null | null |
phadej/generics-sop | src/Generics/SOP/TH.hs | bsd-3-clause | conInfo (GadtC _ _ _) = fail "GADTs not supported" | 53 | conInfo (GadtC _ _ _) = fail "GADTs not supported" | 53 | conInfo (GadtC _ _ _) = fail "GADTs not supported" | 53 | false | false | 0 | 7 | 12 | 22 | 10 | 12 | null | null |
shlevy/ghc | compiler/nativeGen/PIC.hs | bsd-3-clause | -- On AIX we use an indirect local TOC anchored by 'gotLabel'.
-- This way we use up only one global TOC entry per compilation-unit
-- (this is quite similiar to GCC's @-mminimal-toc@ compilation mode)
picRelative _ OSAIX lbl
= CmmLabelDiffOff lbl gotLabel 0 | 266 | picRelative _ OSAIX lbl
= CmmLabelDiffOff lbl gotLabel 0 | 64 | picRelative _ OSAIX lbl
= CmmLabelDiffOff lbl gotLabel 0 | 64 | true | false | 0 | 5 | 51 | 23 | 12 | 11 | null | null |
oisdk/trie | Trie.hsproj/Trie.hs | mit | main = do
trie <- fromIn ()
line <- getLine
unless (line == "q") $ do
forM (subs line trie) putStrLn
main | 119 | main = do
trie <- fromIn ()
line <- getLine
unless (line == "q") $ do
forM (subs line trie) putStrLn
main | 119 | main = do
trie <- fromIn ()
line <- getLine
unless (line == "q") $ do
forM (subs line trie) putStrLn
main | 119 | false | false | 0 | 12 | 35 | 61 | 27 | 34 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs | mpl-2.0 | -- | Creates a value of 'ProjectsSinksGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psgXgafv'
--
-- * 'psgUploadProtocol'
--
-- * 'psgPp'
--
-- * 'psgAccessToken'
--
-- * 'psgUploadType'
--
-- * 'psgBearerToken'
--
-- * 'psgSin... | 721 | projectsSinksGet
:: Text -- ^ 'psgSinkName'
-> ProjectsSinksGet
projectsSinksGet pPsgSinkName_ =
ProjectsSinksGet'
{ _psgXgafv = Nothing
, _psgUploadProtocol = Nothing
, _psgPp = True
, _psgAccessToken = Nothing
, _psgUploadType = Nothing
, _psgBearerToken = Nothing
, _psgSinkNam... | 372 | projectsSinksGet pPsgSinkName_ =
ProjectsSinksGet'
{ _psgXgafv = Nothing
, _psgUploadProtocol = Nothing
, _psgPp = True
, _psgAccessToken = Nothing
, _psgUploadType = Nothing
, _psgBearerToken = Nothing
, _psgSinkName = pPsgSinkName_
, _psgCallback = Nothing
} | 300 | true | true | 0 | 7 | 154 | 97 | 64 | 33 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F14.hs | bsd-3-clause | -- glInvalidateNamedFramebufferSubData -----------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man4/html/glInvalidateSubFramebuffer.xhtml OpenGL 4.x>.
glInvalidateNamedFramebufferSubData
:: MonadIO m
=> GLuint -- ^ @framebuffer@.
-> GLsizei -- ^ @numAttachments@.
-> Ptr ... | 689 | glInvalidateNamedFramebufferSubData
:: MonadIO m
=> GLuint -- ^ @framebuffer@.
-> GLsizei -- ^ @numAttachments@.
-> Ptr GLenum -- ^ @attachments@ pointing to elements of type [FramebufferAttachment](Graphics-GL-Groups.html#FramebufferAttachment).
-> GLint -- ^ @x@.
-> GLint -- ^ @y@.
-> GLsizei -- ^ @widt... | 497 | glInvalidateNamedFramebufferSubData v1 v2 v3 v4 v5 v6 v7 = liftIO $ dyn497 ptr_glInvalidateNamedFramebufferSubData v1 v2 v3 v4 v5 v6 v7 | 135 | true | true | 0 | 15 | 98 | 103 | 53 | 50 | null | null |
AlexeyRaga/eta | compiler/ETA/StgSyn/StgSyn.hs | bsd-3-clause | -- | Strip ticks of a given type from an STG expression
stripStgTicksTop :: (Tickish Id -> Bool) -> StgExpr -> ([Tickish Id], StgExpr)
stripStgTicksTop p = go []
where go ts (StgTick t e) | p t = go (t:ts) e
go ts other = (reverse ts, other)
{-
***********************************************... | 1,335 | stripStgTicksTop :: (Tickish Id -> Bool) -> StgExpr -> ([Tickish Id], StgExpr)
stripStgTicksTop p = go []
where go ts (StgTick t e) | p t = go (t:ts) e
go ts other = (reverse ts, other)
{-
************************************************************************
* ... | 1,279 | stripStgTicksTop p = go []
where go ts (StgTick t e) | p t = go (t:ts) e
go ts other = (reverse ts, other)
{-
************************************************************************
* *
\subsection{STG expressions}
* ... | 1,200 | true | true | 0 | 10 | 443 | 111 | 56 | 55 | null | null |
diagrams/diagrams-contrib | src/Diagrams/Color/XKCD.hs | bsd-3-clause | mahogany = fromJust $ readHexColor "#4a0100" | 57 | mahogany = fromJust $ readHexColor "#4a0100" | 57 | mahogany = fromJust $ readHexColor "#4a0100" | 57 | false | false | 0 | 6 | 18 | 13 | 6 | 7 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Constraint/Split.hs | bsd-3-clause | splitfWithVariance f t1 t2 Contravariant = f t2 t1 | 50 | splitfWithVariance f t1 t2 Contravariant = f t2 t1 | 50 | splitfWithVariance f t1 t2 Contravariant = f t2 t1 | 50 | false | false | 0 | 5 | 8 | 20 | 9 | 11 | null | null |
codeq/pyhint | src/PyHint/Scanner.hs | bsd-3-clause | scanFromImport :: C.Context -> FromItemsSpan -> MessageWriter
scanFromImport ctx items = case items of
ImportEverything span -> do
tell [Message "W001" "Wildcard import used; unable to detect undefined names" span]
return $ C.dirty ctx
FromItems items _ -> foldM scanFromItem ctx items | 297 | scanFromImport :: C.Context -> FromItemsSpan -> MessageWriter
scanFromImport ctx items = case items of
ImportEverything span -> do
tell [Message "W001" "Wildcard import used; unable to detect undefined names" span]
return $ C.dirty ctx
FromItems items _ -> foldM scanFromItem ctx items | 297 | scanFromImport ctx items = case items of
ImportEverything span -> do
tell [Message "W001" "Wildcard import used; unable to detect undefined names" span]
return $ C.dirty ctx
FromItems items _ -> foldM scanFromItem ctx items | 235 | false | true | 0 | 12 | 53 | 85 | 39 | 46 | null | null |
danmane/abalone | unsupported/hs/src/abalone.hs | mit | colinear :: Direction -> Direction -> Bool
colinear d1 d2 = d1 == d2 || d1 == opposite d2 | 89 | colinear :: Direction -> Direction -> Bool
colinear d1 d2 = d1 == d2 || d1 == opposite d2 | 89 | colinear d1 d2 = d1 == d2 || d1 == opposite d2 | 46 | false | true | 0 | 7 | 18 | 39 | 19 | 20 | null | null |
Fuuzetsu/aeson-schema | src/Data/Aeson/Schema/Validator.hs | mit | -- | Validates a JSON value against a schema.
validate :: Ord ref
=> Graph Schema ref -- ^ referenced schemas
-> Schema ref
-> Value
-> [ValidationError]
validate graph schema val = case schemaDRef schema of
Just ref -> case M.lookup ref graph of
Nothing -> validationError "ref... | 2,574 | validate :: Ord ref
=> Graph Schema ref -- ^ referenced schemas
-> Schema ref
-> Value
-> [ValidationError]
validate graph schema val = case schemaDRef schema of
Just ref -> case M.lookup ref graph of
Nothing -> validationError "referenced schema is not in map"
Just referen... | 2,528 | validate graph schema val = case schemaDRef schema of
Just ref -> case M.lookup ref graph of
Nothing -> validationError "referenced schema is not in map"
Just referencedSchema -> validate graph referencedSchema val
Nothing -> L.concat
[ case schemaType schema of
[t] -> validateType t
ts ... | 2,384 | true | true | 32 | 13 | 666 | 840 | 417 | 423 | null | null |
tomberek/RETE | src/RETE/Lib1.hs | bsd-3-clause | rewrite' --[
:: ( VAR :<: f
, LAM :<: f
, VAR :<: PF (LHS' f)
, LAM :<: PF (LHS' f)
, VAR :<: PF (RHS f)
, LAM :<: PF (RHS f)
, Traversable f, EqF f,OrdF f
, g ~ (f :&: Set.Set Name)
)
=> (Term g -> Term g -> Term g) -- ^ Application operator
-> Rule ... | 466 | rewrite' --[
:: ( VAR :<: f
, LAM :<: f
, VAR :<: PF (LHS' f)
, LAM :<: PF (LHS' f)
, VAR :<: PF (RHS f)
, LAM :<: PF (RHS f)
, Traversable f, EqF f,OrdF f
, g ~ (f :&: Set.Set Name)
)
=> (Term g -> Term g -> Term g) -- ^ Application operator
-> Rule ... | 466 | rewrite' app (Rule lhs rhs) t = do
subst <- match' lhs t
substitute app subst rhs --] | 93 | false | true | 0 | 11 | 177 | 237 | 114 | 123 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | g2f3 = setFormulae fm3 g2f1 | 27 | g2f3 = setFormulae fm3 g2f1 | 27 | g2f3 = setFormulae fm3 g2f1 | 27 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
pparkkin/Hagl | Hagl/Strategy.hs | bsd-3-clause | --
-- * Selectors
--
-- ** ByPlayer selection
--
-- | Select the element corresponding to the current player.
my :: GameM m g => m (ByPlayer a) -> m a
my = liftM2 forPlayer myPlayerID | 185 | my :: GameM m g => m (ByPlayer a) -> m a
my = liftM2 forPlayer myPlayerID | 73 | my = liftM2 forPlayer myPlayerID | 32 | true | true | 0 | 10 | 38 | 53 | 26 | 27 | null | null |
jfischoff/symbolic-combinatorics | src/Combinatorics/Symbolic/AllowableConstructions.hs | bsd-3-clause | toGenFunc (Sequence x) = one `divide` (one `sub` (toGenFunc x)) | 66 | toGenFunc (Sequence x) = one `divide` (one `sub` (toGenFunc x)) | 66 | toGenFunc (Sequence x) = one `divide` (one `sub` (toGenFunc x)) | 66 | false | false | 0 | 9 | 12 | 36 | 20 | 16 | null | null |
stefaneng/scheme48 | src/Language/Scheme/Parser.hs | mit | octDigits :: Parser String
octDigits = many1 octDigit | 53 | octDigits :: Parser String
octDigits = many1 octDigit | 53 | octDigits = many1 octDigit | 26 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
iand675/GitMega | Command/Update.hs | bsd-3-clause | getBranchTip = git "symbolic-ref" ["HEAD", "--short"] $ \p -> do
b <- exitOK p
if b then out p >>= (return . Just . asSingleLine) else return Nothing | 153 | getBranchTip = git "symbolic-ref" ["HEAD", "--short"] $ \p -> do
b <- exitOK p
if b then out p >>= (return . Just . asSingleLine) else return Nothing | 153 | getBranchTip = git "symbolic-ref" ["HEAD", "--short"] $ \p -> do
b <- exitOK p
if b then out p >>= (return . Just . asSingleLine) else return Nothing | 153 | false | false | 0 | 13 | 31 | 68 | 34 | 34 | null | null |
opentower/carnap | Carnap/src/Carnap/Calculi/NaturalDeduction/Syntax.hs | gpl-3.0 | range i j sp@(SubProof (n,m) ls) = if n == i && j == m then Just sp
else locale i sp >>= range i j | 153 | range i j sp@(SubProof (n,m) ls) = if n == i && j == m then Just sp
else locale i sp >>= range i j | 153 | range i j sp@(SubProof (n,m) ls) = if n == i && j == m then Just sp
else locale i sp >>= range i j | 153 | false | false | 1 | 8 | 80 | 74 | 34 | 40 | null | null |
mscoutermarsh/exercism_coveralls | assignments/haskell/grains/grains_test.hs | agpl-3.0 | grainsTests :: [Test]
grainsTests =
[ testCase "square 1" $
1 @=? square 1
, testCase "square 2" $
2 @=? square 2
, testCase "square 3" $
4 @=? square 3
, testCase "square 4" $
8 @=? square 4
, testCase "square 16" $
32768 @=? square 16
, testCase "square 32" $
2147483648 @=? square ... | 456 | grainsTests :: [Test]
grainsTests =
[ testCase "square 1" $
1 @=? square 1
, testCase "square 2" $
2 @=? square 2
, testCase "square 3" $
4 @=? square 3
, testCase "square 4" $
8 @=? square 4
, testCase "square 16" $
32768 @=? square 16
, testCase "square 32" $
2147483648 @=? square ... | 456 | grainsTests =
[ testCase "square 1" $
1 @=? square 1
, testCase "square 2" $
2 @=? square 2
, testCase "square 3" $
4 @=? square 3
, testCase "square 4" $
8 @=? square 4
, testCase "square 16" $
32768 @=? square 16
, testCase "square 32" $
2147483648 @=? square 32
, testCase "squar... | 434 | false | true | 0 | 8 | 126 | 147 | 71 | 76 | null | null |
GintMist/double-pendulum | test/Spec.hs | bsd-3-clause | mechEnergy :: DoublePendulumSystem -> Float
mechEnergy (DPS (Pendulum m1 l1 t1 o1 _ _) (Pendulum m2 l2 t2 o2 _ _) g _) = - (m1 + m2) * g * l1 * cos t1 - m2 * g * l2 * cos t2
+ (1/2) * m1 * l1 * l1 * o1 * o1
... | 438 | mechEnergy :: DoublePendulumSystem -> Float
mechEnergy (DPS (Pendulum m1 l1 t1 o1 _ _) (Pendulum m2 l2 t2 o2 _ _) g _) = - (m1 + m2) * g * l1 * cos t1 - m2 * g * l2 * cos t2
+ (1/2) * m1 * l1 * l1 * o1 * o1
... | 438 | mechEnergy (DPS (Pendulum m1 l1 t1 o1 _ _) (Pendulum m2 l2 t2 o2 _ _) g _) = - (m1 + m2) * g * l1 * cos t1 - m2 * g * l2 * cos t2
+ (1/2) * m1 * l1 * l1 * o1 * o1
+ (1/2) * m2 * (l1 ... | 394 | false | true | 0 | 23 | 227 | 220 | 111 | 109 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Concepts/Physics.hs | bsd-2-clause | yVel = dccWDS "yVel" (nounPhraseSent $ phrase yComp `sOf` phrase velocity) (S "The" +:+ phrase yComp `sOf` phrase velocity) | 123 | yVel = dccWDS "yVel" (nounPhraseSent $ phrase yComp `sOf` phrase velocity) (S "The" +:+ phrase yComp `sOf` phrase velocity) | 123 | yVel = dccWDS "yVel" (nounPhraseSent $ phrase yComp `sOf` phrase velocity) (S "The" +:+ phrase yComp `sOf` phrase velocity) | 123 | false | false | 1 | 9 | 18 | 59 | 27 | 32 | null | null |
TOSPIO/yi | src/library/Yi/Buffer/Misc.hs | gpl-2.0 | -- | Read the character at the current point
readB :: BufferM Char
readB = pointB >>= readAtB | 93 | readB :: BufferM Char
readB = pointB >>= readAtB | 48 | readB = pointB >>= readAtB | 26 | true | true | 0 | 5 | 17 | 19 | 10 | 9 | null | null |
amccausl/Swish | Swish/HaskellRDF/N3FormatterTest.hs | lgpl-2.1 | x1 = NSGraph
{ namespaces = nslist
, formulae = emptyFormulaMap
, statements = [tx101,tx102,
tx111,tx112,tx113,tx114,
tx121,tx122,tx123,tx124,
tx125,tx126,tx127,tx128]
} | 282 | x1 = NSGraph
{ namespaces = nslist
, formulae = emptyFormulaMap
, statements = [tx101,tx102,
tx111,tx112,tx113,tx114,
tx121,tx122,tx123,tx124,
tx125,tx126,tx127,tx128]
} | 282 | x1 = NSGraph
{ namespaces = nslist
, formulae = emptyFormulaMap
, statements = [tx101,tx102,
tx111,tx112,tx113,tx114,
tx121,tx122,tx123,tx124,
tx125,tx126,tx127,tx128]
} | 282 | false | false | 1 | 7 | 131 | 71 | 44 | 27 | null | null |
rscprof/kalium | src/Kalium/Nucleus/Vector/Match.hs | bsd-3-clause | doubleOp2 :: NameSpecial -> Maybe (Rational -> Rational -> Rational)
doubleOp2 = \case
OpAdd -> return (+)
OpSubtract -> return (-)
OpMultiply -> return (*)
OpDivide -> return (/)
_ -> Nothing | 212 | doubleOp2 :: NameSpecial -> Maybe (Rational -> Rational -> Rational)
doubleOp2 = \case
OpAdd -> return (+)
OpSubtract -> return (-)
OpMultiply -> return (*)
OpDivide -> return (/)
_ -> Nothing | 212 | doubleOp2 = \case
OpAdd -> return (+)
OpSubtract -> return (-)
OpMultiply -> return (*)
OpDivide -> return (/)
_ -> Nothing | 143 | false | true | 6 | 9 | 51 | 84 | 43 | 41 | null | null |
shepheb/hork | Hork/Objects.hs | bsd-3-clause | objPropAddrData :: Word16 -> Word16 -> Hork RA
objPropAddrData num prop = do
a <- objPropAddr num prop -- address of the size byte
case a of
0 -> return 0
_ -> do
(_, _, sizelen) <- propInfo a
return $ a + fromIntegral sizelen
-- Given a property's (first) size byte's address, returns the addre... | 453 | objPropAddrData :: Word16 -> Word16 -> Hork RA
objPropAddrData num prop = do
a <- objPropAddr num prop -- address of the size byte
case a of
0 -> return 0
_ -> do
(_, _, sizelen) <- propInfo a
return $ a + fromIntegral sizelen
-- Given a property's (first) size byte's address, returns the addre... | 453 | objPropAddrData num prop = do
a <- objPropAddr num prop -- address of the size byte
case a of
0 -> return 0
_ -> do
(_, _, sizelen) <- propInfo a
return $ a + fromIntegral sizelen
-- Given a property's (first) size byte's address, returns the address, number, length and sizelength of the next p... | 406 | false | true | 0 | 13 | 102 | 97 | 47 | 50 | null | null |
luzhuomi/xhaskell | Language/XHaskell/Subtype.hs | bsd-3-clause | -- todo: fixme, this is a hack to get GHC.Types.Bool translated to "Bool", otherwise we can't handle GHC.Types.Bool <= Bool
toRE (TH.TupleT 0) = Eps | 148 | toRE (TH.TupleT 0) = Eps | 24 | toRE (TH.TupleT 0) = Eps | 24 | true | false | 0 | 8 | 24 | 18 | 9 | 9 | null | null |
xenog/haskoin | src/Network/Haskoin/Block/Merkle.hs | unlicense | encodeMerkleFlags :: [Bool] -> [Word8]
encodeMerkleFlags bs = map boolsToWord8 $ splitIn 8 bs | 93 | encodeMerkleFlags :: [Bool] -> [Word8]
encodeMerkleFlags bs = map boolsToWord8 $ splitIn 8 bs | 93 | encodeMerkleFlags bs = map boolsToWord8 $ splitIn 8 bs | 54 | false | true | 0 | 6 | 13 | 36 | 18 | 18 | null | null |
donomii/srt-collector | srt2json.hs | gpl-3.0 | cr :: Parser ()
cr = do
char '\r'
return () | 59 | cr :: Parser ()
cr = do
char '\r'
return () | 59 | cr = do
char '\r'
return () | 43 | false | true | 0 | 9 | 26 | 36 | 14 | 22 | null | null |
bredelings/BAli-Phy | haskell/Probability/Distribution/Multinomial.hs | gpl-2.0 | -- Not sure this is the same as conditioning on not having any zeros.
random_composition sum n_groups | sum < n_groups = error "random_composition: sum < n_groups!"
| otherwise = map (1+) <$> random_composition' (sum-n_groups) n_groups | 272 | random_composition sum n_groups | sum < n_groups = error "random_composition: sum < n_groups!"
| otherwise = map (1+) <$> random_composition' (sum-n_groups) n_groups | 202 | random_composition sum n_groups | sum < n_groups = error "random_composition: sum < n_groups!"
| otherwise = map (1+) <$> random_composition' (sum-n_groups) n_groups | 202 | true | false | 0 | 9 | 72 | 57 | 27 | 30 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_2.hs | mit | primPlusInt :: MyInt -> MyInt -> MyInt;
primPlusInt (Pos x) (Neg y) = primMinusNat x y | 90 | primPlusInt :: MyInt -> MyInt -> MyInt
primPlusInt (Pos x) (Neg y) = primMinusNat x y | 89 | primPlusInt (Pos x) (Neg y) = primMinusNat x y | 46 | false | true | 0 | 7 | 19 | 42 | 21 | 21 | null | null |
arekfu/funpart | test/Physics/FunPart/StatTest.hs | bsd-3-clause | prop_rmsCorrect :: [Double] -> Property
prop_rmsCorrect l =
counterexample (show (rms sVar) ++ "; " ++ show naiveRMS ++ "\n" ++ show sVar ++ "\n" ++ show residues) $
if length l > 1
then fromJust (rms sVar) ~== naiveRMS
else isNothing $ rms sVar
where sVar = foldl' tally empty l
xbar = nai... | 480 | prop_rmsCorrect :: [Double] -> Property
prop_rmsCorrect l =
counterexample (show (rms sVar) ++ "; " ++ show naiveRMS ++ "\n" ++ show sVar ++ "\n" ++ show residues) $
if length l > 1
then fromJust (rms sVar) ~== naiveRMS
else isNothing $ rms sVar
where sVar = foldl' tally empty l
xbar = nai... | 480 | prop_rmsCorrect l =
counterexample (show (rms sVar) ++ "; " ++ show naiveRMS ++ "\n" ++ show sVar ++ "\n" ++ show residues) $
if length l > 1
then fromJust (rms sVar) ~== naiveRMS
else isNothing $ rms sVar
where sVar = foldl' tally empty l
xbar = naiveMean l
residues = map (\x ->... | 440 | false | true | 0 | 16 | 137 | 202 | 102 | 100 | null | null |
sethfowler/pygmalion | indexers/Pygmalion/Index/Source.hs | bsd-3-clause | toSourceKind C.Cursor_FloatingLiteral = FloatingLiteral | 74 | toSourceKind C.Cursor_FloatingLiteral = FloatingLiteral | 74 | toSourceKind C.Cursor_FloatingLiteral = FloatingLiteral | 74 | false | false | 0 | 6 | 22 | 11 | 5 | 6 | null | null |
ben-schulz/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | intArith :: IntTy -> [Prim]
intArith ity =
[ iBinOp ity "add" (bitBin ity (+)) (LPlus . ATInt) total
, iBinOp ity "sub" (bitBin ity (-)) (LMinus . ATInt) total
, iBinOp ity "mul" (bitBin ity (*)) (LTimes . ATInt) total
, iBinOp ity "udiv" (bitBin ity div) LUDiv partial
, iBinOp ity "sdiv" (bsdiv ity... | 897 | intArith :: IntTy -> [Prim]
intArith ity =
[ iBinOp ity "add" (bitBin ity (+)) (LPlus . ATInt) total
, iBinOp ity "sub" (bitBin ity (-)) (LMinus . ATInt) total
, iBinOp ity "mul" (bitBin ity (*)) (LTimes . ATInt) total
, iBinOp ity "udiv" (bitBin ity div) LUDiv partial
, iBinOp ity "sdiv" (bsdiv ity... | 897 | intArith ity =
[ iBinOp ity "add" (bitBin ity (+)) (LPlus . ATInt) total
, iBinOp ity "sub" (bitBin ity (-)) (LMinus . ATInt) total
, iBinOp ity "mul" (bitBin ity (*)) (LTimes . ATInt) total
, iBinOp ity "udiv" (bitBin ity div) LUDiv partial
, iBinOp ity "sdiv" (bsdiv ity) (LSDiv . ATInt) partial
... | 869 | false | true | 0 | 13 | 213 | 413 | 216 | 197 | null | null |
jean-edouard/manager | updatemgr/UpdateMgr/UpdateMgrRpc.hs | gpl-2.0 | expose :: Job -> App ()
expose job = liftRpc . rpcExpose (fromString "/") . interfaces . implementation job =<< getAppState | 123 | expose :: Job -> App ()
expose job = liftRpc . rpcExpose (fromString "/") . interfaces . implementation job =<< getAppState | 123 | expose job = liftRpc . rpcExpose (fromString "/") . interfaces . implementation job =<< getAppState | 99 | false | true | 0 | 11 | 20 | 51 | 24 | 27 | null | null |
mdsteele/fallback | src/Fallback/View/Widget.hs | gpl-3.0 | newScrollZone :: (MonadDraw m) => m (View (Int, Int, Int, Int) Int)
newScrollZone = do
let barWidth = 10
scrollBar <- newScrollBar
let handler (_, maxValue, perPage, curValue) (EvScrollDownwards pt) = do
whenWithinCanvas pt $ do
return $ Action $ min (maxValue - perPage) $ curValue + 1
han... | 709 | newScrollZone :: (MonadDraw m) => m (View (Int, Int, Int, Int) Int)
newScrollZone = do
let barWidth = 10
scrollBar <- newScrollBar
let handler (_, maxValue, perPage, curValue) (EvScrollDownwards pt) = do
whenWithinCanvas pt $ do
return $ Action $ min (maxValue - perPage) $ curValue + 1
han... | 709 | newScrollZone = do
let barWidth = 10
scrollBar <- newScrollBar
let handler (_, maxValue, perPage, curValue) (EvScrollDownwards pt) = do
whenWithinCanvas pt $ do
return $ Action $ min (maxValue - perPage) $ curValue + 1
handler (minValue, _, _, curValue) (EvScrollUpwards pt) = do
wh... | 641 | false | true | 0 | 21 | 155 | 285 | 144 | 141 | null | null |
bgamari/pandoc | src/Text/Pandoc/Readers/Markdown.hs | gpl-2.0 | indentSpaces :: MarkdownParser String
indentSpaces = try $ do
tabStop <- getOption readerTabStop
count tabStop (char ' ') <|>
string "\t" <?> "indentation" | 163 | indentSpaces :: MarkdownParser String
indentSpaces = try $ do
tabStop <- getOption readerTabStop
count tabStop (char ' ') <|>
string "\t" <?> "indentation" | 163 | indentSpaces = try $ do
tabStop <- getOption readerTabStop
count tabStop (char ' ') <|>
string "\t" <?> "indentation" | 125 | false | true | 0 | 12 | 30 | 53 | 24 | 29 | null | null |
vikraman/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | lvectInstDecl _ = False | 45 | lvectInstDecl _ = False | 45 | lvectInstDecl _ = False | 45 | false | false | 0 | 5 | 25 | 9 | 4 | 5 | null | null |
Gurrt/software-testing | week-1/CSI.hs | mit | -- Matthew: Carl didn’t do it, and neither did I.
-- says Matthew Matthew = False
says Matthew Carl = False | 107 | says Matthew Carl = False | 25 | says Matthew Carl = False | 25 | true | false | 1 | 5 | 20 | 18 | 7 | 11 | null | null |
tchagnon/cs636-raytracer | a6/Scene.hs | apache-2.0 | prepScene :: Int -> Scene -> Scene
prepScene faceThreshold scene =
let objs2 = prepObjs id4f (objects scene) in
let objs3 = constructBVH faceThreshold objs2 in
scene{objects = objs3} | 194 | prepScene :: Int -> Scene -> Scene
prepScene faceThreshold scene =
let objs2 = prepObjs id4f (objects scene) in
let objs3 = constructBVH faceThreshold objs2 in
scene{objects = objs3} | 194 | prepScene faceThreshold scene =
let objs2 = prepObjs id4f (objects scene) in
let objs3 = constructBVH faceThreshold objs2 in
scene{objects = objs3} | 159 | false | true | 0 | 11 | 40 | 70 | 34 | 36 | null | null |
dmjio/miso | src/Miso/Svg/Attribute.hs | bsd-3-clause | -- | <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/k1>
k1_ :: MisoString -> Attribute action
k1_ = attr "k1" | 123 | k1_ :: MisoString -> Attribute action
k1_ = attr "k1" | 54 | k1_ = attr "k1" | 15 | true | true | 0 | 7 | 13 | 27 | 12 | 15 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Logging/Types/Product.hs | mpl-2.0 | -- | Optional. A concise name for the monitored resource type that might be
-- displayed in user interfaces. It should be a Title Cased Noun Phrase,
-- without any article or other determiners. For example, \"Google Cloud
-- SQL Database\".
mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdDisplayName... | 385 | mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
mrdDisplayName
= lens _mrdDisplayName
(\ s a -> s{_mrdDisplayName = a}) | 144 | mrdDisplayName
= lens _mrdDisplayName
(\ s a -> s{_mrdDisplayName = a}) | 79 | true | true | 0 | 9 | 65 | 51 | 28 | 23 | null | null |
forestbelton/orb | src/Layout/Box.hs | bsd-3-clause | makeBoxModel :: StyledNode -> [BoxNode]
makeBoxModel node = maybeToList . fmap go . displayToBox . fromDisplayVal $ S.lookup sty Display
where sty = node ^. style
go bt = BoxNode (node ^. nodeType) sty Named bt cs
cs = concatMap makeBoxModel (node ^. children)
-- hack for now, we really need to... | 354 | makeBoxModel :: StyledNode -> [BoxNode]
makeBoxModel node = maybeToList . fmap go . displayToBox . fromDisplayVal $ S.lookup sty Display
where sty = node ^. style
go bt = BoxNode (node ^. nodeType) sty Named bt cs
cs = concatMap makeBoxModel (node ^. children)
-- hack for now, we really need to... | 354 | makeBoxModel node = maybeToList . fmap go . displayToBox . fromDisplayVal $ S.lookup sty Display
where sty = node ^. style
go bt = BoxNode (node ^. nodeType) sty Named bt cs
cs = concatMap makeBoxModel (node ^. children)
-- hack for now, we really need to make NodeType optional on BoxNode | 314 | false | true | 3 | 9 | 81 | 117 | 53 | 64 | null | null |
chrisdone/ghc-server | src/GHC/Server/Model/Ghc.hs | bsd-3-clause | -- | Initialize the GHC service.
initializeGhc :: (MonadLogger m,GhcMonad m)
=> m ()
initializeGhc =
do (libincs,exts,pkgs) <- liftIO getDependencyInfo
initialDynFlags <- getSessionDynFlags
userFlags <- fmap (<> concat [exts,initFlags,deps pkgs,src libincs]) makeUserFlags
(dflags',_,... | 1,865 | initializeGhc :: (MonadLogger m,GhcMonad m)
=> m ()
initializeGhc =
do (libincs,exts,pkgs) <- liftIO getDependencyInfo
initialDynFlags <- getSessionDynFlags
userFlags <- fmap (<> concat [exts,initFlags,deps pkgs,src libincs]) makeUserFlags
(dflags',_,_) <- parseDynamicFlags
... | 1,832 | initializeGhc =
do (libincs,exts,pkgs) <- liftIO getDependencyInfo
initialDynFlags <- getSessionDynFlags
userFlags <- fmap (<> concat [exts,initFlags,deps pkgs,src libincs]) makeUserFlags
(dflags',_,_) <- parseDynamicFlags
(initialDynFlags {hscTarget = HscAsm
... | 1,761 | true | true | 8 | 16 | 603 | 443 | 223 | 220 | null | null |
AlexeyRaga/eta | compiler/ETA/TypeCheck/TcGenDeriv.hs | bsd-3-clause | isSym :: String -> Bool
isSym "" = False | 45 | isSym :: String -> Bool
isSym "" = False | 45 | isSym "" = False | 21 | false | true | 0 | 5 | 13 | 22 | 10 | 12 | null | null |
alexander-at-github/eta | shake/Build.hs | bsd-3-clause | getInstallDir :: Action FilePath
getInstallDir = fmap (</> "bin") $ liftIO $ getAppUserDataDirectory "local" | 108 | getInstallDir :: Action FilePath
getInstallDir = fmap (</> "bin") $ liftIO $ getAppUserDataDirectory "local" | 108 | getInstallDir = fmap (</> "bin") $ liftIO $ getAppUserDataDirectory "local" | 75 | false | true | 1 | 8 | 13 | 35 | 16 | 19 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | dcQual = mk_known_key_name dataName | 37 | dcQual = mk_known_key_name dataName | 37 | dcQual = mk_known_key_name dataName | 37 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.