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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tjakway/ghcjvm | compiler/nativeGen/Dwarf/Constants.hs | bsd-3-clause | dW_TAG_subprogram = 46 | 27 | dW_TAG_subprogram = 46 | 27 | dW_TAG_subprogram = 46 | 27 | false | false | 0 | 4 | 7 | 6 | 3 | 3 | null | null |
ndmitchell/shake | src/Test/Tar.hs | bsd-3-clause | main = testBuild defaultTest $ do
want ["result.tar"]
"result.tar" %> \out -> do
contents <- fmap (map (shakeRoot </>)) $ readFileLines $ shakeRoot </> "src/Test/Tar/list.txt"
need contents
cmd "tar -cf" [out] contents | 250 | main = testBuild defaultTest $ do
want ["result.tar"]
"result.tar" %> \out -> do
contents <- fmap (map (shakeRoot </>)) $ readFileLines $ shakeRoot </> "src/Test/Tar/list.txt"
need contents
cmd "tar -cf" [out] contents | 250 | main = testBuild defaultTest $ do
want ["result.tar"]
"result.tar" %> \out -> do
contents <- fmap (map (shakeRoot </>)) $ readFileLines $ shakeRoot </> "src/Test/Tar/list.txt"
need contents
cmd "tar -cf" [out] contents | 250 | false | false | 3 | 19 | 63 | 90 | 40 | 50 | null | null |
andorp/bead | src/Bead/Persistence/Guards.hs | bsd-3-clause | isStudentOf :: Username -> Username -> Persist Bool
isStudentOf student admin = do
scourses <- userCourses student
sgroups <- userGroups student
sgcourses <- mapM courseOfGroup sgroups
acourses <- map fst <$> administratedCourses admin
agroups <- map fst <$> administratedGroups admin
return $ or [ ha... | 716 | isStudentOf :: Username -> Username -> Persist Bool
isStudentOf student admin = do
scourses <- userCourses student
sgroups <- userGroups student
sgcourses <- mapM courseOfGroup sgroups
acourses <- map fst <$> administratedCourses admin
agroups <- map fst <$> administratedGroups admin
return $ or [ ha... | 716 | isStudentOf student admin = do
scourses <- userCourses student
sgroups <- userGroups student
sgcourses <- mapM courseOfGroup sgroups
acourses <- map fst <$> administratedCourses admin
agroups <- map fst <$> administratedGroups admin
return $ or [ hasIntersection (Set.fromList (scourses ++ sgcourses))... | 664 | false | true | 0 | 14 | 150 | 189 | 88 | 101 | null | null |
Forkk/ChatCore | ChatCore/IRC/Line.hs | mit | -- | Parser which parses the source at the beginning of a line.
-- Will fail and consume no input if no source string is present.
source :: Parser IRCSource
source = do
-- If the line starts with a colon, read the source string.
char ':'
try userSource <|> serverSource
-- | Parser which parses a user sourc... | 358 | source :: Parser IRCSource
source = do
-- If the line starts with a colon, read the source string.
char ':'
try userSource <|> serverSource
-- | Parser which parses a user source in the format <nick>!<ident>@<host>. | 228 | source = do
-- If the line starts with a colon, read the source string.
char ':'
try userSource <|> serverSource
-- | Parser which parses a user source in the format <nick>!<ident>@<host>. | 201 | true | true | 0 | 8 | 75 | 34 | 17 | 17 | null | null |
hvr/jhc | src/E/SStrictness.hs | mit | infer (ELam x@TVr {tvrType = t1} m) = do
s1 <- freshAnot t1
(s2,e) <- local (minsert (tvrIdent x) s1) $
infer m
v <- mkVar
return (TAnot strict $ s1 `TFun` s2,ELam x e) | 192 | infer (ELam x@TVr {tvrType = t1} m) = do
s1 <- freshAnot t1
(s2,e) <- local (minsert (tvrIdent x) s1) $
infer m
v <- mkVar
return (TAnot strict $ s1 `TFun` s2,ELam x e) | 192 | infer (ELam x@TVr {tvrType = t1} m) = do
s1 <- freshAnot t1
(s2,e) <- local (minsert (tvrIdent x) s1) $
infer m
v <- mkVar
return (TAnot strict $ s1 `TFun` s2,ELam x e) | 192 | false | false | 0 | 13 | 58 | 113 | 55 | 58 | null | null |
siddhanathan/yi | yi-core/src/Yi/Buffer/Misc.hs | gpl-2.0 | -- | Move point down one line
lineDown :: BufferM ()
lineDown = void (lineMoveRel 1) | 84 | lineDown :: BufferM ()
lineDown = void (lineMoveRel 1) | 54 | lineDown = void (lineMoveRel 1) | 31 | true | true | 0 | 7 | 15 | 26 | 13 | 13 | null | null |
sapek/pandoc | src/Text/Pandoc/Pretty.hs | gpl-2.0 | mergeBlocks :: Bool -> D -> D -> D
mergeBlocks addSpace (Block w1 lns1) (Block w2 lns2) =
Block (w1 + w2 + if addSpace then 1 else 0) $
zipWith (\l1 l2 -> pad w1 l1 ++ l2) (lns1 ++ empties) (map sp lns2 ++ empties)
where empties = replicate (abs $ length lns1 - length lns2) ""
pad n s = s ++ replic... | 421 | mergeBlocks :: Bool -> D -> D -> D
mergeBlocks addSpace (Block w1 lns1) (Block w2 lns2) =
Block (w1 + w2 + if addSpace then 1 else 0) $
zipWith (\l1 l2 -> pad w1 l1 ++ l2) (lns1 ++ empties) (map sp lns2 ++ empties)
where empties = replicate (abs $ length lns1 - length lns2) ""
pad n s = s ++ replic... | 421 | mergeBlocks addSpace (Block w1 lns1) (Block w2 lns2) =
Block (w1 + w2 + if addSpace then 1 else 0) $
zipWith (\l1 l2 -> pad w1 l1 ++ l2) (lns1 ++ empties) (map sp lns2 ++ empties)
where empties = replicate (abs $ length lns1 - length lns2) ""
pad n s = s ++ replicate (n - realLength s) ' '
... | 386 | false | true | 3 | 10 | 128 | 207 | 105 | 102 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | hvKvmDiskAio :: String
hvKvmDiskAio = "disk_aio" | 48 | hvKvmDiskAio :: String
hvKvmDiskAio = "disk_aio" | 48 | hvKvmDiskAio = "disk_aio" | 25 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Textile.hs | gpl-2.0 | codeBlock :: Parser [Char] ParserState Blocks
codeBlock = codeBlockBc <|> codeBlockPre | 86 | codeBlock :: Parser [Char] ParserState Blocks
codeBlock = codeBlockBc <|> codeBlockPre | 86 | codeBlock = codeBlockBc <|> codeBlockPre | 40 | false | true | 0 | 6 | 10 | 25 | 13 | 12 | null | null |
jkr/pandoc-citeproc | src/Text/CSL/Eval/Common.hs | bsd-3-clause | getStringVar :: String -> State EvalState String
getStringVar
= getVar [] getStringValue | 92 | getStringVar :: String -> State EvalState String
getStringVar
= getVar [] getStringValue | 92 | getStringVar
= getVar [] getStringValue | 43 | false | true | 0 | 7 | 15 | 29 | 13 | 16 | null | null |
markuspf/Idris-dev | src/IRTS/JavaScript/PrimOp.hs | bsd-3-clause | jsPrimCoerce :: JsPrimTy -> JsPrimTy -> JsExpr -> JsExpr
jsPrimCoerce PTBool PTAny x = jsB2I x | 94 | jsPrimCoerce :: JsPrimTy -> JsPrimTy -> JsExpr -> JsExpr
jsPrimCoerce PTBool PTAny x = jsB2I x | 94 | jsPrimCoerce PTBool PTAny x = jsB2I x | 37 | false | true | 0 | 7 | 15 | 33 | 16 | 17 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 24783229 = 3769 | 35 | getValueFromProduct 24783229 = 3769 | 35 | getValueFromProduct 24783229 = 3769 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
wowofbob/circles | src/Model/Movement.hs | mit | -- Vector constructor.
vector :: a -> a -> Vector a
vector = V.V2 | 65 | vector :: a -> a -> Vector a
vector = V.V2 | 42 | vector = V.V2 | 13 | true | true | 0 | 8 | 13 | 31 | 14 | 17 | null | null |
hguenther/nbis | MemoryModel/Typed.hs | agpl-3.0 | typedMemCopy' ptr off_v off_b ((len,vec):vecs) ((blen,bank):banks)
| off_v >= len = typedMemCopy' ptr (off_v-len) off_b vecs ((blen,bank):banks)
| off_b >= blen = bank:typedMemCopy' ptr off_v (off_b - blen) ((len,vec):vecs) banks
| off_v == 0 && off_b == 0 && l... | 1,549 | typedMemCopy' ptr off_v off_b ((len,vec):vecs) ((blen,bank):banks)
| off_v >= len = typedMemCopy' ptr (off_v-len) off_b vecs ((blen,bank):banks)
| off_b >= blen = bank:typedMemCopy' ptr off_v (off_b - blen) ((len,vec):vecs) banks
| off_v == 0 && off_b == 0 && l... | 1,549 | typedMemCopy' ptr off_v off_b ((len,vec):vecs) ((blen,bank):banks)
| off_v >= len = typedMemCopy' ptr (off_v-len) off_b vecs ((blen,bank):banks)
| off_b >= blen = bank:typedMemCopy' ptr off_v (off_b - blen) ((len,vec):vecs) banks
| off_v == 0 && off_b == 0 && l... | 1,549 | false | false | 2 | 18 | 656 | 627 | 323 | 304 | null | null |
edsko/cabal | cabal-install/Distribution/Client/Targets.hs | bsd-3-clause | userToPackageConstraint :: UserConstraint -> PackageConstraint
-- At the moment, the types happen to be directly equivalent
userToPackageConstraint uc = case uc of
UserConstraintVersion name ver -> PackageConstraintVersion name ver
UserConstraintInstalled name -> PackageConstraintInstalled name
User... | 546 | userToPackageConstraint :: UserConstraint -> PackageConstraint
userToPackageConstraint uc = case uc of
UserConstraintVersion name ver -> PackageConstraintVersion name ver
UserConstraintInstalled name -> PackageConstraintInstalled name
UserConstraintSource name -> PackageConstraintSource ... | 485 | userToPackageConstraint uc = case uc of
UserConstraintVersion name ver -> PackageConstraintVersion name ver
UserConstraintInstalled name -> PackageConstraintInstalled name
UserConstraintSource name -> PackageConstraintSource name
UserConstraintFlags name flags -> PackageConstraint... | 422 | true | true | 6 | 5 | 101 | 86 | 43 | 43 | null | null |
dorchard/array-memoize | example.hs | bsd-2-clause | fib' _ 1 = 1 | 12 | fib' _ 1 = 1 | 12 | fib' _ 1 = 1 | 12 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | checkSudoRedirect _ _ = return () | 33 | checkSudoRedirect _ _ = return () | 33 | checkSudoRedirect _ _ = return () | 33 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
alphaHeavy/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | emptyInitFlags :: IT.InitFlags
emptyInitFlags = mempty | 55 | emptyInitFlags :: IT.InitFlags
emptyInitFlags = mempty | 55 | emptyInitFlags = mempty | 24 | false | true | 0 | 5 | 6 | 13 | 7 | 6 | null | null |
mightymoose/liquidhaskell | tests/todo/linspace-crash.hs | bsd-3-clause | {-@ dot :: (Num a) => xs:[a] -> {v:[a] | (len v) = (len xs)} -> a @-}
dot xs ys = sum (zipWith (*) xs ys) | 105 | dot xs ys = sum (zipWith (*) xs ys) | 35 | dot xs ys = sum (zipWith (*) xs ys) | 35 | true | false | 1 | 7 | 26 | 32 | 14 | 18 | null | null |
vizietto/kalkulu | src/Kalkulu/Environment.hs | gpl-3.0 | run :: Environment -> Kernel a -> IO a
run env action =
let proceed = run env . lift . lift in
case runIdentity $ runFreeT $ fmap fst $ runWriterT $ fmap right $ runExceptT action of
Pure x -> return x
Free (GetSymbolMaybe c s next) -> do
table <- readIORef (symbolTable env)
proceed $ next $ Map.lookup ... | 1,984 | run :: Environment -> Kernel a -> IO a
run env action =
let proceed = run env . lift . lift in
case runIdentity $ runFreeT $ fmap fst $ runWriterT $ fmap right $ runExceptT action of
Pure x -> return x
Free (GetSymbolMaybe c s next) -> do
table <- readIORef (symbolTable env)
proceed $ next $ Map.lookup ... | 1,984 | run env action =
let proceed = run env . lift . lift in
case runIdentity $ runFreeT $ fmap fst $ runWriterT $ fmap right $ runExceptT action of
Pure x -> return x
Free (GetSymbolMaybe c s next) -> do
table <- readIORef (symbolTable env)
proceed $ next $ Map.lookup (c, s) table
Free (CreateSymbol c s n... | 1,945 | false | true | 0 | 16 | 484 | 789 | 372 | 417 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Checker.hs | bsd-3-clause | rewriteMessage :: String -> Checker String
rewriteMessage msg = do
st <- get
let tyVars = tyVarContext st
let msgLines = T.lines $ T.pack msg
-- Rewrite internal names to source names
let msgLines' = map (\line -> foldl convertLine line tyVars) msgLines
return $ T.unpack (T.unlines msgLines')
... | 1,037 | rewriteMessage :: String -> Checker String
rewriteMessage msg = do
st <- get
let tyVars = tyVarContext st
let msgLines = T.lines $ T.pack msg
-- Rewrite internal names to source names
let msgLines' = map (\line -> foldl convertLine line tyVars) msgLines
return $ T.unpack (T.unlines msgLines')
... | 1,037 | rewriteMessage msg = do
st <- get
let tyVars = tyVarContext st
let msgLines = T.lines $ T.pack msg
-- Rewrite internal names to source names
let msgLines' = map (\line -> foldl convertLine line tyVars) msgLines
return $ T.unpack (T.unlines msgLines')
where
convertLine line (v, (k, _)) =
... | 994 | false | true | 0 | 20 | 343 | 323 | 160 | 163 | null | null |
HJvT/com | System/Win32/Com/Automation.hs | bsd-3-clause | outEnum :: Enum a => ArgOut a
outEnum = inoutEnum defaultEnum | 71 | outEnum :: Enum a => ArgOut a
outEnum = inoutEnum defaultEnum | 71 | outEnum = inoutEnum defaultEnum | 36 | false | true | 0 | 6 | 20 | 24 | 11 | 13 | null | null |
rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Solver/Validate.hs | bsd-3-clause | dupBindErrors :: [(F.Symbol, [(F.Sort, [F.BindId] )])] -> E.Error
dupBindErrors = foldr1 E.catError . map dbe
where
dbe (x, y) = E.err E.dummySpan $ printf "Multiple sorts for %s : %s \n" (showpp x) (showpp y)
--------------------------------------------------------------------------- | 291 | dupBindErrors :: [(F.Symbol, [(F.Sort, [F.BindId] )])] -> E.Error
dupBindErrors = foldr1 E.catError . map dbe
where
dbe (x, y) = E.err E.dummySpan $ printf "Multiple sorts for %s : %s \n" (showpp x) (showpp y)
--------------------------------------------------------------------------- | 291 | dupBindErrors = foldr1 E.catError . map dbe
where
dbe (x, y) = E.err E.dummySpan $ printf "Multiple sorts for %s : %s \n" (showpp x) (showpp y)
--------------------------------------------------------------------------- | 225 | false | true | 0 | 11 | 41 | 104 | 55 | 49 | null | null |
vollmerm/shallow-fission | Data/Array/Accelerate/Fission.hs | bsd-3-clause | matchShape
:: forall sh sh'. (Shape sh, Shape sh')
=> sh
-> sh'
-> Maybe (sh :=: sh')
matchShape _ _
| Just REFL <- matchTupleType (eltType (undefined::sh))
(eltType (undefined::sh'))
= gcast REFL
| otherwise
= Nothing | 267 | matchShape
:: forall sh sh'. (Shape sh, Shape sh')
=> sh
-> sh'
-> Maybe (sh :=: sh')
matchShape _ _
| Just REFL <- matchTupleType (eltType (undefined::sh))
(eltType (undefined::sh'))
= gcast REFL
| otherwise
= Nothing | 267 | matchShape _ _
| Just REFL <- matchTupleType (eltType (undefined::sh))
(eltType (undefined::sh'))
= gcast REFL
| otherwise
= Nothing | 173 | false | true | 0 | 12 | 85 | 116 | 57 | 59 | null | null |
damoxc/ganeti | src/Ganeti/HTools/Backend/Text.hs | gpl-2.0 | loadNode :: (Monad m) =>
NameAssoc -- ^ Association list with current groups
-> [String] -- ^ Input data as a list of fields
-> m (String, Node.Node) -- ^ The result, a tuple o node name
-- and node object
loadNode ktg [name, tm, n... | 872 | loadNode :: (Monad m) =>
NameAssoc -- ^ Association list with current groups
-> [String] -- ^ Input data as a list of fields
-> m (String, Node.Node)
loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles] = do
gdx <- lookupGroup ktg name gu
new_node <-
... | 782 | loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles] = do
gdx <- lookupGroup ktg name gu
new_node <-
if "?" `elem` [tm,nm,fm,td,fd,tc] || fo == "Y" then
return $ Node.create name 0 0 0 0 0 0 True 0 gdx
else do
vtm <- tryRead name tm
vnm <- tryRead name nm
vfm <... | 577 | true | true | 0 | 13 | 318 | 295 | 151 | 144 | null | null |
cwlmyjm/haskell | FUN/Lab8solution.hs | mpl-2.0 | bss n = [b:bs | bs <- bss (n-1), b<-[True,False]] | 49 | bss n = [b:bs | bs <- bss (n-1), b<-[True,False]] | 49 | bss n = [b:bs | bs <- bss (n-1), b<-[True,False]] | 49 | false | false | 0 | 10 | 9 | 48 | 25 | 23 | null | null |
tibbe/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | shouldInlinePrimOp dflags CloneSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 252 | shouldInlinePrimOp dflags CloneSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 252 | shouldInlinePrimOp dflags CloneSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 252 | false | false | 0 | 11 | 37 | 89 | 44 | 45 | null | null |
EricYT/Haskell | src/chapter-9-3.hs | apache-2.0 | main = interact respondPalindromes | 34 | main = interact respondPalindromes | 34 | main = interact respondPalindromes | 34 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Buyongoogleprograms/Activate.hs | mpl-2.0 | -- | Creates a value of 'BuyongoogleprogramsActivate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'baXgafv'
--
-- * 'baMerchantId'
--
-- * 'baUploadProtocol'
--
-- * 'baRegionCode'
--
-- * 'baAccessToken'
--
-- * 'baUploadType'
--
... | 915 | buyongoogleprogramsActivate
:: Int64 -- ^ 'baMerchantId'
-> Text -- ^ 'baRegionCode'
-> ActivateBuyOnGoogleProgramRequest -- ^ 'baPayload'
-> BuyongoogleprogramsActivate
buyongoogleprogramsActivate pBaMerchantId_ pBaRegionCode_ pBaPayload_ =
BuyongoogleprogramsActivate'
{ _baXgafv = Nothing
, ... | 557 | buyongoogleprogramsActivate pBaMerchantId_ pBaRegionCode_ pBaPayload_ =
BuyongoogleprogramsActivate'
{ _baXgafv = Nothing
, _baMerchantId = _Coerce # pBaMerchantId_
, _baUploadProtocol = Nothing
, _baRegionCode = pBaRegionCode_
, _baAccessToken = Nothing
, _baUploadType = Nothing
, _baPayl... | 371 | true | true | 0 | 9 | 174 | 115 | 74 | 41 | null | null |
tolysz/y-bower | lsbow/Main.hs | bsd-3-clause | readBowerJSON :: String -> String -> IO (Maybe BT.BowerJSON)
readBowerJSON p f = do
fa <- drf (shiv </> p </> "bower.json")
a <- drf (p </> "." ++ f)
b <- drf (p </> f)
return (fa <|> a <|> b)
-- | get dependencies from it | 253 | readBowerJSON :: String -> String -> IO (Maybe BT.BowerJSON)
readBowerJSON p f = do
fa <- drf (shiv </> p </> "bower.json")
a <- drf (p </> "." ++ f)
b <- drf (p </> f)
return (fa <|> a <|> b)
-- | get dependencies from it | 253 | readBowerJSON p f = do
fa <- drf (shiv </> p </> "bower.json")
a <- drf (p </> "." ++ f)
b <- drf (p </> f)
return (fa <|> a <|> b)
-- | get dependencies from it | 191 | false | true | 0 | 11 | 78 | 112 | 54 | 58 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Wai.Request.hs | bsd-3-clause | requestSizeCheck :: Word64 -> Request -> IO Request
requestSizeCheck maxSize req =
case requestBodyLength req of
KnownLength len ->
if len > maxSize
then return $ req { requestBody = throwIO (RequestSizeException maxSize) }
else return req
ChunkedBody ... | 843 | requestSizeCheck :: Word64 -> Request -> IO Request
requestSizeCheck maxSize req =
case requestBodyLength req of
KnownLength len ->
if len > maxSize
then return $ req { requestBody = throwIO (RequestSizeException maxSize) }
else return req
ChunkedBody ... | 843 | requestSizeCheck maxSize req =
case requestBodyLength req of
KnownLength len ->
if len > maxSize
then return $ req { requestBody = throwIO (RequestSizeException maxSize) }
else return req
ChunkedBody -> do
currentSize <- newIORef 0
... | 791 | false | true | 0 | 27 | 390 | 203 | 97 | 106 | null | null |
ihc/futhark | src/Language/Futhark/TypeChecker/Terms.hs | isc | checkExp (Map fun arrexps pos) = do
(arrexps', args) <- unzip <$> mapM checkSOACArrayArg arrexps
fun' <- checkLambda fun args
return $ Map fun' arrexps' pos | 162 | checkExp (Map fun arrexps pos) = do
(arrexps', args) <- unzip <$> mapM checkSOACArrayArg arrexps
fun' <- checkLambda fun args
return $ Map fun' arrexps' pos | 162 | checkExp (Map fun arrexps pos) = do
(arrexps', args) <- unzip <$> mapM checkSOACArrayArg arrexps
fun' <- checkLambda fun args
return $ Map fun' arrexps' pos | 162 | false | false | 0 | 9 | 31 | 67 | 31 | 36 | null | null |
beni55/cryptol | src/Cryptol/TypeCheck/Solver/Numeric/Simplify1.hs | bsd-3-clause | balanceEq x y = (x,y) | 21 | balanceEq x y = (x,y) | 21 | balanceEq x y = (x,y) | 21 | false | false | 1 | 5 | 4 | 21 | 9 | 12 | null | null |
ctford/Idris-Elba-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v LStrIndex [x, y] = v ++ "idris_strIndex(vm, " ++ creg x ++ "," ++ creg y ++ ")" | 86 | doOp v LStrIndex [x, y] = v ++ "idris_strIndex(vm, " ++ creg x ++ "," ++ creg y ++ ")" | 86 | doOp v LStrIndex [x, y] = v ++ "idris_strIndex(vm, " ++ creg x ++ "," ++ creg y ++ ")" | 86 | false | false | 0 | 9 | 19 | 45 | 22 | 23 | null | null |
upsoft/bond | compiler/src/Language/Bond/Codegen/Cpp/Util.hs | mit | defaultValue :: MappingContext -> Type -> Default -> Text
defaultValue _ BT_WString (DefaultString x) = [lt|L"#{x}"|] | 117 | defaultValue :: MappingContext -> Type -> Default -> Text
defaultValue _ BT_WString (DefaultString x) = [lt|L"#{x}"|] | 117 | defaultValue _ BT_WString (DefaultString x) = [lt|L"#{x}"|] | 59 | false | true | 0 | 7 | 15 | 40 | 22 | 18 | null | null |
deniscostadsc/playground | solutions/beecrowd/1006/1006.hs | mit | main :: IO ()
main = do
a <- readLn :: IO Float
b <- readLn :: IO Float
c <- readLn :: IO Float
printf "MEDIA = %.1f\n" ((a * 2.0 + b * 3.0 + c * 5.0) / 10.0) | 174 | main :: IO ()
main = do
a <- readLn :: IO Float
b <- readLn :: IO Float
c <- readLn :: IO Float
printf "MEDIA = %.1f\n" ((a * 2.0 + b * 3.0 + c * 5.0) / 10.0) | 174 | main = do
a <- readLn :: IO Float
b <- readLn :: IO Float
c <- readLn :: IO Float
printf "MEDIA = %.1f\n" ((a * 2.0 + b * 3.0 + c * 5.0) / 10.0) | 160 | false | true | 0 | 15 | 57 | 93 | 45 | 48 | null | null |
hectorhon/autotrace2 | app/Blc/Queries.hs | bsd-3-clause | getBadQualities :: Day -> Day -> Double -> [Key Blc]
-> SqlPersistT IO [(Entity Blc, Double)]
getBadQualities start end qualityTarget bids = do
results <- select $ from $ \ i -> do
criteria i bids start end
let performUptime = coalesceDefault
[sum_ (i ^. BlcResultDataPe... | 960 | getBadQualities :: Day -> Day -> Double -> [Key Blc]
-> SqlPersistT IO [(Entity Blc, Double)]
getBadQualities start end qualityTarget bids = do
results <- select $ from $ \ i -> do
criteria i bids start end
let performUptime = coalesceDefault
[sum_ (i ^. BlcResultDataPe... | 960 | getBadQualities start end qualityTarget bids = do
results <- select $ from $ \ i -> do
criteria i bids start end
let performUptime = coalesceDefault
[sum_ (i ^. BlcResultDataPerformUptime)] (val 0)
let uptime = coalesceDefault [sum_ (i ^. BlcResultDataUptime)] (val 1)
let quali... | 850 | false | true | 0 | 21 | 258 | 405 | 195 | 210 | null | null |
stevely/hspirv | src/SpirV/Builder/Raw.hs | bsd-3-clause | -- Id 1: Result type
-- Id 2: Sampler
-- Id 3: Texture coordinate, floating point vector of 4 components
-- Id 4: Offset added before texel lookup
-- Maybe Id: Bias for implicit level of detail
textureSampleProjOffset :: Id -> Id -> Id -> Id -> Maybe Id -> Builder Id
textureSampleProjOffset = sixOp OpTextureSampleProjO... | 325 | textureSampleProjOffset :: Id -> Id -> Id -> Id -> Maybe Id -> Builder Id
textureSampleProjOffset = sixOp OpTextureSampleProjOffset | 131 | textureSampleProjOffset = sixOp OpTextureSampleProjOffset | 57 | true | true | 0 | 10 | 55 | 45 | 24 | 21 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | not_RDR, getTag_RDR, succ_RDR, pred_RDR, minBound_RDR, maxBound_RDR,
and_RDR, range_RDR, inRange_RDR, index_RDR,
unsafeIndex_RDR, unsafeRangeSize_RDR :: RdrName
and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&") | 231 | not_RDR, getTag_RDR, succ_RDR, pred_RDR, minBound_RDR, maxBound_RDR,
and_RDR, range_RDR, inRange_RDR, index_RDR,
unsafeIndex_RDR, unsafeRangeSize_RDR :: RdrName
and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&") | 231 | and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&") | 62 | false | true | 0 | 7 | 43 | 44 | 33 | 11 | null | null |
beni55/hermit | src/HERMIT/Kure.hs | bsd-2-clause | -- | Rewrite any children of a coercion of the form: @NthCo@ 'Int' 'Coercion'
nthCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Int -> Rewrite c m Coercion -> Rewrite c m Coercion
nthCoAnyR r1 r2 = unwrapAnyR $ nthCoAllR (wrapAnyR r1) (wrapAnyR r2) | 261 | nthCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m Int -> Rewrite c m Coercion -> Rewrite c m Coercion
nthCoAnyR r1 r2 = unwrapAnyR $ nthCoAllR (wrapAnyR r1) (wrapAnyR r2) | 183 | nthCoAnyR r1 r2 = unwrapAnyR $ nthCoAllR (wrapAnyR r1) (wrapAnyR r2) | 68 | true | true | 0 | 8 | 46 | 84 | 41 | 43 | null | null |
edahlgren/protocol-buffers | hprotoc/Text/ProtocolBuffers/ProtoCompile/Parser.hs | apache-2.0 | rpc = pName (U.fromString "rpc") >> do
name <- ident1
input <- between (pChar '(') (pChar ')') ident1
_ <- pName (U.fromString "returns")
output <- between (pChar '(') (pChar ')') ident1
let m1 = defaultValue { D.MethodDescriptorProto.name=Just name
, D.MethodDescriptorProto.input_type... | 565 | rpc = pName (U.fromString "rpc") >> do
name <- ident1
input <- between (pChar '(') (pChar ')') ident1
_ <- pName (U.fromString "returns")
output <- between (pChar '(') (pChar ')') ident1
let m1 = defaultValue { D.MethodDescriptorProto.name=Just name
, D.MethodDescriptorProto.input_type... | 565 | rpc = pName (U.fromString "rpc") >> do
name <- ident1
input <- between (pChar '(') (pChar ')') ident1
_ <- pName (U.fromString "returns")
output <- between (pChar '(') (pChar ')') ident1
let m1 = defaultValue { D.MethodDescriptorProto.name=Just name
, D.MethodDescriptorProto.input_type... | 565 | false | false | 0 | 15 | 127 | 216 | 107 | 109 | null | null |
worksap-ate/aws-sdk | Cloud/AWS/EC2/Image.hs | bsd-3-clause | launchPermissionParams :: LaunchPermission -> [QueryParam]
launchPermissionParams lp =
[ "Add" |.#. map itemParams (launchPermissionAdd lp)
, "Remove" |.#. map itemParams (launchPermissionRemove lp)
]
where
itemParams (LaunchPermissionItemGroup g) = ["Group" |= g]
itemParams (LaunchPermissionItemU... | 346 | launchPermissionParams :: LaunchPermission -> [QueryParam]
launchPermissionParams lp =
[ "Add" |.#. map itemParams (launchPermissionAdd lp)
, "Remove" |.#. map itemParams (launchPermissionRemove lp)
]
where
itemParams (LaunchPermissionItemGroup g) = ["Group" |= g]
itemParams (LaunchPermissionItemU... | 346 | launchPermissionParams lp =
[ "Add" |.#. map itemParams (launchPermissionAdd lp)
, "Remove" |.#. map itemParams (launchPermissionRemove lp)
]
where
itemParams (LaunchPermissionItemGroup g) = ["Group" |= g]
itemParams (LaunchPermissionItemUserId u) = ["UserId" |= u] | 287 | false | true | 0 | 9 | 59 | 110 | 53 | 57 | null | null |
fpinsight/hocilib | src/Database/Ocilib/Fetch.hs | bsd-2-clause | -- | Return the precision of the column for numeric columns.
ociColumnGetPrecision :: Ptr OCI_Column -> IO CInt
ociColumnGetPrecision c = [C.exp| int { OCI_ColumnGetPrecision($(OCI_Column *c)) } |] | 197 | ociColumnGetPrecision :: Ptr OCI_Column -> IO CInt
ociColumnGetPrecision c = [C.exp| int { OCI_ColumnGetPrecision($(OCI_Column *c)) } |] | 136 | ociColumnGetPrecision c = [C.exp| int { OCI_ColumnGetPrecision($(OCI_Column *c)) } |] | 85 | true | true | 0 | 6 | 27 | 31 | 17 | 14 | null | null |
zeyuanxy/hacker-rank | practice/fp/persistent-ds/minimum-multiple/minimum-multiple.hs | mit | build :: V.Vector Int -> SegmentTree (M.Map Int Int)
build vec = rangeBuild vec 0 (V.length vec - 1) | 100 | build :: V.Vector Int -> SegmentTree (M.Map Int Int)
build vec = rangeBuild vec 0 (V.length vec - 1) | 100 | build vec = rangeBuild vec 0 (V.length vec - 1) | 47 | false | true | 0 | 9 | 18 | 58 | 27 | 31 | null | null |
shicks/shsh | System/Console/ShSh/Builtins/Test.hs | bsd-3-clause | binary :: P Bool
binary = do a <- anyString
op <- oneOf "binary operator" binOps
b <- anyString
io $ op a b | 143 | binary :: P Bool
binary = do a <- anyString
op <- oneOf "binary operator" binOps
b <- anyString
io $ op a b | 143 | binary = do a <- anyString
op <- oneOf "binary operator" binOps
b <- anyString
io $ op a b | 126 | false | true | 0 | 9 | 59 | 58 | 24 | 34 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1beta1ValidatingWebhookConfigurationListMetadata' Lens
v1beta1ValidatingWebhookConfigurationListMetadataL :: Lens_' V1beta1ValidatingWebhookConfigurationList (Maybe V1ListMeta)
v1beta1ValidatingWebhookConfigurationListMetadataL f V1beta1ValidatingWebhookConfigurationList{..} = (\v1beta1ValidatingWebhookConfigura... | 496 | v1beta1ValidatingWebhookConfigurationListMetadataL :: Lens_' V1beta1ValidatingWebhookConfigurationList (Maybe V1ListMeta)
v1beta1ValidatingWebhookConfigurationListMetadataL f V1beta1ValidatingWebhookConfigurationList{..} = (\v1beta1ValidatingWebhookConfigurationListMetadata -> V1beta1ValidatingWebhookConfigurationList ... | 434 | v1beta1ValidatingWebhookConfigurationListMetadataL f V1beta1ValidatingWebhookConfigurationList{..} = (\v1beta1ValidatingWebhookConfigurationListMetadata -> V1beta1ValidatingWebhookConfigurationList { v1beta1ValidatingWebhookConfigurationListMetadata, ..} ) <$> f v1beta1ValidatingWebhookConfigurationListMetadata | 312 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | toIntegerName = varQual gHC_REAL (fsLit "toInteger") toIntegerClassOpKey | 81 | toIntegerName = varQual gHC_REAL (fsLit "toInteger") toIntegerClassOpKey | 81 | toIntegerName = varQual gHC_REAL (fsLit "toInteger") toIntegerClassOpKey | 81 | false | false | 0 | 7 | 15 | 19 | 9 | 10 | null | null |
gnn/Hets | Maude/Maude2DG.hs | gpl-2.0 | {- | Includes the references used in an importation to modules in the maude
prelude in the current DG -}
incPredImp :: Import -> DGraph -> UpdtPredefs -> UpdtPredefs
incPredImp i up = up'
where me = getModExp i
up' = incPredImpME me up
{- | Includes the references used in a module expression ... | 372 | incPredImp :: Import -> DGraph -> UpdtPredefs -> UpdtPredefs
incPredImp i up = up'
where me = getModExp i
up' = incPredImpME me up
{- | Includes the references used in a module expression to modules in the
maude prelude in the current DG -} | 267 | incPredImp i up = up'
where me = getModExp i
up' = incPredImpME me up
{- | Includes the references used in a module expression to modules in the
maude prelude in the current DG -} | 206 | true | true | 1 | 9 | 91 | 58 | 27 | 31 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Data for this annotation.
volData :: Lens' Volumeannotation (Maybe Text)
volData = lens _volData (\ s a -> s{_volData = a}) | 128 | volData :: Lens' Volumeannotation (Maybe Text)
volData = lens _volData (\ s a -> s{_volData = a}) | 97 | volData = lens _volData (\ s a -> s{_volData = a}) | 50 | true | true | 1 | 9 | 22 | 51 | 25 | 26 | null | null |
josefs/autosar | oldARSim/ARSim.hs | bsd-3-clause | cutLoop _ [x] = [[]] | 23 | cutLoop _ [x] = [[]] | 23 | cutLoop _ [x] = [[]] | 23 | false | false | 1 | 7 | 7 | 22 | 10 | 12 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Module.hs | bsd-3-clause | delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
delInstalledModuleEnv (InstalledModuleEnv e) m = InstalledModuleEnv (Map.delete m e) | 173 | delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
delInstalledModuleEnv (InstalledModuleEnv e) m = InstalledModuleEnv (Map.delete m e) | 173 | delInstalledModuleEnv (InstalledModuleEnv e) m = InstalledModuleEnv (Map.delete m e) | 84 | false | true | 0 | 8 | 17 | 49 | 23 | 26 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/AllocateAddress.hs | mpl-2.0 | -- | Set to 'vpc' to allocate the address for use with instances in a VPC.
--
-- Default: The address is for use with instances in EC2-Classic.
aaDomain :: Lens' AllocateAddress (Maybe DomainType)
aaDomain = lens _aaDomain (\s a -> s { _aaDomain = a }) | 252 | aaDomain :: Lens' AllocateAddress (Maybe DomainType)
aaDomain = lens _aaDomain (\s a -> s { _aaDomain = a }) | 108 | aaDomain = lens _aaDomain (\s a -> s { _aaDomain = a }) | 55 | true | true | 0 | 9 | 46 | 48 | 27 | 21 | null | null |
lynnard/cocos2d-hs | generator/Graphics/UI/Cocos2d/Generator/Interface/Event.hs | bsd-3-clause | vectorEventTouch :: V.Contents
vectorEventTouch = V.instantiate' "EventTouchVector" (ptrT $ objT c_EventTouch) reqs opts
where
reqs = reqInclude $ includeStd "base/CCTouch.h"
opts = V.Options [] $ Just ConvertValue | 224 | vectorEventTouch :: V.Contents
vectorEventTouch = V.instantiate' "EventTouchVector" (ptrT $ objT c_EventTouch) reqs opts
where
reqs = reqInclude $ includeStd "base/CCTouch.h"
opts = V.Options [] $ Just ConvertValue | 224 | vectorEventTouch = V.instantiate' "EventTouchVector" (ptrT $ objT c_EventTouch) reqs opts
where
reqs = reqInclude $ includeStd "base/CCTouch.h"
opts = V.Options [] $ Just ConvertValue | 193 | false | true | 6 | 8 | 36 | 84 | 34 | 50 | null | null |
contivero/hasmin | tests/Hasmin/Types/StylesheetSpec.hs | bsd-3-clause | atMediaTestInfo :: [(Text, Text)]
atMediaTestInfo =
[("@media all {h1{color:red}}",
"@media {h1{color:red}}")
,("@media all and (min-width: 500px){h1 {color: red}}",
"@media (min-width:500px){h1{color:red}}")
,("@media not all{h1{color:red}}",
"@media not all{h1{color:red}}")
,("@media all and (min-... | 675 | atMediaTestInfo :: [(Text, Text)]
atMediaTestInfo =
[("@media all {h1{color:red}}",
"@media {h1{color:red}}")
,("@media all and (min-width: 500px){h1 {color: red}}",
"@media (min-width:500px){h1{color:red}}")
,("@media not all{h1{color:red}}",
"@media not all{h1{color:red}}")
,("@media all and (min-... | 675 | atMediaTestInfo =
[("@media all {h1{color:red}}",
"@media {h1{color:red}}")
,("@media all and (min-width: 500px){h1 {color: red}}",
"@media (min-width:500px){h1{color:red}}")
,("@media not all{h1{color:red}}",
"@media not all{h1{color:red}}")
,("@media all and (min-width:500px), not all and (min-dev... | 641 | false | true | 0 | 6 | 89 | 74 | 48 | 26 | null | null |
copumpkin/vector-static | Data/Vector/Storable/Static.hs | bsd-3-clause | head (Vec vs) = G.head vs | 25 | head (Vec vs) = G.head vs | 25 | head (Vec vs) = G.head vs | 25 | false | false | 0 | 6 | 5 | 21 | 9 | 12 | null | null |
agentm/project-m36 | src/lib/ProjectM36/Relation.hs | unlicense | cardinality :: Relation -> RelationCardinality --we need to detect infinite tuple sets- perhaps with a flag
cardinality (Relation _ tupSet) = Finite (length (asList tupSet)) | 173 | cardinality :: Relation -> RelationCardinality
cardinality (Relation _ tupSet) = Finite (length (asList tupSet)) | 112 | cardinality (Relation _ tupSet) = Finite (length (asList tupSet)) | 65 | true | true | 0 | 9 | 24 | 47 | 22 | 25 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/main/HscTypes.hs | bsd-3-clause | lookupTypeHscEnv :: HscEnv -> Name -> IO (Maybe TyThing)
lookupTypeHscEnv hsc_env name = do
eps <- readIORef (hsc_EPS hsc_env)
return $! lookupType dflags hpt (eps_PTE eps) name
where
dflags = hsc_dflags hsc_env
hpt = hsc_HPT hsc_env
-- | Get the 'TyCon' from a 'TyThing' if it is a type constructor t... | 342 | lookupTypeHscEnv :: HscEnv -> Name -> IO (Maybe TyThing)
lookupTypeHscEnv hsc_env name = do
eps <- readIORef (hsc_EPS hsc_env)
return $! lookupType dflags hpt (eps_PTE eps) name
where
dflags = hsc_dflags hsc_env
hpt = hsc_HPT hsc_env
-- | Get the 'TyCon' from a 'TyThing' if it is a type constructor t... | 342 | lookupTypeHscEnv hsc_env name = do
eps <- readIORef (hsc_EPS hsc_env)
return $! lookupType dflags hpt (eps_PTE eps) name
where
dflags = hsc_dflags hsc_env
hpt = hsc_HPT hsc_env
-- | Get the 'TyCon' from a 'TyThing' if it is a type constructor thing. Panics otherwise | 285 | false | true | 0 | 10 | 71 | 92 | 43 | 49 | null | null |
beni55/attoparsec | Data/Attoparsec/Zepto.hs | bsd-3-clause | -- | Match a string exactly.
string :: Monad m => ByteString -> ZeptoT m ()
string s = do
i <- gets input
if s `B.isPrefixOf` i
then put (S (B.unsafeDrop (B.length s) i)) >> return ()
else fail "string"
| 215 | string :: Monad m => ByteString -> ZeptoT m ()
string s = do
i <- gets input
if s `B.isPrefixOf` i
then put (S (B.unsafeDrop (B.length s) i)) >> return ()
else fail "string"
| 186 | string s = do
i <- gets input
if s `B.isPrefixOf` i
then put (S (B.unsafeDrop (B.length s) i)) >> return ()
else fail "string"
| 139 | true | true | 0 | 16 | 53 | 105 | 50 | 55 | null | null |
sinelaw/buildsome | src/Lib/Printer.hs | gpl-2.0 | printWrap :: ColorScheme -> Printer -> ColorText -> ColorText -> IO a -> IO a
printWrap ColorScheme{..} printer str entryMsg body = do
printStrLn printer before
res <-
wrappedBody `onExceptionWith` \e ->
printStrLn printer $ after $ cException $
"EXCEPTION: " <> (fromString . concat . take 1 . lines . s... | 680 | printWrap :: ColorScheme -> Printer -> ColorText -> ColorText -> IO a -> IO a
printWrap ColorScheme{..} printer str entryMsg body = do
printStrLn printer before
res <-
wrappedBody `onExceptionWith` \e ->
printStrLn printer $ after $ cException $
"EXCEPTION: " <> (fromString . concat . take 1 . lines . s... | 680 | printWrap ColorScheme{..} printer str entryMsg body = do
printStrLn printer before
res <-
wrappedBody `onExceptionWith` \e ->
printStrLn printer $ after $ cException $
"EXCEPTION: " <> (fromString . concat . take 1 . lines . show) e
printStrLn printer $ after $ cOk "OK"
return res
where
indent... | 602 | false | true | 4 | 17 | 156 | 272 | 132 | 140 | null | null |
Zoetermeer/latro | src/Latro/Typecheck.hs | mit | referencedMetas :: Ty -> Checked [Ty]
referencedMetas meta@(TyMeta _ metaId) = do
result <- lookupMeta metaId
transitiveRefs <- case result of
Just ty ->
case ty of
TyMeta{} -> referencedMetas ty
_ -> return []
_ -> return []
return (meta : transitiveRefs) | 305 | referencedMetas :: Ty -> Checked [Ty]
referencedMetas meta@(TyMeta _ metaId) = do
result <- lookupMeta metaId
transitiveRefs <- case result of
Just ty ->
case ty of
TyMeta{} -> referencedMetas ty
_ -> return []
_ -> return []
return (meta : transitiveRefs) | 305 | referencedMetas meta@(TyMeta _ metaId) = do
result <- lookupMeta metaId
transitiveRefs <- case result of
Just ty ->
case ty of
TyMeta{} -> referencedMetas ty
_ -> return []
_ -> return []
return (meta : transitiveRefs) | 267 | false | true | 9 | 7 | 91 | 107 | 56 | 51 | null | null |
iustin/prefix-units | Data/Prefix/Units.hs | bsd-3-clause | -- | Returns the unit full name.
unitName :: Unit -> String
unitName Yocto = "yocto" | 84 | unitName :: Unit -> String
unitName Yocto = "yocto" | 51 | unitName Yocto = "yocto" | 24 | true | true | 0 | 5 | 15 | 19 | 10 | 9 | null | null |
Happy0/snowdrift | Data/Order.hs | agpl-3.0 | timeValueP :: Parser (Orderable -> Double)
timeValueP = timeConstraintP <|> fmap (const . toTimeValue) timeP | 108 | timeValueP :: Parser (Orderable -> Double)
timeValueP = timeConstraintP <|> fmap (const . toTimeValue) timeP | 108 | timeValueP = timeConstraintP <|> fmap (const . toTimeValue) timeP | 65 | false | true | 0 | 8 | 14 | 37 | 19 | 18 | null | null |
gnn/Hets | OWL2/Rename.hs | gpl-2.0 | newOid :: OntologyIRI -> OntologyIRI -> OntologyIRI
newOid id1 id2 =
let lid1 = localPart id1
lid2 = localPart id2
in if null lid1 then id2
else if null lid2 || id1 == id2 then id1
else id1 { localPart = uriToName lid1 ++ "_" ++ uriToName lid2 } | 273 | newOid :: OntologyIRI -> OntologyIRI -> OntologyIRI
newOid id1 id2 =
let lid1 = localPart id1
lid2 = localPart id2
in if null lid1 then id2
else if null lid2 || id1 == id2 then id1
else id1 { localPart = uriToName lid1 ++ "_" ++ uriToName lid2 } | 273 | newOid id1 id2 =
let lid1 = localPart id1
lid2 = localPart id2
in if null lid1 then id2
else if null lid2 || id1 == id2 then id1
else id1 { localPart = uriToName lid1 ++ "_" ++ uriToName lid2 } | 221 | false | true | 0 | 11 | 76 | 107 | 51 | 56 | null | null |
benjaminy/Charcoal | Testing/MicroTests/JustCalling/non_rec.hs | mit | b = f21 a | 9 | b = f21 a | 9 | b = f21 a | 9 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 21 = 20 | 7 | 21 = 20 | 7 | 21 = 20 | 7 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo FinalizeWeakOp = mkGenPrimOp (fsLit "finalizeWeak#") [alphaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, intPrimTy, (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, unitTy])))])) | 295 | primOpInfo FinalizeWeakOp = mkGenPrimOp (fsLit "finalizeWeak#") [alphaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, intPrimTy, (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, unitTy])))])) | 295 | primOpInfo FinalizeWeakOp = mkGenPrimOp (fsLit "finalizeWeak#") [alphaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, intPrimTy, (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, unitTy])))])) | 295 | false | false | 0 | 16 | 24 | 96 | 50 | 46 | null | null |
forste/haReFork | tools/interp/Monad.hs | bsd-3-clause | errBind :: Error a -> (a -> Error b) -> Error b
errBind x f = case x of
(Ok v) -> f v
(Err msg) -> (Err msg) | 150 | errBind :: Error a -> (a -> Error b) -> Error b
errBind x f = case x of
(Ok v) -> f v
(Err msg) -> (Err msg) | 150 | errBind x f = case x of
(Ok v) -> f v
(Err msg) -> (Err msg) | 102 | false | true | 0 | 10 | 70 | 82 | 38 | 44 | null | null |
ajnsit/wai-routes | src/Routes/TH/RenderRoute.hs | mit | notStrict :: Bang
notStrict = Bang NoSourceUnpackedness NoSourceStrictness | 74 | notStrict :: Bang
notStrict = Bang NoSourceUnpackedness NoSourceStrictness | 74 | notStrict = Bang NoSourceUnpackedness NoSourceStrictness | 56 | false | true | 0 | 6 | 7 | 23 | 9 | 14 | null | null |
cdxr/haskell-tooty | Graphics/Tooty/Geometry.hs | bsd-3-clause | tex :: GL.GLfloat -> GL.GLfloat -> IO ()
tex s t = GL.texCoord $ GL.TexCoord2 s t | 81 | tex :: GL.GLfloat -> GL.GLfloat -> IO ()
tex s t = GL.texCoord $ GL.TexCoord2 s t | 81 | tex s t = GL.texCoord $ GL.TexCoord2 s t | 40 | false | true | 0 | 8 | 16 | 50 | 23 | 27 | null | null |
travitch/dalvik | src/Dalvik/SSA/Internal/Labeling.hs | bsd-3-clause | sealBlock :: (E.MonadThrow m) => BlockNumber -> SSALabeller m ()
sealBlock block = do
iphis <- gets incompletePhis
let blockPhis = maybe [] M.toList $ M.lookup block iphis
forM_ blockPhis $ \(reg, l) ->
addPhiOperands reg block l
modify makeSealed
where
makeSealed s = s { sealedBlocks = IS.insert bloc... | 429 | sealBlock :: (E.MonadThrow m) => BlockNumber -> SSALabeller m ()
sealBlock block = do
iphis <- gets incompletePhis
let blockPhis = maybe [] M.toList $ M.lookup block iphis
forM_ blockPhis $ \(reg, l) ->
addPhiOperands reg block l
modify makeSealed
where
makeSealed s = s { sealedBlocks = IS.insert bloc... | 429 | sealBlock block = do
iphis <- gets incompletePhis
let blockPhis = maybe [] M.toList $ M.lookup block iphis
forM_ blockPhis $ \(reg, l) ->
addPhiOperands reg block l
modify makeSealed
where
makeSealed s = s { sealedBlocks = IS.insert block (sealedBlocks s) }
-- | Check if the given block is sealed (i... | 364 | false | true | 0 | 12 | 89 | 142 | 69 | 73 | null | null |
music-suite/music-score | src/Music/Time/Types.hs | bsd-3-clause | stopsAtTheSameTime :: Span -> Span -> Bool
a `stopsAtTheSameTime` b = _offsetS a == _offsetS b | 94 | stopsAtTheSameTime :: Span -> Span -> Bool
a `stopsAtTheSameTime` b = _offsetS a == _offsetS b | 94 | a `stopsAtTheSameTime` b = _offsetS a == _offsetS b | 51 | false | true | 0 | 6 | 15 | 43 | 20 | 23 | null | null |
Soares/Randometer.hs | randometer.hs | mit | puzzle :: Int -> [Trial] -> [String]
puzzle _ [] = [] | 53 | puzzle :: Int -> [Trial] -> [String]
puzzle _ [] = [] | 53 | puzzle _ [] = [] | 16 | false | true | 0 | 7 | 11 | 34 | 18 | 16 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M08/D19/Solution.hs | mit | -- *Y2016.M08.D19.Solution> uniqueUsers rows ~> length ~> 7
-- fromList [("137",Tweep {screen = "1HaskellADay", ...}), ...]
-- And with that we define our read-function
readTwitterUsers :: FilePath -> IO (Map String User)
readTwitterUsers = fmap uniqueUsers . readGraphJSON | 275 | readTwitterUsers :: FilePath -> IO (Map String User)
readTwitterUsers = fmap uniqueUsers . readGraphJSON | 104 | readTwitterUsers = fmap uniqueUsers . readGraphJSON | 51 | true | true | 0 | 8 | 39 | 36 | 19 | 17 | null | null |
kelnage/tamarin-prover | src/Web/Theory.hs | gpl-3.0 | nextSmartDiffThyPath :: ClosedDiffTheory -> DiffTheoryPath -> DiffTheoryPath
nextSmartDiffThyPath thy = go
where
go DiffTheoryHelp = DiffTheoryDiffRules
go DiffTheoryDiffRules = DiffTheoryMessage LHS False
go (DiffTheoryMessage LHS False) ... | 4,108 | nextSmartDiffThyPath :: ClosedDiffTheory -> DiffTheoryPath -> DiffTheoryPath
nextSmartDiffThyPath thy = go
where
go DiffTheoryHelp = DiffTheoryDiffRules
go DiffTheoryDiffRules = DiffTheoryMessage LHS False
go (DiffTheoryMessage LHS False) ... | 4,108 | nextSmartDiffThyPath thy = go
where
go DiffTheoryHelp = DiffTheoryDiffRules
go DiffTheoryDiffRules = DiffTheoryMessage LHS False
go (DiffTheoryMessage LHS False) = DiffTheoryMessage RHS False
go (DiffTheoryMessage RHS False) ... | 4,031 | false | true | 0 | 15 | 1,292 | 1,301 | 626 | 675 | null | null |
ekmett/hmpfr | src/Data/Number/MPFR/Arithmetic.hs | bsd-3-clause | sqrt_ :: RoundMode -> Precision -> MPFR -> (MPFR, Int)
sqrt_ r p d = withMPFR r p d mpfr_sqrt | 99 | sqrt_ :: RoundMode -> Precision -> MPFR -> (MPFR, Int)
sqrt_ r p d = withMPFR r p d mpfr_sqrt | 99 | sqrt_ r p d = withMPFR r p d mpfr_sqrt | 38 | false | true | 0 | 10 | 25 | 50 | 24 | 26 | null | null |
sdiehl/ghc | hadrian/src/Rules/Libffi.hs | bsd-3-clause | fixLibffiMakefile :: FilePath -> String -> String
fixLibffiMakefile top =
replace "-MD" "-MMD"
. replace "@toolexeclibdir@" "$(libdir)"
. replace "@INSTALL@" ("$(subst ../install-sh," ++ top ++ "/install-sh,@INSTALL@)") | 233 | fixLibffiMakefile :: FilePath -> String -> String
fixLibffiMakefile top =
replace "-MD" "-MMD"
. replace "@toolexeclibdir@" "$(libdir)"
. replace "@INSTALL@" ("$(subst ../install-sh," ++ top ++ "/install-sh,@INSTALL@)") | 233 | fixLibffiMakefile top =
replace "-MD" "-MMD"
. replace "@toolexeclibdir@" "$(libdir)"
. replace "@INSTALL@" ("$(subst ../install-sh," ++ top ++ "/install-sh,@INSTALL@)") | 183 | false | true | 2 | 8 | 39 | 67 | 28 | 39 | null | null |
kawamuray/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | pFileStorageDir :: Field
pFileStorageDir =
withDoc "Directory for storing file-backed disks" $
optionalNEStringField "file_storage_dir" | 139 | pFileStorageDir :: Field
pFileStorageDir =
withDoc "Directory for storing file-backed disks" $
optionalNEStringField "file_storage_dir" | 139 | pFileStorageDir =
withDoc "Directory for storing file-backed disks" $
optionalNEStringField "file_storage_dir" | 114 | false | true | 0 | 6 | 17 | 21 | 10 | 11 | null | null |
Fuuzetsu/yi | yi-core/src/Yi/Config/Simple.hs | gpl-2.0 | -- | List version of 'runOnStartup'.
runManyOnStartup :: [Action] -> ConfigM ()
runManyOnStartup actions = startActions %= (++ actions) | 135 | runManyOnStartup :: [Action] -> ConfigM ()
runManyOnStartup actions = startActions %= (++ actions) | 98 | runManyOnStartup actions = startActions %= (++ actions) | 55 | true | true | 0 | 8 | 18 | 40 | 20 | 20 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Types/Constraints.hs | bsd-3-clause | addIds = zipWith (\i c -> (i, shiftId i $ c {_sid = Just i})) [1..]
where -- Adding shiftId to have distinct VV for SMT conversion
shiftId i c = c { slhs = shiftSR i $ slhs c }
{ srhs = shiftSR i $ srhs c }
shiftSR i sr = sr { sr_reft = shiftR i $ sr_reft sr }
shiftR i r@(Reft (v, _)) ... | 605 | addIds = zipWith (\i c -> (i, shiftId i $ c {_sid = Just i})) [1..]
where -- Adding shiftId to have distinct VV for SMT conversion
shiftId i c = c { slhs = shiftSR i $ slhs c }
{ srhs = shiftSR i $ srhs c }
shiftSR i sr = sr { sr_reft = shiftR i $ sr_reft sr }
shiftR i r@(Reft (v, _)) ... | 605 | addIds = zipWith (\i c -> (i, shiftId i $ c {_sid = Just i})) [1..]
where -- Adding shiftId to have distinct VV for SMT conversion
shiftId i c = c { slhs = shiftSR i $ slhs c }
{ srhs = shiftSR i $ srhs c }
shiftSR i sr = sr { sr_reft = shiftR i $ sr_reft sr }
shiftR i r@(Reft (v, _)) ... | 605 | false | false | 4 | 12 | 117 | 203 | 97 | 106 | null | null |
diminishedprime/.org | programmey_stuff/write_yourself_a_scheme/ch_07/wyas/app/Main.hs | mit | evalAndPrint :: Env -> String -> IO ()
evalAndPrint env expr = evalString env expr >>= putStrLn | 96 | evalAndPrint :: Env -> String -> IO ()
evalAndPrint env expr = evalString env expr >>= putStrLn | 96 | evalAndPrint env expr = evalString env expr >>= putStrLn | 57 | false | true | 0 | 8 | 17 | 38 | 18 | 20 | null | null |
ihc/futhark | src/Futhark/Internalise/TypesValues.hs | isc | mapTypeVariables x@E.Array{} y@E.Array{}
| Just x' <- E.peelArray (E.arrayRank x) x,
Just y' <- E.peelArray (E.arrayRank x) y =
mapTypeVariables x' y' | 162 | mapTypeVariables x@E.Array{} y@E.Array{}
| Just x' <- E.peelArray (E.arrayRank x) x,
Just y' <- E.peelArray (E.arrayRank x) y =
mapTypeVariables x' y' | 162 | mapTypeVariables x@E.Array{} y@E.Array{}
| Just x' <- E.peelArray (E.arrayRank x) x,
Just y' <- E.peelArray (E.arrayRank x) y =
mapTypeVariables x' y' | 162 | false | false | 0 | 12 | 33 | 88 | 41 | 47 | null | null |
zalora/Angel | src/Angel/Config.hs | bsd-3-clause | programNames :: HM.HashMap Name a -> [Name]
programNames = nub . filter nnullN . map extractName . HM.keys
where
extractName = T.takeWhile (/= '.') | 153 | programNames :: HM.HashMap Name a -> [Name]
programNames = nub . filter nnullN . map extractName . HM.keys
where
extractName = T.takeWhile (/= '.') | 153 | programNames = nub . filter nnullN . map extractName . HM.keys
where
extractName = T.takeWhile (/= '.') | 109 | false | true | 0 | 8 | 29 | 62 | 31 | 31 | null | null |
k0001/pipes-http-message | src/Pipes/HTTP/Message/Attoparsec.hs | bsd-3-clause | ------------------------------------------------------------------------------
pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
pValueWithParameters = do
value <- liftM trim (pSpaces *> takeWhile (/= ';'))
params <- many pParam
return (value, map (first CI.mk) params)
where
... | 454 | pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
pValueWithParameters = do
value <- liftM trim (pSpaces *> takeWhile (/= ';'))
params <- many pParam
return (value, map (first CI.mk) params)
where
pParam = pSpaces *> char ';' *> pSpaces *> pParameter
-----------------------... | 375 | pValueWithParameters = do
value <- liftM trim (pSpaces *> takeWhile (/= ';'))
params <- many pParam
return (value, map (first CI.mk) params)
where
pParam = pSpaces *> char ';' *> pSpaces *> pParameter
------------------------------------------------------------------------------ | 300 | true | true | 4 | 12 | 62 | 127 | 61 | 66 | null | null |
Teaspot-Studio/GPipe-Core | src/Graphics/GPipe/Internal/FrameBuffer.hs | mit | drawDepthStencil sf fs m = Shader $ tellDrawcalls fs $ \(c,d) -> let (sh,g,ioc) = runDrawColors (m c) in (sh >> setDepth d, g, f ioc )
where f ioc s = let (fbokeyio, fboio, io) = ioc s
(b, di, si, o) = sf s
in (Just (makeFBOKeys fbokeyio (Just <$> getImageFBOKey di) (Just... | 793 | drawDepthStencil sf fs m = Shader $ tellDrawcalls fs $ \(c,d) -> let (sh,g,ioc) = runDrawColors (m c) in (sh >> setDepth d, g, f ioc )
where f ioc s = let (fbokeyio, fboio, io) = ioc s
(b, di, si, o) = sf s
in (Just (makeFBOKeys fbokeyio (Just <$> getImageFBOKey di) (Just... | 793 | drawDepthStencil sf fs m = Shader $ tellDrawcalls fs $ \(c,d) -> let (sh,g,ioc) = runDrawColors (m c) in (sh >> setDepth d, g, f ioc )
where f ioc s = let (fbokeyio, fboio, io) = ioc s
(b, di, si, o) = sf s
in (Just (makeFBOKeys fbokeyio (Just <$> getImageFBOKey di) (Just... | 793 | false | false | 0 | 13 | 250 | 258 | 127 | 131 | null | null |
MaxOw/servant-sharp | src/Servant/Sharp.hs | bsd-3-clause | generateCSharpMethod :: Req -> Doc
generateCSharpMethod req = vcat
[ ""
, functionDeclaration
, functionBody
]
where
functionDeclaration = hsep
["public", "static", "async", "Task<"<>returnType<>">", functionName, argumentList]
returnType = txt $ req^.reqReturnType
functionName... | 3,898 | generateCSharpMethod :: Req -> Doc
generateCSharpMethod req = vcat
[ ""
, functionDeclaration
, functionBody
]
where
functionDeclaration = hsep
["public", "static", "async", "Task<"<>returnType<>">", functionName, argumentList]
returnType = txt $ req^.reqReturnType
functionName... | 3,898 | generateCSharpMethod req = vcat
[ ""
, functionDeclaration
, functionBody
]
where
functionDeclaration = hsep
["public", "static", "async", "Task<"<>returnType<>">", functionName, argumentList]
returnType = txt $ req^.reqReturnType
functionName = toCSharpFunctionName $ req^.func... | 3,863 | false | true | 0 | 14 | 1,184 | 1,012 | 518 | 494 | null | null |
ciderpunx/exercismo | src/School.hs | gpl-3.0 | add :: Integer -> String -> School -> School
add grade student = M.insertWith (++) grade [student] | 98 | add :: Integer -> String -> School -> School
add grade student = M.insertWith (++) grade [student] | 98 | add grade student = M.insertWith (++) grade [student] | 53 | false | true | 0 | 9 | 16 | 48 | 23 | 25 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Streaming.Filesystem.hs | bsd-3-clause | getFileType :: FilePath -> IO FileType
getFileType fp = do
s <- PosixF.getSymbolicLinkStatus fp
case () of
()
| PosixF.isRegularFile s -> return FTFile
| PosixF.isDirectory s -> return FTDirectory
| PosixF.isSymbolicLink s -> do
es' <- try $ PosixF.get... | 691 | getFileType :: FilePath -> IO FileType
getFileType fp = do
s <- PosixF.getSymbolicLinkStatus fp
case () of
()
| PosixF.isRegularFile s -> return FTFile
| PosixF.isDirectory s -> return FTDirectory
| PosixF.isSymbolicLink s -> do
es' <- try $ PosixF.get... | 691 | getFileType fp = do
s <- PosixF.getSymbolicLinkStatus fp
case () of
()
| PosixF.isRegularFile s -> return FTFile
| PosixF.isDirectory s -> return FTDirectory
| PosixF.isSymbolicLink s -> do
es' <- try $ PosixF.getFileStatus fp
case es' ... | 652 | false | true | 0 | 21 | 282 | 206 | 87 | 119 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml30.hs | bsd-2-clause | parseMillimeters :: String -> P.XParse Millimeters
parseMillimeters = P.xread "Millimeters" | 91 | parseMillimeters :: String -> P.XParse Millimeters
parseMillimeters = P.xread "Millimeters" | 91 | parseMillimeters = P.xread "Millimeters" | 40 | false | true | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
AlexanderPankiv/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprGRHSs :: (OutputableBndr idR, Outputable body)
=> HsMatchContext idL -> GRHSs idR body -> SDoc
pprGRHSs ctxt (GRHSs grhss binds)
= vcat (map (pprGRHS ctxt . unLoc) grhss)
$$ ppUnless (isEmptyLocalBinds binds)
(text "where" $$ nest 4 (pprBinds binds)) | 271 | pprGRHSs :: (OutputableBndr idR, Outputable body)
=> HsMatchContext idL -> GRHSs idR body -> SDoc
pprGRHSs ctxt (GRHSs grhss binds)
= vcat (map (pprGRHS ctxt . unLoc) grhss)
$$ ppUnless (isEmptyLocalBinds binds)
(text "where" $$ nest 4 (pprBinds binds)) | 271 | pprGRHSs ctxt (GRHSs grhss binds)
= vcat (map (pprGRHS ctxt . unLoc) grhss)
$$ ppUnless (isEmptyLocalBinds binds)
(text "where" $$ nest 4 (pprBinds binds)) | 164 | false | true | 2 | 11 | 56 | 120 | 55 | 65 | null | null |
ctford/Idris-Elba-dev | src/Idris/Colours.hs | bsd-3-clause | colourisePrompt :: ColourTheme -> String -> String
colourisePrompt t = colourise (promptColour t) | 97 | colourisePrompt :: ColourTheme -> String -> String
colourisePrompt t = colourise (promptColour t) | 97 | colourisePrompt t = colourise (promptColour t) | 46 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | setNominalRole_maybe (AppCo co1 co2)
= AppCo <$> setNominalRole_maybe co1 <*> pure co2 | 88 | setNominalRole_maybe (AppCo co1 co2)
= AppCo <$> setNominalRole_maybe co1 <*> pure co2 | 88 | setNominalRole_maybe (AppCo co1 co2)
= AppCo <$> setNominalRole_maybe co1 <*> pure co2 | 88 | false | false | 0 | 7 | 13 | 31 | 14 | 17 | null | null |
adolfosilva/granada | library/Granada/Expr.hs | gpl-3.0 | itemToAction _ = error "Expected an Action" | 59 | itemToAction _ = error "Expected an Action" | 59 | itemToAction _ = error "Expected an Action" | 59 | false | false | 0 | 5 | 22 | 13 | 5 | 8 | null | null |
lambdageek/insomnia | src/Insomnia/IReturn.hs | bsd-3-clause | moduleExpr (ModuleFun bnd) =
let (tele, body) = UU.unsafeUnbind bnd
in ModuleFun $ U.bind tele $ moduleExpr body | 116 | moduleExpr (ModuleFun bnd) =
let (tele, body) = UU.unsafeUnbind bnd
in ModuleFun $ U.bind tele $ moduleExpr body | 116 | moduleExpr (ModuleFun bnd) =
let (tele, body) = UU.unsafeUnbind bnd
in ModuleFun $ U.bind tele $ moduleExpr body | 116 | false | false | 0 | 10 | 21 | 54 | 25 | 29 | null | null |
kazu-yamamoto/wai | wai-extra/Network/Wai/Handler/CGI.hs | mit | runGeneric
:: [(String, String)] -- ^ all variables
-> (Int -> IO (IO B.ByteString)) -- ^ responseBody of input
-> (B.ByteString -> IO ()) -- ^ destination for output
-> Maybe B.ByteString -- ^ does the server support the X-Sendfile header?
-> Application
-> IO ()
runGeneric vars inputH ou... | 3,888 | runGeneric
:: [(String, String)] -- ^ all variables
-> (Int -> IO (IO B.ByteString)) -- ^ responseBody of input
-> (B.ByteString -> IO ()) -- ^ destination for output
-> Maybe B.ByteString -- ^ does the server support the X-Sendfile header?
-> Application
-> IO ()
runGeneric vars inputH ou... | 3,888 | runGeneric vars inputH outputH xsendfile app = do
let rmethod = B.pack $ lookup' "REQUEST_METHOD" vars
pinfo = lookup' "PATH_INFO" vars
qstring = lookup' "QUERY_STRING" vars
contentLength = safeRead 0 $ lookup' "CONTENT_LENGTH" vars
remoteHost' =
case lookup "REMOTE_ADDR"... | 3,593 | false | true | 3 | 31 | 1,547 | 1,061 | 521 | 540 | null | null |
jdreaver/eventful | eventful-dynamodb/src/Eventful/Store/DynamoDB.hs | mit | -- | An 'EventStoreReader' that uses AWS DynamoDB as the storage backend. Use a
-- 'DynamoDBEventStoreConfig' to configure this event store.
dynamoDBEventStoreReader
:: DynamoDBEventStoreConfig serialized
-> VersionedEventStoreReader AWS serialized
dynamoDBEventStoreReader config = EventStoreReader $ getDynamoEvent... | 328 | dynamoDBEventStoreReader
:: DynamoDBEventStoreConfig serialized
-> VersionedEventStoreReader AWS serialized
dynamoDBEventStoreReader config = EventStoreReader $ getDynamoEvents config | 187 | dynamoDBEventStoreReader config = EventStoreReader $ getDynamoEvents config | 75 | true | true | 0 | 7 | 39 | 39 | 18 | 21 | null | null |
DougBurke/swish | tests/GraphTest.hs | lgpl-2.1 | g4 = toG [t01,t02,t03,t04,t05,t06,t10,t11,t12] | 46 | g4 = toG [t01,t02,t03,t04,t05,t06,t10,t11,t12] | 46 | g4 = toG [t01,t02,t03,t04,t05,t06,t10,t11,t12] | 46 | false | false | 1 | 6 | 3 | 39 | 22 | 17 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F09.hs | bsd-3-clause | ptr_glGetColorTableParameterivSGI :: FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
ptr_glGetColorTableParameterivSGI = unsafePerformIO $ getCommand "glGetColorTableParameterivSGI" | 181 | ptr_glGetColorTableParameterivSGI :: FunPtr (GLenum -> GLenum -> Ptr GLint -> IO ())
ptr_glGetColorTableParameterivSGI = unsafePerformIO $ getCommand "glGetColorTableParameterivSGI" | 181 | ptr_glGetColorTableParameterivSGI = unsafePerformIO $ getCommand "glGetColorTableParameterivSGI" | 96 | false | true | 0 | 11 | 17 | 44 | 21 | 23 | null | null |
chemist/siberia | src/Siberia/Internal.hs | bsd-3-clause | removeClientPid :: Allowed m => ThreadId -> Radio -> m ()
removeClientPid t mv = removePid =<< info mv
where
removePid mv = liftIO $ modifyMVar_ mv fun
fun :: Radio -> IO Radio
fun r = do
let oldStatus = pid r
newConnections = (connections oldStatus) - 1
newConnectionsPro... | 1,113 | removeClientPid :: Allowed m => ThreadId -> Radio -> m ()
removeClientPid t mv = removePid =<< info mv
where
removePid mv = liftIO $ modifyMVar_ mv fun
fun :: Radio -> IO Radio
fun r = do
let oldStatus = pid r
newConnections = (connections oldStatus) - 1
newConnectionsPro... | 1,113 | removeClientPid t mv = removePid =<< info mv
where
removePid mv = liftIO $ modifyMVar_ mv fun
fun :: Radio -> IO Radio
fun r = do
let oldStatus = pid r
newConnections = (connections oldStatus) - 1
newConnectionsProcesses = Prelude.filter (/= t) (connectionsProcesses oldSt... | 1,055 | false | true | 3 | 15 | 446 | 298 | 147 | 151 | null | null |
mightymoose/liquidhaskell | benchmarks/hmatrix-0.15.0.1/lib/Numeric/LinearAlgebra/Algorithms.hs | bsd-3-clause | -- | RQ factorization.
--
-- If @(r,q) = rq m@ then @m == r \<> q@, where q is unitary and r is upper triangular.
rq :: Field t => Matrix t -> (Matrix t, Matrix t)
rq m = {-# SCC "rq" #-} (r,q) where
(q',r') = qr $ trans $ rev1 m
r = rev2 (trans r')
q = rev2 (trans q')
rev1 = flipud . fliprl
rev2 =... | 535 | rq :: Field t => Matrix t -> (Matrix t, Matrix t)
rq m = {-# SCC "rq" #-} (r,q) where
(q',r') = qr $ trans $ rev1 m
r = rev2 (trans r')
q = rev2 (trans q')
rev1 = flipud . fliprl
rev2 = fliprl . flipud
-- | Hessenberg factorization.
--
-- If @(p,h) = hess m@ then @m == p \<> h \<> ctrans p@, where... | 421 | rq m = {-# SCC "rq" #-} (r,q) where
(q',r') = qr $ trans $ rev1 m
r = rev2 (trans r')
q = rev2 (trans q')
rev1 = flipud . fliprl
rev2 = fliprl . flipud
-- | Hessenberg factorization.
--
-- If @(p,h) = hess m@ then @m == p \<> h \<> ctrans p@, where p is unitary
-- and h is in upper Hessenberg form... | 371 | true | true | 0 | 10 | 136 | 131 | 69 | 62 | null | null |
ocramz/hs-code-jam | A_Soln.hs | gpl-2.0 | triples :: [a] -> [[a]]
triples = chunk 3 | 41 | triples :: [a] -> [[a]]
triples = chunk 3 | 41 | triples = chunk 3 | 17 | false | true | 0 | 7 | 8 | 27 | 15 | 12 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.