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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tdeekens/tda452-code | Exercises/exercise-4.hs | mit | listOf' n g = do
i <- arbitrary
return (i : listOf' (n - 1) g) | 92 | listOf' n g = do
i <- arbitrary
return (i : listOf' (n - 1) g) | 92 | listOf' n g = do
i <- arbitrary
return (i : listOf' (n - 1) g) | 92 | false | false | 1 | 13 | 45 | 48 | 20 | 28 | null | null |
shlevy/ghc | compiler/prelude/THNames.hs | bsd-3-clause | -- data Exp = ...
varEName, conEName, litEName, appEName, appTypeEName, infixEName, infixAppName,
sectionLName, sectionRName, lamEName, lamCaseEName, tupEName,
unboxedTupEName, unboxedSumEName, condEName, multiIfEName, letEName,
caseEName, doEName, compEName, staticEName, unboundVarEName,
labelEName :: ... | 381 | varEName, conEName, litEName, appEName, appTypeEName, infixEName, infixAppName,
sectionLName, sectionRName, lamEName, lamCaseEName, tupEName,
unboxedTupEName, unboxedSumEName, condEName, multiIfEName, letEName,
caseEName, doEName, compEName, staticEName, unboundVarEName,
labelEName :: Name
varEName ... | 363 | varEName = libFun (fsLit "varE") varEIdKey | 56 | true | true | 0 | 7 | 65 | 67 | 56 | 11 | null | null |
TomMD/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeNatExpTyFamNameKey = mkPreludeTyConUnique 164 | 52 | typeNatExpTyFamNameKey = mkPreludeTyConUnique 164 | 52 | typeNatExpTyFamNameKey = mkPreludeTyConUnique 164 | 52 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
k0001/gtk2hs | docs/tutorial/Tutorial_Port/Example_Code/GtkChap3-1.hs | gpl-3.0 | main :: IO ()
main = do
initGUI
window <- windowNew
hbox <- hBoxNew True 10
button1 <- buttonNewWithLabel "Button 1"
button2 <- buttonNewWithLabel "Button 2"
set window [windowDefaultWidth := 200, windowDefaultHeight := 200,
containerBorderWidth := 10, containerChild := hbox,
... | 495 | main :: IO ()
main = do
initGUI
window <- windowNew
hbox <- hBoxNew True 10
button1 <- buttonNewWithLabel "Button 1"
button2 <- buttonNewWithLabel "Button 2"
set window [windowDefaultWidth := 200, windowDefaultHeight := 200,
containerBorderWidth := 10, containerChild := hbox,
... | 495 | main = do
initGUI
window <- windowNew
hbox <- hBoxNew True 10
button1 <- buttonNewWithLabel "Button 1"
button2 <- buttonNewWithLabel "Button 2"
set window [windowDefaultWidth := 200, windowDefaultHeight := 200,
containerBorderWidth := 10, containerChild := hbox,
windowTit... | 481 | false | true | 0 | 9 | 122 | 142 | 64 | 78 | null | null |
meiersi/bytestring | Data/ByteString/Lazy.hs | bsd-3-clause | tails cs@(Chunk c cs')
| S.length c == 1 = cs : tails cs'
| otherwise = cs : tails (Chunk (S.unsafeTail c) cs') | 121 | tails cs@(Chunk c cs')
| S.length c == 1 = cs : tails cs'
| otherwise = cs : tails (Chunk (S.unsafeTail c) cs') | 121 | tails cs@(Chunk c cs')
| S.length c == 1 = cs : tails cs'
| otherwise = cs : tails (Chunk (S.unsafeTail c) cs') | 121 | false | false | 4 | 10 | 33 | 84 | 36 | 48 | null | null |
raymoo/pins-ps | Pins/Handle.hs | gpl-3.0 | makeAction m = handleAny m | 46 | makeAction m = handleAny m | 46 | makeAction m = handleAny m | 46 | false | false | 0 | 5 | 24 | 12 | 5 | 7 | null | null |
dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/DescribeMetricFilters.hs | mpl-2.0 | -- | 'DescribeMetricFiltersResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'dmfrMetricFilters' @::@ ['MetricFilter']
--
-- * 'dmfrNextToken' @::@ 'Maybe' 'Text'
--
describeMetricFiltersResponse :: DescribeMetricFiltersResponse
describeMetricFiltersResponse = DescribeMetricFi... | 408 | describeMetricFiltersResponse :: DescribeMetricFiltersResponse
describeMetricFiltersResponse = DescribeMetricFiltersResponse
{ _dmfrMetricFilters = mempty
, _dmfrNextToken = Nothing
} | 199 | describeMetricFiltersResponse = DescribeMetricFiltersResponse
{ _dmfrMetricFilters = mempty
, _dmfrNextToken = Nothing
} | 136 | true | true | 0 | 7 | 57 | 43 | 25 | 18 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/tests/UnitTests/Distribution/Utils/NubList.hs | bsd-3-clause | tests :: [Test]
tests =
[ testCase "Numlist retains ordering" testOrdering
, testCase "Numlist removes duplicates" testDeDupe
, testProperty "Monoid Numlist Identity" prop_Identity
, testProperty "Monoid Numlist Associativity" prop_Associativity
] | 267 | tests :: [Test]
tests =
[ testCase "Numlist retains ordering" testOrdering
, testCase "Numlist removes duplicates" testDeDupe
, testProperty "Monoid Numlist Identity" prop_Identity
, testProperty "Monoid Numlist Associativity" prop_Associativity
] | 267 | tests =
[ testCase "Numlist retains ordering" testOrdering
, testCase "Numlist removes duplicates" testDeDupe
, testProperty "Monoid Numlist Identity" prop_Identity
, testProperty "Monoid Numlist Associativity" prop_Associativity
] | 251 | false | true | 0 | 7 | 49 | 53 | 25 | 28 | null | null |
fcostantini/QuickFuzz | src/Zip.hs | gpl-3.0 | -- $(devArbitrary ''Archive)
-- $(devMutationRec ''MArchive)
-- $(devMutation ''Entry Nothing)
-- $(devMutation ''L.ByteString Nothing)
-- $(devMutation ''Data.ByteString.Internal.ByteString Nothing)
-- $(devMutationRec ''MArchive)
mencode :: Archive -> ByteString
mencode = encode | 282 | mencode :: Archive -> ByteString
mencode = encode | 49 | mencode = encode | 16 | true | true | 0 | 7 | 29 | 28 | 15 | 13 | null | null |
castaway/pandoc | src/Tests/Writers/ConTeXt.hs | gpl-2.0 | context :: (ToString a, ToPandoc a) => a -> String
context = writeConTeXt defaultWriterOptions . toPandoc | 105 | context :: (ToString a, ToPandoc a) => a -> String
context = writeConTeXt defaultWriterOptions . toPandoc | 105 | context = writeConTeXt defaultWriterOptions . toPandoc | 54 | false | true | 0 | 6 | 15 | 37 | 19 | 18 | null | null |
jbracker/supermonad-plugin | examples/monad/session/MainSupermonad.hs | bsd-3-clause | pong :: Session (Cap (Pong, ()) Pong) () ()
pong = offer close $ do
rsp <- recv
io $ putStrLn rsp
send "Pong"
zero; pong | 136 | pong :: Session (Cap (Pong, ()) Pong) () ()
pong = offer close $ do
rsp <- recv
io $ putStrLn rsp
send "Pong"
zero; pong | 136 | pong = offer close $ do
rsp <- recv
io $ putStrLn rsp
send "Pong"
zero; pong | 92 | false | true | 0 | 9 | 41 | 75 | 35 | 40 | null | null |
ramirez7/configurator-applicative | src/Data/Configurator/Applicative/Parser.hs | bsd-3-clause | -- fail. Need to add context arg to 'parse' probably?
parse (LookupP lk) cfg = liftIO (doLookup lk cfg) `orThrowErrorM` () | 122 | parse (LookupP lk) cfg = liftIO (doLookup lk cfg) `orThrowErrorM` () | 68 | parse (LookupP lk) cfg = liftIO (doLookup lk cfg) `orThrowErrorM` () | 68 | true | false | 1 | 7 | 20 | 42 | 19 | 23 | null | null |
noteed/opengl-api | opengl-api.hs | bsd-3-clause | versionString :: String
versionString =
"opengl-api " ++ showVersion version ++"\n\
\Copyright (c) 2010-2011 Vo Minh Thu.\n\
\This is open source software. See the LICENSE file for conditions." | 195 | versionString :: String
versionString =
"opengl-api " ++ showVersion version ++"\n\
\Copyright (c) 2010-2011 Vo Minh Thu.\n\
\This is open source software. See the LICENSE file for conditions." | 195 | versionString =
"opengl-api " ++ showVersion version ++"\n\
\Copyright (c) 2010-2011 Vo Minh Thu.\n\
\This is open source software. See the LICENSE file for conditions." | 171 | false | true | 0 | 7 | 29 | 22 | 11 | 11 | null | null |
xenog/haskoin | src/Network/Haskoin/Script/Evaluator.hs | unlicense | popCond :: Program Bool
popCond = get >>= \case
[] -> lift $ programError "popCond: empty condStack"
(x:xs) -> put xs >> return x | 141 | popCond :: Program Bool
popCond = get >>= \case
[] -> lift $ programError "popCond: empty condStack"
(x:xs) -> put xs >> return x | 141 | popCond = get >>= \case
[] -> lift $ programError "popCond: empty condStack"
(x:xs) -> put xs >> return x | 117 | false | true | 2 | 10 | 35 | 66 | 30 | 36 | null | null |
vikraman/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | mkParentType :: TyCon -> Type
-- Turn the representation tycon of a family into
-- a use of its family constructor
mkParentType tc
= case tyConFamInst_maybe tc of
Nothing -> mkTyConApp tc (mkTyVarTys (tyConTyVars tc))
Just (fam_tc,tys) -> mkTyConApp fam_tc tys
{-
**************************************... | 626 | mkParentType :: TyCon -> Type
mkParentType tc
= case tyConFamInst_maybe tc of
Nothing -> mkTyConApp tc (mkTyVarTys (tyConTyVars tc))
Just (fam_tc,tys) -> mkTyConApp fam_tc tys
{-
************************************************************************
* ... | 541 | mkParentType tc
= case tyConFamInst_maybe tc of
Nothing -> mkTyConApp tc (mkTyVarTys (tyConTyVars tc))
Just (fam_tc,tys) -> mkTyConApp fam_tc tys
{-
************************************************************************
* *
\subsec... | 511 | true | true | 0 | 12 | 209 | 76 | 37 | 39 | null | null |
beni55/fay | src/Fay/Compiler/Exp.hs | bsd-3-clause | -- | Helper for compileApp.
compileApp' :: S.Exp -> S.Exp -> Compile JsExp
compileApp' exp1 exp2 = do
flattenApps <- config configFlattenApps
jsexp1 <- compileExp exp1
(if flattenApps then method2 else method1) jsexp1 exp2
where
-- Method 1:
-- In this approach code ends up looking like this:
-- a... | 10,241 | compileApp' :: S.Exp -> S.Exp -> Compile JsExp
compileApp' exp1 exp2 = do
flattenApps <- config configFlattenApps
jsexp1 <- compileExp exp1
(if flattenApps then method2 else method1) jsexp1 exp2
where
-- Method 1:
-- In this approach code ends up looking like this:
-- a(a(a(a(a(a(a(a(a(a(L)(c))(b)... | 10,213 | compileApp' exp1 exp2 = do
flattenApps <- config configFlattenApps
jsexp1 <- compileExp exp1
(if flattenApps then method2 else method1) jsexp1 exp2
where
-- Method 1:
-- In this approach code ends up looking like this:
-- a(a(a(a(a(a(a(a(a(a(L)(c))(b))(0))(0))(y))(t))(a(a(F)(3*a(a(d)+a(a(f)/20))))... | 10,166 | true | true | 83 | 22 | 2,508 | 3,277 | 1,630 | 1,647 | null | null |
saffroy/buddhabrot | BBrotRender.hs | bsd-3-clause | ymax = imagPart hiCorner | 24 | ymax = imagPart hiCorner | 24 | ymax = imagPart hiCorner | 24 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
lenary/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | expandNS syn n = case syn_namespace syn of
[] -> n
xs -> sNS n xs
-- For inferring types of things | 148 | expandNS syn n = case syn_namespace syn of
[] -> n
xs -> sNS n xs
-- For inferring types of things | 148 | expandNS syn n = case syn_namespace syn of
[] -> n
xs -> sNS n xs
-- For inferring types of things | 148 | false | false | 1 | 8 | 71 | 42 | 18 | 24 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudfront/test/Test/AWS/Gen/CloudFront.hs | mpl-2.0 | -- Responses
testDeleteStreamingDistributionResponse :: DeleteStreamingDistributionResponse -> TestTree
testDeleteStreamingDistributionResponse = res
"DeleteStreamingDistributionResponse"
"fixture/DeleteStreamingDistributionResponse.proto"
cloudFront
(Proxy :: Proxy DeleteStreamingDistribution) | 312 | testDeleteStreamingDistributionResponse :: DeleteStreamingDistributionResponse -> TestTree
testDeleteStreamingDistributionResponse = res
"DeleteStreamingDistributionResponse"
"fixture/DeleteStreamingDistributionResponse.proto"
cloudFront
(Proxy :: Proxy DeleteStreamingDistribution) | 298 | testDeleteStreamingDistributionResponse = res
"DeleteStreamingDistributionResponse"
"fixture/DeleteStreamingDistributionResponse.proto"
cloudFront
(Proxy :: Proxy DeleteStreamingDistribution) | 207 | true | true | 0 | 6 | 33 | 37 | 18 | 19 | null | null |
brendanhay/gogol | gogol-serviceusage/gen/Network/Google/ServiceUsage/Types/Product.hs | mpl-2.0 | -- | The URL to the root of documentation.
dDocumentationRootURL :: Lens' Documentation (Maybe Text)
dDocumentationRootURL
= lens _dDocumentationRootURL
(\ s a -> s{_dDocumentationRootURL = a}) | 201 | dDocumentationRootURL :: Lens' Documentation (Maybe Text)
dDocumentationRootURL
= lens _dDocumentationRootURL
(\ s a -> s{_dDocumentationRootURL = a}) | 158 | dDocumentationRootURL
= lens _dDocumentationRootURL
(\ s a -> s{_dDocumentationRootURL = a}) | 100 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
kim/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetOnPremisesInstance.hs | mpl-2.0 | -- | The name of the on-premises instance to get information about
gopiInstanceName :: Lens' GetOnPremisesInstance Text
gopiInstanceName = lens _gopiInstanceName (\s a -> s { _gopiInstanceName = a }) | 199 | gopiInstanceName :: Lens' GetOnPremisesInstance Text
gopiInstanceName = lens _gopiInstanceName (\s a -> s { _gopiInstanceName = a }) | 132 | gopiInstanceName = lens _gopiInstanceName (\s a -> s { _gopiInstanceName = a }) | 79 | true | true | 0 | 9 | 29 | 40 | 22 | 18 | null | null |
CRogers/stack | test/integration/lib/StackTest.hs | bsd-3-clause | stackErr :: [String] -> IO ()
stackErr args = do
ec <- stack' args
if ec == ExitSuccess
then error "stack was supposed to fail, but didn't"
else return () | 178 | stackErr :: [String] -> IO ()
stackErr args = do
ec <- stack' args
if ec == ExitSuccess
then error "stack was supposed to fail, but didn't"
else return () | 178 | stackErr args = do
ec <- stack' args
if ec == ExitSuccess
then error "stack was supposed to fail, but didn't"
else return () | 148 | false | true | 0 | 9 | 53 | 59 | 28 | 31 | null | null |
stu-smith/Brandy | src/DataAccess/Users.hs | mit | dbInsertUser :: PrivateUser -> DatabaseEnvironmentT (Maybe (WithId PrivateUser))
dbInsertUser =
standardInsert privateUserMapping | 133 | dbInsertUser :: PrivateUser -> DatabaseEnvironmentT (Maybe (WithId PrivateUser))
dbInsertUser =
standardInsert privateUserMapping | 133 | dbInsertUser =
standardInsert privateUserMapping | 52 | false | true | 0 | 10 | 15 | 33 | 16 | 17 | null | null |
christiaanb/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | mkIntIty "ITNative" = FArith (ATInt ITNative) | 45 | mkIntIty "ITNative" = FArith (ATInt ITNative) | 45 | mkIntIty "ITNative" = FArith (ATInt ITNative) | 45 | false | false | 1 | 7 | 5 | 21 | 8 | 13 | null | null |
fffej/codekatas | 99Problems/31-41/Problems.hs | mit | isPrime :: Integer -> Bool
isPrime n = null [ x | x <- [2.. n-1], n `mod` x == 0] | 81 | isPrime :: Integer -> Bool
isPrime n = null [ x | x <- [2.. n-1], n `mod` x == 0] | 81 | isPrime n = null [ x | x <- [2.. n-1], n `mod` x == 0] | 54 | false | true | 0 | 10 | 20 | 60 | 30 | 30 | null | null |
antalsz/hs-to-coq | examples/graph/graph/Data/Graph/Inductive/Query/ArtPoint.hs | mit | dfsTree n u (v:vs) ls g = case match v g of
(Nothing, g1) -> dfsTree n u vs ls g1
(Just c , g1) -> (B (v,n+1,bck) ts:ts', g3, k)
where bck = getBackEdges v ls
(ts, g2,m) = dfsTree (n+1) v sc ... | 829 | dfsTree n u (v:vs) ls g = case match v g of
(Nothing, g1) -> dfsTree n u vs ls g1
(Just c , g1) -> (B (v,n+1,bck) ts:ts', g3, k)
where bck = getBackEdges v ls
(ts, g2,m) = dfsTree (n+1) v sc ... | 829 | dfsTree n u (v:vs) ls g = case match v g of
(Nothing, g1) -> dfsTree n u vs ls g1
(Just c , g1) -> (B (v,n+1,bck) ts:ts', g3, k)
where bck = getBackEdges v ls
(ts, g2,m) = dfsTree (n+1) v sc ... | 829 | false | false | 0 | 14 | 380 | 235 | 129 | 106 | null | null |
jyp/lp-diagrams | Graphics/Diagrams/Path.hs | agpl-3.0 | -- | Circle approximated with 4 cubic bezier curves
circlePath :: Point -> Expr -> Path
circlePath center r =
Path (pt r zero)
[CurveTo (pt r k) (pt k r) (pt zero r),
CurveTo (pt (negate k) r) (pt (negate r) k) (pt (negate r) zero),
CurveTo (pt (negate r) (negate k)) (pt (negate k) (negate r)) (pt zero (negat... | 557 | circlePath :: Point -> Expr -> Path
circlePath center r =
Path (pt r zero)
[CurveTo (pt r k) (pt k r) (pt zero r),
CurveTo (pt (negate k) r) (pt (negate r) k) (pt (negate r) zero),
CurveTo (pt (negate r) (negate k)) (pt (negate k) (negate r)) (pt zero (negate r)),
CurveTo (pt k (negate r)) (pt r (negate k)... | 505 | circlePath center r =
Path (pt r zero)
[CurveTo (pt r k) (pt k r) (pt zero r),
CurveTo (pt (negate k) r) (pt (negate r) k) (pt (negate r) zero),
CurveTo (pt (negate r) (negate k)) (pt (negate k) (negate r)) (pt zero (negate r)),
CurveTo (pt k (negate r)) (pt r (negate k)) (pt r zero),
Cycle]
where k1 :... | 469 | true | true | 3 | 13 | 144 | 322 | 159 | 163 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'BLC.putStrLn'
blc_putStrLn = BLC.putStrLn | 46 | blc_putStrLn = BLC.putStrLn | 27 | blc_putStrLn = BLC.putStrLn | 27 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
ahodgen/archer-calc | src/Syntax.hs | bsd-2-clause | pos :: Expr -> Pos
pos (Expr p _) = p | 37 | pos :: Expr -> Pos
pos (Expr p _) = p | 37 | pos (Expr p _) = p | 18 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
dotnetCarpenter/haskell1 | ch05/more_recursion.hs | isc | reverse' :: [a] -> [a]
reverse' [] = [] | 39 | reverse' :: [a] -> [a]
reverse' [] = [] | 39 | reverse' [] = [] | 16 | false | true | 0 | 6 | 8 | 28 | 15 | 13 | null | null |
schell/odin | odin-engine/src/Odin/Engine/Physics.hs | mit | emptyScene :: OdinScene
emptyScene = Scene world externals contactBehavior
where world = emptyWorld
externals = []
contactBehavior = ContactBehavior 0.01 0.02 | 176 | emptyScene :: OdinScene
emptyScene = Scene world externals contactBehavior
where world = emptyWorld
externals = []
contactBehavior = ContactBehavior 0.01 0.02 | 176 | emptyScene = Scene world externals contactBehavior
where world = emptyWorld
externals = []
contactBehavior = ContactBehavior 0.01 0.02 | 152 | false | true | 2 | 6 | 38 | 45 | 22 | 23 | null | null |
lynnard/cocos2d-hs | src/Graphics/UI/Cocos2d/Director.hs | bsd-3-clause | castEventDispatcherToNonconst (EventDispatcherConstGc fptr' ptr') = EventDispatcherGc fptr' $ HoppyF.castPtr ptr' | 113 | castEventDispatcherToNonconst (EventDispatcherConstGc fptr' ptr') = EventDispatcherGc fptr' $ HoppyF.castPtr ptr' | 113 | castEventDispatcherToNonconst (EventDispatcherConstGc fptr' ptr') = EventDispatcherGc fptr' $ HoppyF.castPtr ptr' | 113 | false | false | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
shimanekb/Learn_Haskell | pp2/ppTwoTwo/.stack-work/dist/x86_64-osx/Cabal-1.18.1.5/build/autogen/Paths_ppTwoTwo.hs | gpl-2.0 | libexecdir = "/Users/brandonshimanek/Documents/Haskell_Workspaces/LYHGG/Learn_Haskell/pp2/ppTwoTwo/.stack-work/install/x86_64-osx/lts-2.18/7.8.4/libexec" | 153 | libexecdir = "/Users/brandonshimanek/Documents/Haskell_Workspaces/LYHGG/Learn_Haskell/pp2/ppTwoTwo/.stack-work/install/x86_64-osx/lts-2.18/7.8.4/libexec" | 153 | libexecdir = "/Users/brandonshimanek/Documents/Haskell_Workspaces/LYHGG/Learn_Haskell/pp2/ppTwoTwo/.stack-work/install/x86_64-osx/lts-2.18/7.8.4/libexec" | 153 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
CloudI/CloudI | src/api/haskell/external/binary-0.8.7.0/benchmarks/Put.hs | mit | word32s :: [Word32]
word32s = take 10000 $ cycle [minBound .. maxBound] | 71 | word32s :: [Word32]
word32s = take 10000 $ cycle [minBound .. maxBound] | 71 | word32s = take 10000 $ cycle [minBound .. maxBound] | 51 | false | true | 0 | 7 | 11 | 30 | 16 | 14 | null | null |
headprogrammingczar/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | writeConfigFile :: FilePath -> SavedConfig -> SavedConfig -> IO ()
writeConfigFile file comments vals = do
let tmpFile = file <.> "tmp"
createDirectoryIfMissing True (takeDirectory file)
writeFile tmpFile $ explanation ++ showConfigWithComments comments vals ++ "\n"
renameFile tmpFile file
where
explanati... | 1,158 | writeConfigFile :: FilePath -> SavedConfig -> SavedConfig -> IO ()
writeConfigFile file comments vals = do
let tmpFile = file <.> "tmp"
createDirectoryIfMissing True (takeDirectory file)
writeFile tmpFile $ explanation ++ showConfigWithComments comments vals ++ "\n"
renameFile tmpFile file
where
explanati... | 1,158 | writeConfigFile file comments vals = do
let tmpFile = file <.> "tmp"
createDirectoryIfMissing True (takeDirectory file)
writeFile tmpFile $ explanation ++ showConfigWithComments comments vals ++ "\n"
renameFile tmpFile file
where
explanation = unlines
["-- This is the configuration file for the 'cab... | 1,091 | false | true | 0 | 10 | 261 | 164 | 85 | 79 | null | null |
cjp256/manager | xenmgr/Vm/Queries.hs | gpl-2.0 | getVmRunPreBoot uuid = readConfigProperty uuid vmRunPreBoot | 59 | getVmRunPreBoot uuid = readConfigProperty uuid vmRunPreBoot | 59 | getVmRunPreBoot uuid = readConfigProperty uuid vmRunPreBoot | 59 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
HIPERFIT/language-c-quote | Language/C/Quote/Base.hs | bsd-3-clause | qqExpP :: C.Exp -> Maybe (Q Pat)
qqExpP (C.AntiExp v _) = Just $ antiVarP v | 75 | qqExpP :: C.Exp -> Maybe (Q Pat)
qqExpP (C.AntiExp v _) = Just $ antiVarP v | 75 | qqExpP (C.AntiExp v _) = Just $ antiVarP v | 42 | false | true | 0 | 8 | 15 | 50 | 23 | 27 | null | null |
EduPH/Problemas | AB/AB.hs | gpl-3.0 | abProb' r = length [(r!i,r!j,r!k) | i <- [1..length r],
j <- (delete i [1..length r]),
k <-(delete j (delete i [1..length r])),
r!i+r!j== r!k] | 208 | abProb' r = length [(r!i,r!j,r!k) | i <- [1..length r],
j <- (delete i [1..length r]),
k <-(delete j (delete i [1..length r])),
r!i+r!j== r!k] | 208 | abProb' r = length [(r!i,r!j,r!k) | i <- [1..length r],
j <- (delete i [1..length r]),
k <-(delete j (delete i [1..length r])),
r!i+r!j== r!k] | 208 | false | false | 0 | 14 | 90 | 132 | 67 | 65 | null | null |
mcschroeder/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | -- Pretty inefficient!
-- | Test if the 'OccName' is that for any operator (whether
-- it is a data constructor or variable or whatever)
isSymOcc :: OccName -> Bool
isSymOcc (OccName DataName s) = isLexConSym s | 212 | isSymOcc :: OccName -> Bool
isSymOcc (OccName DataName s) = isLexConSym s | 74 | isSymOcc (OccName DataName s) = isLexConSym s | 46 | true | true | 0 | 7 | 38 | 32 | 17 | 15 | null | null |
badp/ganeti | src/Ganeti/Types.hs | gpl-2.0 | roleDescription NRDrained = "drained" | 39 | roleDescription NRDrained = "drained" | 39 | roleDescription NRDrained = "drained" | 39 | false | false | 0 | 4 | 5 | 10 | 4 | 6 | null | null |
vTurbine/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | dsHsWrapper (WpCast co) e = ASSERT(coercionRole co == Representational)
return $ mkCastDs e co | 134 | dsHsWrapper (WpCast co) e = ASSERT(coercionRole co == Representational)
return $ mkCastDs e co | 134 | dsHsWrapper (WpCast co) e = ASSERT(coercionRole co == Representational)
return $ mkCastDs e co | 134 | false | false | 0 | 9 | 53 | 41 | 19 | 22 | null | null |
bch29/robo-monad | demo/ExampleLensed.hs | gpl-3.0 | myOnCollideWall ∷ WallCollisionData → ExampleLensed ()
myOnCollideWall w = do
return ()
-- | This is the actual robot specification to be passed to
-- @runWorld@. | 165 | myOnCollideWall ∷ WallCollisionData → ExampleLensed ()
myOnCollideWall w = do
return ()
-- | This is the actual robot specification to be passed to
-- @runWorld@. | 165 | myOnCollideWall w = do
return ()
-- | This is the actual robot specification to be passed to
-- @runWorld@. | 110 | false | true | 0 | 9 | 28 | 38 | 17 | 21 | null | null |
lamefun/haddock | haddock-api/src/Haddock/Utils.hs | bsd-2-clause | mkMeta :: Doc a -> MDoc a
mkMeta x = emptyMetaDoc { _doc = x } | 62 | mkMeta :: Doc a -> MDoc a
mkMeta x = emptyMetaDoc { _doc = x } | 62 | mkMeta x = emptyMetaDoc { _doc = x } | 36 | false | true | 0 | 6 | 15 | 32 | 16 | 16 | null | null |
dino-r/casttex | src/TexParser.hs | mit | inlineMath i =
do char '$'
arg <- manyTill anyChar (char '$')
return ((ExternalizeInline (Enclosed "$"), i+1), arg)
-- characters that should trigger to stop parsing text. | 187 | inlineMath i =
do char '$'
arg <- manyTill anyChar (char '$')
return ((ExternalizeInline (Enclosed "$"), i+1), arg)
-- characters that should trigger to stop parsing text. | 187 | inlineMath i =
do char '$'
arg <- manyTill anyChar (char '$')
return ((ExternalizeInline (Enclosed "$"), i+1), arg)
-- characters that should trigger to stop parsing text. | 187 | false | false | 0 | 12 | 42 | 65 | 31 | 34 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 229593 = 4191 | 33 | getValueFromProduct 229593 = 4191 | 33 | getValueFromProduct 229593 = 4191 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
NCrashed/hjass | src/library/Language/Jass/Parser/Grammar.hs | mit | localVar :: JassParser LocalVar
localVar = reserved "local" >> (try podLocalVar <|> arrayLocalVar)
where
podLocalVar = LocalVar <$> getPosition' <*> pure False <*> jassType <*> identifier <*> optionMaybe (reservedOp "=" >> expression)
arrayLocalVar = LocalVar <$> getPosition' <*> pure True <*> jassType <*> (r... | 368 | localVar :: JassParser LocalVar
localVar = reserved "local" >> (try podLocalVar <|> arrayLocalVar)
where
podLocalVar = LocalVar <$> getPosition' <*> pure False <*> jassType <*> identifier <*> optionMaybe (reservedOp "=" >> expression)
arrayLocalVar = LocalVar <$> getPosition' <*> pure True <*> jassType <*> (r... | 368 | localVar = reserved "local" >> (try podLocalVar <|> arrayLocalVar)
where
podLocalVar = LocalVar <$> getPosition' <*> pure False <*> jassType <*> identifier <*> optionMaybe (reservedOp "=" >> expression)
arrayLocalVar = LocalVar <$> getPosition' <*> pure True <*> jassType <*> (reserved "array" >> identifier) <... | 336 | false | true | 0 | 9 | 60 | 116 | 56 | 60 | null | null |
brownplt/javascript-contracts | src/BrownPLT/JavaScript/Contracts.hs | bsd-3-clause | getContractLibraryPath :: IO FilePath
getContractLibraryPath = do
dataDir <- getDataDir
return $ dataDir </> "contracts.js" | 127 | getContractLibraryPath :: IO FilePath
getContractLibraryPath = do
dataDir <- getDataDir
return $ dataDir </> "contracts.js" | 127 | getContractLibraryPath = do
dataDir <- getDataDir
return $ dataDir </> "contracts.js" | 89 | false | true | 0 | 8 | 18 | 32 | 15 | 17 | null | null |
tolysz/wai | warp/Network/Wai/Handler/Warp/HTTP2/Receiver.hs | mit | control _ _ _ _ =
-- must not reach here
return False | 61 | control _ _ _ _ =
-- must not reach here
return False | 61 | control _ _ _ _ =
-- must not reach here
return False | 61 | false | false | 1 | 5 | 20 | 19 | 8 | 11 | null | null |
peterokagey/haskellOEIS | src/Sandbox/Sami/PermutationStatistics.hs | apache-2.0 | firstLetterKMDescents k m = firstStatistic ((==k) . mDescents m) | 66 | firstLetterKMDescents k m = firstStatistic ((==k) . mDescents m) | 66 | firstLetterKMDescents k m = firstStatistic ((==k) . mDescents m) | 66 | false | false | 0 | 8 | 10 | 28 | 14 | 14 | null | null |
mightymoose/liquidhaskell | benchmarks/ghc-7.4.1/IO/Handle/Text.hs | bsd-3-clause | hPutStr :: Handle -> String -> IO ()
hPutStr handle str = hPutStr' handle str False | 83 | hPutStr :: Handle -> String -> IO ()
hPutStr handle str = hPutStr' handle str False | 83 | hPutStr handle str = hPutStr' handle str False | 46 | false | true | 0 | 8 | 15 | 36 | 17 | 19 | null | null |
mattias-lundell/timber-llvm | src/Kind.hs | bsd-3-clause | kindOfType env (TAp t t') = k
where KFun k' k = kindOfType env t | 102 | kindOfType env (TAp t t') = k
where KFun k' k = kindOfType env t | 102 | kindOfType env (TAp t t') = k
where KFun k' k = kindOfType env t | 102 | false | false | 0 | 7 | 52 | 36 | 17 | 19 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Concrete/FingerTree.hs | mit | appendTree3 :: (Measured v a) => FingerTree v a -> a -> a -> a -> FingerTree v a -> FingerTree v a
appendTree3 Empty a b c xs =
a `lcons` (b `lcons` (c `lcons` xs)) | 172 | appendTree3 :: (Measured v a) => FingerTree v a -> a -> a -> a -> FingerTree v a -> FingerTree v a
appendTree3 Empty a b c xs =
a `lcons` (b `lcons` (c `lcons` xs)) | 172 | appendTree3 Empty a b c xs =
a `lcons` (b `lcons` (c `lcons` xs)) | 73 | false | true | 0 | 12 | 44 | 100 | 51 | 49 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory/Model/Rule.hs | gpl-3.0 | prettyProtoRuleACInfo :: HighlightDocument d => ProtoRuleACInfo -> d
prettyProtoRuleACInfo i =
(ppVariants $ L.get pracVariants i) $-$
prettyLoopBreakers i
where
ppVariants (Disj [subst]) | subst == emptySubstVFresh = emptyDoc
ppVariants substs = kwVariantsModulo "AC" $-$ prettyDisjLNSubstsVFresh subs... | 322 | prettyProtoRuleACInfo :: HighlightDocument d => ProtoRuleACInfo -> d
prettyProtoRuleACInfo i =
(ppVariants $ L.get pracVariants i) $-$
prettyLoopBreakers i
where
ppVariants (Disj [subst]) | subst == emptySubstVFresh = emptyDoc
ppVariants substs = kwVariantsModulo "AC" $-$ prettyDisjLNSubstsVFresh subs... | 322 | prettyProtoRuleACInfo i =
(ppVariants $ L.get pracVariants i) $-$
prettyLoopBreakers i
where
ppVariants (Disj [subst]) | subst == emptySubstVFresh = emptyDoc
ppVariants substs = kwVariantsModulo "AC" $-$ prettyDisjLNSubstsVFresh substs | 253 | false | true | 1 | 9 | 54 | 101 | 45 | 56 | null | null |
AndreasPK/stack | src/Stack/Types/Config.hs | bsd-3-clause | configMonoidScmInitName :: Text
configMonoidScmInitName = "scm-init" | 68 | configMonoidScmInitName :: Text
configMonoidScmInitName = "scm-init" | 68 | configMonoidScmInitName = "scm-init" | 36 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
haskell-compat/base-compat | check/exes/dumpindex.hs | mit | removeTypeDefinitions :: [String] -> [String]
removeTypeDefinitions = filter (not . List.isPrefixOf "type ") | 108 | removeTypeDefinitions :: [String] -> [String]
removeTypeDefinitions = filter (not . List.isPrefixOf "type ") | 108 | removeTypeDefinitions = filter (not . List.isPrefixOf "type ") | 62 | false | true | 0 | 9 | 12 | 43 | 20 | 23 | null | null |
thomasdziedzic/hs-spotify | example/high-login.hs | mit | main :: IO ()
main = do
key <- B.readFile $ "spotify_appkey.key"
process_events_broadcast <- Broadcast.new
let sessionCallbacks = SessionCallbacks {
loggedIn = loggedInCb
, loggedOut = loggedOutCb
, metadataUpdated = metadataUpdatedCb
, connectionErro... | 2,488 | main :: IO ()
main = do
key <- B.readFile $ "spotify_appkey.key"
process_events_broadcast <- Broadcast.new
let sessionCallbacks = SessionCallbacks {
loggedIn = loggedInCb
, loggedOut = loggedOutCb
, metadataUpdated = metadataUpdatedCb
, connectionErro... | 2,488 | main = do
key <- B.readFile $ "spotify_appkey.key"
process_events_broadcast <- Broadcast.new
let sessionCallbacks = SessionCallbacks {
loggedIn = loggedInCb
, loggedOut = loggedOutCb
, metadataUpdated = metadataUpdatedCb
, connectionError = ... | 2,474 | false | true | 0 | 12 | 895 | 389 | 221 | 168 | null | null |
diku-dk/futhark | src/Futhark/IR/Prop/Types.hs | isc | -- | Add the given uniqueness information to the types.
toDecl ::
TypeBase shape NoUniqueness ->
Uniqueness ->
TypeBase shape Uniqueness
toDecl (Prim t) _ = Prim t | 169 | toDecl ::
TypeBase shape NoUniqueness ->
Uniqueness ->
TypeBase shape Uniqueness
toDecl (Prim t) _ = Prim t | 113 | toDecl (Prim t) _ = Prim t | 26 | true | true | 0 | 10 | 33 | 48 | 22 | 26 | null | null |
harendra-kumar/asyncly | src/Streamly/Internal/Benchmark/Prelude.hs | bsd-3-clause | isSubsequenceOf src = S.isSubsequenceOf src src | 47 | isSubsequenceOf src = S.isSubsequenceOf src src | 47 | isSubsequenceOf src = S.isSubsequenceOf src src | 47 | false | false | 1 | 6 | 5 | 19 | 7 | 12 | null | null |
sinelaw/fresh | src/Fresh/Infer.hs | gpl-2.0 | flattenTyAp :: SType s -> FlatTy (SType s)
flattenTyAp (SType (TyAST (TyAp ap res))) = FlatTyAp (flattenTyAp ap) (flattenTyAp res) | 130 | flattenTyAp :: SType s -> FlatTy (SType s)
flattenTyAp (SType (TyAST (TyAp ap res))) = FlatTyAp (flattenTyAp ap) (flattenTyAp res) | 130 | flattenTyAp (SType (TyAST (TyAp ap res))) = FlatTyAp (flattenTyAp ap) (flattenTyAp res) | 87 | false | true | 0 | 13 | 19 | 71 | 33 | 38 | null | null |
ComputationWithBoundedResources/tct-common | src/Tct/Common/Graph.hs | bsd-3-clause | lookupNode' :: Eq nl => Graph nl el -> nl -> NodeId
lookupNode' gr n = err `fromMaybe` lookupNode gr n
where err = error "Graph.lookupNodeLabel': label not found" | 164 | lookupNode' :: Eq nl => Graph nl el -> nl -> NodeId
lookupNode' gr n = err `fromMaybe` lookupNode gr n
where err = error "Graph.lookupNodeLabel': label not found" | 164 | lookupNode' gr n = err `fromMaybe` lookupNode gr n
where err = error "Graph.lookupNodeLabel': label not found" | 112 | false | true | 0 | 7 | 30 | 58 | 28 | 30 | null | null |
dgvncsz0f/nws | src/Jerimum/Storage/LMDB/Device.hs | bsd-3-clause | getHandlePath :: S.Handle a -> IO FilePath
getHandlePath handle = S.getPath handle >>= getRealPath | 98 | getHandlePath :: S.Handle a -> IO FilePath
getHandlePath handle = S.getPath handle >>= getRealPath | 98 | getHandlePath handle = S.getPath handle >>= getRealPath | 55 | false | true | 0 | 7 | 13 | 35 | 16 | 19 | null | null |
AccelerateHS/accelerate-cuda | Data/Array/Accelerate/CUDA.hs | bsd-3-clause | -- | As 'run1', but the computation is executed asynchronously.
--
run1Async :: (Arrays a, Arrays b) => (Acc a -> Acc b) -> a -> IO (Async b)
run1Async = run1AsyncWith defaultContext | 182 | run1Async :: (Arrays a, Arrays b) => (Acc a -> Acc b) -> a -> IO (Async b)
run1Async = run1AsyncWith defaultContext | 115 | run1Async = run1AsyncWith defaultContext | 40 | true | true | 0 | 10 | 32 | 61 | 31 | 30 | null | null |
folivetti/BIGDATA | 03 - Distancias/DistancesPar.hs | mit | normaliza :: [[Double]] -> [[Double]]
normaliza x = map normaliza' x
where
normaliza' xi = xi ./ (norma xi)
norma xi = sqrt . sum $ xi .^ 2 | 154 | normaliza :: [[Double]] -> [[Double]]
normaliza x = map normaliza' x
where
normaliza' xi = xi ./ (norma xi)
norma xi = sqrt . sum $ xi .^ 2 | 154 | normaliza x = map normaliza' x
where
normaliza' xi = xi ./ (norma xi)
norma xi = sqrt . sum $ xi .^ 2 | 116 | false | true | 4 | 9 | 43 | 86 | 41 | 45 | null | null |
lukexi/ghc-7.8-arm64 | compiler/main/DynFlags.hs | bsd-3-clause | wayOptc _ WayDyn = [] | 28 | wayOptc _ WayDyn = [] | 28 | wayOptc _ WayDyn = [] | 28 | false | false | 1 | 6 | 11 | 15 | 6 | 9 | null | null |
sdiehl/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | mkTemplateTyVarsFrom :: Int -> [Kind] -> [TyVar]
-- a with unique (mkAlphaTyVarUnique n)
-- b with unique (mkAlphaTyVarUnique n+1)
-- ... etc
-- Typically called as
-- mkTemplateTyVarsFrom (length kv_bndrs) kinds
-- where kv_bndrs are the kind-level binders of a TyCon
mkTemplateTyVarsFrom n kinds
= [ mkTyVar name... | 565 | mkTemplateTyVarsFrom :: Int -> [Kind] -> [TyVar]
mkTemplateTyVarsFrom n kinds
= [ mkTyVar name kind
| (kind, index) <- zip kinds [0..],
let ch_ord = index + ord 'a'
name_str | ch_ord <= ord 'z' = [chr ch_ord]
| otherwise = 't':show index
name = mk_tv_name (inde... | 341 | mkTemplateTyVarsFrom n kinds
= [ mkTyVar name kind
| (kind, index) <- zip kinds [0..],
let ch_ord = index + ord 'a'
name_str | ch_ord <= ord 'z' = [chr ch_ord]
| otherwise = 't':show index
name = mk_tv_name (index + n) name_str
] | 292 | true | true | 0 | 15 | 151 | 146 | 74 | 72 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Organizations/InspectTemplates/List.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
oitlUploadType :: Lens' OrganizationsInspectTemplatesList (Maybe Text)
oitlUploadType
= lens _oitlUploadType
(\ s a -> s{_oitlUploadType = a}) | 221 | oitlUploadType :: Lens' OrganizationsInspectTemplatesList (Maybe Text)
oitlUploadType
= lens _oitlUploadType
(\ s a -> s{_oitlUploadType = a}) | 150 | oitlUploadType
= lens _oitlUploadType
(\ s a -> s{_oitlUploadType = a}) | 79 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
DaMSL/K3 | src/Language/K3/Codegen/CPP/Materialization/Constructors.hs | apache-2.0 | mAtom :: Method -> K3 (MExpr)
mAtom m = Node (MAtom m :@: []) [] | 64 | mAtom :: Method -> K3 (MExpr)
mAtom m = Node (MAtom m :@: []) [] | 64 | mAtom m = Node (MAtom m :@: []) [] | 34 | false | true | 0 | 8 | 14 | 47 | 22 | 25 | null | null |
skill-lang/skill | deps/haskell/Controls.hs | bsd-3-clause | serialize'' :: FilePath -> FilePath -> IO ()
serialize'' inPath outPath = readState'' inPath >>= \state -> serialize state outPath | 130 | serialize'' :: FilePath -> FilePath -> IO ()
serialize'' inPath outPath = readState'' inPath >>= \state -> serialize state outPath | 130 | serialize'' inPath outPath = readState'' inPath >>= \state -> serialize state outPath | 85 | false | true | 0 | 8 | 19 | 46 | 22 | 24 | null | null |
ezyang/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | patSynSigD :: Name -> TypeQ -> DecQ
patSynSigD nm ty =
do ty' <- ty
return $ PatSynSigD nm ty' | 101 | patSynSigD :: Name -> TypeQ -> DecQ
patSynSigD nm ty =
do ty' <- ty
return $ PatSynSigD nm ty' | 101 | patSynSigD nm ty =
do ty' <- ty
return $ PatSynSigD nm ty' | 65 | false | true | 0 | 8 | 26 | 43 | 20 | 23 | null | null |
danr/hipspec | examples/old-examples/quickspec/SetList.hs | gpl-3.0 | prop_absorb_union :: SetList -> SetList -> Bool
prop_absorb_union a b = a /\ (a \/ b) == a | 90 | prop_absorb_union :: SetList -> SetList -> Bool
prop_absorb_union a b = a /\ (a \/ b) == a | 90 | prop_absorb_union a b = a /\ (a \/ b) == a | 42 | false | true | 0 | 8 | 17 | 39 | 20 | 19 | null | null |
lennart/tidal-midi | Sound/Tidal/Tetra.hs | gpl-3.0 | edcy = makeF oscPolysynth "edcy" | 37 | edcy = makeF oscPolysynth "edcy" | 37 | edcy = makeF oscPolysynth "edcy" | 37 | false | false | 0 | 5 | 9 | 11 | 5 | 6 | null | null |
ctford/Idris-Elba-dev | src/IRTS/CodegenJava.hs | bsd-3-clause | removePom :: FilePath -> IO ()
removePom tgtDir = removeFile (pomFileName tgtDir) | 81 | removePom :: FilePath -> IO ()
removePom tgtDir = removeFile (pomFileName tgtDir) | 81 | removePom tgtDir = removeFile (pomFileName tgtDir) | 50 | false | true | 0 | 7 | 11 | 32 | 15 | 17 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | [Optional] The categories attached to this field, used for field-level
-- access control.
tfsCategories :: Lens' TableFieldSchema (Maybe TableFieldSchemaCategories)
tfsCategories
= lens _tfsCategories
(\ s a -> s{_tfsCategories = a}) | 246 | tfsCategories :: Lens' TableFieldSchema (Maybe TableFieldSchemaCategories)
tfsCategories
= lens _tfsCategories
(\ s a -> s{_tfsCategories = a}) | 151 | tfsCategories
= lens _tfsCategories
(\ s a -> s{_tfsCategories = a}) | 76 | true | true | 0 | 9 | 39 | 49 | 26 | 23 | null | null |
kosmoskatten/synthetic-web | src/SyntheticWeb/Plan/Writer.hs | mit | writeActivity (POST headers upload download rate) =
printf " POST headers %s upload %s download %s rate %s,"
(show headers)
(writeUpload upload)
(writeDownload download)
(writeRate rate) | 224 | writeActivity (POST headers upload download rate) =
printf " POST headers %s upload %s download %s rate %s,"
(show headers)
(writeUpload upload)
(writeDownload download)
(writeRate rate) | 224 | writeActivity (POST headers upload download rate) =
printf " POST headers %s upload %s download %s rate %s,"
(show headers)
(writeUpload upload)
(writeDownload download)
(writeRate rate) | 224 | false | false | 0 | 6 | 63 | 61 | 27 | 34 | null | null |
bitemyapp/ghc | libraries/base/GHC/Event/Manager.hs | bsd-3-clause | newDefaultBackend = KQueue.new | 30 | newDefaultBackend = KQueue.new | 30 | newDefaultBackend = KQueue.new | 30 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
firefrorefiddle/songmaker | src/SongMaker/Read/Header.hs | gpl-2.0 | skipHeader = dropWhile isEndOfHeaderMarker .
dropWhile (not . isEndOfHeaderMarker) .
lines | 116 | skipHeader = dropWhile isEndOfHeaderMarker .
dropWhile (not . isEndOfHeaderMarker) .
lines | 116 | skipHeader = dropWhile isEndOfHeaderMarker .
dropWhile (not . isEndOfHeaderMarker) .
lines | 116 | false | false | 0 | 9 | 36 | 27 | 13 | 14 | null | null |
ezyang/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | isGcPtrType (CmmType GcPtrCat _) = True | 39 | isGcPtrType (CmmType GcPtrCat _) = True | 39 | isGcPtrType (CmmType GcPtrCat _) = True | 39 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
frontrowed/wai | wai-extra/test/WaiExtraSpec.hs | mit | streamLBSApp :: Application
streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200
[("Content-Type", "text/plain")]
"test" | 137 | streamLBSApp :: Application
streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200
[("Content-Type", "text/plain")]
"test" | 137 | streamLBSApp = streamFile $ \_ f -> f $ responseLBS status200
[("Content-Type", "text/plain")]
"test" | 109 | false | true | 0 | 8 | 24 | 44 | 23 | 21 | null | null |
NightRa/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | piBindp p ((n, ty):ns) t = PPi p n NoFC ty (piBindp p ns t) | 59 | piBindp p ((n, ty):ns) t = PPi p n NoFC ty (piBindp p ns t) | 59 | piBindp p ((n, ty):ns) t = PPi p n NoFC ty (piBindp p ns t) | 59 | false | false | 0 | 8 | 14 | 47 | 24 | 23 | null | null |
msakai/icfpc2014 | GHostCPU.hs | bsd-3-clause | execAnd m@(Machine ic pc regs mem code hdl) (AND d s) = do
{ modifyIORef pc succ
; modifyIORef ic succ
; c <- readIORef ic
; let reason = if c == 1024 then ResLim else ResNon
; v <- getValue pc regs mem s
; case d of
ArgPC -> return (m,ResErr)
ArgReg r -> modifyArray (v .&.) regs r >> r... | 531 | execAnd m@(Machine ic pc regs mem code hdl) (AND d s) = do
{ modifyIORef pc succ
; modifyIORef ic succ
; c <- readIORef ic
; let reason = if c == 1024 then ResLim else ResNon
; v <- getValue pc regs mem s
; case d of
ArgPC -> return (m,ResErr)
ArgReg r -> modifyArray (v .&.) regs r >> r... | 531 | execAnd m@(Machine ic pc regs mem code hdl) (AND d s) = do
{ modifyIORef pc succ
; modifyIORef ic succ
; c <- readIORef ic
; let reason = if c == 1024 then ResLim else ResNon
; v <- getValue pc regs mem s
; case d of
ArgPC -> return (m,ResErr)
ArgReg r -> modifyArray (v .&.) regs r >> r... | 531 | false | false | 0 | 13 | 152 | 254 | 128 | 126 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvsParameters :: FrozenSet String
hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes | 98 | hvsParameters :: FrozenSet String
hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes | 98 | hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes | 64 | false | true | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
rjohnsondev/haskellshop | src/Frontend/Frontend.hs | bsd-2-clause | handleProduct :: AppHandler ()
handleProduct = method GET handleProductGet <|> method POST handleProductPost
where
handleProductGet = cRender "product"
handleProductPost = do
pid <- getFormInt "product_id" 0
c <- getFormInt "c" 0
pvos <- getFormIntArray "variant_options"
b <- b... | 664 | handleProduct :: AppHandler ()
handleProduct = method GET handleProductGet <|> method POST handleProductPost
where
handleProductGet = cRender "product"
handleProductPost = do
pid <- getFormInt "product_id" 0
c <- getFormInt "c" 0
pvos <- getFormIntArray "variant_options"
b <- b... | 664 | handleProduct = method GET handleProductGet <|> method POST handleProductPost
where
handleProductGet = cRender "product"
handleProductPost = do
pid <- getFormInt "product_id" 0
c <- getFormInt "c" 0
pvos <- getFormIntArray "variant_options"
b <- basket
saveBasket $ addT... | 633 | false | true | 0 | 11 | 172 | 135 | 60 | 75 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_CMD_VCHOMEWRAPEXTEND :: Int
wxSTC_CMD_VCHOMEWRAPEXTEND = 2454 | 67 | wxSTC_CMD_VCHOMEWRAPEXTEND :: Int
wxSTC_CMD_VCHOMEWRAPEXTEND = 2454 | 67 | wxSTC_CMD_VCHOMEWRAPEXTEND = 2454 | 33 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Markdown.hs | gpl-2.0 | -- | Read markdown from an input string and return a Pandoc document.
readMarkdown :: ReaderOptions -- ^ Reader options
-> String -- ^ String to parse (assuming @'\n'@ line endings)
-> Either PandocError Pandoc
readMarkdown opts s =
(readWith parseMarkdown) def{ stateOptions = opts } ... | 333 | readMarkdown :: ReaderOptions -- ^ Reader options
-> String -- ^ String to parse (assuming @'\n'@ line endings)
-> Either PandocError Pandoc
readMarkdown opts s =
(readWith parseMarkdown) def{ stateOptions = opts } (s ++ "\n\n") | 263 | readMarkdown opts s =
(readWith parseMarkdown) def{ stateOptions = opts } (s ++ "\n\n") | 89 | true | true | 0 | 7 | 83 | 58 | 31 | 27 | null | null |
k0001/haskell-opaleye | Opaleye/Order.hs | bsd-3-clause | limit :: Int -> Query a -> Query a
limit n a = Q.simpleQueryArr (O.limit' n . Q.runSimpleQueryArr a) | 100 | limit :: Int -> Query a -> Query a
limit n a = Q.simpleQueryArr (O.limit' n . Q.runSimpleQueryArr a) | 100 | limit n a = Q.simpleQueryArr (O.limit' n . Q.runSimpleQueryArr a) | 65 | false | true | 0 | 9 | 18 | 56 | 25 | 31 | null | null |
ghcjs/ghcjs | src/Gen2/Archive.hs | mit | readIndex :: FilePath -> IO Index
readIndex file =
withArchive "readIndex" file $ \_sections index _h -> return index | 119 | readIndex :: FilePath -> IO Index
readIndex file =
withArchive "readIndex" file $ \_sections index _h -> return index | 119 | readIndex file =
withArchive "readIndex" file $ \_sections index _h -> return index | 85 | false | true | 0 | 7 | 20 | 42 | 20 | 22 | null | null |
jjingram/satori | src/Curry.hs | bsd-3-clause | curry (Fix name e) = Fix name (curry e) | 39 | curry (Fix name e) = Fix name (curry e) | 39 | curry (Fix name e) = Fix name (curry e) | 39 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
joshuaunderwood7/HaskeLinGeom | R.hs | gpl-3.0 | r_q' x@(x1, x2) y@(y1, y2) = or [r_r x y, r_b x y] | 50 | r_q' x@(x1, x2) y@(y1, y2) = or [r_r x y, r_b x y] | 50 | r_q' x@(x1, x2) y@(y1, y2) = or [r_r x y, r_b x y] | 50 | false | false | 0 | 7 | 12 | 48 | 26 | 22 | null | null |
facebookincubator/duckling | Duckling/Time/HR/Rules.hs | bsd-3-clause | ruleTimeBeforeLast :: Rule
ruleTimeBeforeLast = Rule
{ name = "<time> before last"
, pattern =
[ dimension Time
, regex "prije (prethodn(e|o(ga?)?)|pro(s|š)l(ih?|u|a|e|o(ga?)?))"
]
, prod = \tokens -> case tokens of
(Token Time td:_) ->
tt $ predNth (-2) False td
_ -> Nothing
} | 318 | ruleTimeBeforeLast :: Rule
ruleTimeBeforeLast = Rule
{ name = "<time> before last"
, pattern =
[ dimension Time
, regex "prije (prethodn(e|o(ga?)?)|pro(s|š)l(ih?|u|a|e|o(ga?)?))"
]
, prod = \tokens -> case tokens of
(Token Time td:_) ->
tt $ predNth (-2) False td
_ -> Nothing
} | 318 | ruleTimeBeforeLast = Rule
{ name = "<time> before last"
, pattern =
[ dimension Time
, regex "prije (prethodn(e|o(ga?)?)|pro(s|š)l(ih?|u|a|e|o(ga?)?))"
]
, prod = \tokens -> case tokens of
(Token Time td:_) ->
tt $ predNth (-2) False td
_ -> Nothing
} | 291 | false | true | 0 | 15 | 84 | 96 | 51 | 45 | null | null |
FalsePsyche/ProgrammingLanguages | finalproject/main.hs | unlicense | newImage16 :: String -> Int -> Int -> Pixel16 -> IO ()
newImage16 path width height blue = writePng path $ generateImage pixelRenderer width height
where pixelRenderer x y = PixelRGB16 (fromIntegral x) (fromIntegral y) (fromIntegral blue)
-- createPixelRGB16 :: Int -> Int -> Int -> PixelRGB16 ()
-- createPixelRGB1... | 364 | newImage16 :: String -> Int -> Int -> Pixel16 -> IO ()
newImage16 path width height blue = writePng path $ generateImage pixelRenderer width height
where pixelRenderer x y = PixelRGB16 (fromIntegral x) (fromIntegral y) (fromIntegral blue)
-- createPixelRGB16 :: Int -> Int -> Int -> PixelRGB16 ()
-- createPixelRGB1... | 364 | newImage16 path width height blue = writePng path $ generateImage pixelRenderer width height
where pixelRenderer x y = PixelRGB16 (fromIntegral x) (fromIntegral y) (fromIntegral blue)
-- createPixelRGB16 :: Int -> Int -> Int -> PixelRGB16 ()
-- createPixelRGB16 red green blue = PixelRGB16 red green blue | 309 | false | true | 0 | 10 | 62 | 99 | 47 | 52 | null | null |
jonte/ircbot | Network/IRC/Bot/Core.hs | bsd-3-clause | writeMaybeChan (Just chan) a = writeChan chan a | 47 | writeMaybeChan (Just chan) a = writeChan chan a | 47 | writeMaybeChan (Just chan) a = writeChan chan a | 47 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
jdnavarro/smallcheck | src/Test/SmallCheck/Series.hs | bsd-3-clause | cons4 :: (Serial m a, Serial m b, Serial m c, Serial m d) =>
(a->b->c->d->e) -> Series m e
cons4 f = decDepth $
f <$> series
<~> series
<~> series
<~> series | 180 | cons4 :: (Serial m a, Serial m b, Serial m c, Serial m d) =>
(a->b->c->d->e) -> Series m e
cons4 f = decDepth $
f <$> series
<~> series
<~> series
<~> series | 180 | cons4 f = decDepth $
f <$> series
<~> series
<~> series
<~> series | 80 | false | true | 0 | 11 | 56 | 97 | 49 | 48 | null | null |
TomMD/ghc | compiler/main/DriverMkDepend.hs | bsd-3-clause | -- Handle of the open temporary file
beginMkDependHS :: DynFlags -> IO MkDepFiles
beginMkDependHS dflags = do
-- open a new temp file in which to stuff the dependency info
-- as we go along.
tmp_file <- newTempName dflags "dep"
tmp_hdl <- openFile tmp_file WriteMode
-- open the makefile
... | 1,788 | beginMkDependHS :: DynFlags -> IO MkDepFiles
beginMkDependHS dflags = do
-- open a new temp file in which to stuff the dependency info
-- as we go along.
tmp_file <- newTempName dflags "dep"
tmp_hdl <- openFile tmp_file WriteMode
-- open the makefile
let makefile = depMakefile dflags
ex... | 1,750 | beginMkDependHS dflags = do
-- open a new temp file in which to stuff the dependency info
-- as we go along.
tmp_file <- newTempName dflags "dep"
tmp_hdl <- openFile tmp_file WriteMode
-- open the makefile
let makefile = depMakefile dflags
exists <- doesFileExist makefile
mb_make_hdl ... | 1,705 | true | true | 0 | 19 | 639 | 335 | 166 | 169 | null | null |
elordin/haskell-tetris | font.hs | mit | letterPath 'z' = [ (1 , 0 , 0) , (0 , 0 , 0) , (1 , 0.16, 0)
, (0 , 0.16, 0) , (0.33, 0.16, 0) , (0.67, 0.83, 0)
, (1 , 0.83, 0) , (0 , 0.83, 0) , (1 , 1 , 0)
, (0 , 1 , 0) ] | 249 | letterPath 'z' = [ (1 , 0 , 0) , (0 , 0 , 0) , (1 , 0.16, 0)
, (0 , 0.16, 0) , (0.33, 0.16, 0) , (0.67, 0.83, 0)
, (1 , 0.83, 0) , (0 , 0.83, 0) , (1 , 1 , 0)
, (0 , 1 , 0) ] | 249 | letterPath 'z' = [ (1 , 0 , 0) , (0 , 0 , 0) , (1 , 0.16, 0)
, (0 , 0.16, 0) , (0.33, 0.16, 0) , (0.67, 0.83, 0)
, (1 , 0.83, 0) , (0 , 0.83, 0) , (1 , 1 , 0)
, (0 , 1 , 0) ] | 249 | false | false | 1 | 6 | 130 | 132 | 84 | 48 | null | null |
jonsterling/ETT-Lite | src/Equal.hs | bsd-3-clause | -- | Determine whether the pattern matches the argument
-- If so return the appropriate substitution
patternMatches :: Arg -> Pattern -> TcMonad [(TName, Term)]
patternMatches (Arg t) (PatVar x) = return [(x, t)] | 212 | patternMatches :: Arg -> Pattern -> TcMonad [(TName, Term)]
patternMatches (Arg t) (PatVar x) = return [(x, t)] | 111 | patternMatches (Arg t) (PatVar x) = return [(x, t)] | 51 | true | true | 0 | 10 | 33 | 66 | 35 | 31 | null | null |
PeterBeard/project-euler | haskell/src/problem-008.hs | gpl-2.0 | -- Return a list of all windows of size n from the list xs
windows :: Int -> [Int] -> [[Int]]
windows n xs = map (\i -> window i n xs) $ [0..(length xs - n)] | 157 | windows :: Int -> [Int] -> [[Int]]
windows n xs = map (\i -> window i n xs) $ [0..(length xs - n)] | 98 | windows n xs = map (\i -> window i n xs) $ [0..(length xs - n)] | 63 | true | true | 0 | 9 | 36 | 71 | 38 | 33 | null | null |
sinelaw/stackage | Stackage/InstallInfo.hs | mit | showDep :: (PackageName, BuildInfo) -> String
showDep (PackageName name, BuildInfo {..}) =
concat
[ name
, "-"
, showVersion biVersion
, " ("
, unMaintainer biMaintainer
, case biGithubUser of
Nothing -> ""
Just x -> " @" ++ x
, ")"
... | 557 | showDep :: (PackageName, BuildInfo) -> String
showDep (PackageName name, BuildInfo {..}) =
concat
[ name
, "-"
, showVersion biVersion
, " ("
, unMaintainer biMaintainer
, case biGithubUser of
Nothing -> ""
Just x -> " @" ++ x
, ")"
... | 557 | showDep (PackageName name, BuildInfo {..}) =
concat
[ name
, "-"
, showVersion biVersion
, " ("
, unMaintainer biMaintainer
, case biGithubUser of
Nothing -> ""
Just x -> " @" ++ x
, ")"
, ": "
, unwords $ map unP biUser... | 511 | false | true | 0 | 10 | 190 | 126 | 67 | 59 | null | null |
dysinger/amazonka | core/src/Network/AWS/Types.hs | mpl-2.0 | -- | Determine the full host address and credential scope for a 'Service' within
-- the specified 'Region'.
endpoint :: Service a -> Region -> Endpoint
endpoint Service{..} r = go (CI.mk _svcPrefix)
where
go = \case
"iam"
| china -> region "iam.cn-north-1.amazonaws.com.cn"
| go... | 2,293 | endpoint :: Service a -> Region -> Endpoint
endpoint Service{..} r = go (CI.mk _svcPrefix)
where
go = \case
"iam"
| china -> region "iam.cn-north-1.amazonaws.com.cn"
| govcloud -> region "iam.us-gov.amazonaws.com"
| otherwise -> global "iam.amazonaws.com"
... | 2,185 | endpoint Service{..} r = go (CI.mk _svcPrefix)
where
go = \case
"iam"
| china -> region "iam.cn-north-1.amazonaws.com.cn"
| govcloud -> region "iam.us-gov.amazonaws.com"
| otherwise -> global "iam.amazonaws.com"
"sdb"
| virginia -> region "sdb... | 2,141 | true | true | 8 | 18 | 759 | 565 | 269 | 296 | null | null |
harendra-kumar/asyncly | src/Streamly/Internal/Data/Fold/Types.hs | bsd-3-clause | duplicate :: Applicative m => Fold m a b -> Fold m a (Fold m a b)
duplicate (Fold step begin done) =
Fold step begin (\x -> pure (Fold step (pure x) done)) | 159 | duplicate :: Applicative m => Fold m a b -> Fold m a (Fold m a b)
duplicate (Fold step begin done) =
Fold step begin (\x -> pure (Fold step (pure x) done)) | 159 | duplicate (Fold step begin done) =
Fold step begin (\x -> pure (Fold step (pure x) done)) | 93 | false | true | 0 | 12 | 37 | 93 | 45 | 48 | null | null |
facebookincubator/duckling | Duckling/Rules/UK.hs | bsd-3-clause | langRules (Seal Distance) = [] | 30 | langRules (Seal Distance) = [] | 30 | langRules (Seal Distance) = [] | 30 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.