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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
feuerbach/prover | src/Reduce.hs | mit | nf :: Eq n => Lookup n -> Int -> Term n -> Maybe (Term n)
nf lkp = go
where
go fuel term
| fuel <= 0 = Nothing
| otherwise =
let
Reduce term' = reduce lkp term
in
if term == term'
then Just term
else go (fuel-1) term'
-----------------------... | 474 | nf :: Eq n => Lookup n -> Int -> Term n -> Maybe (Term n)
nf lkp = go
where
go fuel term
| fuel <= 0 = Nothing
| otherwise =
let
Reduce term' = reduce lkp term
in
if term == term'
then Just term
else go (fuel-1) term'
-----------------------... | 474 | nf lkp = go
where
go fuel term
| fuel <= 0 = Nothing
| otherwise =
let
Reduce term' = reduce lkp term
in
if term == term'
then Just term
else go (fuel-1) term'
----------------------------------------------------------------------
-- ... | 416 | false | true | 0 | 12 | 160 | 141 | 64 | 77 | null | null |
dagit/7drl2017 | src/Random.hs | bsd-3-clause | generateLevelAndLoad :: (Int, Int) -> Game ()
generateLevelAndLoad size = do
lvl <- mkLevel size
modifyGS (gsLevel .~ lvl)
logMsg "After many winding passages you arrive at a new floor" | 191 | generateLevelAndLoad :: (Int, Int) -> Game ()
generateLevelAndLoad size = do
lvl <- mkLevel size
modifyGS (gsLevel .~ lvl)
logMsg "After many winding passages you arrive at a new floor" | 191 | generateLevelAndLoad size = do
lvl <- mkLevel size
modifyGS (gsLevel .~ lvl)
logMsg "After many winding passages you arrive at a new floor" | 145 | false | true | 0 | 9 | 35 | 58 | 27 | 31 | null | null |
aleator/Haskell-Interpolation-Library | Data/String/Interpolation.hs | mit | sbitToExp (Var x) = appM x | 28 | sbitToExp (Var x) = appM x | 28 | sbitToExp (Var x) = appM x | 28 | false | false | 0 | 6 | 7 | 19 | 8 | 11 | null | null |
sebcrozet/falling | Physics/Falling/Collision/Graph/CollisionGraph.hs | bsd-3-clause | modifyCollisions :: [Collision c] -> CollisionGraph b c -> CollisionGraph b c
modifyCollisions news = insertCollisions news . removeCollisions' news | 149 | modifyCollisions :: [Collision c] -> CollisionGraph b c -> CollisionGraph b c
modifyCollisions news = insertCollisions news . removeCollisions' news | 149 | modifyCollisions news = insertCollisions news . removeCollisions' news | 70 | false | true | 0 | 7 | 20 | 48 | 22 | 26 | null | null |
ezyang/ghc | compiler/types/Type.hs | bsd-3-clause | getRuntimeRepFromKind :: HasDebugCallStack
=> Type -> Type
getRuntimeRepFromKind k =
case getRuntimeRepFromKind_maybe k of
Just r -> r
Nothing -> pprPanic "getRuntimeRepFromKind"
(ppr k <+> dcolon <+> ppr (typeKind k))
-- | Extract the RuntimeRep classi... | 450 | getRuntimeRepFromKind :: HasDebugCallStack
=> Type -> Type
getRuntimeRepFromKind k =
case getRuntimeRepFromKind_maybe k of
Just r -> r
Nothing -> pprPanic "getRuntimeRepFromKind"
(ppr k <+> dcolon <+> ppr (typeKind k))
-- | Extract the RuntimeRep classi... | 450 | getRuntimeRepFromKind k =
case getRuntimeRepFromKind_maybe k of
Just r -> r
Nothing -> pprPanic "getRuntimeRepFromKind"
(ppr k <+> dcolon <+> ppr (typeKind k))
-- | Extract the RuntimeRep classifier of a type from its kind. For example,
-- @getRuntimeRepFromKind * = LiftedRe... | 369 | false | true | 0 | 13 | 123 | 81 | 38 | 43 | null | null |
pegurnee/2015-01-341 | haskell/higherOrderFunctions.hs | mit | isUpperAlphaNum :: Char -> Bool
isUpperAlphaNum = (`elem` ['A'..'Z']) | 69 | isUpperAlphaNum :: Char -> Bool
isUpperAlphaNum = (`elem` ['A'..'Z']) | 69 | isUpperAlphaNum = (`elem` ['A'..'Z']) | 37 | false | true | 0 | 6 | 8 | 26 | 16 | 10 | null | null |
andorp/bead | src/Bead/Domain/Entities.hs | bsd-3-clause | parseRole "Course Admin" = Just CourseAdmin | 43 | parseRole "Course Admin" = Just CourseAdmin | 43 | parseRole "Course Admin" = Just CourseAdmin | 43 | false | false | 0 | 5 | 5 | 12 | 5 | 7 | null | null |
weihu816/Adagio | app/ClientUI.hs | bsd-3-clause | -- | modify contents in viewport, modify visible parts of viewport
processViewport :: St -> String -> T.EventM Name (T.Next St)
processViewport st msg =
liftIO getTimeStringIO >>= \timeStr ->
M.vScrollBy vp1Scroll (getLineNumber msg 80) >>
M.continue
(st & clockIO .~ getTimeStringIO & messageList ... | 396 | processViewport :: St -> String -> T.EventM Name (T.Next St)
processViewport st msg =
liftIO getTimeStringIO >>= \timeStr ->
M.vScrollBy vp1Scroll (getLineNumber msg 80) >>
M.continue
(st & clockIO .~ getTimeStringIO & messageList %~
(++ [timeStr ++ "\n" ++ breakStringIntoLines msg 80 +... | 329 | processViewport st msg =
liftIO getTimeStringIO >>= \timeStr ->
M.vScrollBy vp1Scroll (getLineNumber msg 80) >>
M.continue
(st & clockIO .~ getTimeStringIO & messageList %~
(++ [timeStr ++ "\n" ++ breakStringIntoLines msg 80 ++ "\n"])) | 268 | true | true | 0 | 12 | 87 | 125 | 61 | 64 | null | null |
kikofernandez/kikofernandez.github.io | files/monadic-typechecker/typechecker/src/Initial/AST.hs | mit | isThisAccess _ = False | 22 | isThisAccess _ = False | 22 | isThisAccess _ = False | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Markdown.hs | gpl-2.0 | regex_'23'5cs'2e'2a'5b'23'5d'3f'24 = compileRegex True "#\\s.*[#]?$" | 68 | regex_'23'5cs'2e'2a'5b'23'5d'3f'24 = compileRegex True "#\\s.*[#]?$" | 68 | regex_'23'5cs'2e'2a'5b'23'5d'3f'24 = compileRegex True "#\\s.*[#]?$" | 68 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
lukexi/ghc | compiler/codeGen/StgCmmHeap.hs | bsd-3-clause | emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
emitSetDynHdr base info_ptr ccs
= do dflags <- getDynFlags
hpStore base (zip (header dflags) [0, wORD_SIZE dflags ..])
where
header :: DynFlags -> [CmmExpr]
header dflags = [info_ptr] ++ dynProfHdr dflags ccs
-- ToDof: Parallel stuff
... | 389 | emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
emitSetDynHdr base info_ptr ccs
= do dflags <- getDynFlags
hpStore base (zip (header dflags) [0, wORD_SIZE dflags ..])
where
header :: DynFlags -> [CmmExpr]
header dflags = [info_ptr] ++ dynProfHdr dflags ccs
-- ToDof: Parallel stuff
... | 389 | emitSetDynHdr base info_ptr ccs
= do dflags <- getDynFlags
hpStore base (zip (header dflags) [0, wORD_SIZE dflags ..])
where
header :: DynFlags -> [CmmExpr]
header dflags = [info_ptr] ++ dynProfHdr dflags ccs
-- ToDof: Parallel stuff
-- No ticky header
-- Store the item (expr,off) in... | 330 | false | true | 0 | 11 | 92 | 122 | 59 | 63 | null | null |
hpacheco/HAAP | examples/plab/svn/2017li1g180/src/BotHugo180.hs | mit | retiraJaPercorrido (x:xs) (y@(_,p,_):ys)
| x == p = retiraJaPercorrido xs ys
| isJust idx = retiraJaPercorrido xs (drop (fromJust idx) ys)
| otherwise = retiraJaPercorrido xs (y:ys)
where
idx = elemIndex x (map snd3 $ take tuning ys) | 252 | retiraJaPercorrido (x:xs) (y@(_,p,_):ys)
| x == p = retiraJaPercorrido xs ys
| isJust idx = retiraJaPercorrido xs (drop (fromJust idx) ys)
| otherwise = retiraJaPercorrido xs (y:ys)
where
idx = elemIndex x (map snd3 $ take tuning ys) | 252 | retiraJaPercorrido (x:xs) (y@(_,p,_):ys)
| x == p = retiraJaPercorrido xs ys
| isJust idx = retiraJaPercorrido xs (drop (fromJust idx) ys)
| otherwise = retiraJaPercorrido xs (y:ys)
where
idx = elemIndex x (map snd3 $ take tuning ys) | 252 | false | false | 1 | 10 | 56 | 143 | 66 | 77 | null | null |
rfranek/duckling | tests/Duckling/Dimensions/Tests.hs | bsd-3-clause | tests :: TestTree
tests = testGroup "Dimensions Tests"
[ AmountOfMoney.tests
, Distance.tests
, Duration.tests
, Email.tests
, Numeral.tests
, Ordinal.tests
, PhoneNumber.tests
, Quantity.tests
, Temperature.tests
, Time.tests
, Volume.tests
, Url.tests
] | 281 | tests :: TestTree
tests = testGroup "Dimensions Tests"
[ AmountOfMoney.tests
, Distance.tests
, Duration.tests
, Email.tests
, Numeral.tests
, Ordinal.tests
, PhoneNumber.tests
, Quantity.tests
, Temperature.tests
, Time.tests
, Volume.tests
, Url.tests
] | 281 | tests = testGroup "Dimensions Tests"
[ AmountOfMoney.tests
, Distance.tests
, Duration.tests
, Email.tests
, Numeral.tests
, Ordinal.tests
, PhoneNumber.tests
, Quantity.tests
, Temperature.tests
, Time.tests
, Volume.tests
, Url.tests
] | 263 | false | true | 0 | 7 | 58 | 84 | 45 | 39 | null | null |
rfranek/duckling | Duckling/AmountOfMoney/ID/Rules.hs | bsd-3-clause | rulePounds :: Rule
rulePounds = Rule
{ name = "£"
, pattern =
[ regex "pound( sterling)?"
]
, prod = \_ -> Just . Token AmountOfMoney $ currencyOnly Pound
} | 172 | rulePounds :: Rule
rulePounds = Rule
{ name = "£"
, pattern =
[ regex "pound( sterling)?"
]
, prod = \_ -> Just . Token AmountOfMoney $ currencyOnly Pound
} | 172 | rulePounds = Rule
{ name = "£"
, pattern =
[ regex "pound( sterling)?"
]
, prod = \_ -> Just . Token AmountOfMoney $ currencyOnly Pound
} | 153 | false | true | 0 | 11 | 46 | 66 | 33 | 33 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_SQL_SQLPLUS_PROMPT :: Int
wxSTC_SQL_SQLPLUS_PROMPT = 9 | 60 | wxSTC_SQL_SQLPLUS_PROMPT :: Int
wxSTC_SQL_SQLPLUS_PROMPT = 9 | 60 | wxSTC_SQL_SQLPLUS_PROMPT = 9 | 28 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
kwibus/myLang | tests/TestTypeCheker.hs | bsd-3-clause | testTypeChecker :: TestTree
testTypeChecker = testGroup "typeChecker"
[ testApply
, testUnify
, testUnifySubs
, testTypeCheck
, testAnnotate
, testReadType
] | 297 | testTypeChecker :: TestTree
testTypeChecker = testGroup "typeChecker"
[ testApply
, testUnify
, testUnifySubs
, testTypeCheck
, testAnnotate
, testReadType
] | 297 | testTypeChecker = testGroup "typeChecker"
[ testApply
, testUnify
, testUnifySubs
, testTypeCheck
, testAnnotate
, testReadType
] | 269 | false | true | 0 | 6 | 159 | 34 | 20 | 14 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | mkGenC :: Module -> OccName -> Int -> OccName
mkGenC mod occ m =
mk_deriv tcName ("C1_" ++ show m) $
mkModPrefix mod ++ "_" ++ occNameString occ | 152 | mkGenC :: Module -> OccName -> Int -> OccName
mkGenC mod occ m =
mk_deriv tcName ("C1_" ++ show m) $
mkModPrefix mod ++ "_" ++ occNameString occ | 152 | mkGenC mod occ m =
mk_deriv tcName ("C1_" ++ show m) $
mkModPrefix mod ++ "_" ++ occNameString occ | 106 | false | true | 0 | 11 | 35 | 67 | 31 | 36 | null | null |
DrSLDR/logoff | src/Logoff.hs | mit | tdSolveResHelperOptions :: [(Sequent, Residuation)] ->
Maybe (ProofTree, Residuation)
tdSolveResHelperOptions [] = Nothing | 124 | tdSolveResHelperOptions :: [(Sequent, Residuation)] ->
Maybe (ProofTree, Residuation)
tdSolveResHelperOptions [] = Nothing | 124 | tdSolveResHelperOptions [] = Nothing | 36 | false | true | 0 | 7 | 13 | 38 | 21 | 17 | null | null |
yliu120/K3 | src/Language/K3/Analysis/SEffects/Inference.hs | apache-2.0 | fiextepM :: Identifier -> K3 Provenance -> FInfM ()
fiextepM n f = get >>= \env -> return (fiextep env n f) >>= put | 115 | fiextepM :: Identifier -> K3 Provenance -> FInfM ()
fiextepM n f = get >>= \env -> return (fiextep env n f) >>= put | 115 | fiextepM n f = get >>= \env -> return (fiextep env n f) >>= put | 63 | false | true | 0 | 10 | 23 | 58 | 28 | 30 | null | null |
Forec/learn | 2017.1/joking-haskell/joking3.hs | mit | main :: IO ()
main = do
gen <- getStdGen
output $ randomRs ('a', 'z') gen
where
output :: String -> IO ()
output xs = do
let (part1, part2) = splitAt 20 xs
putStrLn part1
output part2 | 224 | main :: IO ()
main = do
gen <- getStdGen
output $ randomRs ('a', 'z') gen
where
output :: String -> IO ()
output xs = do
let (part1, part2) = splitAt 20 xs
putStrLn part1
output part2 | 223 | main = do
gen <- getStdGen
output $ randomRs ('a', 'z') gen
where
output :: String -> IO ()
output xs = do
let (part1, part2) = splitAt 20 xs
putStrLn part1
output part2 | 209 | false | true | 0 | 11 | 78 | 109 | 48 | 61 | null | null |
mathlover2/combinator-birds | Data/Function/CombinatorBirds.hs | gpl-3.0 | bald_eagle = eagle eagle | 24 | bald_eagle = eagle eagle | 24 | bald_eagle = eagle eagle | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jfdm/hUML | src/ClassDiagram/Lexer.hs | bsd-3-clause | runLex :: Parser a -> Parser a
runLex p = do
Tok.whiteSpace lexer
res <- p
eof
return res
-- | Core Lexer Operation | 124 | runLex :: Parser a -> Parser a
runLex p = do
Tok.whiteSpace lexer
res <- p
eof
return res
-- | Core Lexer Operation | 124 | runLex p = do
Tok.whiteSpace lexer
res <- p
eof
return res
-- | Core Lexer Operation | 93 | false | true | 0 | 9 | 32 | 54 | 22 | 32 | null | null |
gaeldeest/ocaml-isl | scripts/generate-bindings.hs | mit | mustKeepFun :: ISLFunction -> Bool
mustKeepFun (ISLFunction annots _ name _) =
"equality" `isInfixOf` name ||
not ((elem ISL_NULL annots) || (isSuffixOf "_free" name) || (isSuffixOf "_copy" name) || (isSuffixOf "_get_ctx" name)) | 232 | mustKeepFun :: ISLFunction -> Bool
mustKeepFun (ISLFunction annots _ name _) =
"equality" `isInfixOf` name ||
not ((elem ISL_NULL annots) || (isSuffixOf "_free" name) || (isSuffixOf "_copy" name) || (isSuffixOf "_get_ctx" name)) | 232 | mustKeepFun (ISLFunction annots _ name _) =
"equality" `isInfixOf` name ||
not ((elem ISL_NULL annots) || (isSuffixOf "_free" name) || (isSuffixOf "_copy" name) || (isSuffixOf "_get_ctx" name)) | 197 | false | true | 0 | 10 | 35 | 90 | 46 | 44 | null | null |
johnjcamilleri/hpsg | NLP/UG/GrammarCFG.hs | mit | lin (Node _ _ kids) = concatMap lin kids | 40 | lin (Node _ _ kids) = concatMap lin kids | 40 | lin (Node _ _ kids) = concatMap lin kids | 40 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
MasseR/xmonadcontrib | XMonad/Actions/TagWindows.hs | bsd-3-clause | shiftHere :: (Ord a, Eq s, Eq i) => a -> StackSet i l a s sd -> StackSet i l a s sd
shiftHere w s = shiftWin (currentTag s) w s | 127 | shiftHere :: (Ord a, Eq s, Eq i) => a -> StackSet i l a s sd -> StackSet i l a s sd
shiftHere w s = shiftWin (currentTag s) w s | 127 | shiftHere w s = shiftWin (currentTag s) w s | 43 | false | true | 0 | 9 | 32 | 85 | 40 | 45 | null | null |
olsner/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getRegister' _ is32Bit (CmmMachOp (MO_UU_Conv W8 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVZxL II8) addr
return (Any II64 code) | 156 | getRegister' _ is32Bit (CmmMachOp (MO_UU_Conv W8 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVZxL II8) addr
return (Any II64 code) | 156 | getRegister' _ is32Bit (CmmMachOp (MO_UU_Conv W8 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVZxL II8) addr
return (Any II64 code) | 156 | false | false | 1 | 12 | 29 | 82 | 35 | 47 | null | null |
ekmett/wxHaskell | wx/src/Graphics/UI/WX/Menu.hs | lgpl-2.1 | -- | /Deprecated/: use 'menuBar'.
menubar :: WriteAttr (Frame a) [Menu ()]
menubar
= menuBar | 94 | menubar :: WriteAttr (Frame a) [Menu ()]
menubar
= menuBar | 60 | menubar
= menuBar | 19 | true | true | 0 | 9 | 16 | 37 | 17 | 20 | null | null |
urbanslug/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | expandCmmReg :: DynFlags -> (CmmReg, Int) -> CmmExpr
expandCmmReg dflags (reg, off)
= let width = typeWidth (cmmRegType dflags reg)
voff = CmmLit $ CmmInt (fromIntegral off) width
in CmmMachOp (MO_Add width) [CmmReg reg, voff] | 241 | expandCmmReg :: DynFlags -> (CmmReg, Int) -> CmmExpr
expandCmmReg dflags (reg, off)
= let width = typeWidth (cmmRegType dflags reg)
voff = CmmLit $ CmmInt (fromIntegral off) width
in CmmMachOp (MO_Add width) [CmmReg reg, voff] | 241 | expandCmmReg dflags (reg, off)
= let width = typeWidth (cmmRegType dflags reg)
voff = CmmLit $ CmmInt (fromIntegral off) width
in CmmMachOp (MO_Add width) [CmmReg reg, voff] | 188 | false | true | 0 | 12 | 49 | 104 | 51 | 53 | null | null |
moon-musick/xmonad-ubuntu-conf | xmonad.hs | mit | -- color of workspace with 'urgent' window
myCurrentWSLeft = "<fc=#fdf6e3,#268bd2> " | 85 | myCurrentWSLeft = "<fc=#fdf6e3,#268bd2> " | 42 | myCurrentWSLeft = "<fc=#fdf6e3,#268bd2> " | 42 | true | false | 0 | 4 | 11 | 7 | 4 | 3 | null | null |
osa1/rho-torrent | src/Rho/Magnet.hs | bsd-3-clause | printMagnet :: Magnet -> B.ByteString
printMagnet (Magnet (InfoHash bs) trs dn) = LB.toStrict . BB.toLazyByteString . mconcat $
[ BB.byteString "magnet:?xt=urn:btih:"
, BB.byteString $ bsEncodeBytes bs
, maybe mempty (BB.byteString . ("&dn=" <>) . BC.pack) dn
] <> map (BB.byteString . ("&tr=" <>) . prin... | 1,074 | printMagnet :: Magnet -> B.ByteString
printMagnet (Magnet (InfoHash bs) trs dn) = LB.toStrict . BB.toLazyByteString . mconcat $
[ BB.byteString "magnet:?xt=urn:btih:"
, BB.byteString $ bsEncodeBytes bs
, maybe mempty (BB.byteString . ("&dn=" <>) . BC.pack) dn
] <> map (BB.byteString . ("&tr=" <>) . prin... | 1,074 | printMagnet (Magnet (InfoHash bs) trs dn) = LB.toStrict . BB.toLazyByteString . mconcat $
[ BB.byteString "magnet:?xt=urn:btih:"
, BB.byteString $ bsEncodeBytes bs
, maybe mempty (BB.byteString . ("&dn=" <>) . BC.pack) dn
] <> map (BB.byteString . ("&tr=" <>) . printTracker) trs
where
bsEncodeByte... | 1,036 | false | true | 0 | 12 | 231 | 330 | 171 | 159 | null | null |
bitemyapp/ghc | compiler/basicTypes/PatSyn.hs | bsd-3-clause | patSynInstResTy :: PatSyn -> [Type] -> Type
-- Return the type of whole pattern
-- E.g. pattern P x y = Just (x,x,y)
-- P :: a -> b -> Just (a,a,b)
-- (patSynInstResTy P [Int,Bool] = Maybe (Int,Int,Bool)
-- NB: unlikepatSynInstArgTys, the inst_tys should be just the *universal* tyvars
patSynInstResTy (... | 626 | patSynInstResTy :: PatSyn -> [Type] -> Type
patSynInstResTy (MkPatSyn { psName = name, psUnivTyVars = univ_tvs
, psOrigResTy = res_ty })
inst_tys
= ASSERT2( length univ_tvs == length inst_tys
, ptext (sLit "patSynInstResTy") <+> ppr name $$ ppr univ_tvs $$ ppr inst... | 367 | patSynInstResTy (MkPatSyn { psName = name, psUnivTyVars = univ_tvs
, psOrigResTy = res_ty })
inst_tys
= ASSERT2( length univ_tvs == length inst_tys
, ptext (sLit "patSynInstResTy") <+> ppr name $$ ppr univ_tvs $$ ppr inst_tys )
substTyWith univ_tvs inst_tys res... | 323 | true | true | 0 | 12 | 165 | 115 | 60 | 55 | null | null |
oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Types.hs | bsd-3-clause | getUUID :: S.Get UUID
getUUID = undefined | 41 | getUUID :: S.Get UUID
getUUID = undefined | 41 | getUUID = undefined | 19 | false | true | 0 | 7 | 6 | 22 | 9 | 13 | null | null |
michel-steuwer/haskell-patterns | src/Patterns.hs | mit | toGlobal :: forall a b. (a -> b) -> (a -> b)
toGlobal = id | 58 | toGlobal :: forall a b. (a -> b) -> (a -> b)
toGlobal = id | 58 | toGlobal = id | 13 | false | true | 0 | 8 | 14 | 35 | 20 | 15 | null | null |
spacekitteh/smcghc | libraries/base/GHC/IO/Handle.hs | bsd-3-clause | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_closedHandle
htype -> return (isReadableHandleType htype) | 263 | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_closedHandle
htype -> return (isReadableHandleType htype) | 263 | hIsReadable handle =
withHandle_ "hIsReadable" handle $ \ handle_ -> do
case haType handle_ of
ClosedHandle -> ioe_closedHandle
SemiClosedHandle -> ioe_closedHandle
htype -> return (isReadableHandleType htype) | 263 | false | false | 0 | 14 | 79 | 60 | 28 | 32 | null | null |
Forkk/ChatCore | ChatCore/ChatBuffer.hs | mit | -- | Returns `Just BufferEvent` if the given line translates directly into a
-- buffer event.
bufEventForLine :: IRCLine -> Maybe BufferEvent
bufEventForLine (IRCLine (Just source) ICmdPrivmsg [_] (Just msg)) =
Just $ UserMessage source msg | 244 | bufEventForLine :: IRCLine -> Maybe BufferEvent
bufEventForLine (IRCLine (Just source) ICmdPrivmsg [_] (Just msg)) =
Just $ UserMessage source msg | 150 | bufEventForLine (IRCLine (Just source) ICmdPrivmsg [_] (Just msg)) =
Just $ UserMessage source msg | 102 | true | true | 0 | 9 | 39 | 59 | 30 | 29 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/Error.hs | bsd-3-clause | -- | Fallback function to convert old style error strings to the new
-- representation.
toUndef :: String -> Error
toUndef x = Error (FallbackError x) defaultPos [] | 164 | toUndef :: String -> Error
toUndef x = Error (FallbackError x) defaultPos [] | 76 | toUndef x = Error (FallbackError x) defaultPos [] | 49 | true | true | 0 | 7 | 27 | 35 | 18 | 17 | null | null |
quchen/stg | src/Stg/Machine/GarbageCollection/TriStateTracing.hs | bsd-3-clause | -- | Remove all unused addresses, without moving the others.
triStateTracing :: GarbageCollectionAlgorithm
triStateTracing = GarbageCollectionAlgorithm
"Tri-state tracing"
(insert2nd mempty . garbageCollect) | 215 | triStateTracing :: GarbageCollectionAlgorithm
triStateTracing = GarbageCollectionAlgorithm
"Tri-state tracing"
(insert2nd mempty . garbageCollect) | 154 | triStateTracing = GarbageCollectionAlgorithm
"Tri-state tracing"
(insert2nd mempty . garbageCollect) | 108 | true | true | 0 | 8 | 29 | 35 | 15 | 20 | null | null |
rahulmutt/ghcvm | compiler/Eta/Core/CoreSeq.hs | bsd-3-clause | seqRules (BuiltinRule {} : rules) = seqRules rules | 50 | seqRules (BuiltinRule {} : rules) = seqRules rules | 50 | seqRules (BuiltinRule {} : rules) = seqRules rules | 50 | false | false | 0 | 8 | 7 | 23 | 11 | 12 | null | null |
DanielWaterworth/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTactic (LetTacTy n p1 p2) = n : concatMap extract [p1, p2] | 66 | extractPTactic (LetTacTy n p1 p2) = n : concatMap extract [p1, p2] | 66 | extractPTactic (LetTacTy n p1 p2) = n : concatMap extract [p1, p2] | 66 | false | false | 0 | 7 | 11 | 34 | 17 | 17 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_AVE_COMMENT :: Int
wxSTC_AVE_COMMENT = 1 | 46 | wxSTC_AVE_COMMENT :: Int
wxSTC_AVE_COMMENT = 1 | 46 | wxSTC_AVE_COMMENT = 1 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Heather/stack | src/Stack/Types/Config.hs | bsd-3-clause | packageDatabaseLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir)
packageDatabaseLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "pkgdb")
-- | Extra package databases | 227 | packageDatabaseLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir)
packageDatabaseLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "pkgdb")
-- | Extra package databases | 227 | packageDatabaseLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "pkgdb")
-- | Extra package databases | 131 | false | true | 0 | 10 | 39 | 71 | 35 | 36 | null | null |
hephaestus-pl/hephaestus | willian/hephaestus-integrated/asset-base/component-model/src/ComponentModel/Parsers/PrintComponentModel.hs | mit | prPrec :: Int -> Int -> Doc -> Doc
prPrec i j = if j<i then parenth else id | 75 | prPrec :: Int -> Int -> Doc -> Doc
prPrec i j = if j<i then parenth else id | 75 | prPrec i j = if j<i then parenth else id | 40 | false | true | 0 | 9 | 18 | 46 | 22 | 24 | null | null |
jhance/gba-hs | src/Game/GBA/RegisterSet.hs | mit | toModeBits SupervisorMode = [b|10011|] | 38 | toModeBits SupervisorMode = [b|10011|] | 38 | toModeBits SupervisorMode = [b|10011|] | 38 | false | false | 0 | 4 | 3 | 14 | 8 | 6 | null | null |
danstiner/clod | src/ContentIdentifier.hs | mit | hashLazy :: Algro -> L.ByteString -> B.ByteString
hashLazy SHA1 = SHA1.hashlazy | 83 | hashLazy :: Algro -> L.ByteString -> B.ByteString
hashLazy SHA1 = SHA1.hashlazy | 83 | hashLazy SHA1 = SHA1.hashlazy | 33 | false | true | 0 | 7 | 14 | 28 | 14 | 14 | null | null |
artuuge/IHaskell | src/IHaskell/Types.hs | mit | -- | Duplicate a message header, giving it a new UUID and message type.
dupHeader :: MessageHeader -> MessageType -> IO MessageHeader
dupHeader header messageType = do
uuid <- liftIO random
return header { messageId = uuid, msgType = messageType } | 252 | dupHeader :: MessageHeader -> MessageType -> IO MessageHeader
dupHeader header messageType = do
uuid <- liftIO random
return header { messageId = uuid, msgType = messageType } | 180 | dupHeader header messageType = do
uuid <- liftIO random
return header { messageId = uuid, msgType = messageType } | 118 | true | true | 0 | 9 | 45 | 58 | 29 | 29 | null | null |
nevrenato/Hets_Fork | THF/StaticAnalysisTHF.hs | gpl-2.0 | thfTypedConstToType :: THFTypedConst -> Maybe (Type, Constant, THFTypedConst)
thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp | 154 | thfTypedConstToType :: THFTypedConst -> Maybe (Type, Constant, THFTypedConst)
thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp | 154 | thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp | 76 | false | true | 0 | 7 | 14 | 39 | 20 | 19 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivityGroups/List.hs | mpl-2.0 | -- | Creates a value of 'FloodlightActivityGroupsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'faglFloodlightConfigurationId'
--
-- * 'faglAdvertiserId'
--
-- * 'faglSearchString'
--
-- * 'faglIds'
--
-- * 'faglProFileId'
--
-... | 957 | floodlightActivityGroupsList
:: Int64 -- ^ 'faglProFileId'
-> FloodlightActivityGroupsList
floodlightActivityGroupsList pFaglProFileId_ =
FloodlightActivityGroupsList'
{ _faglFloodlightConfigurationId = Nothing
, _faglAdvertiserId = Nothing
, _faglSearchString = Nothing
, _faglIds = Nothing
... | 525 | floodlightActivityGroupsList pFaglProFileId_ =
FloodlightActivityGroupsList'
{ _faglFloodlightConfigurationId = Nothing
, _faglAdvertiserId = Nothing
, _faglSearchString = Nothing
, _faglIds = Nothing
, _faglProFileId = _Coerce # pFaglProFileId_
, _faglSortOrder = Nothing
, _faglPageToke... | 426 | true | true | 0 | 8 | 180 | 117 | 78 | 39 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Fake opcodes for functions that have hooks attached to them via
-- backend.RunLocalHooks
fakeOpMasterTurndown :: String
fakeOpMasterTurndown = "OP_CLUSTER_IP_TURNDOWN" | 173 | fakeOpMasterTurndown :: String
fakeOpMasterTurndown = "OP_CLUSTER_IP_TURNDOWN" | 78 | fakeOpMasterTurndown = "OP_CLUSTER_IP_TURNDOWN" | 47 | true | true | 0 | 6 | 21 | 20 | 9 | 11 | null | null |
lynnard/cocos2d-hs | generator/Graphics/UI/Cocos2d/Generator/Interface/Common.hs | bsd-3-clause | e_LabelEffect :: CppEnum
e_LabelEffect =
addReqIncludes [includeStd "base/ccTypes.h"] $
makeEnum (ident1 "cocos2d" "LabelEffect") Nothing
[ (0, ["normal"])
, (1, ["outline"])
, (2, ["shadow"])
, (3, ["glow"])
, (4, ["all"])
] | 267 | e_LabelEffect :: CppEnum
e_LabelEffect =
addReqIncludes [includeStd "base/ccTypes.h"] $
makeEnum (ident1 "cocos2d" "LabelEffect") Nothing
[ (0, ["normal"])
, (1, ["outline"])
, (2, ["shadow"])
, (3, ["glow"])
, (4, ["all"])
] | 267 | e_LabelEffect =
addReqIncludes [includeStd "base/ccTypes.h"] $
makeEnum (ident1 "cocos2d" "LabelEffect") Nothing
[ (0, ["normal"])
, (1, ["outline"])
, (2, ["shadow"])
, (3, ["glow"])
, (4, ["all"])
] | 242 | false | true | 0 | 8 | 71 | 100 | 59 | 41 | null | null |
wangbj/MortageCalc | test/Spec.hs | mit | prop_full_term_pays_all (SimpleLoan amt apr years) = monadicIO $ do
amortizedPayments <- run (F.toList <$> runMortgageSimple amt apr years)
-- floating point could accumulate errors.
assert $! length amortizedPayments `elem` [12 * years, 1 + 12 * years] | 265 | prop_full_term_pays_all (SimpleLoan amt apr years) = monadicIO $ do
amortizedPayments <- run (F.toList <$> runMortgageSimple amt apr years)
-- floating point could accumulate errors.
assert $! length amortizedPayments `elem` [12 * years, 1 + 12 * years] | 265 | prop_full_term_pays_all (SimpleLoan amt apr years) = monadicIO $ do
amortizedPayments <- run (F.toList <$> runMortgageSimple amt apr years)
-- floating point could accumulate errors.
assert $! length amortizedPayments `elem` [12 * years, 1 + 12 * years] | 265 | false | false | 0 | 12 | 48 | 84 | 42 | 42 | null | null |
tamarin-prover/tamarin-prover | lib/term/src/Term/Maude/Signature.hs | gpl-3.0 | -- | Add function symbol to given maude signature.
addFunSym :: NoEqSym -> MaudeSig -> MaudeSig
addFunSym funsym msig =
msig `mappend` mempty {stFunSyms=S.fromList [funsym]} | 177 | addFunSym :: NoEqSym -> MaudeSig -> MaudeSig
addFunSym funsym msig =
msig `mappend` mempty {stFunSyms=S.fromList [funsym]} | 126 | addFunSym funsym msig =
msig `mappend` mempty {stFunSyms=S.fromList [funsym]} | 81 | true | true | 0 | 9 | 28 | 47 | 26 | 21 | null | null |
bruno-cadorette/TheLambdaReactor | src/Backend/Game/Map.hs | mit | toPoint2d :: (Int, Int) -> Point2d
toPoint2d (x, y) = (Point2d (fromIntegral x) (fromIntegral y)) | 101 | toPoint2d :: (Int, Int) -> Point2d
toPoint2d (x, y) = (Point2d (fromIntegral x) (fromIntegral y)) | 99 | toPoint2d (x, y) = (Point2d (fromIntegral x) (fromIntegral y)) | 64 | false | true | 0 | 8 | 18 | 50 | 27 | 23 | null | null |
tsahyt/clingo-haskell | src/Clingo/Internal/AST.hs | mit | rawBodyLiteral (BodyTheoryAtom l s x) = AstBodyTheoryAtom
<$> rawLocation l <*> pure (rawSign s)
<*> (new =<< rawTheoryAtom x) | 134 | rawBodyLiteral (BodyTheoryAtom l s x) = AstBodyTheoryAtom
<$> rawLocation l <*> pure (rawSign s)
<*> (new =<< rawTheoryAtom x) | 134 | rawBodyLiteral (BodyTheoryAtom l s x) = AstBodyTheoryAtom
<$> rawLocation l <*> pure (rawSign s)
<*> (new =<< rawTheoryAtom x) | 134 | false | false | 5 | 8 | 26 | 58 | 27 | 31 | null | null |
xmonad/xmonad-contrib | XMonad/Util/WorkspaceCompare.hs | bsd-3-clause | indexCompare Nothing (Just _) = GT | 34 | indexCompare Nothing (Just _) = GT | 34 | indexCompare Nothing (Just _) = GT | 34 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
bmjames/typo | Main.hs | bsd-3-clause | foldAccuracy :: TL.Text -> Moore (Char, UTCTime) (Maybe Int)
foldAccuracy copy = unfoldMoore (toAccuracy &&& updateState) (copy, 0, 0)
where
updateState (copy, g, n) (c,_) =
case TL.uncons copy of
Just (c', copy') -> (copy', if acceptInput c' c then succ g else g, succ n)
Nothing -> (copy, ... | 402 | foldAccuracy :: TL.Text -> Moore (Char, UTCTime) (Maybe Int)
foldAccuracy copy = unfoldMoore (toAccuracy &&& updateState) (copy, 0, 0)
where
updateState (copy, g, n) (c,_) =
case TL.uncons copy of
Just (c', copy') -> (copy', if acceptInput c' c then succ g else g, succ n)
Nothing -> (copy, ... | 402 | foldAccuracy copy = unfoldMoore (toAccuracy &&& updateState) (copy, 0, 0)
where
updateState (copy, g, n) (c,_) =
case TL.uncons copy of
Just (c', copy') -> (copy', if acceptInput c' c then succ g else g, succ n)
Nothing -> (copy, g, n)
toAccuracy (_, g, n) = guard (n /= 0) >> Just (tru... | 341 | false | true | 1 | 12 | 103 | 203 | 110 | 93 | null | null |
centromere/cacophony | tests/vectors/Types.hs | unlicense | patternToHandshake PatternIKpsk2 = noiseIKpsk2 | 46 | patternToHandshake PatternIKpsk2 = noiseIKpsk2 | 46 | patternToHandshake PatternIKpsk2 = noiseIKpsk2 | 46 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
facebookincubator/duckling | Duckling/Time/DA/Rules.hs | bsd-3-clause | ruleDayofmonthOrdinal :: Rule
ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(Token Ordinal OrdinalData{TOrdinal.value = v}:_) ->
tt . mkLatent $ dayOfMonth v
_ -> Nothing
} | 301 | ruleDayofmonthOrdinal :: Rule
ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(Token Ordinal OrdinalData{TOrdinal.value = v}:_) ->
tt . mkLatent $ dayOfMonth v
_ -> Nothing
} | 301 | ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(Token Ordinal OrdinalData{TOrdinal.value = v}:_) ->
tt . mkLatent $ dayOfMonth v
_ -> Nothing
} | 271 | false | true | 0 | 17 | 77 | 96 | 51 | 45 | null | null |
ptol/oczor | src/Oczor/Infer/InferContext.hs | mit | addOpenModule :: ModuleName -> Module -> InferContext -> InferContext
-- addOpenModule name newMdl ctx | traceArgs ["addOpenModule", show name, pshow newMdl] = undefined
addOpenModule name newMdl ctx =
ctx
& openModules %~ mergeModules newMdl | 252 | addOpenModule :: ModuleName -> Module -> InferContext -> InferContext
addOpenModule name newMdl ctx =
ctx
& openModules %~ mergeModules newMdl | 152 | addOpenModule name newMdl ctx =
ctx
& openModules %~ mergeModules newMdl | 82 | true | true | 0 | 7 | 43 | 42 | 21 | 21 | null | null |
paradigmsort/ASN1_Happy_LALR1 | BasicTypes.hs | mit | makeOctet :: [Bit] -> Octet
makeOctet (a:b:c:d:e:f:g:h:[]) = (a,b,c,d,e,f,g,h) | 79 | makeOctet :: [Bit] -> Octet
makeOctet (a:b:c:d:e:f:g:h:[]) = (a,b,c,d,e,f,g,h) | 78 | makeOctet (a:b:c:d:e:f:g:h:[]) = (a,b,c,d,e,f,g,h) | 50 | false | true | 0 | 15 | 9 | 82 | 46 | 36 | null | null |
codemac/yi-editor | src/Yi/Mode/Haskell.hs | gpl-2.0 | insideGroup :: Token -> Bool
insideGroup (Special c) = c `notElem` "',;})]" | 75 | insideGroup :: Token -> Bool
insideGroup (Special c) = c `notElem` "',;})]" | 75 | insideGroup (Special c) = c `notElem` "',;})]" | 46 | false | true | 0 | 7 | 11 | 30 | 16 | 14 | null | null |
psibi/persistent | persistent-sqlite/Database/Sqlite.hs | mit | sqlError :: Maybe Connection -> Text -> Error -> IO a
sqlError maybeConnection functionName error = do
details <- case maybeConnection of
Just database -> do
details <- errmsg database
return $ ": " `Data.Monoid.mappend` details
Nothing -> return "."
t... | 432 | sqlError :: Maybe Connection -> Text -> Error -> IO a
sqlError maybeConnection functionName error = do
details <- case maybeConnection of
Just database -> do
details <- errmsg database
return $ ": " `Data.Monoid.mappend` details
Nothing -> return "."
t... | 432 | sqlError maybeConnection functionName error = do
details <- case maybeConnection of
Just database -> do
details <- errmsg database
return $ ": " `Data.Monoid.mappend` details
Nothing -> return "."
throwIO SqliteException
{ seError = error
, seF... | 378 | false | true | 0 | 15 | 138 | 122 | 59 | 63 | null | null |
spacekitteh/compdata | benchmark/Functions/Comp/Inference.hs | bsd-3-clause | desugType2 :: SugarExpr -> BaseType
desugType2 = inferType2 . (desug :: SugarExpr -> Expr) | 90 | desugType2 :: SugarExpr -> BaseType
desugType2 = inferType2 . (desug :: SugarExpr -> Expr) | 90 | desugType2 = inferType2 . (desug :: SugarExpr -> Expr) | 54 | false | true | 0 | 7 | 13 | 29 | 16 | 13 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USegd/Split.hs | bsd-3-clause | getChunk
:: USegd -- ^ Segment descriptor of entire array.
-> Int -- ^ Starting offset into the flat array for the first
-- slice on this thread.
-> Int -- ^ Number of elements in this thread.
-> Bool -- ^ Whether this ... | 3,741 | getChunk
:: USegd -- ^ Segment descriptor of entire array.
-> Int -- ^ Starting offset into the flat array for the first
-- slice on this thread.
-> Int -- ^ Number of elements in this thread.
-> Bool -- ^ Whether this ... | 3,705 | getChunk !segd !nStart !nElems is_last
= (# lens'', k-left_len, left_off #)
where
-- Lengths of all segments.
-- eg: [60, 10, 20, 40, 50]
!lens = USegd.takeLengths segd
-- Indices indices of all segments.
-- eg: [0, 60, 70, 90, 130]
!idxs = USegd.takeIndices segd
-- Total number of... | 3,218 | true | true | 26 | 25 | 1,422 | 541 | 278 | 263 | null | null |
tphyahoo/gititpt | Network/Gitit/Handlers.hs | gpl-2.0 | categoryListPage :: Handler
categoryListPage = do
cfg <- getConfig
let repoPath = repositoryPath cfg
fs <- getFileStore
files <- liftIO $ index fs
let pages = filter (\f -> isPageFile f && not (isDiscussPageFile f)) files
categories <- liftIO $
liftM (nub . sort . concat) $
f... | 837 | categoryListPage :: Handler
categoryListPage = do
cfg <- getConfig
let repoPath = repositoryPath cfg
fs <- getFileStore
files <- liftIO $ index fs
let pages = filter (\f -> isPageFile f && not (isDiscussPageFile f)) files
categories <- liftIO $
liftM (nub . sort . concat) $
f... | 837 | categoryListPage = do
cfg <- getConfig
let repoPath = repositoryPath cfg
fs <- getFileStore
files <- liftIO $ index fs
let pages = filter (\f -> isPageFile f && not (isDiscussPageFile f)) files
categories <- liftIO $
liftM (nub . sort . concat) $
forM pages $
... | 809 | false | true | 0 | 17 | 272 | 258 | 128 | 130 | null | null |
cglazner/ibd_stitch | src/Joint.hs | bsd-3-clause | outbredSecond :: Constraint
outbredSecond = negateConstraint inbredSecond | 73 | outbredSecond :: Constraint
outbredSecond = negateConstraint inbredSecond | 73 | outbredSecond = negateConstraint inbredSecond | 45 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
olsner/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | tyCoFVsOfProv :: UnivCoProvenance -> FV
tyCoFVsOfProv UnsafeCoerceProv fv_cand in_scope acc = emptyFV fv_cand in_scope acc | 125 | tyCoFVsOfProv :: UnivCoProvenance -> FV
tyCoFVsOfProv UnsafeCoerceProv fv_cand in_scope acc = emptyFV fv_cand in_scope acc | 125 | tyCoFVsOfProv UnsafeCoerceProv fv_cand in_scope acc = emptyFV fv_cand in_scope acc | 85 | false | true | 0 | 5 | 17 | 31 | 15 | 16 | null | null |
kindl/Hypatia | src/Typechecker.hs | mit | typecheckVar x ty = do
env <- getEnv
scheme <- mfind x env
subsume scheme ty | 88 | typecheckVar x ty = do
env <- getEnv
scheme <- mfind x env
subsume scheme ty | 88 | typecheckVar x ty = do
env <- getEnv
scheme <- mfind x env
subsume scheme ty | 88 | false | false | 1 | 9 | 27 | 43 | 16 | 27 | null | null |
fgaray/erd | src/Parse.hs | unlicense | entity :: Parser (Maybe AST)
entity = do n <- between (char '[') (char ']') ident
spacesNoNew
opts <- options
eolComment
return $ Just $ E Entity { name = n, attribs = [],
hoptions = opts, eoptions = opts } | 293 | entity :: Parser (Maybe AST)
entity = do n <- between (char '[') (char ']') ident
spacesNoNew
opts <- options
eolComment
return $ Just $ E Entity { name = n, attribs = [],
hoptions = opts, eoptions = opts } | 293 | entity = do n <- between (char '[') (char ']') ident
spacesNoNew
opts <- options
eolComment
return $ Just $ E Entity { name = n, attribs = [],
hoptions = opts, eoptions = opts } | 264 | false | true | 1 | 12 | 127 | 105 | 51 | 54 | null | null |
svenssonjoel/ArrowObsidian | Obsidian/ArrowObsidian/Printing.hs | bsd-3-clause | printOp1 ACosH a = " acosh(" ++ pprint a ++ ")" | 47 | printOp1 ACosH a = " acosh(" ++ pprint a ++ ")" | 47 | printOp1 ACosH a = " acosh(" ++ pprint a ++ ")" | 47 | false | false | 0 | 7 | 10 | 22 | 10 | 12 | null | null |
jstolarek/haddock | haddock-api/src/Haddock/Interface/Rename.hs | bsd-2-clause | renameLDocHsSyn :: LHsDocString -> RnM LHsDocString
renameLDocHsSyn = return | 76 | renameLDocHsSyn :: LHsDocString -> RnM LHsDocString
renameLDocHsSyn = return | 76 | renameLDocHsSyn = return | 24 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
SkemaPlatform/skema-common | src/Skema/Util.hs | agpl-3.0 | nodesWithoutIncoming :: Eq a => [(a,a)] -> [a]
nodesWithoutIncoming edges = filter notInput $ graphNodes edges
where
notInput x = x `notElem` (map snd edges)
-- ----------------------------------------------------------------------------- | 245 | nodesWithoutIncoming :: Eq a => [(a,a)] -> [a]
nodesWithoutIncoming edges = filter notInput $ graphNodes edges
where
notInput x = x `notElem` (map snd edges)
-- ----------------------------------------------------------------------------- | 245 | nodesWithoutIncoming edges = filter notInput $ graphNodes edges
where
notInput x = x `notElem` (map snd edges)
-- ----------------------------------------------------------------------------- | 198 | false | true | 0 | 8 | 33 | 73 | 38 | 35 | null | null |
8l/barrelfish | hake/RuleDefs.hs | mit | kernelCFlags "armv5" = ARMv5.kernelCFlags | 41 | kernelCFlags "armv5" = ARMv5.kernelCFlags | 41 | kernelCFlags "armv5" = ARMv5.kernelCFlags | 41 | false | false | 1 | 6 | 3 | 15 | 5 | 10 | null | null |
amutake/andon-yesod | Andon/Gallery.hs | bsd-2-clause | imgExts :: [String]
imgExts = exts ++ map (map toUpper) exts
where
exts = [".jpg", ".jpeg", ".png", ".bmp", ".gif"] | 121 | imgExts :: [String]
imgExts = exts ++ map (map toUpper) exts
where
exts = [".jpg", ".jpeg", ".png", ".bmp", ".gif"] | 121 | imgExts = exts ++ map (map toUpper) exts
where
exts = [".jpg", ".jpeg", ".png", ".bmp", ".gif"] | 101 | false | true | 0 | 8 | 24 | 52 | 29 | 23 | null | null |
input-output-hk/cardano-sl | core/test/Test/Pos/Core/Gen.hs | apache-2.0 | -- Microseconds are rounded to the nearest second when enc/decoded to/from
-- JSON. So here we round to the nearest 10^6.
genTimestampRoundedToSecond :: Gen Timestamp
genTimestampRoundedToSecond =
Timestamp . (* 1000000) . (`rem` 1000000) <$> genMicrosecond | 261 | genTimestampRoundedToSecond :: Gen Timestamp
genTimestampRoundedToSecond =
Timestamp . (* 1000000) . (`rem` 1000000) <$> genMicrosecond | 139 | genTimestampRoundedToSecond =
Timestamp . (* 1000000) . (`rem` 1000000) <$> genMicrosecond | 94 | true | true | 0 | 8 | 39 | 38 | 23 | 15 | null | null |
gatlin/psilo | src/Lib/Types/TypeCheck.hs | gpl-3.0 | -- this is almost certainly wrong
unify (TForall _ t1) t2 = unify t1 t2 | 71 | unify (TForall _ t1) t2 = unify t1 t2 | 37 | unify (TForall _ t1) t2 = unify t1 t2 | 37 | true | false | 0 | 7 | 14 | 25 | 12 | 13 | null | null |
Dlackware/dlackware | lib/Slackware/CompileOrder.hs | gpl-3.0 | package :: GenParser (Maybe Step)
package = do
old <- takeWhile1P Nothing $ \c -> c /= '\n' && c /= '%'
new <- optional $ percent *> takeWhile1P Nothing (/= '\n')
return $ Just $ PackageName (old <$ new) $ fromMaybe old new | 235 | package :: GenParser (Maybe Step)
package = do
old <- takeWhile1P Nothing $ \c -> c /= '\n' && c /= '%'
new <- optional $ percent *> takeWhile1P Nothing (/= '\n')
return $ Just $ PackageName (old <$ new) $ fromMaybe old new | 235 | package = do
old <- takeWhile1P Nothing $ \c -> c /= '\n' && c /= '%'
new <- optional $ percent *> takeWhile1P Nothing (/= '\n')
return $ Just $ PackageName (old <$ new) $ fromMaybe old new | 201 | false | true | 0 | 12 | 55 | 105 | 51 | 54 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | Sign-in details of the enterprise.
eSigninDetails :: Lens' Enterprise [SigninDetail]
eSigninDetails
= lens _eSigninDetails
(\ s a -> s{_eSigninDetails = a})
. _Default
. _Coerce | 202 | eSigninDetails :: Lens' Enterprise [SigninDetail]
eSigninDetails
= lens _eSigninDetails
(\ s a -> s{_eSigninDetails = a})
. _Default
. _Coerce | 162 | eSigninDetails
= lens _eSigninDetails
(\ s a -> s{_eSigninDetails = a})
. _Default
. _Coerce | 112 | true | true | 3 | 8 | 46 | 58 | 28 | 30 | null | null |
tmishima/bindings-Oculus | test/case2/GLFWWindow.hs | apache-2.0 | swapBuff :: GLFWHandle -> IO ()
swapBuff glfwHdl = do
winStat <- readIORef $ winHdl glfwHdl
case winStat of
(Just win,_) -> GLFW.swapBuffers win
(Nothing,_) -> return () | 181 | swapBuff :: GLFWHandle -> IO ()
swapBuff glfwHdl = do
winStat <- readIORef $ winHdl glfwHdl
case winStat of
(Just win,_) -> GLFW.swapBuffers win
(Nothing,_) -> return () | 181 | swapBuff glfwHdl = do
winStat <- readIORef $ winHdl glfwHdl
case winStat of
(Just win,_) -> GLFW.swapBuffers win
(Nothing,_) -> return () | 149 | false | true | 0 | 11 | 39 | 81 | 39 | 42 | null | null |
danielksb/eventlog | src/EventLog.hs | bsd-3-clause | unregister :: EventLog -> Subscriber -> IO ()
unregister eventLog subcr = modifyMVar_ (_subscribers eventLog) (return . L.delete subcr) | 135 | unregister :: EventLog -> Subscriber -> IO ()
unregister eventLog subcr = modifyMVar_ (_subscribers eventLog) (return . L.delete subcr) | 135 | unregister eventLog subcr = modifyMVar_ (_subscribers eventLog) (return . L.delete subcr) | 89 | false | true | 0 | 9 | 18 | 52 | 25 | 27 | null | null |
creswick/dbmigrations | src/Database/Schema/Migrations/Filesystem.hs | bsd-3-clause | throwFS :: String -> a
throwFS = throw . FilesystemStoreError | 61 | throwFS :: String -> a
throwFS = throw . FilesystemStoreError | 61 | throwFS = throw . FilesystemStoreError | 38 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
elieux/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- | Conditional branch
genCondBranch :: CmmExpr -> BlockId -> BlockId -> LlvmM StmtData
genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
... | 2,014 | genCondBranch :: CmmExpr -> BlockId -> BlockId -> LlvmM StmtData
genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
then do
... | 1,990 | genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
then do
let s1 = BranchIf vc labelT labelF
return (stmts `... | 1,925 | true | true | 0 | 14 | 482 | 172 | 83 | 89 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/general/haskellforall/src/X_2012_06_09_why_free_monads_matter.hs | unlicense | {-
Remedy using:
-- named Fix because it is "fixed point of a functor"
:i Fix
newtype Fix f = Fix {unFix :: f (Fix f)}
instance Eq (f (Fix f)) => Eq (Fix f)
instance Ord (f (Fix f)) => Ord (Fix f)
instance Show (f (Fix f)) => Show (Fix f)
Wraps many Toys into the same data type.
-}
exampleCommandFp1 :: Fix (... | 389 | exampleCommandFp1 :: Fix (Toy Char)
exampleCommandFp1 = Fix (Output 'A' (Fix Done)) | 95 | exampleCommandFp1 = Fix (Output 'A' (Fix Done)) | 59 | true | true | 2 | 9 | 96 | 44 | 19 | 25 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | {-
- Notes for the parameter.
-}
getContractParameterNotes :: KRPCHS.SpaceCenter.ContractParameter -> RPCContext (Data.Text.Text)
getContractParameterNotes thisArg = do
let r = makeRequest "SpaceCenter" "ContractParameter_get_Notes" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 312 | getContractParameterNotes :: KRPCHS.SpaceCenter.ContractParameter -> RPCContext (Data.Text.Text)
getContractParameterNotes thisArg = do
let r = makeRequest "SpaceCenter" "ContractParameter_get_Notes" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 277 | getContractParameterNotes thisArg = do
let r = makeRequest "SpaceCenter" "ContractParameter_get_Notes" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 180 | true | true | 0 | 13 | 45 | 75 | 35 | 40 | null | null |
adityam/teams | Data/Teams/Structure.hs | gpl-3.0 | chMark BothMarked _ = BothMarked | 45 | chMark BothMarked _ = BothMarked | 45 | chMark BothMarked _ = BothMarked | 45 | false | false | 0 | 5 | 17 | 11 | 5 | 6 | null | null |
fmapfmapfmap/amazonka | amazonka-importexport/gen/Network/AWS/ImportExport/GetStatus.hs | mpl-2.0 | -- | Undocumented member.
gsrsSignature :: Lens' GetStatusResponse (Maybe Text)
gsrsSignature = lens _gsrsSignature (\ s a -> s{_gsrsSignature = a}) | 148 | gsrsSignature :: Lens' GetStatusResponse (Maybe Text)
gsrsSignature = lens _gsrsSignature (\ s a -> s{_gsrsSignature = a}) | 122 | gsrsSignature = lens _gsrsSignature (\ s a -> s{_gsrsSignature = a}) | 68 | true | true | 0 | 9 | 20 | 46 | 25 | 21 | null | null |
haasn/vimus | src/Vimus/Type.hs | mit | getCurrentWidget :: Vimus AnyWidget
getCurrentWidget = gets (tabContent . Tab.current . tabView) | 96 | getCurrentWidget :: Vimus AnyWidget
getCurrentWidget = gets (tabContent . Tab.current . tabView) | 96 | getCurrentWidget = gets (tabContent . Tab.current . tabView) | 60 | false | true | 0 | 9 | 11 | 36 | 16 | 20 | null | null |
TomMD/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsPatNeedsParens (ConPatIn _ ds) = conPatNeedsParens ds | 59 | hsPatNeedsParens (ConPatIn _ ds) = conPatNeedsParens ds | 59 | hsPatNeedsParens (ConPatIn _ ds) = conPatNeedsParens ds | 59 | false | false | 0 | 7 | 10 | 20 | 9 | 11 | null | null |
Munksgaard/SFOT | Asm/Parser.hs | mit | jmp :: Parser Operation
jmp = do
token "JMP"
choice [jmpInd, jmpAbs]
where
jmpAbs = do
s <- name
return $ JMP (JmpA (LongLabel s))
jmpInd = parens $ do
s <- name
return $ JMP (JmpI (LongLabel s)) | 247 | jmp :: Parser Operation
jmp = do
token "JMP"
choice [jmpInd, jmpAbs]
where
jmpAbs = do
s <- name
return $ JMP (JmpA (LongLabel s))
jmpInd = parens $ do
s <- name
return $ JMP (JmpI (LongLabel s)) | 247 | jmp = do
token "JMP"
choice [jmpInd, jmpAbs]
where
jmpAbs = do
s <- name
return $ JMP (JmpA (LongLabel s))
jmpInd = parens $ do
s <- name
return $ JMP (JmpI (LongLabel s)) | 223 | false | true | 0 | 15 | 90 | 106 | 50 | 56 | null | null |
weihu816/Adagio | src/Txn.hs | bsd-3-clause | updateRSet :: TxnManager -> KVKey -> KVVal -> KVVersion -> STM ()
updateRSet TxnManager{..} key val ver = do
rSet <- readTVar readSet
let new_rSet = Map.insert key (key, val, ver) rSet
writeTVar readSet new_rSet | 217 | updateRSet :: TxnManager -> KVKey -> KVVal -> KVVersion -> STM ()
updateRSet TxnManager{..} key val ver = do
rSet <- readTVar readSet
let new_rSet = Map.insert key (key, val, ver) rSet
writeTVar readSet new_rSet | 217 | updateRSet TxnManager{..} key val ver = do
rSet <- readTVar readSet
let new_rSet = Map.insert key (key, val, ver) rSet
writeTVar readSet new_rSet | 151 | false | true | 5 | 6 | 40 | 80 | 44 | 36 | null | null |
ezyang/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | -- Same as `wrapFamInstBody`, but for type family instances, which are
-- represented by a `CoAxiom`, and not a `TyCon`
wrapTypeFamInstBody :: CoAxiom br -> Int -> [Type] -> [Coercion]
-> CoreExpr -> CoreExpr
wrapTypeFamInstBody axiom ind args cos body
= mkCast body (mkSymCo (mkAxInstCo Representa... | 347 | wrapTypeFamInstBody :: CoAxiom br -> Int -> [Type] -> [Coercion]
-> CoreExpr -> CoreExpr
wrapTypeFamInstBody axiom ind args cos body
= mkCast body (mkSymCo (mkAxInstCo Representational axiom ind args cos)) | 227 | wrapTypeFamInstBody axiom ind args cos body
= mkCast body (mkSymCo (mkAxInstCo Representational axiom ind args cos)) | 118 | true | true | 0 | 9 | 71 | 78 | 40 | 38 | null | null |
vincenthz/hs-foundation | foundation/Foundation/IO/Terminal.hs | bsd-3-clause | -- | Print a string with a newline to standard output
putStrLn :: String -> IO ()
putStrLn = Prelude.putStrLn . toList | 118 | putStrLn :: String -> IO ()
putStrLn = Prelude.putStrLn . toList | 64 | putStrLn = Prelude.putStrLn . toList | 36 | true | true | 0 | 7 | 21 | 27 | 14 | 13 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | l1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "L1") | 58 | l1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "L1") | 58 | l1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "L1") | 58 | false | false | 0 | 7 | 9 | 17 | 8 | 9 | null | null |
haskell-distributed/distributed-process-platform | src/Control/Distributed/Process/Platform/Execution/Mailbox.hs | bsd-3-clause | -- | Instructs the mailbox to send a 'NewMail' signal as soon as any mail is
-- available for delivery. Once the signal is sent, it will not be resent, even
-- when further mail arrives, until 'notify' is called again.
--
-- NB: signals are /only/ delivered to the mailbox's owning process.
--
notify :: Mailbox -> Proce... | 375 | notify :: Mailbox -> Process ()
notify mb = sendCtrlMsg mb $ SetActiveMode Notify | 81 | notify mb = sendCtrlMsg mb $ SetActiveMode Notify | 49 | true | true | 0 | 7 | 67 | 39 | 21 | 18 | null | null |
jseaton/ttasm | Instructions.hs | gpl-3.0 | sfvtl perp = byte $ if perp then 0x09 else 0x08 | 47 | sfvtl perp = byte $ if perp then 0x09 else 0x08 | 47 | sfvtl perp = byte $ if perp then 0x09 else 0x08 | 47 | false | false | 0 | 6 | 10 | 21 | 11 | 10 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/TT.hs | bsd-3-clause | implicitable (NS n _) = implicitable n | 38 | implicitable (NS n _) = implicitable n | 38 | implicitable (NS n _) = implicitable n | 38 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
qzchenwl/LambdaNet | AI/Layer.hs | mit | -- | The connectLocally function takes in ConvolutionalSettings and the number
-- of output and input neurons
connectLocally :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Connectivity
connectLocally f s p k d w1 h1 w2 h2 i j =
repmat (fromLists conn :: Matrix Double) k d
where conn = [(replica... | 1,127 | connectLocally :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Connectivity
connectLocally f s p k d w1 h1 w2 h2 i j =
repmat (fromLists conn :: Matrix Double) k d
where conn = [(replicate rowZeroOffset 0)
++ (take (f * rowSize) (cycle fieldArea))
++ (replicate (ro... | 1,015 | connectLocally f s p k d w1 h1 w2 h2 i j =
repmat (fromLists conn :: Matrix Double) k d
where conn = [(replicate rowZeroOffset 0)
++ (take (f * rowSize) (cycle fieldArea))
++ (replicate (rowSize * colSize - rowSize * f - rowZeroOffset) 0)
| n <- [0.. (quot i k)-1],
... | 921 | true | true | 1 | 16 | 397 | 355 | 179 | 176 | null | null |
vTurbine/ghc | ghc/Main.hs | bsd-3-clause | dumpPackagesSimple dflags = putMsg dflags (pprPackagesSimple dflags) | 68 | dumpPackagesSimple dflags = putMsg dflags (pprPackagesSimple dflags) | 68 | dumpPackagesSimple dflags = putMsg dflags (pprPackagesSimple dflags) | 68 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
ezyang/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
ppr_quasi n quoter quote = whenPprDebug (brackets (ppr n)) <>
char '[' <> ppr quoter <> vbar <>
ppr quote <> text "|]" | 234 | ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
ppr_quasi n quoter quote = whenPprDebug (brackets (ppr n)) <>
char '[' <> ppr quoter <> vbar <>
ppr quote <> text "|]" | 234 | ppr_quasi n quoter quote = whenPprDebug (brackets (ppr n)) <>
char '[' <> ppr quoter <> vbar <>
ppr quote <> text "|]" | 172 | false | true | 0 | 14 | 88 | 84 | 39 | 45 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | mkIntegerIdKey, smallIntegerIdKey, wordToIntegerIdKey,
integerToWordIdKey, integerToIntIdKey,
integerToWord64IdKey, integerToInt64IdKey,
word64ToIntegerIdKey, int64ToIntegerIdKey,
plusIntegerIdKey, timesIntegerIdKey, minusIntegerIdKey,
negateIntegerIdKey,
eqIntegerPrimIdKey, neqIntegerPrimIdKey,... | 942 | mkIntegerIdKey, smallIntegerIdKey, wordToIntegerIdKey,
integerToWordIdKey, integerToIntIdKey,
integerToWord64IdKey, integerToInt64IdKey,
word64ToIntegerIdKey, int64ToIntegerIdKey,
plusIntegerIdKey, timesIntegerIdKey, minusIntegerIdKey,
negateIntegerIdKey,
eqIntegerPrimIdKey, neqIntegerPrimIdKey,... | 942 | mkIntegerIdKey = mkPreludeMiscIdUnique 60 | 56 | false | true | 0 | 5 | 121 | 94 | 87 | 7 | null | null |
alanz/htelehash | src/Network/TeleHash/Old/Switch.hs | bsd-3-clause | {-
self.pathSet = function(path)
{
var updated = (self.paths[path.type] && JSON.stringify(self.paths[path.type]) == JSON.stringify(path));
self.paths[path.type] = path;
// if ip4 and local ip, set nat mode
if(path.type == "ipv4") self.nat = isLocalIP(path.ip);
// trigger pings if our address cha... | 8,830 | whois :: HashName -> TeleHash (Maybe HashContainer)
whois hn = do
-- logT $ "whois entered for:" ++ show hn
sw <- get
-- never return ourselves
if (fromMaybe (HN "") (swHashname sw)) == hn
then do
-- logT "whois called for self"
return Nothing
else do
-- logT "whois not called for sel... | 8,157 | whois hn = do
-- logT $ "whois entered for:" ++ show hn
sw <- get
-- never return ourselves
if (fromMaybe (HN "") (swHashname sw)) == hn
then do
-- logT "whois called for self"
return Nothing
else do
-- logT "whois not called for self"
-- if we already have it, return it
c... | 8,105 | true | true | 0 | 27 | 1,947 | 318 | 163 | 155 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.