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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
buckie/scheme48 | src/Scheme48/Parsers.hs | mit | spaces :: Parser ()
spaces = skipMany1 space | 44 | spaces :: Parser ()
spaces = skipMany1 space | 44 | spaces = skipMany1 space | 24 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
Teaspot-Studio/Urho3D-Haskell | urho3d-bindgen/src/Graphics/Urho3D/Container/Ptr.hs | mit | sharedWeakPtr :: String -> DecsQ
sharedWeakPtr tname = do
#ifndef SHARED_DEBUG
typedef <- C.verbatim $ "typedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#else
typedef <- C.verbatim $ "#include <iostream>\ntypedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#endif
deleter <- sequence [
deleteWeakTPtr ^:: [t... | 1,874 | sharedWeakPtr :: String -> DecsQ
sharedWeakPtr tname = do
#ifndef SHARED_DEBUG
typedef <- C.verbatim $ "typedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#else
typedef <- C.verbatim $ "#include <iostream>\ntypedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#endif
deleter <- sequence [
deleteWeakTPtr ^:: [t... | 1,874 | sharedWeakPtr tname = do
#ifndef SHARED_DEBUG
typedef <- C.verbatim $ "typedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#else
typedef <- C.verbatim $ "#include <iostream>\ntypedef WeakPtr<" ++ tname ++ "> " ++ weakT ++ ";"
#endif
deleter <- sequence [
deleteWeakTPtr ^:: [t| Ptr $weakTType -> IO () |]
... | 1,841 | false | true | 0 | 13 | 432 | 176 | 99 | 77 | null | null |
olive/antiqua-prime | src/Antiqua/Graphics/Renderer.hs | mit | vertArrayp = do
let mp = [ ((i, j), undefined) | i <- [0..48-1], j <- [0..48-1]]
vert <- newArray_ (0,len*8) :: IO (StorableArray Int GLfloat)
foldlM (\arr ((pos, t), i) -> writeVertex (Tileset 16 16 16 16) pos (i*8) arr) vert (zip mp [0..len-1]) | 258 | vertArrayp = do
let mp = [ ((i, j), undefined) | i <- [0..48-1], j <- [0..48-1]]
vert <- newArray_ (0,len*8) :: IO (StorableArray Int GLfloat)
foldlM (\arr ((pos, t), i) -> writeVertex (Tileset 16 16 16 16) pos (i*8) arr) vert (zip mp [0..len-1]) | 258 | vertArrayp = do
let mp = [ ((i, j), undefined) | i <- [0..48-1], j <- [0..48-1]]
vert <- newArray_ (0,len*8) :: IO (StorableArray Int GLfloat)
foldlM (\arr ((pos, t), i) -> writeVertex (Tileset 16 16 16 16) pos (i*8) arr) vert (zip mp [0..len-1]) | 258 | false | false | 1 | 15 | 56 | 179 | 93 | 86 | null | null |
RyanBeatty/Falcon | src/AI/MCTS.hs | gpl-2.0 | treePolicy :: TreePos Full SearchNode -> StdGen -> (TreePos Full SearchNode, StdGen)
treePolicy searchTree gen
-- If a node is a TerminalNode, then stop search
| isTerminal tree' = (searchTree, gen)
-- If a Node is FullyExpanded, then search its best child
| isFullyExpanded tree' = treePolicy bChild gen
... | 850 | treePolicy :: TreePos Full SearchNode -> StdGen -> (TreePos Full SearchNode, StdGen)
treePolicy searchTree gen
-- If a node is a TerminalNode, then stop search
| isTerminal tree' = (searchTree, gen)
-- If a Node is FullyExpanded, then search its best child
| isFullyExpanded tree' = treePolicy bChild gen
... | 850 | treePolicy searchTree gen
-- If a node is a TerminalNode, then stop search
| isTerminal tree' = (searchTree, gen)
-- If a Node is FullyExpanded, then search its best child
| isFullyExpanded tree' = treePolicy bChild gen
-- otherwise, expand the current node and stop search
| otherwise = e... | 765 | false | true | 2 | 10 | 296 | 163 | 76 | 87 | null | null |
ruslantalpa/postgrest | src/PostgREST/QueryBuilder.hs | mit | insertableValue :: JSON.Value -> SqlFragment
insertableValue JSON.Null = "null" | 79 | insertableValue :: JSON.Value -> SqlFragment
insertableValue JSON.Null = "null" | 79 | insertableValue JSON.Null = "null" | 34 | false | true | 0 | 6 | 8 | 26 | 12 | 14 | null | null |
eggzilla/ClustalParser | Biobase/Clustal/Import.hs | gpl-3.0 | genParserSequenceParameters :: GenParser Char st SequenceParameters
genParserSequenceParameters = do
string "Sequence "
sequenceIndexParam <- many1 digit
string ": "
sequenceIdentifierParam <- many1 (noneOf " ")
spaces
sequenceLengthParam <- many1 digit
space
string "bp"
newline
return $ SequencePar... | 470 | genParserSequenceParameters :: GenParser Char st SequenceParameters
genParserSequenceParameters = do
string "Sequence "
sequenceIndexParam <- many1 digit
string ": "
sequenceIdentifierParam <- many1 (noneOf " ")
spaces
sequenceLengthParam <- many1 digit
space
string "bp"
newline
return $ SequencePar... | 470 | genParserSequenceParameters = do
string "Sequence "
sequenceIndexParam <- many1 digit
string ": "
sequenceIdentifierParam <- many1 (noneOf " ")
spaces
sequenceLengthParam <- many1 digit
space
string "bp"
newline
return $ SequenceParameters (readInt sequenceIndexParam) (T.pack sequenceIdentifierParam... | 402 | false | true | 0 | 11 | 71 | 116 | 50 | 66 | null | null |
gergoerdi/brainfuck | language-brainfuck/src/Language/Brainfuck/Parser.hs | bsd-3-clause | stmt = incPtr <|> decPtr <|> incData <|> decData <|> output <|> input <|> while
where
incPtr = symbol '>' >> return IncPtr
decPtr = symbol '<' >> return DecPtr
incData = symbol '+' >> return IncData
decData = symbol '-' >> return DecData
output = symbol '.' >> return Output
in... | 418 | stmt = incPtr <|> decPtr <|> incData <|> decData <|> output <|> input <|> while
where
incPtr = symbol '>' >> return IncPtr
decPtr = symbol '<' >> return DecPtr
incData = symbol '+' >> return IncData
decData = symbol '-' >> return DecData
output = symbol '.' >> return Output
in... | 418 | stmt = incPtr <|> decPtr <|> incData <|> decData <|> output <|> input <|> while
where
incPtr = symbol '>' >> return IncPtr
decPtr = symbol '<' >> return DecPtr
incData = symbol '+' >> return IncData
decData = symbol '-' >> return DecData
output = symbol '.' >> return Output
in... | 418 | false | false | 0 | 10 | 121 | 148 | 71 | 77 | null | null |
nickspinale/euler | complete/050.hs | mit | limit = (< 1000000) | 19 | limit = (< 1000000) | 19 | limit = (< 1000000) | 19 | false | false | 0 | 5 | 3 | 10 | 6 | 4 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType21.hs | bsd-3-clause | pointType21Parser :: Get PointType21
pointType21Parser = do
pointTypeDesc <- getByteString 20
templatePointer <- getWord32le
numParameters <- getWord8
displayNum <- getWord8
return $ PointType21 pointTypeDesc templatePointer numParameters displayNum | 285 | pointType21Parser :: Get PointType21
pointType21Parser = do
pointTypeDesc <- getByteString 20
templatePointer <- getWord32le
numParameters <- getWord8
displayNum <- getWord8
return $ PointType21 pointTypeDesc templatePointer numParameters displayNum | 285 | pointType21Parser = do
pointTypeDesc <- getByteString 20
templatePointer <- getWord32le
numParameters <- getWord8
displayNum <- getWord8
return $ PointType21 pointTypeDesc templatePointer numParameters displayNum | 248 | false | true | 1 | 9 | 62 | 65 | 27 | 38 | null | null |
lenary/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | eqTy = sUN "=" | 14 | eqTy = sUN "=" | 14 | eqTy = sUN "=" | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Trafo/Sharing.hs | bsd-3-clause | buildInitialEnvExp :: [Level] -> [StableSharingExp] -> [StableSharingExp]
buildInitialEnvExp tags ses = map (lookupSE ses) tags
where
lookupSE ses tag1
= case filter hasTag ses of
[] -> noStableSharing -- tag is not used in the analysed expression
[se] -> se -- tag h... | 1,330 | buildInitialEnvExp :: [Level] -> [StableSharingExp] -> [StableSharingExp]
buildInitialEnvExp tags ses = map (lookupSE ses) tags
where
lookupSE ses tag1
= case filter hasTag ses of
[] -> noStableSharing -- tag is not used in the analysed expression
[se] -> se -- tag h... | 1,330 | buildInitialEnvExp tags ses = map (lookupSE ses) tags
where
lookupSE ses tag1
= case filter hasTag ses of
[] -> noStableSharing -- tag is not used in the analysed expression
[se] -> se -- tag has a unique occurrence
ses2 -> INTERNAL_ERROR(error) "buildIniti... | 1,256 | false | true | 16 | 13 | 382 | 325 | 165 | 160 | null | null |
marcelosousa/poet | src/Domain/Synchron.hs | gpl-2.0 | toFlat :: M.Map Integer (M.Map Integer PEvent) -> [[PEvent]]
toFlat m = map M.elems $ M.elems m | 95 | toFlat :: M.Map Integer (M.Map Integer PEvent) -> [[PEvent]]
toFlat m = map M.elems $ M.elems m | 95 | toFlat m = map M.elems $ M.elems m | 34 | false | true | 0 | 9 | 16 | 55 | 27 | 28 | null | null |
alpmestan/probable | src/Math/Probable/Random.hs | bsd-3-clause | -- | If for some reason you have a 'RandT' ('ST' 's')
-- you can run it from 'IO' just like we do with 'mwc'.
--
-- > λ> mwcST $ listOf 4 bool
-- > [False,False,True,True]
mwcST :: RandT (ST s) a
-> IO a
mwcST = MWC.withSystemRandom
. MWC.asGenST
. runRandT | 278 | mwcST :: RandT (ST s) a
-> IO a
mwcST = MWC.withSystemRandom
. MWC.asGenST
. runRandT | 103 | mwcST = MWC.withSystemRandom
. MWC.asGenST
. runRandT | 65 | true | true | 0 | 8 | 73 | 46 | 25 | 21 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Config/Dmwit.hs | bsd-2-clause | pipeName n s = "/home/dmwit/.xmonad/pipe-" ++ n ++ "-" ++ show s | 64 | pipeName n s = "/home/dmwit/.xmonad/pipe-" ++ n ++ "-" ++ show s | 64 | pipeName n s = "/home/dmwit/.xmonad/pipe-" ++ n ++ "-" ++ show s | 64 | false | false | 0 | 7 | 11 | 26 | 12 | 14 | null | null |
kayhide/deep-learning-from-scratch | src/NeuralNetwork.hs | bsd-3-clause | stepFunction :: Double -> Double
stepFunction x | x > 0 = 1.0
| otherwise = 0.0 | 94 | stepFunction :: Double -> Double
stepFunction x | x > 0 = 1.0
| otherwise = 0.0 | 94 | stepFunction x | x > 0 = 1.0
| otherwise = 0.0 | 61 | false | true | 0 | 8 | 31 | 37 | 17 | 20 | null | null |
lawrencelomax/ResultWorthy | ResultWorthy/Transforms.hs | bsd-3-clause | -- Extracts the Resultable Functions recursively.
resultFunctionDeclExtract :: Declaration -> Maybe Declaration
resultFunctionDeclExtract (FunctionDecl a m n g f) =
let constructF = FunctionDecl a m n g
construct f = BodyDecl (constructF f) $ show (renderSwiftBody n [] f)
in fmap construct (resultFunction... | 334 | resultFunctionDeclExtract :: Declaration -> Maybe Declaration
resultFunctionDeclExtract (FunctionDecl a m n g f) =
let constructF = FunctionDecl a m n g
construct f = BodyDecl (constructF f) $ show (renderSwiftBody n [] f)
in fmap construct (resultFunctionTypeExtract f) | 284 | resultFunctionDeclExtract (FunctionDecl a m n g f) =
let constructF = FunctionDecl a m n g
construct f = BodyDecl (constructF f) $ show (renderSwiftBody n [] f)
in fmap construct (resultFunctionTypeExtract f) | 222 | true | true | 0 | 13 | 58 | 103 | 49 | 54 | null | null |
seereason/cabal | Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | isStanzaHeader :: Field -> Bool
isStanzaHeader (F _ f _) = f == "executable" | 76 | isStanzaHeader :: Field -> Bool
isStanzaHeader (F _ f _) = f == "executable" | 76 | isStanzaHeader (F _ f _) = f == "executable" | 44 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
jsl/spoonerize | Text/Spoonerize.hs | mit | annotatedSentence :: String -> AnnotatedSentence
annotatedSentence sent =
map (\(x, y, z) -> (WordInfo x y z)) wordTuples
where sentence = words sent
wordTuples = zip3 [1..] sentence $ cycle [True] | 217 | annotatedSentence :: String -> AnnotatedSentence
annotatedSentence sent =
map (\(x, y, z) -> (WordInfo x y z)) wordTuples
where sentence = words sent
wordTuples = zip3 [1..] sentence $ cycle [True] | 217 | annotatedSentence sent =
map (\(x, y, z) -> (WordInfo x y z)) wordTuples
where sentence = words sent
wordTuples = zip3 [1..] sentence $ cycle [True] | 168 | false | true | 0 | 9 | 50 | 85 | 44 | 41 | null | null |
cfredric/NumberTheory | NumberTheory.hs | gpl-3.0 | -- |Convert a continued fraction to a quadratic number.
continuedFractionToQuadratic :: ContinuedFraction -> Quadratic
continuedFractionToQuadratic frac@(Finite _) =
let rat = continuedFractionToRational frac
in reduceQuad $ Quad (numerator rat, 0, 0, denominator rat) | 276 | continuedFractionToQuadratic :: ContinuedFraction -> Quadratic
continuedFractionToQuadratic frac@(Finite _) =
let rat = continuedFractionToRational frac
in reduceQuad $ Quad (numerator rat, 0, 0, denominator rat) | 220 | continuedFractionToQuadratic frac@(Finite _) =
let rat = continuedFractionToRational frac
in reduceQuad $ Quad (numerator rat, 0, 0, denominator rat) | 157 | true | true | 0 | 10 | 40 | 67 | 34 | 33 | null | null |
ruicc/structured-concurrent | src/Control/Concurrent/Structured/Async.hs | mit | asyncWithUnmask
:: (a -> IO r')
-> ((forall s b. CIO s b -> CIO s b) -> CIO r' a)
-> CIO r (A.Async r')
asyncWithUnmask k action =
callCC $ \ exit ->
ContT $ \ k' -> do -- IO
r' <- A.asyncWithUnmask $ \ unblock ->
let
unmask act = ContT $ \k'' -> u... | 440 | asyncWithUnmask
:: (a -> IO r')
-> ((forall s b. CIO s b -> CIO s b) -> CIO r' a)
-> CIO r (A.Async r')
asyncWithUnmask k action =
callCC $ \ exit ->
ContT $ \ k' -> do -- IO
r' <- A.asyncWithUnmask $ \ unblock ->
let
unmask act = ContT $ \k'' -> u... | 440 | asyncWithUnmask k action =
callCC $ \ exit ->
ContT $ \ k' -> do -- IO
r' <- A.asyncWithUnmask $ \ unblock ->
let
unmask act = ContT $ \k'' -> unblock (runCIO k'' act)
in
runCIO k (action unmask)
runCIO k' (exit ... | 324 | false | true | 0 | 22 | 191 | 178 | 88 | 90 | null | null |
sramekj/lunchvote | Application.hs | mit | -- | Run DB queries
db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 93 | db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 73 | db = handler . runDB | 20 | true | true | 0 | 9 | 20 | 44 | 20 | 24 | null | null |
jyrimatti/alava | src-lib/HtmlPrint.hs | mit | dispS x = term x | 46 | dispS x = term x | 46 | dispS x = term x | 46 | false | false | 0 | 5 | 34 | 12 | 5 | 7 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/AmortizedQueue.hs | bsd-3-clause | cons x (SL n xs) = SL (n+1) (x:xs) | 34 | cons x (SL n xs) = SL (n+1) (x:xs) | 34 | cons x (SL n xs) = SL (n+1) (x:xs) | 34 | false | false | 0 | 7 | 8 | 39 | 19 | 20 | null | null |
beni55/hdbc-postgresql | Database/HDBC/PostgreSQL/ErrorCodes.hs | bsd-3-clause | -- |Is set to @\"42P05\"@.
duplicatePstatement :: String
duplicatePstatement = "42P05" | 86 | duplicatePstatement :: String
duplicatePstatement = "42P05" | 59 | duplicatePstatement = "42P05" | 29 | true | true | 0 | 4 | 10 | 12 | 7 | 5 | null | null |
santolucito/ives | tests/stutter.hs | mit | :: a -> [a]
f x = [x,x]
| 25 | f :: a -> [a]
f x = [x,x] | 25 | f x = [x,x] | 11 | false | true | 0 | 8 | 9 | 29 | 15 | 14 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/array/Data/Array/Base.hs | bsd-3-clause | unsafeFreeze :: (Ix i, MArray a e m, IArray b e) => a i e -> m (b i e)
unsafeFreeze = freeze | 92 | unsafeFreeze :: (Ix i, MArray a e m, IArray b e) => a i e -> m (b i e)
unsafeFreeze = freeze | 92 | unsafeFreeze = freeze | 21 | false | true | 0 | 9 | 22 | 58 | 29 | 29 | null | null |
glguy/ssh-hans | src/Network/SSH/Rekey.hs | bsd-3-clause | rekeyConnection_s :: HandleLike -> SshState -> SshProposal -> SshProposal -> IO ()
rekeyConnection_s h state i_s i_c =
do (v_s, v_c) <- readIORef (sshIdents state)
let (_i_us, i_them) = (i_s, i_c)
let creds = sshAuthMethods state
suite <- computeSuiteOrDie h state creds i_c i_s
handleMissedGu... | 934 | rekeyConnection_s :: HandleLike -> SshState -> SshProposal -> SshProposal -> IO ()
rekeyConnection_s h state i_s i_c =
do (v_s, v_c) <- readIORef (sshIdents state)
let (_i_us, i_them) = (i_s, i_c)
let creds = sshAuthMethods state
suite <- computeSuiteOrDie h state creds i_c i_s
handleMissedGu... | 934 | rekeyConnection_s h state i_s i_c =
do (v_s, v_c) <- readIORef (sshIdents state)
let (_i_us, i_them) = (i_s, i_c)
let creds = sshAuthMethods state
suite <- computeSuiteOrDie h state creds i_c i_s
handleMissedGuess h state suite i_them
SshMsgKexDhInit pub_c <- receive h state
(pub_s... | 851 | false | true | 0 | 14 | 229 | 319 | 150 | 169 | null | null |
gcampax/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | dsCmdStmts _ _ _ [] _ = panic "dsCmdStmts []" | 45 | dsCmdStmts _ _ _ [] _ = panic "dsCmdStmts []" | 45 | dsCmdStmts _ _ _ [] _ = panic "dsCmdStmts []" | 45 | false | false | 0 | 6 | 9 | 22 | 10 | 12 | null | null |
ip1981/sproxy2 | src/Sproxy/Application.hs | mit | authenticationRequired ::
ByteString -> HM.HashMap Text OAuth2Client -> W.Application
authenticationRequired key oa2 req resp = do
Log.info $ "511 Unauthenticated: " ++ showReq req
resp $
W.responseLBS
networkAuthenticationRequired511
[(hContentType, "text/html; charset=utf-8")]
page
wh... | 1,146 | authenticationRequired ::
ByteString -> HM.HashMap Text OAuth2Client -> W.Application
authenticationRequired key oa2 req resp = do
Log.info $ "511 Unauthenticated: " ++ showReq req
resp $
W.responseLBS
networkAuthenticationRequired511
[(hContentType, "text/html; charset=utf-8")]
page
wh... | 1,146 | authenticationRequired key oa2 req resp = do
Log.info $ "511 Unauthenticated: " ++ showReq req
resp $
W.responseLBS
networkAuthenticationRequired511
[(hContentType, "text/html; charset=utf-8")]
page
where
path =
if W.requestMethod req == methodGet
then W.rawPathInfo req <> ... | 1,055 | false | true | 9 | 11 | 269 | 244 | 124 | 120 | null | null |
HS-Carbon/hs-carbon-aggregator | 3rd-party/python-pickle/Language/Python/Pickle.hs | apache-2.0 | binint = string "J" *> (BININT <$> int4) | 40 | binint = string "J" *> (BININT <$> int4) | 40 | binint = string "J" *> (BININT <$> int4) | 40 | false | false | 0 | 7 | 7 | 20 | 10 | 10 | null | null |
ruud-v-a/hakyll | src/Hakyll/Check.hs | bsd-3-clause | checkExternalUrl url = do
logger <- checkerLogger <$> ask
needsCheck <- (== All) . checkerCheck <$> ask
checked <- (url `S.member`) <$> get
if not needsCheck || checked
then Logger.debug logger "Already checked, skipping"
else do
isOk <- liftIO $ hand... | 1,764 | checkExternalUrl url = do
logger <- checkerLogger <$> ask
needsCheck <- (== All) . checkerCheck <$> ask
checked <- (url `S.member`) <$> get
if not needsCheck || checked
then Logger.debug logger "Already checked, skipping"
else do
isOk <- liftIO $ hand... | 1,764 | checkExternalUrl url = do
logger <- checkerLogger <$> ask
needsCheck <- (== All) . checkerCheck <$> ask
checked <- (url `S.member`) <$> get
if not needsCheck || checked
then Logger.debug logger "Already checked, skipping"
else do
isOk <- liftIO $ hand... | 1,764 | false | false | 6 | 21 | 578 | 448 | 216 | 232 | null | null |
li-zhirui/EoplLangs | src/CheckedLang/Data.hs | bsd-3-clause | throwError :: LangError -> Try a
throwError = Left | 50 | throwError :: LangError -> Try a
throwError = Left | 50 | throwError = Left | 17 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
kishoredbn/barrelfish | tools/mackerel/TypeTable.hs | mit | make_rtrec :: AST -> String -> BitOrder -> [Rec]
make_rtrec (RegType nm dsc (TypeDefn decls) p) dev order =
[ RegFormat { tt_name = TN.fromParts dev nm,
tt_size = (calc_tt_size decls),
fields = F.make_list dev NOATTR order 0 decls,
tt_desc = dsc,
... | 335 | make_rtrec :: AST -> String -> BitOrder -> [Rec]
make_rtrec (RegType nm dsc (TypeDefn decls) p) dev order =
[ RegFormat { tt_name = TN.fromParts dev nm,
tt_size = (calc_tt_size decls),
fields = F.make_list dev NOATTR order 0 decls,
tt_desc = dsc,
... | 335 | make_rtrec (RegType nm dsc (TypeDefn decls) p) dev order =
[ RegFormat { tt_name = TN.fromParts dev nm,
tt_size = (calc_tt_size decls),
fields = F.make_list dev NOATTR order 0 decls,
tt_desc = dsc,
pos = p } ] | 286 | false | true | 0 | 13 | 123 | 118 | 62 | 56 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/Recurrences/Bilinear.hs | mit | -- | Infinite zero-based list of the @n@-th order Euler polynomials evaluated at @1@.
-- The algorithm used was derived from <http://www.emis.ams.org/journals/JIS/VOL4/CHEN/AlgBE2.pdf Algorithms for Bernoulli numbers and Euler numbers>
-- by Kwang-Wu Chen, third formula of the Corollary in page 7.
-- Element-by-element... | 669 | eulerPolyAt1 :: forall a . Integral a => [Ratio a]
eulerPolyAt1 = tail $ helperForBEEP tail (map recip (iterate (2 *) 1)) | 121 | eulerPolyAt1 = tail $ helperForBEEP tail (map recip (iterate (2 *) 1)) | 70 | true | true | 0 | 11 | 105 | 66 | 38 | 28 | null | null |
hferreiro/replay | testsuite/tests/th/T5555.hs | bsd-3-clause | test :: String
test = [L.s|hello world|] | 40 | test :: String
test = [L.s|hello world|] | 40 | test = [L.s|hello world|] | 25 | false | true | 0 | 6 | 6 | 24 | 12 | 12 | null | null |
nkarag/haskell-CSVDB | src/Data/RTable/Julius.hs | bsd-3-clause | -- | Evaluates (parses) a Relational Operation Expression of the form
-- @
-- ROp :. ROp :. ... :. ROpStart
-- @
-- and produces the corresponding ROperation data type.
-- This will be an RCombinedOp relational operation that will be the composition of all relational operators
-- in the ROpExpr. In the returned... | 580 | evalROpExpr :: ROpExpr -> (ROperation, TabExprEnhanced, TabExprEnhanced)
evalROpExpr ROpStart = (ROperationEmpty, EmptyTab, EmptyTab) | 133 | evalROpExpr ROpStart = (ROperationEmpty, EmptyTab, EmptyTab) | 60 | true | true | 0 | 6 | 97 | 44 | 29 | 15 | null | null |
clauderichard/Euclaude | Geo.hs | mit | claudianLines :: Claudian -> Triangle -> [Line]
claudianLines cl t = lineupTriangles t $ claudianTriangle cl t | 110 | claudianLines :: Claudian -> Triangle -> [Line]
claudianLines cl t = lineupTriangles t $ claudianTriangle cl t | 110 | claudianLines cl t = lineupTriangles t $ claudianTriangle cl t | 62 | false | true | 0 | 7 | 16 | 39 | 19 | 20 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Locations/Buckets/Patch.hs | mpl-2.0 | -- | Multipart request metadata.
lbpPayload :: Lens' LocationsBucketsPatch LogBucket
lbpPayload
= lens _lbpPayload (\ s a -> s{_lbpPayload = a}) | 146 | lbpPayload :: Lens' LocationsBucketsPatch LogBucket
lbpPayload
= lens _lbpPayload (\ s a -> s{_lbpPayload = a}) | 113 | lbpPayload
= lens _lbpPayload (\ s a -> s{_lbpPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
ezyang/ghc | compiler/types/Type.hs | bsd-3-clause | equalityTyCon Representational = eqReprPrimTyCon | 48 | equalityTyCon Representational = eqReprPrimTyCon | 48 | equalityTyCon Representational = eqReprPrimTyCon | 48 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ian-ross/ggp | players/MobilityMinimax.hs | bsd-3-clause | boundedMinimum :: [Integer] -> Integer
boundedMinimum [] = 100 | 62 | boundedMinimum :: [Integer] -> Integer
boundedMinimum [] = 100 | 62 | boundedMinimum [] = 100 | 23 | false | true | 0 | 6 | 8 | 23 | 12 | 11 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionDisks/Insert.hs | mpl-2.0 | -- | Creates a value of 'RegionDisksInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdiRequestId'
--
-- * 'rdiSourceImage'
--
-- * 'rdiProject'
--
-- * 'rdiPayload'
--
-- * 'rdiRegion'
regionDisksInsert
:: Text -- ^ 'rdiPr... | 654 | regionDisksInsert
:: Text -- ^ 'rdiProject'
-> Disk -- ^ 'rdiPayload'
-> Text -- ^ 'rdiRegion'
-> RegionDisksInsert
regionDisksInsert pRdiProject_ pRdiPayload_ pRdiRegion_ =
RegionDisksInsert'
{ _rdiRequestId = Nothing
, _rdiSourceImage = Nothing
, _rdiProject = pRdiProject_
, _rdiPayl... | 375 | regionDisksInsert pRdiProject_ pRdiPayload_ pRdiRegion_ =
RegionDisksInsert'
{ _rdiRequestId = Nothing
, _rdiSourceImage = Nothing
, _rdiProject = pRdiProject_
, _rdiPayload = pRdiPayload_
, _rdiRegion = pRdiRegion_
} | 243 | true | true | 0 | 9 | 136 | 87 | 54 | 33 | null | null |
swift-nav/plover | src/Language/Plover/Convert.hs | mit | makePos' :: Tag SourcePos -> SourcePos
makePos' NoTag = newPos "<unknown>" (-1) (-1) | 84 | makePos' :: Tag SourcePos -> SourcePos
makePos' NoTag = newPos "<unknown>" (-1) (-1) | 84 | makePos' NoTag = newPos "<unknown>" (-1) (-1) | 45 | false | true | 0 | 7 | 12 | 44 | 20 | 24 | null | null |
joelburget/daily-typecheckers | src/Day22.hs | bsd-3-clause | reflectC :: CheckNom -> ReflectM Hoas
reflectC t = case t of
NLet name iTm ty cTm -> do
iTm' <- reflectI iTm
f <- reflectCapture (reflectC cTm)
return $ HLet name iTm' ty f
NNeutral iTm -> HNeutral <$> reflectI iTm
NAbs name cTm -> do
f <- reflectCapture (reflectC cTm)
return $ HAbs name f | 316 | reflectC :: CheckNom -> ReflectM Hoas
reflectC t = case t of
NLet name iTm ty cTm -> do
iTm' <- reflectI iTm
f <- reflectCapture (reflectC cTm)
return $ HLet name iTm' ty f
NNeutral iTm -> HNeutral <$> reflectI iTm
NAbs name cTm -> do
f <- reflectCapture (reflectC cTm)
return $ HAbs name f | 316 | reflectC t = case t of
NLet name iTm ty cTm -> do
iTm' <- reflectI iTm
f <- reflectCapture (reflectC cTm)
return $ HLet name iTm' ty f
NNeutral iTm -> HNeutral <$> reflectI iTm
NAbs name cTm -> do
f <- reflectCapture (reflectC cTm)
return $ HAbs name f | 278 | false | true | 0 | 14 | 82 | 142 | 62 | 80 | null | null |
haskell-distributed/distributed-process | src/Control/Distributed/Process/Internal/Primitives.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Channels --
--------------------------------------------------------------------------------
-- | Create a new typed channel, bound to the calling Process
--
-- Note tha... | 1,560 | newChan :: Serializable a => Process (SendPort a, ReceivePort a)
newChan = do
proc <- ask
liftIO . modifyMVar (processState proc) $ \st -> do
let lcid = st ^. channelCounter
let cid = SendPortId { sendPortProcessId = processId proc
, sendPortLocalId = lcid
... | 933 | newChan = do
proc <- ask
liftIO . modifyMVar (processState proc) $ \st -> do
let lcid = st ^. channelCounter
let cid = SendPortId { sendPortProcessId = processId proc
, sendPortLocalId = lcid
}
let sport = SendPort cid
chan ... | 868 | true | true | 0 | 17 | 452 | 294 | 147 | 147 | null | null |
nomeata/codeworld | funblocks-client/src/Blocks/Types.hs | apache-2.0 | cwYellow = standardFunction "cwYellow" "yellow" Nothing [typeColor] [] colorColor "The color yellow" | 100 | cwYellow = standardFunction "cwYellow" "yellow" Nothing [typeColor] [] colorColor "The color yellow" | 100 | cwYellow = standardFunction "cwYellow" "yellow" Nothing [typeColor] [] colorColor "The color yellow" | 100 | false | false | 0 | 6 | 11 | 26 | 13 | 13 | null | null |
input-output-hk/pos-haskell-prototype | util/src/Pos/Util/Concurrent.hs | mit | clearMVar :: MonadIO m => MVar a -> m ()
clearMVar = void . tryTakeMVar | 71 | clearMVar :: MonadIO m => MVar a -> m ()
clearMVar = void . tryTakeMVar | 71 | clearMVar = void . tryTakeMVar | 30 | false | true | 0 | 8 | 14 | 34 | 16 | 18 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | The currency in which the 'limitPrice' amount is specified. At this
-- time, the only supported currency is 'USD'.
rilpCurrencyCode :: Lens' ReservedInstanceLimitPrice (Maybe CurrencyCodeValues)
rilpCurrencyCode = lens _rilpCurrencyCode (\ s a -> s{_rilpCurrencyCode = a}) | 277 | rilpCurrencyCode :: Lens' ReservedInstanceLimitPrice (Maybe CurrencyCodeValues)
rilpCurrencyCode = lens _rilpCurrencyCode (\ s a -> s{_rilpCurrencyCode = a}) | 157 | rilpCurrencyCode = lens _rilpCurrencyCode (\ s a -> s{_rilpCurrencyCode = a}) | 77 | true | true | 0 | 9 | 37 | 47 | 26 | 21 | null | null |
netogallo/polyvariant | src/Analysis/Types/Render.hs | bsd-3-clause | renderEff :: LaTeXC l => E.Effect -> l
renderEff elm = runIdentity $ E.foldEffectM alg elm
where
varf _ v = return $ delta ^: texy v
appf _ a1 a2 = return $ a1 <> appL <> a2
appAnnf _ eff ann = return $ eff <> appL <> texy ann
absf _ v b =
let var | S.annSort $ S.sort v = beta ^: (texy $ S.name ... | 949 | renderEff :: LaTeXC l => E.Effect -> l
renderEff elm = runIdentity $ E.foldEffectM alg elm
where
varf _ v = return $ delta ^: texy v
appf _ a1 a2 = return $ a1 <> appL <> a2
appAnnf _ eff ann = return $ eff <> appL <> texy ann
absf _ v b =
let var | S.annSort $ S.sort v = beta ^: (texy $ S.name ... | 949 | renderEff elm = runIdentity $ E.foldEffectM alg elm
where
varf _ v = return $ delta ^: texy v
appf _ a1 a2 = return $ a1 <> appL <> a2
appAnnf _ eff ann = return $ eff <> appL <> texy ann
absf _ v b =
let var | S.annSort $ S.sort v = beta ^: (texy $ S.name v)
| otherwise = delta ^:... | 910 | false | true | 25 | 14 | 315 | 475 | 228 | 247 | null | null |
piyush-kurur/yesod | yesod/GhcBuild.hs | mit | addFlag :: String -> String -> EwM ModeM ()
addFlag s flag = liftEwM $ do
(m, e, flags') <- getCmdLineState
putCmdLineState (m, e, mkGeneralLocated loc s : flags')
where loc = "addFlag by " ++ flag ++ " on the commandline" | 230 | addFlag :: String -> String -> EwM ModeM ()
addFlag s flag = liftEwM $ do
(m, e, flags') <- getCmdLineState
putCmdLineState (m, e, mkGeneralLocated loc s : flags')
where loc = "addFlag by " ++ flag ++ " on the commandline" | 230 | addFlag s flag = liftEwM $ do
(m, e, flags') <- getCmdLineState
putCmdLineState (m, e, mkGeneralLocated loc s : flags')
where loc = "addFlag by " ++ flag ++ " on the commandline" | 186 | false | true | 0 | 11 | 49 | 91 | 46 | 45 | null | null |
sdiehl/ghc | libraries/base/GHC/Foreign.hs | bsd-3-clause | -- | Marshal a Haskell string into a NUL terminated C string.
--
-- * the Haskell string may /not/ contain any NUL characters
--
-- * new storage is allocated for the C string and must be
-- explicitly freed using 'Foreign.Marshal.Alloc.free' or
-- 'Foreign.Marshal.Alloc.finalizerFree'.
--
newCString :: TextEncodin... | 401 | newCString :: TextEncoding -> String -> IO CString
newCString enc = liftM fst . newEncodedCString enc True | 106 | newCString enc = liftM fst . newEncodedCString enc True | 55 | true | true | 0 | 7 | 67 | 45 | 25 | 20 | null | null |
authchir/SoSe17-FFP-haskell-http2-server | src/Handle/RSTStream.hs | gpl-3.0 | handleRSTStream :: (ConnMonad m) => FRSTStream.Payload -> StreamId -> FrameFlags -> m ()
handleRSTStream payload (StreamId sid) _flags = do
Log.log Log.Crit $ fromString $ "Stream " ++ show sid ++ " canceled due to " ++ show payload
setStreamState (StreamId sid) $ StreamRst RemoteEndpoint | 315 | handleRSTStream :: (ConnMonad m) => FRSTStream.Payload -> StreamId -> FrameFlags -> m ()
handleRSTStream payload (StreamId sid) _flags = do
Log.log Log.Crit $ fromString $ "Stream " ++ show sid ++ " canceled due to " ++ show payload
setStreamState (StreamId sid) $ StreamRst RemoteEndpoint | 315 | handleRSTStream payload (StreamId sid) _flags = do
Log.log Log.Crit $ fromString $ "Stream " ++ show sid ++ " canceled due to " ++ show payload
setStreamState (StreamId sid) $ StreamRst RemoteEndpoint | 226 | false | true | 0 | 13 | 70 | 107 | 50 | 57 | null | null |
databrary/databrary | src/Model/Ingest.hs | agpl-3.0 | mapQuery :: ByteString -> ([PGValue] -> a) -> PGSimpleQuery a
mapQuery qry mkResult =
fmap mkResult (rawPGSimpleQuery qry) | 124 | mapQuery :: ByteString -> ([PGValue] -> a) -> PGSimpleQuery a
mapQuery qry mkResult =
fmap mkResult (rawPGSimpleQuery qry) | 124 | mapQuery qry mkResult =
fmap mkResult (rawPGSimpleQuery qry) | 62 | false | true | 0 | 9 | 19 | 48 | 24 | 24 | null | null |
olsner/ghc | compiler/cmm/CmmProcPoint.hs | bsd-3-clause | callProcPoints :: CmmGraph -> ProcPointSet
callProcPoints g = foldGraphBlocks add (setSingleton (g_entry g)) g
where add :: CmmBlock -> LabelSet -> LabelSet
add b set = case lastNode b of
CmmCall {cml_cont = Just k} -> setInsert k set
CmmForeignCall {succ=k} ... | 371 | callProcPoints :: CmmGraph -> ProcPointSet
callProcPoints g = foldGraphBlocks add (setSingleton (g_entry g)) g
where add :: CmmBlock -> LabelSet -> LabelSet
add b set = case lastNode b of
CmmCall {cml_cont = Just k} -> setInsert k set
CmmForeignCall {succ=k} ... | 371 | callProcPoints g = foldGraphBlocks add (setSingleton (g_entry g)) g
where add :: CmmBlock -> LabelSet -> LabelSet
add b set = case lastNode b of
CmmCall {cml_cont = Just k} -> setInsert k set
CmmForeignCall {succ=k} -> setInsert k set
_ -> ... | 323 | false | true | 0 | 11 | 132 | 119 | 58 | 61 | null | null |
DanielSchuessler/hstri | Blender/Conversion.hs | gpl-3.0 | fromSpqwcAndIntegerNormalSurface
:: (Ord v,
Show v,
Pretty v,
ShortShow v,
StandardCoords s Integer) =>
CornPosOverride v
-> SPQWithCoords v
-> Admissible s
-> Blenderable
(DJSC2
v (Corn v)
(Asc2 v) (Asc2 (Corn v))
(Asc3 v... | 527 | fromSpqwcAndIntegerNormalSurface
:: (Ord v,
Show v,
Pretty v,
ShortShow v,
StandardCoords s Integer) =>
CornPosOverride v
-> SPQWithCoords v
-> Admissible s
-> Blenderable
(DJSC2
v (Corn v)
(Asc2 v) (Asc2 (Corn v))
(Asc3 v... | 526 | fromSpqwcAndIntegerNormalSurface posOverride spqwc s =
makeTrisInvisible
(fromSpqwc spqwc)
`disjointUnion`
fromIntegerNormalSurface posOverride spqwc s | 173 | false | true | 0 | 15 | 185 | 163 | 79 | 84 | null | null |
mortberg/cubicaltt | CTT.hs | mit | formulaOfEnv :: Env -> [Formula]
formulaOfEnv = snd . valAndFormulaOfEnv | 72 | formulaOfEnv :: Env -> [Formula]
formulaOfEnv = snd . valAndFormulaOfEnv | 72 | formulaOfEnv = snd . valAndFormulaOfEnv | 39 | false | true | 0 | 6 | 9 | 22 | 12 | 10 | null | null |
foreverbell/unlimited-plt-toys | tapl/simplesub/Evaluator.hs | bsd-3-clause | evaluate1 (TermProj v@(TermRecord fields) f)
| isValue v = case find (\(f1, _) -> f1 == f) fields of
Just (_, t) -> Just t
Nothing -> undefined
{- E-Proj -} | 195 | evaluate1 (TermProj v@(TermRecord fields) f)
| isValue v = case find (\(f1, _) -> f1 == f) fields of
Just (_, t) -> Just t
Nothing -> undefined
{- E-Proj -} | 195 | evaluate1 (TermProj v@(TermRecord fields) f)
| isValue v = case find (\(f1, _) -> f1 == f) fields of
Just (_, t) -> Just t
Nothing -> undefined
{- E-Proj -} | 195 | false | false | 0 | 10 | 69 | 87 | 44 | 43 | null | null |
sdiehl/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | -- | Finds free variables in an expression selected by a predicate
exprSomeFreeVars :: InterestingVarFun -- ^ Says which 'Var's are interesting
-> CoreExpr
-> VarSet
exprSomeFreeVars fv_cand e = fvVarSet $ filterFV fv_cand $ expr_fvs e | 271 | exprSomeFreeVars :: InterestingVarFun -- ^ Says which 'Var's are interesting
-> CoreExpr
-> VarSet
exprSomeFreeVars fv_cand e = fvVarSet $ filterFV fv_cand $ expr_fvs e | 204 | exprSomeFreeVars fv_cand e = fvVarSet $ filterFV fv_cand $ expr_fvs e | 69 | true | true | 0 | 7 | 72 | 40 | 20 | 20 | null | null |
olorin/amazonka | amazonka-s3/gen/Network/AWS/S3/UploadPart.hs | mpl-2.0 | -- | Specifies the algorithm to use to when encrypting the object (e.g.,
-- AES256).
upSSECustomerAlgorithm :: Lens' UploadPart (Maybe Text)
upSSECustomerAlgorithm = lens _upSSECustomerAlgorithm (\ s a -> s{_upSSECustomerAlgorithm = a}) | 236 | upSSECustomerAlgorithm :: Lens' UploadPart (Maybe Text)
upSSECustomerAlgorithm = lens _upSSECustomerAlgorithm (\ s a -> s{_upSSECustomerAlgorithm = a}) | 151 | upSSECustomerAlgorithm = lens _upSSECustomerAlgorithm (\ s a -> s{_upSSECustomerAlgorithm = a}) | 95 | true | true | 1 | 9 | 31 | 50 | 26 | 24 | null | null |
sdiehl/llvm-codegen | src/LLVM/Codegen/Comparison.hs | mit | sgt :: Operand -> Operand -> Codegen Operand
sgt a b = icmp IP.SGT a b | 70 | sgt :: Operand -> Operand -> Codegen Operand
sgt a b = icmp IP.SGT a b | 70 | sgt a b = icmp IP.SGT a b | 25 | false | true | 0 | 7 | 15 | 40 | 18 | 22 | null | null |
andyarvanitis/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | writeIBC :: FilePath -> FilePath -> Idris ()
writeIBC src f
= do iLOG $ "Writing ibc " ++ show f
i <- getIState
-- case (Data.List.map fst (idris_metavars i)) \\ primDefs of
-- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables"
-- [] -> return ()... | 648 | writeIBC :: FilePath -> FilePath -> Idris ()
writeIBC src f
= do iLOG $ "Writing ibc " ++ show f
i <- getIState
-- case (Data.List.map fst (idris_metavars i)) \\ primDefs of
-- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables"
-- [] -> return ()... | 648 | writeIBC src f
= do iLOG $ "Writing ibc " ++ show f
i <- getIState
-- case (Data.List.map fst (idris_metavars i)) \\ primDefs of
-- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables"
-- [] -> return ()
resetNameIdx
ibcf <- mkIBC... | 603 | false | true | 0 | 15 | 239 | 169 | 78 | 91 | null | null |
tonicebrian/sgf | Data/SGF/Parse.hs | bsd-3-clause | extraProperties LinesOfAction None = ["AS", "SE"] | 53 | extraProperties LinesOfAction None = ["AS", "SE"] | 53 | extraProperties LinesOfAction None = ["AS", "SE"] | 53 | false | false | 0 | 5 | 9 | 19 | 9 | 10 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall-docs/tasty/Main.hs | bsd-3-clause | getPackageContents :: IO [(Path Rel File, ByteString)]
getPackageContents = getDirContents $(Path.mkRelDir "./tasty/data/package") | 130 | getPackageContents :: IO [(Path Rel File, ByteString)]
getPackageContents = getDirContents $(Path.mkRelDir "./tasty/data/package") | 130 | getPackageContents = getDirContents $(Path.mkRelDir "./tasty/data/package") | 75 | false | true | 0 | 9 | 11 | 40 | 20 | 20 | null | null |
green-haskell/ghc | utils/hpc/HpcMarkup.hs | bsd-3-clause | openTick (TopLevelDecl True 0)
= "<span class=\"funcount\">-- never entered</span>" ++
openTopDecl | 118 | openTick (TopLevelDecl True 0)
= "<span class=\"funcount\">-- never entered</span>" ++
openTopDecl | 118 | openTick (TopLevelDecl True 0)
= "<span class=\"funcount\">-- never entered</span>" ++
openTopDecl | 118 | false | false | 0 | 7 | 30 | 21 | 10 | 11 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-utils/Utils/Drasil/Phrase.hs | bsd-2-clause | compoundNCPlPh :: NamedChunk -> NamedChunk -> NamedChunk
compoundNCPlPh = compoundNC'' D.pluralNP D.phraseNP | 108 | compoundNCPlPh :: NamedChunk -> NamedChunk -> NamedChunk
compoundNCPlPh = compoundNC'' D.pluralNP D.phraseNP | 108 | compoundNCPlPh = compoundNC'' D.pluralNP D.phraseNP | 51 | false | true | 0 | 8 | 11 | 34 | 15 | 19 | null | null |
cameronkerrnz/iptables-metalanguage | src/Text/IptablesMetalanguage/Parser.hs | bsd-3-clause | natIpPort :: GenParser Char st NatAddress
natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >>... | 454 | natIpPort :: GenParser Char st NatAddress
natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >>... | 454 | natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >> many1 digit)
let port2 = read port2S
... | 412 | false | true | 0 | 16 | 144 | 179 | 79 | 100 | null | null |
TomMD/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | -- | What phase to run after one of the backend code generators has run
hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase
hscPostBackendPhase _ HsBootFile _ = StopLn | 186 | hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase
hscPostBackendPhase _ HsBootFile _ = StopLn | 114 | hscPostBackendPhase _ HsBootFile _ = StopLn | 47 | true | true | 0 | 7 | 33 | 31 | 16 | 15 | null | null |
ekmett/data-lens-fd | Data/Lens.hs | bsd-3-clause | f ||= b = f %= (|| b) | 21 | f ||= b = f %= (|| b) | 21 | f ||= b = f %= (|| b) | 21 | false | false | 0 | 7 | 7 | 24 | 11 | 13 | null | null |
tekul/cryptonite | Crypto/Cipher/Twofish/Primitive.hs | bsd-3-clause | gfMult :: Word32 -> Word8 -> Word8 -> Word8
gfMult p a b = fromIntegral $ run a b' p' result 0
where b' = (0, fromIntegral b)
p' = (0, p)
result = 0
run :: Word8 -> (Word32, Word32) -> (Word32, Word32) -> Word32 -> Int -> Word32
run a' b'' p'' result' count =
if ... | 617 | gfMult :: Word32 -> Word8 -> Word8 -> Word8
gfMult p a b = fromIntegral $ run a b' p' result 0
where b' = (0, fromIntegral b)
p' = (0, p)
result = 0
run :: Word8 -> (Word32, Word32) -> (Word32, Word32) -> Word32 -> Int -> Word32
run a' b'' p'' result' count =
if ... | 617 | gfMult p a b = fromIntegral $ run a b' p' result 0
where b' = (0, fromIntegral b)
p' = (0, p)
result = 0
run :: Word8 -> (Word32, Word32) -> (Word32, Word32) -> Word32 -> Int -> Word32
run a' b'' p'' result' count =
if count == 7
then result''
... | 573 | false | true | 4 | 12 | 242 | 272 | 133 | 139 | null | null |
ajhc/drift | src/Rules/GhcBinary.hs | mit | mknss [] _ = [] | 20 | mknss [] _ = [] | 20 | mknss [] _ = [] | 20 | false | false | 0 | 6 | 9 | 15 | 7 | 8 | null | null |
dblia/nosql-ganeti | src/Ganeti/Objects.hs | gpl-2.0 | encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name] | 72 | encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name] | 72 | encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name] | 72 | false | false | 0 | 7 | 9 | 32 | 15 | 17 | null | null |
a143753/AOJ | 3201.hs | apache-2.0 | dec n =
let a = n `div` 10
b = n `mod` 10
in
b:(dec a) | 83 | dec n =
let a = n `div` 10
b = n `mod` 10
in
b:(dec a) | 83 | dec n =
let a = n `div` 10
b = n `mod` 10
in
b:(dec a) | 83 | false | false | 0 | 9 | 45 | 47 | 25 | 22 | null | null |
Minoru/hakyll | tests/Hakyll/Core/Runtime/Tests.hs | bsd-3-clause | --------------------------------------------------------------------------------
case01 :: Assertion
case01 = do
logger <- Logger.new Logger.Error
_ <- run testConfiguration logger $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "*.md" $ do
... | 1,318 | case01 :: Assertion
case01 = do
logger <- Logger.new Logger.Error
_ <- run testConfiguration logger $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "*.md" $ do
route $ setExtension "html"
compile $ do
... | 1,237 | case01 = do
logger <- Logger.new Logger.Error
_ <- run testConfiguration logger $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "*.md" $ do
route $ setExtension "html"
compile $ do
getResourceBody
... | 1,217 | true | true | 0 | 21 | 383 | 294 | 128 | 166 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/PixelRectangles.hs | bsd-3-clause | ptr_glConvolutionFilter2D :: FunPtr a ; ptr_glConvolutionFilter2D = unsafePerformIO (Graphics.Rendering.OpenGL.GL.Extensions.getProcAddress ("GL_ARB_imaging") ("glConvolutionFilter2D")) | 185 | ptr_glConvolutionFilter2D :: FunPtr a
ptr_glConvolutionFilter2D = unsafePerformIO (Graphics.Rendering.OpenGL.GL.Extensions.getProcAddress ("GL_ARB_imaging") ("glConvolutionFilter2D")) | 183 | ptr_glConvolutionFilter2D = unsafePerformIO (Graphics.Rendering.OpenGL.GL.Extensions.getProcAddress ("GL_ARB_imaging") ("glConvolutionFilter2D")) | 145 | false | true | 0 | 8 | 10 | 38 | 22 | 16 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/CoinSelection/FromGeneric.hs | mit | -- | Size to use for a value of type @Attributes AddrAttributes@ when estimating
-- encoded transaction sizes. The minimum possible value is 2.
--
-- NOTE: When the /actual/ size exceeds this bounds, we may underestimate
-- tranasction fees and potentially generate invalid transactions.
--
-- `boundAddrAttrSize` need... | 813 | boundAddrAttrSize :: Byte
boundAddrAttrSize = 34 + 7 | 52 | boundAddrAttrSize = 34 + 7 | 26 | true | true | 0 | 5 | 124 | 28 | 21 | 7 | null | null |
aslatter/xhb | build-utils/src/Generate/Functions.hs | bsd-3-clause | functionsModule :: [HXHeader] -> HXHeader -> HsModule
functionsModule xs xhd | isCoreModule xhd = buildCore xhd
| otherwise = buildExtension xs xhd | 170 | functionsModule :: [HXHeader] -> HXHeader -> HsModule
functionsModule xs xhd | isCoreModule xhd = buildCore xhd
| otherwise = buildExtension xs xhd | 170 | functionsModule xs xhd | isCoreModule xhd = buildCore xhd
| otherwise = buildExtension xs xhd | 116 | false | true | 0 | 8 | 44 | 53 | 24 | 29 | null | null |
conal/type-encode | src/TypeEncode/Plugin.hs | bsd-3-clause | -- encode (decode e) --> e
unEncodeDecode :: ReExpr
unEncodeDecode = unEncode >>> unDecode | 90 | unEncodeDecode :: ReExpr
unEncodeDecode = unEncode >>> unDecode | 63 | unEncodeDecode = unEncode >>> unDecode | 38 | true | true | 0 | 6 | 13 | 23 | 10 | 13 | null | null |
singpolyma/localripple | Application.hs | isc | currencyCode (Currency code _) = code | 37 | currencyCode (Currency code _) = code | 37 | currencyCode (Currency code _) = code | 37 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
maximilianhuber/maximilian-huber.de | src/Css.hs | bsd-3-clause | fgColor = "#bbb" :: Color | 29 | fgColor = "#bbb" :: Color | 29 | fgColor = "#bbb" :: Color | 29 | false | false | 0 | 4 | 8 | 9 | 5 | 4 | null | null |
bitemyapp/ghc | compiler/main/HscTypes.hs | bsd-3-clause | -- | Get the PrintUnqualified function based on the flags and this InteractiveContext
icPrintUnqual :: DynFlags -> InteractiveContext -> PrintUnqualified
icPrintUnqual dflags InteractiveContext{ ic_rn_gbl_env = grenv } =
mkPrintUnqualified dflags grenv | 256 | icPrintUnqual :: DynFlags -> InteractiveContext -> PrintUnqualified
icPrintUnqual dflags InteractiveContext{ ic_rn_gbl_env = grenv } =
mkPrintUnqualified dflags grenv | 170 | icPrintUnqual dflags InteractiveContext{ ic_rn_gbl_env = grenv } =
mkPrintUnqualified dflags grenv | 102 | true | true | 0 | 8 | 34 | 39 | 20 | 19 | null | null |
pparkkin/eta | compiler/ETA/Specialise/Rules.hs | bsd-3-clause | match_co renv subst (TyConAppCo r1 tc1 cos1) co2
= case co2 of
TyConAppCo r2 tc2 cos2
| r1 == r2 && tc1 == tc2
-> match_cos renv subst cos1 cos2
_ -> Nothing | 191 | match_co renv subst (TyConAppCo r1 tc1 cos1) co2
= case co2 of
TyConAppCo r2 tc2 cos2
| r1 == r2 && tc1 == tc2
-> match_cos renv subst cos1 cos2
_ -> Nothing | 191 | match_co renv subst (TyConAppCo r1 tc1 cos1) co2
= case co2 of
TyConAppCo r2 tc2 cos2
| r1 == r2 && tc1 == tc2
-> match_cos renv subst cos1 cos2
_ -> Nothing | 191 | false | false | 0 | 13 | 66 | 75 | 35 | 40 | null | null |
anttisalonen/nix | src/Global.hs | gpl-3.0 | globalconfigfile :: IO String
globalconfigfile = do
let globalconfigfilebase = "config"
appdir <- getAppUserDataDirectory appName
createDirectoryIfMissing False appdir
return $ appdir </> globalconfigfilebase | 216 | globalconfigfile :: IO String
globalconfigfile = do
let globalconfigfilebase = "config"
appdir <- getAppUserDataDirectory appName
createDirectoryIfMissing False appdir
return $ appdir </> globalconfigfilebase | 216 | globalconfigfile = do
let globalconfigfilebase = "config"
appdir <- getAppUserDataDirectory appName
createDirectoryIfMissing False appdir
return $ appdir </> globalconfigfilebase | 186 | false | true | 0 | 9 | 30 | 52 | 23 | 29 | null | null |
sthiele/hasple | GoodSolver.hs | gpl-3.0 | anssets :: [Rule] -> [[Atom]]
-- return the answer sets of the program
anssets p = [ x | x <- (subsets $ heads_p p), (sort $ cn $ reduct p x)==(sort x) ] | 153 | anssets :: [Rule] -> [[Atom]]
anssets p = [ x | x <- (subsets $ heads_p p), (sort $ cn $ reduct p x)==(sort x) ] | 112 | anssets p = [ x | x <- (subsets $ heads_p p), (sort $ cn $ reduct p x)==(sort x) ] | 82 | true | true | 0 | 11 | 33 | 85 | 43 | 42 | null | null |
lukexi/cabal | cabal-install/Distribution/Client/Targets.hs | bsd-3-clause | readUserTargets :: Verbosity -> [String] -> IO [UserTarget]
readUserTargets _verbosity targetStrs = do
(problems, targets) <- liftM partitionEithers
(mapM readUserTarget targetStrs)
reportUserTargetProblems problems
return targets | 275 | readUserTargets :: Verbosity -> [String] -> IO [UserTarget]
readUserTargets _verbosity targetStrs = do
(problems, targets) <- liftM partitionEithers
(mapM readUserTarget targetStrs)
reportUserTargetProblems problems
return targets | 275 | readUserTargets _verbosity targetStrs = do
(problems, targets) <- liftM partitionEithers
(mapM readUserTarget targetStrs)
reportUserTargetProblems problems
return targets | 215 | false | true | 0 | 10 | 69 | 71 | 34 | 37 | null | null |
gencer/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | csType (BT_List element) = "LinkedList<" <>> elementTypeName element <<> ">" | 76 | csType (BT_List element) = "LinkedList<" <>> elementTypeName element <<> ">" | 76 | csType (BT_List element) = "LinkedList<" <>> elementTypeName element <<> ">" | 76 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
pbogdan/react-flux-mui | react-flux-mui/src/React/Flux/Mui/Drawer.hs | bsd-3-clause | drawer_ ::
Drawer
-> [PropertyOrHandler handler]
-> ReactElementM handler ()
-> ReactElementM handler ()
drawer_ args props = foreign_ "Drawer" (fromMaybe [] (toProps args) ++ props) | 193 | drawer_ ::
Drawer
-> [PropertyOrHandler handler]
-> ReactElementM handler ()
-> ReactElementM handler ()
drawer_ args props = foreign_ "Drawer" (fromMaybe [] (toProps args) ++ props) | 193 | drawer_ args props = foreign_ "Drawer" (fromMaybe [] (toProps args) ++ props) | 77 | false | true | 0 | 10 | 36 | 74 | 35 | 39 | null | null |
garry-cairns/ILikeWhenItWorks | ILikeWhenItWorks/Application.hs | gpl-3.0 | -- | Warp settings for the given foundation value.
warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
... | 528 | warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
... | 477 | warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
$(qLocation >>= liftLoc)... | 445 | true | true | 4 | 11 | 155 | 131 | 61 | 70 | null | null |
DamienCassou/HYahtzee | Game/HYahtzee/UI/SimpleIO.hs | bsd-3-clause | iothingy AskNumOfPlayers = askNumOfPlayers | 42 | iothingy AskNumOfPlayers = askNumOfPlayers | 42 | iothingy AskNumOfPlayers = askNumOfPlayers | 42 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
dmjio/miso | src/Miso/Html/Element.hs | bsd-3-clause | -- | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output
output_ :: [Attribute action] -> [View action] -> View action
output_ = nodeHtml "output" | 159 | output_ :: [Attribute action] -> [View action] -> View action
output_ = nodeHtml "output" | 89 | output_ = nodeHtml "output" | 27 | true | true | 0 | 9 | 16 | 44 | 20 | 24 | null | null |
shlevy/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | noForeignExportCoercionYet :: PlaceHolder
noForeignExportCoercionYet = PlaceHolder | 82 | noForeignExportCoercionYet :: PlaceHolder
noForeignExportCoercionYet = PlaceHolder | 82 | noForeignExportCoercionYet = PlaceHolder | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
izgzhen/hadrian | src/CommandLine.hs | mit | cmdProgressInfo :: Action ProgressInfo
cmdProgressInfo = progressInfo <$> cmdLineArgs | 85 | cmdProgressInfo :: Action ProgressInfo
cmdProgressInfo = progressInfo <$> cmdLineArgs | 85 | cmdProgressInfo = progressInfo <$> cmdLineArgs | 46 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
kmels/hledger | hledger-lib/Hledger/Utils.hs | gpl-3.0 | -- | Flatten a Test containing TestLists into a list of single tests.
flattenTests :: Test -> [Test]
flattenTests (TestLabel _ t@(TestList _)) = flattenTests t | 159 | flattenTests :: Test -> [Test]
flattenTests (TestLabel _ t@(TestList _)) = flattenTests t | 89 | flattenTests (TestLabel _ t@(TestList _)) = flattenTests t | 58 | true | true | 0 | 9 | 25 | 46 | 23 | 23 | null | null |
gbataille/pandoc | tests/Tests/Readers/Org.hs | gpl-2.0 | (=:) :: ToString c
=> String -> (String, c) -> Test
(=:) = test org | 72 | (=:) :: ToString c
=> String -> (String, c) -> Test
(=:) = test org | 72 | (=:) = test org | 15 | false | true | 0 | 9 | 19 | 45 | 23 | 22 | null | null |
Kotolegokot/Underlisp | src/Lexer.hs | gpl-3.0 | isBracket :: Char -> Bool
isBracket = isOpen &&& isClosed >>> uncurry (||) | 74 | isBracket :: Char -> Bool
isBracket = isOpen &&& isClosed >>> uncurry (||) | 74 | isBracket = isOpen &&& isClosed >>> uncurry (||) | 48 | false | true | 4 | 7 | 12 | 36 | 16 | 20 | null | null |
rueshyna/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/List.hs | mpl-2.0 | -- | Optional. A page token to request the next page of results. You get the
-- token from the \`next_page_token\` field of the response from the
-- previous call.
pmlPageToken :: Lens' ProjectsModelsList (Maybe Text)
pmlPageToken
= lens _pmlPageToken (\ s a -> s{_pmlPageToken = a}) | 285 | pmlPageToken :: Lens' ProjectsModelsList (Maybe Text)
pmlPageToken
= lens _pmlPageToken (\ s a -> s{_pmlPageToken = a}) | 121 | pmlPageToken
= lens _pmlPageToken (\ s a -> s{_pmlPageToken = a}) | 67 | true | true | 0 | 9 | 48 | 50 | 27 | 23 | null | null |
BartAdv/hoogle | src/General/Conduit.hs | bsd-3-clause | linesCR :: Monad m => Conduit Str m Str
linesCR = linesC =$= mapC f
where f x | Just (x, '\r') <- bsUnsnoc x = x
| otherwise = x | 146 | linesCR :: Monad m => Conduit Str m Str
linesCR = linesC =$= mapC f
where f x | Just (x, '\r') <- bsUnsnoc x = x
| otherwise = x | 146 | linesCR = linesC =$= mapC f
where f x | Just (x, '\r') <- bsUnsnoc x = x
| otherwise = x | 106 | false | true | 1 | 10 | 48 | 76 | 34 | 42 | null | null |
NightRa/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | showDeclImp o (PParams _ ns ps) = text "params" <+> braces (text (show ns) <> line <> showDecls o ps <> line) | 109 | showDeclImp o (PParams _ ns ps) = text "params" <+> braces (text (show ns) <> line <> showDecls o ps <> line) | 109 | showDeclImp o (PParams _ ns ps) = text "params" <+> braces (text (show ns) <> line <> showDecls o ps <> line) | 109 | false | false | 0 | 13 | 21 | 60 | 28 | 32 | null | null |
brendanhay/text-manipulate | src/Data/Text/Manipulate/Internal/Fusion.hs | mpl-2.0 | lower !c s = lowerMapping c s | 29 | lower !c s = lowerMapping c s | 29 | lower !c s = lowerMapping c s | 29 | false | false | 1 | 5 | 6 | 17 | 7 | 10 | null | null |
hvr/text | tests/Tests/Properties.hs | bsd-2-clause | tl_null = null `eqP` TL.null | 40 | tl_null = null `eqP` TL.null | 40 | tl_null = null `eqP` TL.null | 40 | false | false | 0 | 6 | 16 | 14 | 8 | 6 | null | null |
m-renaud/NSFW | src/Firewall.hs | bsd-2-clause | defaultState :: FirewallState
defaultState = FirewallState ["http"] ["1.1.1.1"] | 79 | defaultState :: FirewallState
defaultState = FirewallState ["http"] ["1.1.1.1"] | 79 | defaultState = FirewallState ["http"] ["1.1.1.1"] | 49 | false | true | 0 | 6 | 7 | 28 | 13 | 15 | null | null |
lamdu/lamdu | src/Lamdu/Eval/JS/Compiler.hs | gpl-3.0 | freshName :: Monad m => Text -> M m Text
freshName prefix =
freshId <+= 1
<&> show
<&> Text.pack
<&> (prefix <>)
& M | 136 | freshName :: Monad m => Text -> M m Text
freshName prefix =
freshId <+= 1
<&> show
<&> Text.pack
<&> (prefix <>)
& M | 136 | freshName prefix =
freshId <+= 1
<&> show
<&> Text.pack
<&> (prefix <>)
& M | 95 | false | true | 8 | 7 | 44 | 61 | 28 | 33 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.