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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vikraman/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | -- | Build the type of a big tuple that holds the specified type of thing
-- One-tuples are flattened; see Note [Flattening of one-tuples]
mkBigCoreTupTy :: [Type] -> Type
mkBigCoreTupTy = mkChunkified mkBoxedTupleTy | 216 | mkBigCoreTupTy :: [Type] -> Type
mkBigCoreTupTy = mkChunkified mkBoxedTupleTy | 77 | mkBigCoreTupTy = mkChunkified mkBoxedTupleTy | 44 | true | true | 0 | 7 | 33 | 30 | 14 | 16 | null | null |
kawu/partage | src/NLP/Partage/AStar.hs | bsd-2-clause | -- | Number of waiting nodes in the parsing hypergraph.
waitingNodesNum :: (Ord n, Ord t) => Hype n t -> Int
waitingNodesNum = length . listWaiting | 147 | waitingNodesNum :: (Ord n, Ord t) => Hype n t -> Int
waitingNodesNum = length . listWaiting | 91 | waitingNodesNum = length . listWaiting | 38 | true | true | 0 | 7 | 26 | 40 | 21 | 19 | null | null |
tomjaguarpaw/postgresql-simple | tools/GenTypeInfo.hs | bsd-3-clause | main = do
(oidmap, namemap) <- getTypeInfos typeNames
L.writeFile "src/Database/PostgreSQL/Simple/TypeInfo/Static.hs"
(Blaze.toLazyByteString (renderFile oidmap namemap typeNames)) | 198 | main = do
(oidmap, namemap) <- getTypeInfos typeNames
L.writeFile "src/Database/PostgreSQL/Simple/TypeInfo/Static.hs"
(Blaze.toLazyByteString (renderFile oidmap namemap typeNames)) | 198 | main = do
(oidmap, namemap) <- getTypeInfos typeNames
L.writeFile "src/Database/PostgreSQL/Simple/TypeInfo/Static.hs"
(Blaze.toLazyByteString (renderFile oidmap namemap typeNames)) | 198 | false | false | 0 | 11 | 32 | 50 | 24 | 26 | null | null |
DaMSL/K3 | src/Language/K3/Codegen/Haskell.hs | apache-2.0 | isStore _ = False | 17 | isStore _ = False | 17 | isStore _ = False | 17 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
krdlab/yahoo-web-textanalysis | Web/Yahoo/MAService.hs | bsd-3-clause | buildRequest :: (Monad m, Failure HC.HttpException m, Monad m')
=> Params
-> Text
-> m (HC.Request m')
buildRequest params sentence = url endpoint >>= addHeader >>= addBody
where
url = HC.parseUrl
addHeader req = return $ req { HC.requestHeaders = HC.... | 449 | buildRequest :: (Monad m, Failure HC.HttpException m, Monad m')
=> Params
-> Text
-> m (HC.Request m')
buildRequest params sentence = url endpoint >>= addHeader >>= addBody
where
url = HC.parseUrl
addHeader req = return $ req { HC.requestHeaders = HC.... | 449 | buildRequest params sentence = url endpoint >>= addHeader >>= addBody
where
url = HC.parseUrl
addHeader req = return $ req { HC.requestHeaders = HC.requestHeaders req ++ pairsOfHeader params }
addBody req = return $ HC.urlEncodedBody (pairsOfBody params sentence) req | 307 | false | true | 7 | 12 | 134 | 157 | 71 | 86 | null | null |
olorin/amazonka | amazonka-cloudformation/gen/Network/AWS/CloudFormation/ListStacks.hs | mpl-2.0 | -- | Creates a value of 'ListStacks' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lsNextToken'
--
-- * 'lsStackStatusFilter'
listStacks
:: ListStacks
listStacks =
ListStacks'
{ _lsNextToken = Nothing
, _lsStackStatu... | 343 | listStacks
:: ListStacks
listStacks =
ListStacks'
{ _lsNextToken = Nothing
, _lsStackStatusFilter = Nothing
} | 129 | listStacks =
ListStacks'
{ _lsNextToken = Nothing
, _lsStackStatusFilter = Nothing
} | 100 | true | true | 0 | 7 | 72 | 42 | 24 | 18 | null | null |
rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Resource/Autoscaler/Autoscalers/Update.hs | mpl-2.0 | -- | Zone name of Autoscaler resource.
auZone :: Lens' AutoscalersUpdate Text
auZone = lens _auZone (\ s a -> s{_auZone = a}) | 125 | auZone :: Lens' AutoscalersUpdate Text
auZone = lens _auZone (\ s a -> s{_auZone = a}) | 86 | auZone = lens _auZone (\ s a -> s{_auZone = a}) | 47 | true | true | 1 | 9 | 22 | 43 | 22 | 21 | null | null |
bitemyapp/hlint | data/Default.hs | bsd-3-clause | warn "Redundant /=" = a /= False ==> a | 39 | warn "Redundant /=" = a /= False ==> a | 39 | warn "Redundant /=" = a /= False ==> a | 39 | false | false | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
zsedem/haskell-python | lib/Emitter.hs | mit | emit :: Emitter -> CString -> IO ()
emit emitter message =
print $ "Haskell called emitter="++show emitter ++" message='" ++ show message ++ "'" | 148 | emit :: Emitter -> CString -> IO ()
emit emitter message =
print $ "Haskell called emitter="++show emitter ++" message='" ++ show message ++ "'" | 148 | emit emitter message =
print $ "Haskell called emitter="++show emitter ++" message='" ++ show message ++ "'" | 112 | false | true | 0 | 9 | 28 | 55 | 26 | 29 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/Enum.hs | bsd-3-clause | enumDeltaToInteger1 :: Integer -> Integer -> [Integer]
-- Special case for Delta = 1
enumDeltaToInteger1 x0 lim = go (x0 :: Integer)
where
go x | x > lim = []
| otherwise = x : go (x+1) | 262 | enumDeltaToInteger1 :: Integer -> Integer -> [Integer]
enumDeltaToInteger1 x0 lim = go (x0 :: Integer)
where
go x | x > lim = []
| otherwise = x : go (x+1) | 232 | enumDeltaToInteger1 x0 lim = go (x0 :: Integer)
where
go x | x > lim = []
| otherwise = x : go (x+1) | 177 | true | true | 0 | 11 | 114 | 82 | 41 | 41 | null | null |
z0isch/aoc2016 | src/Day12.hs | bsd-3-clause | fromSuccess :: Result x -> x
fromSuccess (Success x) = x | 56 | fromSuccess :: Result x -> x
fromSuccess (Success x) = x | 56 | fromSuccess (Success x) = x | 27 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
XinhuaZhang/PetaVisionHaskell | Application/Caffe/PVP2HDF5.hs | gpl-3.0 | pvpConduit :: ParallelParams
-> Conduit PVPOutputData (ResourceT IO) (R.Array U DIM3 Double)
pvpConduit parallelParams = do
xs <- CL.take (PA.batchSize parallelParams)
unless
(L.null xs)
(do let ys =
parMapChunk
parallelParams
rseq
(\a... | 501 | pvpConduit :: ParallelParams
-> Conduit PVPOutputData (ResourceT IO) (R.Array U DIM3 Double)
pvpConduit parallelParams = do
xs <- CL.take (PA.batchSize parallelParams)
unless
(L.null xs)
(do let ys =
parMapChunk
parallelParams
rseq
(\a... | 501 | pvpConduit parallelParams = do
xs <- CL.take (PA.batchSize parallelParams)
unless
(L.null xs)
(do let ys =
parMapChunk
parallelParams
rseq
(\arr ->
let arr' = pvpOutputData2Array arr
in deepSeqArray arr' arr'... | 397 | false | true | 0 | 21 | 201 | 139 | 64 | 75 | null | null |
BartAdv/Idris-dev | src/Idris/Error.hs | bsd-3-clause | warnDisamb ist (PDPair _ _ x y z) = warnDisamb ist x >> warnDisamb ist y >> warnDisamb ist z | 92 | warnDisamb ist (PDPair _ _ x y z) = warnDisamb ist x >> warnDisamb ist y >> warnDisamb ist z | 92 | warnDisamb ist (PDPair _ _ x y z) = warnDisamb ist x >> warnDisamb ist y >> warnDisamb ist z | 92 | false | false | 0 | 7 | 19 | 49 | 22 | 27 | null | null |
dmjio/aeson | tests/Encoders.hs | bsd-3-clause | gSomeTypeLiftToJSONObjectWithSingleField :: LiftToJSON SomeType a
gSomeTypeLiftToJSONObjectWithSingleField = genericLiftToJSON optsObjectWithSingleField | 152 | gSomeTypeLiftToJSONObjectWithSingleField :: LiftToJSON SomeType a
gSomeTypeLiftToJSONObjectWithSingleField = genericLiftToJSON optsObjectWithSingleField | 152 | gSomeTypeLiftToJSONObjectWithSingleField = genericLiftToJSON optsObjectWithSingleField | 86 | false | true | 0 | 5 | 8 | 19 | 9 | 10 | null | null |
kindl/Hypatia | src/Typechecker.hs | mit | generalize ty = do
subst <- getSubst
let ty' = apply subst ty
env <- getEnv
let envVars = foldMap' (freeVars . apply subst) env
let qualVars = excluding envVars (freeVars ty')
return (makeForAll qualVars ty') | 232 | generalize ty = do
subst <- getSubst
let ty' = apply subst ty
env <- getEnv
let envVars = foldMap' (freeVars . apply subst) env
let qualVars = excluding envVars (freeVars ty')
return (makeForAll qualVars ty') | 232 | generalize ty = do
subst <- getSubst
let ty' = apply subst ty
env <- getEnv
let envVars = foldMap' (freeVars . apply subst) env
let qualVars = excluding envVars (freeVars ty')
return (makeForAll qualVars ty') | 232 | false | false | 1 | 14 | 59 | 99 | 42 | 57 | null | null |
pittsburgh-haskell/haskell-intro-session | answersrc/Tutorial.hs | bsd-3-clause | -- | a person
david :: Person
david = P { firstName = "David", parents = [], age = 77 } | 87 | david :: Person
david = P { firstName = "David", parents = [], age = 77 } | 73 | david = P { firstName = "David", parents = [], age = 77 } | 57 | true | true | 0 | 8 | 20 | 44 | 23 | 21 | null | null |
vincenthz/cryptonite | Crypto/PubKey/Ed448.hs | bsd-3-clause | -- | Try to build a signature from a bytearray
signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature
signature bs
| B.length bs == signatureSize =
CryptoPassed $ Signature $ B.copyAndFreeze bs (\_ -> return ())
| otherwise =
CryptoFailed CryptoError_SecretKeyStructureInvalid | 311 | signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature
signature bs
| B.length bs == signatureSize =
CryptoPassed $ Signature $ B.copyAndFreeze bs (\_ -> return ())
| otherwise =
CryptoFailed CryptoError_SecretKeyStructureInvalid | 264 | signature bs
| B.length bs == signatureSize =
CryptoPassed $ Signature $ B.copyAndFreeze bs (\_ -> return ())
| otherwise =
CryptoFailed CryptoError_SecretKeyStructureInvalid | 198 | true | true | 0 | 11 | 65 | 84 | 39 | 45 | null | null |
urbanslug/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | ppr_mono_ty _ (HsExplicitListTy _ tys) = quote $ brackets (interpp'SP tys) | 77 | ppr_mono_ty _ (HsExplicitListTy _ tys) = quote $ brackets (interpp'SP tys) | 77 | ppr_mono_ty _ (HsExplicitListTy _ tys) = quote $ brackets (interpp'SP tys) | 77 | false | false | 1 | 8 | 13 | 34 | 15 | 19 | null | null |
ddssff/rdf4h | testsuite/tests/W3C/NTripleTest.hs | bsd-3-clause | testParser :: NTriplesParser
testParser = NTriplesParser | 56 | testParser :: NTriplesParser
testParser = NTriplesParser | 56 | testParser = NTriplesParser | 27 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
jwiegley/ghc-release | compiler/utils/Platform.hs | gpl-3.0 | latformBinariesAreStaticLibs :: Platform -> Bool
platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS
| 118 | platformBinariesAreStaticLibs :: Platform -> Bool
platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS | 118 | platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS | 68 | false | true | 0 | 5 | 10 | 19 | 10 | 9 | null | null |
bos/mwc-random | mwc-random-bench/test/MWC/ChiSquare.hs | bsd-2-clause | binomialTest :: Int -> Double -> MWC.GenIO -> Test.Framework.Test
binomialTest n p
= sampleTest ("binomialTest: " ++ show p ++ " " ++ show n) gen (10^4)
where
binom = binomial n p
gen = Generator
{ generator = MWC.genFromTable (MWC.tableBinomial n p)
, probabilites = U.generate ... | 397 | binomialTest :: Int -> Double -> MWC.GenIO -> Test.Framework.Test
binomialTest n p
= sampleTest ("binomialTest: " ++ show p ++ " " ++ show n) gen (10^4)
where
binom = binomial n p
gen = Generator
{ generator = MWC.genFromTable (MWC.tableBinomial n p)
, probabilites = U.generate ... | 397 | binomialTest n p
= sampleTest ("binomialTest: " ++ show p ++ " " ++ show n) gen (10^4)
where
binom = binomial n p
gen = Generator
{ generator = MWC.genFromTable (MWC.tableBinomial n p)
, probabilites = U.generate (n+1) (probability binom)
}
-- | Test for geometric d... | 331 | false | true | 0 | 10 | 110 | 136 | 70 | 66 | null | null |
adityagupta1089/Project-Euler-Haskell | src/problems/Problem407.hs | bsd-3-clause | main :: IO ()
-- a^2=a mod n => n | a(a-1) so if n=pq where p|a & q|(a-1) and px+qy=1
-- min(p, q)^2<=pq<=10^7=>min(p,q)<=~3x10^3
-- then a=px' & a-1=qy' where px'-qy'=1 so x' = x & y' = -y
-- also p(x'+kq)-q(y'+kp)=1
-- 15 = 3*5 -> 3*2-5*1=1,5*2-3*3=1
main = print $ sum $ accumArray
max
1
(2, lim)
[ (... | 868 | main :: IO ()
main = print $ sum $ accumArray
max
1
(2, lim)
[ (p * q, getas p q x y)
| p <- [2 .. lim]
, q <- [p + 1 .. lim `div` p]
, let (gcd, x, y) = extGCD p q
, gcd == 1
]
where
-- series 1: a=px' where x' in [px,p(x+q),..]
-- series 2: a=py' where y' in [q(y+p),p(y+... | 628 | main = print $ sum $ accumArray
max
1
(2, lim)
[ (p * q, getas p q x y)
| p <- [2 .. lim]
, q <- [p + 1 .. lim `div` p]
, let (gcd, x, y) = extGCD p q
, gcd == 1
]
where
-- series 1: a=px' where x' in [px,p(x+q),..]
-- series 2: a=py' where y' in [q(y+p),p(y+2p),...]
... | 614 | true | true | 4 | 10 | 284 | 252 | 129 | 123 | null | null |
seereason/process-extras | Tests.hs | mit | _test3 :: IO [Chunk String]
_test3 = runT (dots 10 >> run (proc "ls" []) "") | 76 | _test3 :: IO [Chunk String]
_test3 = runT (dots 10 >> run (proc "ls" []) "") | 76 | _test3 = runT (dots 10 >> run (proc "ls" []) "") | 48 | false | true | 0 | 11 | 15 | 48 | 23 | 25 | null | null |
Rizary/hackage-matrix-builder | src-exe/Controller/Compute.hs | gpl-3.0 | runCompute :: PGS.Connection -> IO ()
runCompute dbconn = do
-- xs <- PGS.query_ dbconn "SELECT unnest(units) FROM solution JOIN iplan_job USING (jobid) \
-- \EXCEPT \
-- \SELECT xunitid FROM solution_span WHERE not vstale \
-- \"
... | 9,074 | runCompute :: PGS.Connection -> IO ()
runCompute dbconn = do
-- xs <- PGS.query_ dbconn "SELECT unnest(units) FROM solution JOIN iplan_job USING (jobid) \
-- \EXCEPT \
-- \SELECT xunitid FROM solution_span WHERE not vstale \
-- \"
... | 9,074 | runCompute dbconn = do
-- xs <- PGS.query_ dbconn "SELECT unnest(units) FROM solution JOIN iplan_job USING (jobid) \
-- \EXCEPT \
-- \SELECT xunitid FROM solution_span WHERE not vstale \
-- \"
-- xs <- PGS.query_ dbconn "SELECT... | 9,036 | false | true | 56 | 22 | 3,069 | 1,568 | 854 | 714 | null | null |
maruks/haskell-book | src/Chapter9_lists.hs | gpl-3.0 | myMinBy f (x:xs) = if f x t == LT then x else t
where t = myMinBy f xs | 72 | myMinBy f (x:xs) = if f x t == LT then x else t
where t = myMinBy f xs | 72 | myMinBy f (x:xs) = if f x t == LT then x else t
where t = myMinBy f xs | 72 | false | false | 0 | 7 | 21 | 48 | 24 | 24 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | The type of configuration. The default and only option is
-- ONE_TO_ONE_NAT.
acType :: Lens' AccessConfig AccessConfigType
acType = lens _acType (\ s a -> s{_acType = a}) | 175 | acType :: Lens' AccessConfig AccessConfigType
acType = lens _acType (\ s a -> s{_acType = a}) | 93 | acType = lens _acType (\ s a -> s{_acType = a}) | 47 | true | true | 0 | 9 | 29 | 48 | 24 | 24 | null | null |
vollmerm/shallow-fission | tests/black-scholes/src-acc/BlackScholes.hs | bsd-3-clause | volatility = 0.30 | 17 | volatility = 0.30 | 17 | volatility = 0.30 | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
nushio3/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | -- See Note [Empty case alternatives] in CoreSyn If the case
-- alternatives are empty, the scrutinee must diverge or raise an
-- exception, so we can just dive into it.
--
-- Of course this may seg-fault if the scrutinee *does* return. A
-- belt-and-braces approach would be to move this case into ... | 3,632 | coreToStgExpr (Case scrut bndr _ alts) = do
(alts2, alts_fvs, alts_escs)
<- extendVarEnvLne [(bndr, LambdaBound)] $ do
(alts2, fvs_s, escs_s) <- mapAndUnzip3M vars_alt alts
return ( alts2,
unionFVInfos fvs_s,
unionVarSets escs_s )
let
... | 3,202 | coreToStgExpr (Case scrut bndr _ alts) = do
(alts2, alts_fvs, alts_escs)
<- extendVarEnvLne [(bndr, LambdaBound)] $ do
(alts2, fvs_s, escs_s) <- mapAndUnzip3M vars_alt alts
return ( alts2,
unionFVInfos fvs_s,
unionVarSets escs_s )
let
... | 3,202 | true | false | 0 | 17 | 1,150 | 578 | 317 | 261 | null | null |
siddhanathan/yi | yi-frontend-pango/src/Yi/Frontend/Pango.hs | gpl-2.0 | shownRegion :: UI -> FontDescription -> WinInfo -> FBuffer -> IO Region
shownRegion ui f w b = modifyMVar (winLayoutInfo w) $ \wli -> do
(tos, cur, bos, bufEnd) <- updatePango ui f w b (winLayout wli)
return (wli{tos,cur=clampTo tos bos cur,bos,bufEnd}, mkRegion tos bos)
where clampTo lo hi x = max lo (min hi x)... | 1,322 | shownRegion :: UI -> FontDescription -> WinInfo -> FBuffer -> IO Region
shownRegion ui f w b = modifyMVar (winLayoutInfo w) $ \wli -> do
(tos, cur, bos, bufEnd) <- updatePango ui f w b (winLayout wli)
return (wli{tos,cur=clampTo tos bos cur,bos,bufEnd}, mkRegion tos bos)
where clampTo lo hi x = max lo (min hi x)... | 1,322 | shownRegion ui f w b = modifyMVar (winLayoutInfo w) $ \wli -> do
(tos, cur, bos, bufEnd) <- updatePango ui f w b (winLayout wli)
return (wli{tos,cur=clampTo tos bos cur,bos,bufEnd}, mkRegion tos bos)
where clampTo lo hi x = max lo (min hi x)
-- during scrolling, cur might not lie between tos and bos,
-- so we cl... | 1,250 | false | true | 1 | 13 | 247 | 179 | 89 | 90 | null | null |
gridaphobe/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr (CVTSS2SD from to) = pprRegReg (sLit "cvtss2sd") from to | 70 | pprInstr (CVTSS2SD from to) = pprRegReg (sLit "cvtss2sd") from to | 70 | pprInstr (CVTSS2SD from to) = pprRegReg (sLit "cvtss2sd") from to | 70 | false | false | 0 | 7 | 14 | 31 | 14 | 17 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Assoc/AssocList.hs | mit | adjustOrDeleteAll = adjustOrDeleteAllDefault | 44 | adjustOrDeleteAll = adjustOrDeleteAllDefault | 44 | adjustOrDeleteAll = adjustOrDeleteAllDefault | 44 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
goshakkk/Poker.hs | src/Poker.hs | mit | matchesIn :: [Card] -> [HandCategory]
matchesIn = concatMap (matches . listToHand) . subsequencesN 5 | 100 | matchesIn :: [Card] -> [HandCategory]
matchesIn = concatMap (matches . listToHand) . subsequencesN 5 | 100 | matchesIn = concatMap (matches . listToHand) . subsequencesN 5 | 62 | false | true | 0 | 8 | 13 | 38 | 20 | 18 | null | null |
fgaz/shine | src/Graphics/Shine/Render.hs | mit | -- push all the Colors to the leaves to avoid things like
-- Color blue $ Translate _ _ $ Over (Color red pic) pic'q
-- in which pic' would be black instead of blue:
-- do
-- set color blue -- first Colored
-- translate
-- set color red -- second Colored
-- render pic
-- set color back to black -- second Colo... | 522 | render ctx (Colored col (Rotate angle pic)) =
render ctx $ Rotate angle $ Colored col pic | 93 | render ctx (Colored col (Rotate angle pic)) =
render ctx $ Rotate angle $ Colored col pic | 93 | true | false | 2 | 8 | 121 | 61 | 33 | 28 | null | null |
XinhuaZhang/PetaVisionHaskell | Classifier/LibSVM/Bindings.hs | gpl-3.0 | c'SIGMOID = 3 | 13 | c'SIGMOID = 3 | 13 | c'SIGMOID = 3 | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
silkapp/tagsoup | dead/LazyParse.hs | bsd-3-clause | runParser :: Parser s a -> s -> a
runParser = evalState | 55 | runParser :: Parser s a -> s -> a
runParser = evalState | 55 | runParser = evalState | 21 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
arybczak/happstack-server | attic/Examples/MultimasterTest1.hs | bsd-3-clause | getVal :: Query MyState Int
getVal = do MyState n <- ask
return n
| 79 | getVal :: Query MyState Int
getVal = do MyState n <- ask
return n
| 79 | getVal = do MyState n <- ask
return n
| 51 | false | true | 0 | 8 | 27 | 32 | 14 | 18 | null | null |
lspitzner/brittany | source/library/Language/Haskell/Brittany/Internal/Config.hs | agpl-3.0 | userConfigPath :: IO System.IO.FilePath
userConfigPath = do
userBritPathSimple <- Directory.getAppUserDataDirectory "brittany"
userBritPathXdg <- Directory.getXdgDirectory Directory.XdgConfig "brittany"
let searchDirs = [userBritPathSimple, userBritPathXdg]
globalConfig <- Directory.findFileWith
Directory.d... | 725 | userConfigPath :: IO System.IO.FilePath
userConfigPath = do
userBritPathSimple <- Directory.getAppUserDataDirectory "brittany"
userBritPathXdg <- Directory.getXdgDirectory Directory.XdgConfig "brittany"
let searchDirs = [userBritPathSimple, userBritPathXdg]
globalConfig <- Directory.findFileWith
Directory.d... | 725 | userConfigPath = do
userBritPathSimple <- Directory.getAppUserDataDirectory "brittany"
userBritPathXdg <- Directory.getXdgDirectory Directory.XdgConfig "brittany"
let searchDirs = [userBritPathSimple, userBritPathXdg]
globalConfig <- Directory.findFileWith
Directory.doesFileExist
searchDirs
"config.... | 685 | false | true | 0 | 10 | 108 | 148 | 68 | 80 | null | null |
jdve/xchat-plugin | src/Main.hs | gpl-2.0 | createWorkspace :: Options -> IO (Maybe String)
createWorkspace o =
getCurrentDirectory >>= \ cd ->
let pn = getOption o pluginName defPluginName
newdir = cd++(pathSeparator:pn)
catchErrA _ = "Sorry, unable to create the " ++ newdir ++ " directory."
csym s = do old <- getDataFileName s
... | 677 | createWorkspace :: Options -> IO (Maybe String)
createWorkspace o =
getCurrentDirectory >>= \ cd ->
let pn = getOption o pluginName defPluginName
newdir = cd++(pathSeparator:pn)
catchErrA _ = "Sorry, unable to create the " ++ newdir ++ " directory."
csym s = do old <- getDataFileName s
... | 677 | createWorkspace o =
getCurrentDirectory >>= \ cd ->
let pn = getOption o pluginName defPluginName
newdir = cd++(pathSeparator:pn)
catchErrA _ = "Sorry, unable to create the " ++ newdir ++ " directory."
csym s = do old <- getDataFileName s
copyFile old (newdir ++ (pathSeparator : ... | 629 | false | true | 2 | 16 | 160 | 227 | 109 | 118 | null | null |
andrewthad/vinyl-vectors | src/Data/Vector/Vinyl/Default/Empty/Monomorphic.hs | bsd-3-clause | -- | /O(n)/ Scan over a non-empty vector with a strict accumulator
scanl1' :: G.Vector Vector (Rec Identity rs)
=> (Rec Identity rs -> Rec Identity rs -> Rec Identity rs) -> Vector (Rec Identity rs) -> Vector (Rec Identity rs)
scanl1' = G.scanl1' | 248 | scanl1' :: G.Vector Vector (Rec Identity rs)
=> (Rec Identity rs -> Rec Identity rs -> Rec Identity rs) -> Vector (Rec Identity rs) -> Vector (Rec Identity rs)
scanl1' = G.scanl1' | 181 | scanl1' = G.scanl1' | 19 | true | true | 0 | 10 | 45 | 89 | 43 | 46 | null | null |
mattias-lundell/timber-llvm | src/LLVMKindle.hs | bsd-3-clause | k2llvmName (Name s t _ _)
| t == 0 = s | 40 | k2llvmName (Name s t _ _)
| t == 0 = s | 40 | k2llvmName (Name s t _ _)
| t == 0 = s | 40 | false | false | 0 | 8 | 13 | 31 | 14 | 17 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/OldList.hs | bsd-3-clause | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | mapAccumLF f = \x r -> oneShot (\s ->
let (s', y) = f s x
(s'', ys) = r s'
in (s'', y:ys)) | 171 | false | false | 0 | 13 | 104 | 75 | 39 | 36 | null | null |
gnn/Hets | QVTR/ParseQvtAsLibDefn.hs | gpl-2.0 | parseXmiMetamodel :: FilePath -> IO Metamodel
parseXmiMetamodel fp =
do
handle <- openFile fp ReadMode
contents <- hGetContents handle
case parseXMLDoc contents of
Nothing -> return Metamodel { metamodelName = takeBaseName fp
, element = []
, mod... | 396 | parseXmiMetamodel :: FilePath -> IO Metamodel
parseXmiMetamodel fp =
do
handle <- openFile fp ReadMode
contents <- hGetContents handle
case parseXMLDoc contents of
Nothing -> return Metamodel { metamodelName = takeBaseName fp
, element = []
, mod... | 396 | parseXmiMetamodel fp =
do
handle <- openFile fp ReadMode
contents <- hGetContents handle
case parseXMLDoc contents of
Nothing -> return Metamodel { metamodelName = takeBaseName fp
, element = []
, model = []
}
Jus... | 350 | false | true | 0 | 13 | 153 | 107 | 51 | 56 | null | null |
brendanhay/khan | khan-cli/Khan/CLI/Launch.hs | mpl-2.0 | commands :: EnvMap -> Mod CommandFields Command
commands env = mconcat
[ command "launch" launch (launchParser env)
"Launch 1..n instances."
] | 158 | commands :: EnvMap -> Mod CommandFields Command
commands env = mconcat
[ command "launch" launch (launchParser env)
"Launch 1..n instances."
] | 158 | commands env = mconcat
[ command "launch" launch (launchParser env)
"Launch 1..n instances."
] | 110 | false | true | 0 | 8 | 36 | 44 | 21 | 23 | null | null |
sebschrader/programmierung-ss2015 | AMx/TypeCheck.hs | mit | checkBinaryInstruction :: Argument -> Argument -> (InstructionSpecification a) -> ParserMonad i a
checkBinaryInstruction _ _ (Nullary name _ ) = throwParserError $ WrongOperandCount name 0 2 | 208 | checkBinaryInstruction :: Argument -> Argument -> (InstructionSpecification a) -> ParserMonad i a
checkBinaryInstruction _ _ (Nullary name _ ) = throwParserError $ WrongOperandCount name 0 2 | 208 | checkBinaryInstruction _ _ (Nullary name _ ) = throwParserError $ WrongOperandCount name 0 2 | 110 | false | true | 0 | 9 | 43 | 60 | 29 | 31 | null | null |
Happstack/ixset | src/Data/IxSet.hs | bsd-3-clause | -- | Infix version of 'getGT'.
(@>) :: (Indexable a, Typeable a, Ord a, Typeable k)
=> IxSet a -> k -> IxSet a
ix @> v = getGT v ix | 136 | (@>) :: (Indexable a, Typeable a, Ord a, Typeable k)
=> IxSet a -> k -> IxSet a
ix @> v = getGT v ix | 105 | ix @> v = getGT v ix | 20 | true | true | 0 | 10 | 35 | 69 | 34 | 35 | null | null |
adityagupta1089/Project-Euler-Haskell | src/problems/Problem61.hs | bsd-3-clause | endsWithStartOf :: Int -> Int -> Bool
endsWithStartOf n m = (n `mod` 100) == m `div` 100 | 88 | endsWithStartOf :: Int -> Int -> Bool
endsWithStartOf n m = (n `mod` 100) == m `div` 100 | 88 | endsWithStartOf n m = (n `mod` 100) == m `div` 100 | 50 | false | true | 0 | 8 | 17 | 49 | 25 | 24 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M12/D05/Exercise.hs | mit | hasWordInDiagonals :: Grid -> String -> Bool
hasWordInDiagonals grid word = undefined | 85 | hasWordInDiagonals :: Grid -> String -> Bool
hasWordInDiagonals grid word = undefined | 85 | hasWordInDiagonals grid word = undefined | 40 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
jean-edouard/xclibs | xchwebsocket/Network/WebSocket.hs | lgpl-2.1 | lineP = limitedLineP 256 | 24 | lineP = limitedLineP 256 | 24 | lineP = limitedLineP 256 | 24 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs | mpl-2.0 | -- | Creates a value of 'CitiesList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'citXgafv'
--
-- * 'citUploadProtocol'
--
-- * 'citRegionDartIds'
--
-- * 'citAccessToken'
--
-- * 'citUploadType'
--
-- * 'citProFileId'
--
-- * 'cit... | 840 | citiesList
:: Int64 -- ^ 'citProFileId'
-> CitiesList
citiesList pCitProFileId_ =
CitiesList'
{ _citXgafv = Nothing
, _citUploadProtocol = Nothing
, _citRegionDartIds = Nothing
, _citAccessToken = Nothing
, _citUploadType = Nothing
, _citProFileId = _Coerce # pCitProFileId_
, _citN... | 437 | citiesList pCitProFileId_ =
CitiesList'
{ _citXgafv = Nothing
, _citUploadProtocol = Nothing
, _citRegionDartIds = Nothing
, _citAccessToken = Nothing
, _citUploadType = Nothing
, _citProFileId = _Coerce # pCitProFileId_
, _citNamePrefix = Nothing
, _citCountryDartIds = Nothing
, _... | 375 | true | true | 0 | 8 | 178 | 117 | 78 | 39 | null | null |
friedbrice/codewars | haskell/Partitions.hs | gpl-3.0 | test :: Show a => Eq b => Show b => (a -> b) -> [(a, b)] -> IO ()
test f tests = mapM_ print . map process $ tests
where
process (x, y) = let res = f x in (((x, y), res), res == y) | 186 | test :: Show a => Eq b => Show b => (a -> b) -> [(a, b)] -> IO ()
test f tests = mapM_ print . map process $ tests
where
process (x, y) = let res = f x in (((x, y), res), res == y) | 186 | test f tests = mapM_ print . map process $ tests
where
process (x, y) = let res = f x in (((x, y), res), res == y) | 120 | false | true | 0 | 11 | 53 | 133 | 68 | 65 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | gpl-2.0 | opNetworkConnect :: String
opNetworkConnect =
"Connect a Network to a specific Nodegroup with the defined netparams\n\
\ (mode, link). Nics in this Network will inherit those params.\n\
\ Produce errors if a NIC (that its not already assigned to a network)\n\
\ has an IP that is contained in the Network t... | 394 | opNetworkConnect :: String
opNetworkConnect =
"Connect a Network to a specific Nodegroup with the defined netparams\n\
\ (mode, link). Nics in this Network will inherit those params.\n\
\ Produce errors if a NIC (that its not already assigned to a network)\n\
\ has an IP that is contained in the Network t... | 394 | opNetworkConnect =
"Connect a Network to a specific Nodegroup with the defined netparams\n\
\ (mode, link). Nics in this Network will inherit those params.\n\
\ Produce errors if a NIC (that its not already assigned to a network)\n\
\ has an IP that is contained in the Network this will produce error\
\ u... | 367 | false | true | 0 | 4 | 78 | 11 | 6 | 5 | null | null |
mparusinski/dotfiles | xmonad/xmonad.hs | mit | myKeyShortcuts =
[ ( (0, 0x1008FF02), spawn "xbacklight -inc 10" )
, ( (0, 0x1008FF03), spawn "xbacklight -dec 10" )
, ( (0, 0x1008FF14), spawn "playerctl play-pause" )
, ( (0, 0x1008FF17), spawn "playerctl next" )
, ( (0, 0x1008FF16), spawn "playerctl prev" )
, ( (0, 0x1008FF13), spawn "pactl set-sink-vol... | 395 | myKeyShortcuts =
[ ( (0, 0x1008FF02), spawn "xbacklight -inc 10" )
, ( (0, 0x1008FF03), spawn "xbacklight -dec 10" )
, ( (0, 0x1008FF14), spawn "playerctl play-pause" )
, ( (0, 0x1008FF17), spawn "playerctl next" )
, ( (0, 0x1008FF16), spawn "playerctl prev" )
, ( (0, 0x1008FF13), spawn "pactl set-sink-vol... | 395 | myKeyShortcuts =
[ ( (0, 0x1008FF02), spawn "xbacklight -inc 10" )
, ( (0, 0x1008FF03), spawn "xbacklight -dec 10" )
, ( (0, 0x1008FF14), spawn "playerctl play-pause" )
, ( (0, 0x1008FF17), spawn "playerctl next" )
, ( (0, 0x1008FF16), spawn "playerctl prev" )
, ( (0, 0x1008FF13), spawn "pactl set-sink-vol... | 395 | false | false | 0 | 7 | 79 | 132 | 80 | 52 | null | null |
atsukotakahashi/wi | src/library/Yi/Syntax/JavaScript.hs | gpl-2.0 | -- | Better name for 'tokFromT'.
toTT :: t -> Tok t
toTT = tokFromT | 67 | toTT :: t -> Tok t
toTT = tokFromT | 34 | toTT = tokFromT | 15 | true | true | 0 | 6 | 14 | 19 | 10 | 9 | null | null |
pepeiborra/muterm-framework | MuTerm/Framework/GraphViz.hs | bsd-3-clause | outId' ClusterNode{..} = outId | 30 | outId' ClusterNode{..} = outId | 30 | outId' ClusterNode{..} = outId | 30 | false | false | 1 | 5 | 3 | 22 | 8 | 14 | null | null |
mightymoose/liquidhaskell | src/Language/Haskell/Liquid/Measure.hs | bsd-3-clause | qualifySpec name sp = sp { sigs = [ (tx x, t) | (x, t) <- sigs sp]
, asmSigs = [ (tx x, t) | (x, t) <- asmSigs sp]
-- , termexprs = [ (tx x, es) | (x, es) <- termexprs sp]
}
where
tx = fmap (qualifySymbol name) | 302 | qualifySpec name sp = sp { sigs = [ (tx x, t) | (x, t) <- sigs sp]
, asmSigs = [ (tx x, t) | (x, t) <- asmSigs sp]
-- , termexprs = [ (tx x, es) | (x, es) <- termexprs sp]
}
where
tx = fmap (qualifySymbol name) | 302 | qualifySpec name sp = sp { sigs = [ (tx x, t) | (x, t) <- sigs sp]
, asmSigs = [ (tx x, t) | (x, t) <- asmSigs sp]
-- , termexprs = [ (tx x, es) | (x, es) <- termexprs sp]
}
where
tx = fmap (qualifySymbol name) | 302 | false | false | 0 | 10 | 143 | 101 | 55 | 46 | null | null |
isomorphism/hackage2 | Distribution/Client.hs | bsd-3-clause | requestGET :: URI -> HttpSession ByteString
requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
checkStatus uri rsp
return (rspBody rsp)
where
headers = []
-- Really annoying! | 217 | requestGET :: URI -> HttpSession ByteString
requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
checkStatus uri rsp
return (rspBody rsp)
where
headers = []
-- Really annoying! | 217 | requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
checkStatus uri rsp
return (rspBody rsp)
where
headers = []
-- Really annoying! | 173 | false | true | 0 | 11 | 50 | 82 | 39 | 43 | null | null |
BeautifulDestinations/fb | gen/src/Facebook/Gen/CodeGenStr.hs | bsd-3-clause | modeToArgs Reading defFields = "[(\"fields\", textListToBS $ fieldNameList $ " <> defFields <> "fl)] " | 102 | modeToArgs Reading defFields = "[(\"fields\", textListToBS $ fieldNameList $ " <> defFields <> "fl)] " | 102 | modeToArgs Reading defFields = "[(\"fields\", textListToBS $ fieldNameList $ " <> defFields <> "fl)] " | 102 | false | false | 0 | 6 | 14 | 19 | 9 | 10 | null | null |
DanielWaterworth/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | -- | Less-than or equal to indent property
lteProp :: IndentProperty
lteProp = IndentProperty (<=) "should be less than or equal to context indentation" | 152 | lteProp :: IndentProperty
lteProp = IndentProperty (<=) "should be less than or equal to context indentation" | 109 | lteProp = IndentProperty (<=) "should be less than or equal to context indentation" | 83 | true | true | 0 | 6 | 23 | 26 | 12 | 14 | null | null |
spechub/Hets | CSL/Keywords.hs | gpl-2.0 | nilS :: String
nilS = "nil" | 27 | nilS :: String
nilS = "nil" | 27 | nilS = "nil" | 12 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
fredokun/piexplorer | src/EnvTests.hs | gpl-3.0 | -- printing tests
testEnv1 = initEnv [Static "a", Static "b", Static "c"] | 74 | testEnv1 = initEnv [Static "a", Static "b", Static "c"] | 55 | testEnv1 = initEnv [Static "a", Static "b", Static "c"] | 55 | true | false | 1 | 6 | 12 | 31 | 14 | 17 | null | null |
meiersi-11ce/stack | src/Stack/Setup.hs | bsd-3-clause | upgradeCabal :: (MonadIO m, MonadLogger m, MonadReader env m, HasHttpManager env, HasConfig env, MonadBaseControl IO m, MonadMask m)
=> EnvOverride
-> WhichCompiler
-> m ()
upgradeCabal menv wc = do
let name = $(mkPackageName "Cabal")
rmap <- resolvePackages menv Set.empty... | 2,821 | upgradeCabal :: (MonadIO m, MonadLogger m, MonadReader env m, HasHttpManager env, HasConfig env, MonadBaseControl IO m, MonadMask m)
=> EnvOverride
-> WhichCompiler
-> m ()
upgradeCabal menv wc = do
let name = $(mkPackageName "Cabal")
rmap <- resolvePackages menv Set.empty... | 2,821 | upgradeCabal menv wc = do
let name = $(mkPackageName "Cabal")
rmap <- resolvePackages menv Set.empty (Set.singleton name)
newest <-
case Map.keys rmap of
[] -> error "No Cabal library found in index, cannot upgrade"
[PackageIdentifier name' version]
| name == ... | 2,609 | false | true | 3 | 13 | 1,135 | 643 | 311 | 332 | null | null |
AndrewWUw/cs9181 | Data/Array/Accelerate/C/Exp.hs | bsd-3-clause | roundToC :: FloatingType a -> IntegralType b -> C.Exp -> C.Exp
roundToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "round") [x] | 179 | roundToC :: FloatingType a -> IntegralType b -> C.Exp -> C.Exp
roundToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "round") [x] | 179 | roundToC ta tb x
= ccast (NumScalarType (IntegralNumType tb))
$ ccall (FloatingNumType ta `postfix` "round") [x] | 116 | false | true | 2 | 9 | 30 | 79 | 39 | 40 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp _ (VecSubOp WordVec n w) = Just (MO_V_Sub n w) | 61 | translateOp _ (VecSubOp WordVec n w) = Just (MO_V_Sub n w) | 61 | translateOp _ (VecSubOp WordVec n w) = Just (MO_V_Sub n w) | 61 | false | false | 0 | 7 | 13 | 32 | 15 | 17 | null | null |
rumblesan/improviz | src/Language/Interpreter.hs | bsd-3-clause | interpretExpression :: Expression -> InterpreterProcess Value
interpretExpression (EApp (Application name args mbLambda)) = do
variableDefs <- use variables
let mbScopedLambda = fmap (setLambdaScope (Just variableDefs)) mbLambda
interpretApplication name args mbScopedLambda | 280 | interpretExpression :: Expression -> InterpreterProcess Value
interpretExpression (EApp (Application name args mbLambda)) = do
variableDefs <- use variables
let mbScopedLambda = fmap (setLambdaScope (Just variableDefs)) mbLambda
interpretApplication name args mbScopedLambda | 280 | interpretExpression (EApp (Application name args mbLambda)) = do
variableDefs <- use variables
let mbScopedLambda = fmap (setLambdaScope (Just variableDefs)) mbLambda
interpretApplication name args mbScopedLambda | 218 | false | true | 0 | 14 | 35 | 83 | 38 | 45 | null | null |
juhp/leksah | src/IDE/Package.hs | gpl-2.0 | interactiveFlags :: Prefs -> [Text]
interactiveFlags prefs =
(printEvldWithShowFlag $ printEvldWithShow prefs)
: (breakOnExceptionFlag $ breakOnException prefs)
: (breakOnErrorFlag $ breakOnError prefs)
: [printBindResultFlag $ printBindResult prefs] | 266 | interactiveFlags :: Prefs -> [Text]
interactiveFlags prefs =
(printEvldWithShowFlag $ printEvldWithShow prefs)
: (breakOnExceptionFlag $ breakOnException prefs)
: (breakOnErrorFlag $ breakOnError prefs)
: [printBindResultFlag $ printBindResult prefs] | 266 | interactiveFlags prefs =
(printEvldWithShowFlag $ printEvldWithShow prefs)
: (breakOnExceptionFlag $ breakOnException prefs)
: (breakOnErrorFlag $ breakOnError prefs)
: [printBindResultFlag $ printBindResult prefs] | 230 | false | true | 6 | 8 | 42 | 82 | 38 | 44 | null | null |
begriffs/hs-webdriver | src/Test/WebDriver/Monad.hs | bsd-3-clause | -- |A finalizer ensuring that the session is always closed at the end of
-- the given 'WD' action, regardless of any exceptions.
finallyClose:: WebDriver wd => wd a -> wd a
finallyClose wd = closeOnException wd <* closeSession | 226 | finallyClose:: WebDriver wd => wd a -> wd a
finallyClose wd = closeOnException wd <* closeSession | 97 | finallyClose wd = closeOnException wd <* closeSession | 53 | true | true | 0 | 7 | 38 | 40 | 19 | 21 | null | null |
comatose/redo | src/Development/Redo/Future.hs | bsd-3-clause | waitEither :: Future a -> IO (Either SomeException a)
waitEither (Future _ mvar) = readMVar mvar | 96 | waitEither :: Future a -> IO (Either SomeException a)
waitEither (Future _ mvar) = readMVar mvar | 96 | waitEither (Future _ mvar) = readMVar mvar | 42 | false | true | 0 | 9 | 15 | 47 | 21 | 26 | null | null |
sgtest/haskell-simple-tests | src/Main.hs | mit | identity = id | 13 | identity = id | 13 | identity = id | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
herngyi/hmol | MoleculeBuilder.hs | gpl-3.0 | beginWithNotCentering :: Molecule -> OrbitalRef -> MoleculeBuilder () -> Molecule
beginWithNotCentering mol ref mb = mol'
where (_, mol',_) = runBuilder mb mol ref | 167 | beginWithNotCentering :: Molecule -> OrbitalRef -> MoleculeBuilder () -> Molecule
beginWithNotCentering mol ref mb = mol'
where (_, mol',_) = runBuilder mb mol ref | 166 | beginWithNotCentering mol ref mb = mol'
where (_, mol',_) = runBuilder mb mol ref | 84 | false | true | 0 | 9 | 27 | 60 | 30 | 30 | null | null |
MarcusWalz/hgit | Lib/HGit/Batch.hs | bsd-3-clause | -- | Build a GitBatch from Git Reader
makeGitBatch :: GitReader GitBatch
makeGitBatch = do
(inh, outh, _,_) <- spawnGitProcess cmd
return $ GitBatch inh outh
where cmd = GitCommand (T.pack "cat-file") [T.pack "--batch"]
--Create a GitReader given a GitBatch reader | 272 | makeGitBatch :: GitReader GitBatch
makeGitBatch = do
(inh, outh, _,_) <- spawnGitProcess cmd
return $ GitBatch inh outh
where cmd = GitCommand (T.pack "cat-file") [T.pack "--batch"]
--Create a GitReader given a GitBatch reader | 234 | makeGitBatch = do
(inh, outh, _,_) <- spawnGitProcess cmd
return $ GitBatch inh outh
where cmd = GitCommand (T.pack "cat-file") [T.pack "--batch"]
--Create a GitReader given a GitBatch reader | 199 | true | true | 0 | 8 | 48 | 79 | 40 | 39 | null | null |
pandaychen/PFQ | Development/SimpleBuilder.hs | gpl-2.0 | (*>>) :: Target -> ActionInfo -> Writer [Component] ()
t *>> r = tell [Component t r] | 85 | (*>>) :: Target -> ActionInfo -> Writer [Component] ()
t *>> r = tell [Component t r] | 85 | t *>> r = tell [Component t r] | 30 | false | true | 0 | 10 | 16 | 51 | 25 | 26 | null | null |
lovullo/mikegerwitz-at-lovullo | files/xmonad/xmonad.hs | gpl-3.0 | keybindings conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [
-- launch terminal
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
-- dmenu used as launcher
((modm, xK_p), spawn "dmenu_run"),
-- window manipulation
((modm .|. shiftMask, xK_c), kill),
((modm, xK_n), refresh... | 2,950 | keybindings conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [
-- launch terminal
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
-- dmenu used as launcher
((modm, xK_p), spawn "dmenu_run"),
-- window manipulation
((modm .|. shiftMask, xK_c), kill),
((modm, xK_n), refresh... | 2,950 | keybindings conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [
-- launch terminal
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
-- dmenu used as launcher
((modm, xK_p), spawn "dmenu_run"),
-- window manipulation
((modm .|. shiftMask, xK_c), kill),
((modm, xK_n), refresh... | 2,950 | false | false | 28 | 17 | 635 | 999 | 608 | 391 | null | null |
nsmryan/CADH | src/Main.hs | bsd-3-clause | sys = Section "Sys" [ uint8Tlm "stayInCheckResult"
, uint8Tlm "stayOutCheckResult"
, uint8Tlm "altitudeCheckResult"
, uint8Tlm "pad"
, uint32Tlmle "StateFlags"
, doubleTlmle "latitude"
... | 1,561 | sys = Section "Sys" [ uint8Tlm "stayInCheckResult"
, uint8Tlm "stayOutCheckResult"
, uint8Tlm "altitudeCheckResult"
, uint8Tlm "pad"
, uint32Tlmle "StateFlags"
, doubleTlmle "latitude"
... | 1,561 | sys = Section "Sys" [ uint8Tlm "stayInCheckResult"
, uint8Tlm "stayOutCheckResult"
, uint8Tlm "altitudeCheckResult"
, uint8Tlm "pad"
, uint32Tlmle "StateFlags"
, doubleTlmle "latitude"
... | 1,561 | false | false | 1 | 7 | 741 | 194 | 95 | 99 | null | null |
ekmett/multipass | Data/Pass/L.hs | bsd-3-clause | eqL LScale a = a | 16 | eqL LScale a = a | 16 | eqL LScale a = a | 16 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
eryx67/vk-api-example | src/VK/App/Widgets/AudioPlayer/Views.hs | bsd-3-clause | nameLabel_ :: T.Text -> ReactElementM eventHandler ()
nameLabel_ name =
view nameLabelView name mempty | 105 | nameLabel_ :: T.Text -> ReactElementM eventHandler ()
nameLabel_ name =
view nameLabelView name mempty | 105 | nameLabel_ name =
view nameLabelView name mempty | 50 | false | true | 0 | 7 | 16 | 34 | 16 | 18 | null | null |
ezyang/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | noSourceStrictness, sourceLazy, sourceStrict :: SourceStrictnessQ
noSourceStrictness = return NoSourceStrictness | 112 | noSourceStrictness, sourceLazy, sourceStrict :: SourceStrictnessQ
noSourceStrictness = return NoSourceStrictness | 112 | noSourceStrictness = return NoSourceStrictness | 46 | false | true | 0 | 5 | 8 | 18 | 11 | 7 | null | null |
tekul/cryptonite | Crypto/Cipher/DES/Primitive.hs | bsd-3-clause | unbitify :: Bits64 -> Word64
unbitify bs = foldl (\i b -> if b then 1 + shiftL i 1 else shiftL i 1) 0 bs | 104 | unbitify :: Bits64 -> Word64
unbitify bs = foldl (\i b -> if b then 1 + shiftL i 1 else shiftL i 1) 0 bs | 104 | unbitify bs = foldl (\i b -> if b then 1 + shiftL i 1 else shiftL i 1) 0 bs | 75 | false | true | 0 | 10 | 25 | 57 | 29 | 28 | null | null |
tokiwoousaka/ArareSynth | src/Sound/ArareSynth/Oscillator.hs | mit | oscillate :: (Oscillator o, Channel c h) => o c -> [Frequency] -> [c]
oscillate _ [] = [] | 89 | oscillate :: (Oscillator o, Channel c h) => o c -> [Frequency] -> [c]
oscillate _ [] = [] | 89 | oscillate _ [] = [] | 19 | false | true | 0 | 8 | 18 | 54 | 28 | 26 | null | null |
ti1024/hacq | src/Control/Monad/Quantum/Class.hs | bsd-3-clause | handleMaybeCtrl :: MonadQuantum w m => (Maybe w -> m a) -> m a
handleMaybeCtrl handler =
compressCtrls 1 $ handleCtrls $ handler . Maybe.listToMaybe | 152 | handleMaybeCtrl :: MonadQuantum w m => (Maybe w -> m a) -> m a
handleMaybeCtrl handler =
compressCtrls 1 $ handleCtrls $ handler . Maybe.listToMaybe | 152 | handleMaybeCtrl handler =
compressCtrls 1 $ handleCtrls $ handler . Maybe.listToMaybe | 89 | false | true | 2 | 9 | 28 | 65 | 29 | 36 | null | null |
kojiromike/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processErrorHandlers :: Archive -> Idris ()
processErrorHandlers ar = do
ns <- getEntry [] "ibc_errorhandlers" ar
updateIState (\i -> i { idris_errorhandlers = idris_errorhandlers i ++ ns }) | 198 | processErrorHandlers :: Archive -> Idris ()
processErrorHandlers ar = do
ns <- getEntry [] "ibc_errorhandlers" ar
updateIState (\i -> i { idris_errorhandlers = idris_errorhandlers i ++ ns }) | 198 | processErrorHandlers ar = do
ns <- getEntry [] "ibc_errorhandlers" ar
updateIState (\i -> i { idris_errorhandlers = idris_errorhandlers i ++ ns }) | 154 | false | true | 0 | 14 | 35 | 73 | 34 | 39 | null | null |
boj/garbage | src/NaiveGame0.hs | bsd-3-clause | numEntities :: Int
numEntities = 1000 | 37 | numEntities :: Int
numEntities = 1000 | 37 | numEntities = 1000 | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
sdiehl/ghc | compiler/GHC/Stg/Syntax.hs | bsd-3-clause | pprStgOp (StgPrimCallOp op)= ppr op | 35 | pprStgOp (StgPrimCallOp op)= ppr op | 35 | pprStgOp (StgPrimCallOp op)= ppr op | 35 | false | false | 0 | 7 | 4 | 18 | 8 | 10 | null | null |
kim/amazonka | amazonka-cloudformation/gen/Network/AWS/CloudFormation/Types.hs | mpl-2.0 | -- | Time the status was updated.
srdLastUpdatedTimestamp :: Lens' StackResourceDetail UTCTime
srdLastUpdatedTimestamp =
lens _srdLastUpdatedTimestamp (\s a -> s { _srdLastUpdatedTimestamp = a })
. _Time | 215 | srdLastUpdatedTimestamp :: Lens' StackResourceDetail UTCTime
srdLastUpdatedTimestamp =
lens _srdLastUpdatedTimestamp (\s a -> s { _srdLastUpdatedTimestamp = a })
. _Time | 181 | srdLastUpdatedTimestamp =
lens _srdLastUpdatedTimestamp (\s a -> s { _srdLastUpdatedTimestamp = a })
. _Time | 120 | true | true | 0 | 10 | 38 | 44 | 24 | 20 | null | null |
mhlakhani/hlisp | src/Lexer.hs | mit | identifier = Tok.identifier lexer | 38 | identifier = Tok.identifier lexer | 38 | identifier = Tok.identifier lexer | 38 | false | false | 0 | 6 | 8 | 11 | 5 | 6 | null | null |
dwincort/UISF | FRP/UISF/Graphics/Graphic.hs | bsd-3-clause | -- | Draw a filled polygon with corners defined by the given points.
polygon :: [Point] -> Graphic
polygon = GPolygon | 117 | polygon :: [Point] -> Graphic
polygon = GPolygon | 48 | polygon = GPolygon | 18 | true | true | 0 | 6 | 20 | 19 | 11 | 8 | null | null |
danplubell/hbase-haskell | src/Database/HBase/Client.hs | mit | tColumnToRowResultColumn::TColumn->RowResultColumn
tColumnToRowResultColumn t =RowResultColumn
{
rowResultColumn = fmap (BC.unpack . lazyToStrict) $ f_TColumn_columnName t
, rowResultColumnValue = fmap tCellToResultValue $ f_TColumn_cell t
} | 270 | tColumnToRowResultColumn::TColumn->RowResultColumn
tColumnToRowResultColumn t =RowResultColumn
{
rowResultColumn = fmap (BC.unpack . lazyToStrict) $ f_TColumn_columnName t
, rowResultColumnValue = fmap tCellToResultValue $ f_TColumn_cell t
} | 270 | tColumnToRowResultColumn t =RowResultColumn
{
rowResultColumn = fmap (BC.unpack . lazyToStrict) $ f_TColumn_columnName t
, rowResultColumnValue = fmap tCellToResultValue $ f_TColumn_cell t
} | 219 | false | true | 0 | 12 | 51 | 71 | 33 | 38 | null | null |
patperry/hs-linear-algebra | tests-old/Banded.hs | bsd-3-clause | prop_herm_scale (a :: B) k =
herm (k *> a) === (conjugate k) *> (herm a) | 76 | prop_herm_scale (a :: B) k =
herm (k *> a) === (conjugate k) *> (herm a) | 76 | prop_herm_scale (a :: B) k =
herm (k *> a) === (conjugate k) *> (herm a) | 76 | false | false | 0 | 9 | 19 | 48 | 24 | 24 | null | null |
GaloisInc/sk-dev-platform | libs/SCD/src/SCD/M4/ErrorsXml.hs | bsd-3-clause | -- | Constructs an XML element
mkElem :: QName -> [Attr] -> [Element] -> Element
mkElem qn attrs children = Element{ elName = qn
, elAttribs = attrs
, elContent = map Elem children
, elLine = Nothing
... | 343 | mkElem :: QName -> [Attr] -> [Element] -> Element
mkElem qn attrs children = Element{ elName = qn
, elAttribs = attrs
, elContent = map Elem children
, elLine = Nothing
} | 312 | mkElem qn attrs children = Element{ elName = qn
, elAttribs = attrs
, elContent = map Elem children
, elLine = Nothing
} | 262 | true | true | 0 | 8 | 180 | 74 | 40 | 34 | null | null |
frantisekfarka/ghc-dsi | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl (CmmLabel _ fs CmmRet)
= ftext fs <> ptext (sLit "_ret") | 66 | pprCLbl (CmmLabel _ fs CmmRet)
= ftext fs <> ptext (sLit "_ret") | 66 | pprCLbl (CmmLabel _ fs CmmRet)
= ftext fs <> ptext (sLit "_ret") | 66 | false | false | 0 | 8 | 13 | 35 | 16 | 19 | null | null |
noamz/linlam-gos | src/Lambda.hs | mit | -- test for beta equality
beta :: ULT -> ULT -> Bool
beta t u = alpha (normalize t) (normalize u) | 97 | beta :: ULT -> ULT -> Bool
beta t u = alpha (normalize t) (normalize u) | 71 | beta t u = alpha (normalize t) (normalize u) | 44 | true | true | 0 | 7 | 20 | 46 | 22 | 24 | null | null |
CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy.hs | mit | -- ---------------------------------------------------------------------
-- Indexing ByteStrings
-- | /O(c)/ 'ByteString' index (subscript) operator, starting from 0.
index :: ByteString -> Int64 -> Word8
index _ i | i < 0 = moduleError "index" ("negative index: " ++ show i) | 278 | index :: ByteString -> Int64 -> Word8
index _ i | i < 0 = moduleError "index" ("negative index: " ++ show i) | 110 | index _ i | i < 0 = moduleError "index" ("negative index: " ++ show i) | 72 | true | true | 0 | 9 | 40 | 52 | 26 | 26 | null | null |
bobgru/conifer | src/Conifer.hs | bsd-3-clause | whorl :: P3 Double -> TreeParams -> AgeParams -> [Seed]
whorl p tp ap@(AgeParams age tbai phase) = ss
where
lr = tpTrunkBranchLengthRatio tp
nb = tpWhorlSize tp
as = tpTrunkBranchAngles tp
pt :: Int -> V3 Double
pt i = r3 (cos (theta i), sin (theta i), cos (phi i)) ^* lr
where theta... | 799 | whorl :: P3 Double -> TreeParams -> AgeParams -> [Seed]
whorl p tp ap@(AgeParams age tbai phase) = ss
where
lr = tpTrunkBranchLengthRatio tp
nb = tpWhorlSize tp
as = tpTrunkBranchAngles tp
pt :: Int -> V3 Double
pt i = r3 (cos (theta i), sin (theta i), cos (phi i)) ^* lr
where theta... | 799 | whorl p tp ap@(AgeParams age tbai phase) = ss
where
lr = tpTrunkBranchLengthRatio tp
nb = tpWhorlSize tp
as = tpTrunkBranchAngles tp
pt :: Int -> V3 Double
pt i = r3 (cos (theta i), sin (theta i), cos (phi i)) ^* lr
where theta i = fromIntegral i * tau / fromIntegral nb + phase
... | 743 | false | true | 8 | 11 | 213 | 304 | 149 | 155 | null | null |
mfine/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | eqPhase :: Phase -> Phase -> Bool
-- Equality of constructors, ignoring the HscSource field
-- NB: the HscSource field can be 'bot'; see anyHsc above
eqPhase (Unlit _) (Unlit _) = True | 187 | eqPhase :: Phase -> Phase -> Bool
eqPhase (Unlit _) (Unlit _) = True | 71 | eqPhase (Unlit _) (Unlit _) = True | 37 | true | true | 0 | 10 | 35 | 44 | 21 | 23 | null | null |
MaxDaten/yage-rendering | src/Yage/Rendering/Textures/TextureImage.hs | mit | -- TODO complete mapping
defaultInternal pf = error $ unpack $ format "unsupported format: {}" (Only $ Shown pf ) | 113 | defaultInternal pf = error $ unpack $ format "unsupported format: {}" (Only $ Shown pf ) | 88 | defaultInternal pf = error $ unpack $ format "unsupported format: {}" (Only $ Shown pf ) | 88 | true | false | 0 | 9 | 19 | 33 | 16 | 17 | null | null |
ihc/futhark | src/Futhark/Analysis/ScalExp.hs | isc | toScalExp look (BasicOp (UnOp AST.Not e)) =
Just . SNot <$> subExpToScalExp' look e | 85 | toScalExp look (BasicOp (UnOp AST.Not e)) =
Just . SNot <$> subExpToScalExp' look e | 85 | toScalExp look (BasicOp (UnOp AST.Not e)) =
Just . SNot <$> subExpToScalExp' look e | 85 | false | false | 3 | 9 | 15 | 46 | 19 | 27 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | toName TR = "Turkey" | 20 | toName TR = "Turkey" | 20 | toName TR = "Turkey" | 20 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
jtapolczai/Hephaestos | Crawling/Hephaestos/CLI.hs | apache-2.0 | -- |Main function.
mainCLI :: AppState -> IO ()
mainCLI initState = do
-- initialize log4j
logH <- Log.log4jFileHandler "log.xml" Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (Log.addHandler logH)
-- Run commands until one of them returns True (=quit)
flip runStateT initState (do
lib <- comm... | 589 | mainCLI :: AppState -> IO ()
mainCLI initState = do
-- initialize log4j
logH <- Log.log4jFileHandler "log.xml" Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (Log.addHandler logH)
-- Run commands until one of them returns True (=quit)
flip runStateT initState (do
lib <- commandLib
makeRE... | 570 | mainCLI initState = do
-- initialize log4j
logH <- Log.log4jFileHandler "log.xml" Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (Log.addHandler logH)
-- Run commands until one of them returns True (=quit)
flip runStateT initState (do
lib <- commandLib
makeREPL (noOp l : lib) (exit l) (u... | 541 | true | true | 4 | 14 | 133 | 205 | 92 | 113 | null | null |
ndmitchell/shake | src/Development/Shake/Internal/FilePattern.hs | bsd-3-clause | parseLit :: String -> Pat
parseLit "*" = Star | 45 | parseLit :: String -> Pat
parseLit "*" = Star | 45 | parseLit "*" = Star | 19 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Socket.ByteString.hs | bsd-3-clause | send :: Socket -- ^ Connected socket
-> ByteString -- ^ Data to send
-> IO Int -- ^ Number of bytes sent
send sock xs = unsafeUseAsCStringLen xs $ \(str, len) ->
sendBuf sock (castPtr str) len | 217 | send :: Socket -- ^ Connected socket
-> ByteString -- ^ Data to send
-> IO Int
send sock xs = unsafeUseAsCStringLen xs $ \(str, len) ->
sendBuf sock (castPtr str) len | 186 | send sock xs = unsafeUseAsCStringLen xs $ \(str, len) ->
sendBuf sock (castPtr str) len | 91 | true | true | 0 | 9 | 62 | 61 | 32 | 29 | null | null |
karamellpelle/grid | source/MyPrelude.hs | gpl-3.0 | --------------------------------------------------------------------------------
--
-- | (dx, dy) of angle
cossin :: Float -> (Float, Float)
cossin a =
(cos a, sin a) | 173 | cossin :: Float -> (Float, Float)
cossin a =
(cos a, sin a) | 63 | cossin a =
(cos a, sin a) | 29 | true | true | 0 | 6 | 27 | 39 | 22 | 17 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.