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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
anttisalonen/cgen | src/HeaderData.hs | bsd-3-clause | -- return the class called n, if found.
fetchClass :: [Object] -> String -> Maybe Object
fetchClass classes n = headMay $ filter (classHasName n) classes | 153 | fetchClass :: [Object] -> String -> Maybe Object
fetchClass classes n = headMay $ filter (classHasName n) classes | 113 | fetchClass classes n = headMay $ filter (classHasName n) classes | 64 | true | true | 0 | 8 | 25 | 46 | 23 | 23 | null | null |
brendanhay/gogol | gogol-chat/gen/Network/Google/Chat/Types/Product.hs | mpl-2.0 | -- | Only the top and bottom label and content region are clickable.
gacvdtOnClick :: Lens' GoogleAppsCardV1DecoratedText (Maybe GoogleAppsCardV1OnClick)
gacvdtOnClick
= lens _gacvdtOnClick
(\ s a -> s{_gacvdtOnClick = a}) | 230 | gacvdtOnClick :: Lens' GoogleAppsCardV1DecoratedText (Maybe GoogleAppsCardV1OnClick)
gacvdtOnClick
= lens _gacvdtOnClick
(\ s a -> s{_gacvdtOnClick = a}) | 161 | gacvdtOnClick
= lens _gacvdtOnClick
(\ s a -> s{_gacvdtOnClick = a}) | 76 | true | true | 1 | 9 | 37 | 51 | 25 | 26 | null | null |
urbanslug/ghc | testsuite/tests/gadt/T2040.hs | bsd-3-clause | foo :: W (S ()) -> W (S ()) -> ()
foo (W (_ :: W a1)) (W (_ :: W a2)) =
case proof :: Teq a1 (S ()) of
Teq -> () | 118 | foo :: W (S ()) -> W (S ()) -> ()
foo (W (_ :: W a1)) (W (_ :: W a2)) =
case proof :: Teq a1 (S ()) of
Teq -> () | 118 | foo (W (_ :: W a1)) (W (_ :: W a2)) =
case proof :: Teq a1 (S ()) of
Teq -> () | 84 | false | true | 0 | 13 | 39 | 112 | 54 | 58 | null | null |
scslab/iterIO | Data/IterIO/Parse.hs | bsd-3-clause | (<:>) = liftA2 LL.cons | 22 | (<:>) = liftA2 LL.cons | 22 | (<:>) = liftA2 LL.cons | 22 | false | false | 0 | 6 | 3 | 13 | 7 | 6 | null | null |
urbanslug/ghc | testsuite/tests/esc/TestList.hs | bsd-3-clause | not1 True = False | 17 | not1 True = False | 17 | not1 True = False | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
plancalculus/nextstep-plist | Text/NSPlist/Parsec.hs | bsd-3-clause | pString :: Parsec String u String
pString = (pQuotedString <|> pNonQuotedString) <* pNonContent | 95 | pString :: Parsec String u String
pString = (pQuotedString <|> pNonQuotedString) <* pNonContent | 95 | pString = (pQuotedString <|> pNonQuotedString) <* pNonContent | 61 | false | true | 0 | 7 | 12 | 29 | 15 | 14 | null | null |
coreyhaines/evercraft_kata | src/EverCraft.hs | mit | addDamage :: Damage -> Character -> Character
addDamage amount character = character {damage=(damage character + amount)} | 121 | addDamage :: Damage -> Character -> Character
addDamage amount character = character {damage=(damage character + amount)} | 121 | addDamage amount character = character {damage=(damage character + amount)} | 75 | false | true | 0 | 10 | 15 | 48 | 23 | 25 | null | null |
juhp/network-uri | tests/uri001.hs | bsd-3-clause | testComponent12 = testURIRefComponents "testComponent03"
( Just $ URI
{ uriScheme = "file:"
, uriAuthority = Just (URIAuth "" "windowsauth" "")
, uriPath = "/d$"
, uriQuery = ""
, uriFragment = ""
} )
"file://windowsaut... | 325 | testComponent12 = testURIRefComponents "testComponent03"
( Just $ URI
{ uriScheme = "file:"
, uriAuthority = Just (URIAuth "" "windowsauth" "")
, uriPath = "/d$"
, uriQuery = ""
, uriFragment = ""
} )
"file://windowsaut... | 325 | testComponent12 = testURIRefComponents "testComponent03"
( Just $ URI
{ uriScheme = "file:"
, uriAuthority = Just (URIAuth "" "windowsauth" "")
, uriPath = "/d$"
, uriQuery = ""
, uriFragment = ""
} )
"file://windowsaut... | 325 | false | false | 0 | 12 | 135 | 65 | 37 | 28 | null | null |
markusle/husky | test/CalculatorTest.hs | gpl-3.0 | functionTest13 :: GoodTestCase
functionTest13 = ("fact 20", DblResult 2.43290200817664e18) | 90 | functionTest13 :: GoodTestCase
functionTest13 = ("fact 20", DblResult 2.43290200817664e18) | 90 | functionTest13 = ("fact 20", DblResult 2.43290200817664e18) | 59 | false | true | 0 | 6 | 8 | 20 | 11 | 9 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | areNodeNamesSane :: ConfigData -> Bool
areNodeNamesSane cfg =
let fqdns = map nodeName . Map.elems . fromContainer $ configNodes cfg
names = map (head . sepSplit '.') fqdns
in length names == length (nub names) | 220 | areNodeNamesSane :: ConfigData -> Bool
areNodeNamesSane cfg =
let fqdns = map nodeName . Map.elems . fromContainer $ configNodes cfg
names = map (head . sepSplit '.') fqdns
in length names == length (nub names) | 220 | areNodeNamesSane cfg =
let fqdns = map nodeName . Map.elems . fromContainer $ configNodes cfg
names = map (head . sepSplit '.') fqdns
in length names == length (nub names) | 181 | false | true | 0 | 12 | 44 | 85 | 40 | 45 | null | null |
moonKimura/vector-0.10.9.1 | tests/Tests/Vector.hs | bsd-3-clause | testMonadFunctions :: forall a v. (COMMON_CONTEXT(a, v), Monad v) => v a -> [Test]
testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 282 | testMonadFunctions :: forall a v. (COMMON_CONTEXT(a, v), Monad v) => v a -> [Test]
testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 282 | testMonadFunctions _ = $(testProperties
[ 'prop_return, 'prop_bind ])
where
prop_return :: P (a -> v a) = return `eq` return
prop_bind :: P (v a -> (a -> v a) -> v a) = (>>=) `eq` (>>=) | 199 | false | true | 0 | 12 | 64 | 148 | 80 | 68 | null | null |
nevrenato/Hets_Fork | Common/Lib/Tabular.hs | gpl-2.0 | renderHLine' :: [Int] -> Char -> Header String -> String
renderHLine' is sep h = [ '+', sep ] ++ coreLine ++ [sep, '+']
where
coreLine = concatMap helper $ flattenHeader $ zipHeader 0 is h
helper = either vsep dashes
dashes (i, _) = replicate i sep
vsep NoLine = [sep]
vsep SingleLine = sep : '+' : [sep]
vs... | 355 | renderHLine' :: [Int] -> Char -> Header String -> String
renderHLine' is sep h = [ '+', sep ] ++ coreLine ++ [sep, '+']
where
coreLine = concatMap helper $ flattenHeader $ zipHeader 0 is h
helper = either vsep dashes
dashes (i, _) = replicate i sep
vsep NoLine = [sep]
vsep SingleLine = sep : '+' : [sep]
vs... | 355 | renderHLine' is sep h = [ '+', sep ] ++ coreLine ++ [sep, '+']
where
coreLine = concatMap helper $ flattenHeader $ zipHeader 0 is h
helper = either vsep dashes
dashes (i, _) = replicate i sep
vsep NoLine = [sep]
vsep SingleLine = sep : '+' : [sep]
vsep DoubleLine = sep : "++" ++ [sep] | 298 | false | true | 0 | 8 | 80 | 160 | 83 | 77 | null | null |
mstksg/auto | src/Control/Auto/Process.hs | mit | _deltasF :: Num a => a -> Maybe a -> (Maybe a, Maybe a)
_deltasF x s = case s of
Nothing -> (Nothing , Just x)
Just prev -> (Just (x - prev), Just x)
-- | The output is the running/cumulative 'mconcat' of all of the input
-- seen so far, starting with 'mempty'.
--
-- >>> stre... | 616 | _deltasF :: Num a => a -> Maybe a -> (Maybe a, Maybe a)
_deltasF x s = case s of
Nothing -> (Nothing , Just x)
Just prev -> (Just (x - prev), Just x)
-- | The output is the running/cumulative 'mconcat' of all of the input
-- seen so far, starting with 'mempty'.
--
-- >>> stre... | 616 | _deltasF x s = case s of
Nothing -> (Nothing , Just x)
Just prev -> (Just (x - prev), Just x)
-- | The output is the running/cumulative 'mconcat' of all of the input
-- seen so far, starting with 'mempty'.
--
-- >>> streamauto' mappender . map Last $ [Just 4, Nothing, Just 2,... | 560 | false | true | 0 | 11 | 143 | 102 | 55 | 47 | null | null |
yiannist/ganeti | test/hs/Test/Ganeti/Query/Instance.hs | bsd-2-clause | -- | Successful response - the error does not really matter.
responseSuccess :: String
-> [String]
-> (String, ERpcError RpcResultAllInstancesInfo)
responseSuccess name instNames = (name, Right .
RpcResultAllInstancesInfo . map (, fakeInstanceInfo) $ instNames) | 295 | responseSuccess :: String
-> [String]
-> (String, ERpcError RpcResultAllInstancesInfo)
responseSuccess name instNames = (name, Right .
RpcResultAllInstancesInfo . map (, fakeInstanceInfo) $ instNames) | 234 | responseSuccess name instNames = (name, Right .
RpcResultAllInstancesInfo . map (, fakeInstanceInfo) $ instNames) | 115 | true | true | 0 | 9 | 67 | 62 | 34 | 28 | null | null |
mcmaniac/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr platform g@(GMUL _ src1 src2 dst)
| src1 == dst
= pprG platform g (text "\t#GMUL-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fmulp %st(0),", greg src1 1])
| src2 == dst
= pprG platform g (text "\t#GMUL-xxxcase2" $$
hcat [gt... | 589 | pprInstr platform g@(GMUL _ src1 src2 dst)
| src1 == dst
= pprG platform g (text "\t#GMUL-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fmulp %st(0),", greg src1 1])
| src2 == dst
= pprG platform g (text "\t#GMUL-xxxcase2" $$
hcat [gt... | 589 | pprInstr platform g@(GMUL _ src1 src2 dst)
| src1 == dst
= pprG platform g (text "\t#GMUL-xxxcase1" $$
hcat [gtab, gpush src2 0,
text " ; fmulp %st(0),", greg src1 1])
| src2 == dst
= pprG platform g (text "\t#GMUL-xxxcase2" $$
hcat [gt... | 589 | false | false | 1 | 11 | 253 | 205 | 100 | 105 | null | null |
GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs | bsd-3-clause | -- | Helper function for 'translateLLVMValue'
translateLLVMTypedValue :: (1 <= w, KnownNat w) => NatRepr w -> L.Typed L.Value ->
LLVMTransM (PermExpr (LLVMShapeType w), OpenTerm)
translateLLVMTypedValue w (L.Typed tp v) = translateLLVMValue w tp v | 274 | translateLLVMTypedValue :: (1 <= w, KnownNat w) => NatRepr w -> L.Typed L.Value ->
LLVMTransM (PermExpr (LLVMShapeType w), OpenTerm)
translateLLVMTypedValue w (L.Typed tp v) = translateLLVMValue w tp v | 228 | translateLLVMTypedValue w (L.Typed tp v) = translateLLVMValue w tp v | 68 | true | true | 0 | 12 | 61 | 87 | 43 | 44 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e &&
and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts] | 162 | exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e &&
and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts] | 162 | exprIsCheap' good_app (Case e _ _ alts) = exprIsCheap' good_app e &&
and [exprIsCheap' good_app rhs | (_,_,rhs) <- alts] | 162 | false | false | 0 | 10 | 61 | 60 | 30 | 30 | null | null |
olsner/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtOrigin :: CtOrigin -> SDoc
-- "arising from ..."
-- Not an instance of Outputable because of the "arising from" prefix
pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk | 175 | pprCtOrigin :: CtOrigin -> SDoc
pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk | 83 | pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk | 51 | true | true | 0 | 9 | 28 | 38 | 18 | 20 | null | null |
seppeljordan/sdl2 | src/SDL/Video.hs | bsd-3-clause | -- | Get or set if the window should have a border.
--
-- This 'StateVar' can be modified using '$=' and the current value retrieved with 'get'.
windowBordered :: Window -> StateVar Bool
windowBordered (Window w) = makeStateVar getWindowBordered setWindowBordered
where
getWindowBordered = fmap ((== 0) . (.&. Raw.SD... | 726 | windowBordered :: Window -> StateVar Bool
windowBordered (Window w) = makeStateVar getWindowBordered setWindowBordered
where
getWindowBordered = fmap ((== 0) . (.&. Raw.SDL_WINDOW_BORDERLESS)) (Raw.getWindowFlags w)
setWindowBordered = Raw.setWindowBordered w
-- | Get or set the window's brightness, where 0.0 is... | 581 | windowBordered (Window w) = makeStateVar getWindowBordered setWindowBordered
where
getWindowBordered = fmap ((== 0) . (.&. Raw.SDL_WINDOW_BORDERLESS)) (Raw.getWindowFlags w)
setWindowBordered = Raw.setWindowBordered w
-- | Get or set the window's brightness, where 0.0 is completely dark and 1.0 is normal brightn... | 539 | true | true | 0 | 9 | 118 | 89 | 50 | 39 | null | null |
nsmryan/BIC | Types.hs | unlicense | mkDValue :: DType -> String -> DValue
mkDValue t str = DInt t (read str) | 72 | mkDValue :: DType -> String -> DValue
mkDValue t str = DInt t (read str) | 72 | mkDValue t str = DInt t (read str) | 34 | false | true | 0 | 8 | 14 | 42 | 18 | 24 | null | null |
ulricha/dsh | src/Database/DSH/VSL/Opt/Rewrite/Common.hs | bsd-3-clause | inferBottomUp :: Ordish r e => VSLRewrite r e (NodeMap BottomUpProps)
inferBottomUp = do
to <- R.topsort
props <- R.infer $ inferBottomUpProperties to
return props | 172 | inferBottomUp :: Ordish r e => VSLRewrite r e (NodeMap BottomUpProps)
inferBottomUp = do
to <- R.topsort
props <- R.infer $ inferBottomUpProperties to
return props | 172 | inferBottomUp = do
to <- R.topsort
props <- R.infer $ inferBottomUpProperties to
return props | 102 | false | true | 0 | 9 | 33 | 64 | 29 | 35 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | List of operations within the stage in dependency order (approximately
-- chronological).
eqsSteps :: Lens' ExplainQueryStage [ExplainQueryStep]
eqsSteps
= lens _eqsSteps (\ s a -> s{_eqsSteps = a}) .
_Default
. _Coerce | 238 | eqsSteps :: Lens' ExplainQueryStage [ExplainQueryStep]
eqsSteps
= lens _eqsSteps (\ s a -> s{_eqsSteps = a}) .
_Default
. _Coerce | 143 | eqsSteps
= lens _eqsSteps (\ s a -> s{_eqsSteps = a}) .
_Default
. _Coerce | 88 | true | true | 0 | 11 | 47 | 54 | 29 | 25 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | vecElemProjectCast _ WordVec W64 = Nothing | 49 | vecElemProjectCast _ WordVec W64 = Nothing | 49 | vecElemProjectCast _ WordVec W64 = Nothing | 49 | false | false | 0 | 5 | 12 | 13 | 6 | 7 | null | null |
waldheinz/ads | src/lib/Freenet/Mime.hs | gpl-3.0 | lookupMime :: DefaultMimes -> Word16 -> Mime
lookupMime dm mid = case Map.lookup mid (unDefMime dm) of
Nothing -> "application/octet-stream"
Just m -> m | 157 | lookupMime :: DefaultMimes -> Word16 -> Mime
lookupMime dm mid = case Map.lookup mid (unDefMime dm) of
Nothing -> "application/octet-stream"
Just m -> m | 157 | lookupMime dm mid = case Map.lookup mid (unDefMime dm) of
Nothing -> "application/octet-stream"
Just m -> m | 112 | false | true | 0 | 8 | 28 | 62 | 28 | 34 | null | null |
pdownen/sequent-core | src/Language/SequentCore/OccurAnal.hs | bsd-3-clause | occAnalTerm :: OccEnv
-> SeqCoreTerm
-> (UsageDetails, -- Gives info only about the "interesting" Ids
SeqCoreTerm)
occAnalTerm _ expr@(Type _) = (emptyDetails, expr) | 222 | occAnalTerm :: OccEnv
-> SeqCoreTerm
-> (UsageDetails, -- Gives info only about the "interesting" Ids
SeqCoreTerm)
occAnalTerm _ expr@(Type _) = (emptyDetails, expr) | 221 | occAnalTerm _ expr@(Type _) = (emptyDetails, expr) | 60 | false | true | 1 | 10 | 79 | 53 | 27 | 26 | null | null |
sol/wai | warp/Network/Wai/Handler/Warp/Types.hs | mit | readSource' :: Source -> IO ByteString
readSource' (Source _ func) = func | 73 | readSource' :: Source -> IO ByteString
readSource' (Source _ func) = func | 73 | readSource' (Source _ func) = func | 34 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
tamarin-prover/tamarin-prover | lib/theory/src/Theory/Text/Parser/Token.hs | gpl-3.0 | -- | The chain operator @~~>@.
opChain :: Parser ()
opChain = symbol_ "~~>" | 75 | opChain :: Parser ()
opChain = symbol_ "~~>" | 44 | opChain = symbol_ "~~>" | 23 | true | true | 0 | 6 | 13 | 20 | 10 | 10 | null | null |
JPMoresmau/HJVM | src/Language/Java/JVM/JavapParser.hs | bsd-3-clause | angles :: ParsecT String u Identity a -> ParsecT String u Identity a
angles = P.angles lexer | 98 | angles :: ParsecT String u Identity a -> ParsecT String u Identity a
angles = P.angles lexer | 98 | angles = P.angles lexer | 28 | false | true | 0 | 6 | 22 | 41 | 19 | 22 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Flow/Sequence/Quantity.hs | bsd-3-clause | formatAssigns ::
(Node.C node, FormatValue a, FormatValue v, Format output) =>
Graph node a v -> [output]
formatAssigns =
EFA.Flow.Sequence.Quantity.foldMap (:[]) (:[]) .
mapGraphWithVar formatAssign formatAssign | 224 | formatAssigns ::
(Node.C node, FormatValue a, FormatValue v, Format output) =>
Graph node a v -> [output]
formatAssigns =
EFA.Flow.Sequence.Quantity.foldMap (:[]) (:[]) .
mapGraphWithVar formatAssign formatAssign | 224 | formatAssigns =
EFA.Flow.Sequence.Quantity.foldMap (:[]) (:[]) .
mapGraphWithVar formatAssign formatAssign | 112 | false | true | 0 | 8 | 37 | 85 | 46 | 39 | null | null |
mikeizbicki/dominion | src/Engine/Ratings.hs | bsd-3-clause | winPercent :: Rating -> Double
winPercent r = fromIntegral (wins r) / fromIntegral (wins r + losses r) | 102 | winPercent :: Rating -> Double
winPercent r = fromIntegral (wins r) / fromIntegral (wins r + losses r) | 102 | winPercent r = fromIntegral (wins r) / fromIntegral (wins r + losses r) | 71 | false | true | 0 | 9 | 17 | 52 | 23 | 29 | null | null |
ribag/ganeti-experiments | test/hs/Test/Ganeti/OpCodes.hs | gpl-2.0 | case_py_compat_fields :: HUnit.Assertion
case_py_compat_fields = do
let hs_fields = sort $ map (\op_id -> (op_id, OpCodes.allOpFields op_id))
OpCodes.allOpIDs
py_stdout <-
runPython "from ganeti import opcodes\n\
\import sys\n\
\from ganeti import serializ... | 1,458 | case_py_compat_fields :: HUnit.Assertion
case_py_compat_fields = do
let hs_fields = sort $ map (\op_id -> (op_id, OpCodes.allOpFields op_id))
OpCodes.allOpIDs
py_stdout <-
runPython "from ganeti import opcodes\n\
\import sys\n\
\from ganeti import serializ... | 1,458 | case_py_compat_fields = do
let hs_fields = sort $ map (\op_id -> (op_id, OpCodes.allOpFields op_id))
OpCodes.allOpIDs
py_stdout <-
runPython "from ganeti import opcodes\n\
\import sys\n\
\from ganeti import serializer\n\
\fields = [(k, sorte... | 1,417 | false | true | 0 | 16 | 454 | 288 | 143 | 145 | null | null |
solvery/lang-features | haskell/list_1.hs | gpl-2.0 | -- ' !! ++
main = do
let s = [] :: [String]
putStrLn $ "emp: " ++ show s
let s' = ["a", "b", "c"]
putStrLn $ "set: " ++ show s'
putStrLn $ "get: " ++ s' !! 2
putStrLn $ "len: " ++ show (length s')
let s2 = s' ++ ["d"]
let s3 = s2 ++ ["d", "f"]
putStrLn $ "apd: " ++ show s3
le... | 697 | main = do
let s = [] :: [String]
putStrLn $ "emp: " ++ show s
let s' = ["a", "b", "c"]
putStrLn $ "set: " ++ show s'
putStrLn $ "get: " ++ s' !! 2
putStrLn $ "len: " ++ show (length s')
let s2 = s' ++ ["d"]
let s3 = s2 ++ ["d", "f"]
putStrLn $ "apd: " ++ show s3
let c = s3
... | 685 | main = do
let s = [] :: [String]
putStrLn $ "emp: " ++ show s
let s' = ["a", "b", "c"]
putStrLn $ "set: " ++ show s'
putStrLn $ "get: " ++ s' !! 2
putStrLn $ "len: " ++ show (length s')
let s2 = s' ++ ["d"]
let s3 = s2 ++ ["d", "f"]
putStrLn $ "apd: " ++ show s3
let c = s3
... | 685 | true | false | 1 | 15 | 249 | 365 | 171 | 194 | null | null |
johnjcamilleri/fst | FST/TransducerInterface.hs | bsd-3-clause | -- | Return the number of states in a transducer
numberOfStates :: Ord a => Transducer a -> Int
numberOfStates = length . states | 128 | numberOfStates :: Ord a => Transducer a -> Int
numberOfStates = length . states | 79 | numberOfStates = length . states | 32 | true | true | 1 | 8 | 23 | 38 | 16 | 22 | null | null |
agocorona/MFlow | geraldus.hs | bsd-3-clause | htmlContents User = h1 "??? ???????" | 42 | htmlContents User = h1 "??? ???????" | 42 | htmlContents User = h1 "??? ???????" | 42 | false | false | 0 | 5 | 11 | 13 | 5 | 8 | null | null |
FPtje/LuaAnalysis | analysis/src/SignAnalysis.hs | lgpl-2.1 | sConsistent :: EmbellishedSign -> EmbellishedSign -> EdgeLabel -> Bool
sConsistent x y l = all M.null $ map snd $ M.toList $ M.unionWith (\a b -> if signConsist a b l then M.empty else M.union a b) x y | 201 | sConsistent :: EmbellishedSign -> EmbellishedSign -> EdgeLabel -> Bool
sConsistent x y l = all M.null $ map snd $ M.toList $ M.unionWith (\a b -> if signConsist a b l then M.empty else M.union a b) x y | 201 | sConsistent x y l = all M.null $ map snd $ M.toList $ M.unionWith (\a b -> if signConsist a b l then M.empty else M.union a b) x y | 130 | false | true | 0 | 11 | 38 | 100 | 48 | 52 | null | null |
mcschroeder/ghc | compiler/types/Type.hs | bsd-3-clause | binderVar e (Anon t) = pprPanic ("binderVar (" ++ e ++ ")") (ppr t) | 70 | binderVar e (Anon t) = pprPanic ("binderVar (" ++ e ++ ")") (ppr t) | 70 | binderVar e (Anon t) = pprPanic ("binderVar (" ++ e ++ ")") (ppr t) | 70 | false | false | 0 | 8 | 16 | 41 | 19 | 22 | null | null |
elben/typing-haskell-in-haskell | TypingHaskellInHaskell.hs | bsd-3-clause | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 292 | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 292 | tiPat (PCon (i:>:sc) pats) = do (ps,as,ts) <- tiPats pats
t' <- newTVar Star
(qs :=> t) <- freshInst sc
unify t (foldr fn t' ts)
return (ps++qs, as, t') | 292 | false | false | 0 | 9 | 169 | 108 | 52 | 56 | null | null |
lcycon/hs-dson | Data/DSON/Parse.hs | gpl-3.0 | topLevel :: Parser DSON
topLevel = try objectP <|> arrayP | 57 | topLevel :: Parser DSON
topLevel = try objectP <|> arrayP | 57 | topLevel = try objectP <|> arrayP | 33 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
TheBB/hess | src/Game/Magic.hs | mit | magicsR = UV.fromList MT.magicsR | 34 | magicsR = UV.fromList MT.magicsR | 34 | magicsR = UV.fromList MT.magicsR | 34 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
phischu/fragnix | builtins/base/GHC.ForeignPtr.hs | bsd-3-clause | newConcForeignPtr :: Ptr a -> IO () -> IO (ForeignPtr a)
--
-- ^Turns a plain memory reference into a foreign object by
-- associating a finalizer - given by the monadic operation - with the
-- reference. The storage manager will start the finalizer, in a
-- separate thread, some time after the last reference to the
-... | 1,002 | newConcForeignPtr :: Ptr a -> IO () -> IO (ForeignPtr a)
newConcForeignPtr p finalizer
= do fObj <- newForeignPtr_ p
addForeignPtrConcFinalizer fObj finalizer
return fObj | 186 | newConcForeignPtr p finalizer
= do fObj <- newForeignPtr_ p
addForeignPtrConcFinalizer fObj finalizer
return fObj | 129 | true | true | 0 | 10 | 185 | 86 | 45 | 41 | null | null |
dpwright/igo | src/Game/Go/Simple.hs | bsd-3-clause | -- | Check the legality of a move.
isLegal :: Player p => Game p -> p -> (Int, Int) -> Bool
isLegal g p = G.isLegal g p . tupleToRepaCoords | 139 | isLegal :: Player p => Game p -> p -> (Int, Int) -> Bool
isLegal g p = G.isLegal g p . tupleToRepaCoords | 104 | isLegal g p = G.isLegal g p . tupleToRepaCoords | 47 | true | true | 0 | 10 | 30 | 62 | 29 | 33 | null | null |
krapsh/kraps-haskell | src/Spark/Core/StructuresInternal.hs | apache-2.0 | headFieldPath :: FieldPath -> Maybe FieldName
headFieldPath (FieldPath v) | V.null v = Nothing | 94 | headFieldPath :: FieldPath -> Maybe FieldName
headFieldPath (FieldPath v) | V.null v = Nothing | 94 | headFieldPath (FieldPath v) | V.null v = Nothing | 48 | false | true | 0 | 9 | 13 | 38 | 17 | 21 | null | null |
onponomarev/ganeti | src/Ganeti/JQueue.hs | bsd-2-clause | -- | Waits for a job ordered to cancel to react, and returns whether it was
-- canceled, and a user-intended description of the reason.
waitForJobCancelation :: JobId -> Int -> ResultG (Bool, String)
waitForJobCancelation jid tmout = do
qDir <- liftIO queueDir
let jobfile = liveJobFile qDir jid
load = liftM f... | 1,238 | waitForJobCancelation :: JobId -> Int -> ResultG (Bool, String)
waitForJobCancelation jid tmout = do
qDir <- liftIO queueDir
let jobfile = liveJobFile qDir jid
load = liftM fst <$> loadJobFromDisk qDir False jid
finalizedR = genericResult (const False) jobFinalized
jobR <- liftIO $ watchFileBy jobfile... | 1,102 | waitForJobCancelation jid tmout = do
qDir <- liftIO queueDir
let jobfile = liveJobFile qDir jid
load = liftM fst <$> loadJobFromDisk qDir False jid
finalizedR = genericResult (const False) jobFinalized
jobR <- liftIO $ watchFileBy jobfile tmout finalizedR load
case calcJobStatus <$> jobR of
Ok s... | 1,038 | true | true | 0 | 14 | 369 | 247 | 119 | 128 | null | null |
grwlf/vindinium-bot | src/Client.hs | mit | boardPositions Board{..} = [ (Pos x y) | x <- [0.._bo_size-1], y <- [0.._bo_size-1]] | 84 | boardPositions Board{..} = [ (Pos x y) | x <- [0.._bo_size-1], y <- [0.._bo_size-1]] | 84 | boardPositions Board{..} = [ (Pos x y) | x <- [0.._bo_size-1], y <- [0.._bo_size-1]] | 84 | false | false | 0 | 9 | 13 | 61 | 31 | 30 | null | null |
sol/pandoc | src/Text/Pandoc/Writers/Textile.hs | gpl-2.0 | blockToTextile _ HorizontalRule = return "<hr />\n" | 51 | blockToTextile _ HorizontalRule = return "<hr />\n" | 51 | blockToTextile _ HorizontalRule = return "<hr />\n" | 51 | false | false | 1 | 5 | 6 | 15 | 6 | 9 | null | null |
haya14busa/errorformat | fmts/testdata/resources/haskell/hlint/Add.hs | mit | add :: Integer -> Integer -> Integer
add (x) y = x + y | 54 | add :: Integer -> Integer -> Integer
add (x) y = x + y | 54 | add (x) y = x + y | 17 | false | true | 0 | 9 | 13 | 37 | 17 | 20 | null | null |
sphynx/turnir | src/TurnirShell.hs | bsd-3-clause | -- run main shell
run :: IO ()
run = do
runShell mkShellDescr haskelineBackend (ShellState [] 0 [])
return () | 117 | run :: IO ()
run = do
runShell mkShellDescr haskelineBackend (ShellState [] 0 [])
return () | 99 | run = do
runShell mkShellDescr haskelineBackend (ShellState [] 0 [])
return () | 86 | true | true | 0 | 11 | 27 | 55 | 24 | 31 | null | null |
kosmikus/getopt-generics | src/WithCli/HasArguments.hs | bsd-3-clause | noSelectorsParser :: All HasArguments xs =>
Modifiers -> Shape xs -> Result (Parser Unnormalized (NP I xs))
noSelectorsParser modifiers = \ case
ShapeNil -> return $ emptyParser Nil
ShapeCons rest ->
fmap (fmap (\ (a, r) -> a :* r)) $
combine (fmap (fmap I) $ (argumentsParser modifiers Nothing)) (noSel... | 348 | noSelectorsParser :: All HasArguments xs =>
Modifiers -> Shape xs -> Result (Parser Unnormalized (NP I xs))
noSelectorsParser modifiers = \ case
ShapeNil -> return $ emptyParser Nil
ShapeCons rest ->
fmap (fmap (\ (a, r) -> a :* r)) $
combine (fmap (fmap I) $ (argumentsParser modifiers Nothing)) (noSel... | 348 | noSelectorsParser modifiers = \ case
ShapeNil -> return $ emptyParser Nil
ShapeCons rest ->
fmap (fmap (\ (a, r) -> a :* r)) $
combine (fmap (fmap I) $ (argumentsParser modifiers Nothing)) (noSelectorsParser modifiers rest) | 238 | false | true | 6 | 12 | 68 | 147 | 71 | 76 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getPartsResourceHarvestersStreamReq :: KRPCHS.SpaceCenter.Parts -> KRPCStreamReq ([KRPCHS.SpaceCenter.ResourceHarvester])
getPartsResourceHarvestersStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Parts_get_ResourceHarvesters" [makeArgument 0 thisArg]
in makeStream req | 286 | getPartsResourceHarvestersStreamReq :: KRPCHS.SpaceCenter.Parts -> KRPCStreamReq ([KRPCHS.SpaceCenter.ResourceHarvester])
getPartsResourceHarvestersStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Parts_get_ResourceHarvesters" [makeArgument 0 thisArg]
in makeStream req | 286 | getPartsResourceHarvestersStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Parts_get_ResourceHarvesters" [makeArgument 0 thisArg]
in makeStream req | 164 | false | true | 0 | 11 | 29 | 62 | 31 | 31 | null | null |
fpco/stackage-server | src/Handler/MirrorStatus.hs | mit | getLastModifiedGit :: Text -- ^ org
-> Text -- ^ repo
-> Text -- ^ ref
-> IO (Text, UTCTime)
getLastModifiedGit org repo ref = do
req <- parseUrlThrow $ unpack url
res <- httpJSON $ addRequestHeader "User-Agent" "Stackage Server" req
dateT <- lookupJ ... | 740 | getLastModifiedGit :: Text -- ^ org
-> Text -- ^ repo
-> Text -- ^ ref
-> IO (Text, UTCTime)
getLastModifiedGit org repo ref = do
req <- parseUrlThrow $ unpack url
res <- httpJSON $ addRequestHeader "User-Agent" "Stackage Server" req
dateT <- lookupJ ... | 740 | getLastModifiedGit org repo ref = do
req <- parseUrlThrow $ unpack url
res <- httpJSON $ addRequestHeader "User-Agent" "Stackage Server" req
dateT <- lookupJ "commit" (getResponseBody res)
>>= lookupJ "author"
>>= lookupJ "date"
>>= textJ
date <- parseTimeM
True
... | 590 | false | true | 0 | 13 | 283 | 185 | 93 | 92 | null | null |
YoEight/rakhana | Data/Rakhana/Tape.hs | bsd-3-clause | --------------------------------------------------------------------------------
driveGetSeek :: Monad m => Drive m Integer
driveGetSeek
= do RSeek i <- request GetSeek
return i
-------------------------------------------------------------------------------- | 272 | driveGetSeek :: Monad m => Drive m Integer
driveGetSeek
= do RSeek i <- request GetSeek
return i
-------------------------------------------------------------------------------- | 191 | driveGetSeek
= do RSeek i <- request GetSeek
return i
-------------------------------------------------------------------------------- | 148 | true | true | 0 | 8 | 33 | 46 | 20 | 26 | null | null |
frp-arduino/frp-arduino | src/Arduino/Nano.hs | gpl-3.0 | a1 :: AnalogInput
a1 = AnalogInput "a1" 1 | 41 | a1 :: AnalogInput
a1 = AnalogInput "a1" 1 | 41 | a1 = AnalogInput "a1" 1 | 23 | false | true | 0 | 6 | 7 | 24 | 9 | 15 | null | null |
kmate/raw-feldspar | src/Feldspar/Optimize.hs | bsd-3-clause | simplifyUp (SymP _ Or :$ LitP t False :$ b) = b | 47 | simplifyUp (SymP _ Or :$ LitP t False :$ b) = b | 47 | simplifyUp (SymP _ Or :$ LitP t False :$ b) = b | 47 | false | false | 0 | 9 | 11 | 30 | 14 | 16 | null | null |
GaloisInc/ivory | ivory-hw/src/Ivory/HW/IOArea.hs | bsd-3-clause | -- | "addrInBounds addr size area" returns True if the address range
-- "[addr, addr + size)" lies within the bounds of "area".
addrInBounds :: Integer -> Integer -> IOArea -> Bool
addrInBounds addr size (IOArea start end) =
(size >= 0) && (addr >= start) && (addr + size <= end) | 281 | addrInBounds :: Integer -> Integer -> IOArea -> Bool
addrInBounds addr size (IOArea start end) =
(size >= 0) && (addr >= start) && (addr + size <= end) | 153 | addrInBounds addr size (IOArea start end) =
(size >= 0) && (addr >= start) && (addr + size <= end) | 100 | true | true | 0 | 8 | 53 | 73 | 39 | 34 | null | null |
gbwey/persistentold | persistent-postgresql/Database/Persist/Postgresql.hs | mit | showSqlType SqlDayTimeZoned = "TIMESTAMP WITH TIME ZONE" | 56 | showSqlType SqlDayTimeZoned = "TIMESTAMP WITH TIME ZONE" | 56 | showSqlType SqlDayTimeZoned = "TIMESTAMP WITH TIME ZONE" | 56 | false | false | 1 | 5 | 6 | 13 | 4 | 9 | null | null |
sampou-org/pfad | Code/Code02.hs | bsd-3-clause | tcount3 :: Ord a => a -> [(a,Int)] -> Int
tcount3 z tys = length (dropWhile ((z >=) . fst) tys) | 106 | tcount3 :: Ord a => a -> [(a,Int)] -> Int
tcount3 z tys = length (dropWhile ((z >=) . fst) tys) | 106 | tcount3 z tys = length (dropWhile ((z >=) . fst) tys) | 56 | false | true | 0 | 10 | 31 | 68 | 34 | 34 | null | null |
imuli/gitit | Network/Gitit/Export.hs | gpl-2.0 | respondDocx :: String -> Pandoc -> Handler
respondDocx = respondX "native"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"docx" writeDocx defaultRespOptions | 188 | respondDocx :: String -> Pandoc -> Handler
respondDocx = respondX "native"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"docx" writeDocx defaultRespOptions | 188 | respondDocx = respondX "native"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"docx" writeDocx defaultRespOptions | 145 | false | true | 0 | 6 | 18 | 33 | 15 | 18 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/utils/Pretty.hs | bsd-3-clause | -- Hence the text "" in the spec
nilBeside g (Nest _ p) = nilBeside g p | 71 | nilBeside g (Nest _ p) = nilBeside g p | 38 | nilBeside g (Nest _ p) = nilBeside g p | 38 | true | false | 0 | 7 | 16 | 25 | 12 | 13 | null | null |
diku-kmc/repg | src/KMC/Kleenex/ApproximationMetrics.hs | mit | rewriteRead Hamming Explicit (rid,rid',_,frid') rt@(RRead rs _) (AS n m c) =
AS (HM.union newElems n) m $ c+8
where
newElems = HM.fromList
[ (rid, RSum [c, c+2])
, (c , RSeq [c+1, rid'])
, (c+1, rt)
, (c+2, RSeq [c+3, c+4])
, (c+3, RRead RS.universe True)
, (c+4, RSeq [c+5, ... | 448 | rewriteRead Hamming Explicit (rid,rid',_,frid') rt@(RRead rs _) (AS n m c) =
AS (HM.union newElems n) m $ c+8
where
newElems = HM.fromList
[ (rid, RSum [c, c+2])
, (c , RSeq [c+1, rid'])
, (c+1, rt)
, (c+2, RSeq [c+3, c+4])
, (c+3, RRead RS.universe True)
, (c+4, RSeq [c+5, ... | 448 | rewriteRead Hamming Explicit (rid,rid',_,frid') rt@(RRead rs _) (AS n m c) =
AS (HM.union newElems n) m $ c+8
where
newElems = HM.fromList
[ (rid, RSum [c, c+2])
, (c , RSeq [c+1, rid'])
, (c+1, rt)
, (c+2, RSeq [c+3, c+4])
, (c+3, RRead RS.universe True)
, (c+4, RSeq [c+5, ... | 448 | false | false | 0 | 13 | 133 | 302 | 167 | 135 | null | null |
brendanhay/gogol | gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Run.hs | mpl-2.0 | -- | Multipart request metadata.
tjrPayload :: Lens' TransferJobsRun RunTransferJobRequest
tjrPayload
= lens _tjrPayload (\ s a -> s{_tjrPayload = a}) | 152 | tjrPayload :: Lens' TransferJobsRun RunTransferJobRequest
tjrPayload
= lens _tjrPayload (\ s a -> s{_tjrPayload = a}) | 119 | tjrPayload
= lens _tjrPayload (\ s a -> s{_tjrPayload = a}) | 61 | true | true | 1 | 9 | 22 | 46 | 22 | 24 | null | null |
DaMSL/K3 | src/Language/K3/Interpreter/Data/Instances.hs | apache-2.0 | showListParens :: ShowPC a => PrintConfig -> [a] -> String
showListParens pc = showListPC pc printParens ", " | 109 | showListParens :: ShowPC a => PrintConfig -> [a] -> String
showListParens pc = showListPC pc printParens ", " | 109 | showListParens pc = showListPC pc printParens ", " | 50 | false | true | 0 | 8 | 17 | 39 | 19 | 20 | null | null |
ruudkoot/odin | src/Parser.hs | gpl-3.0 | runParser :: Parser a -> ByteString -> a
runParser (Parser p) = fst . p | 71 | runParser :: Parser a -> ByteString -> a
runParser (Parser p) = fst . p | 71 | runParser (Parser p) = fst . p | 30 | false | true | 0 | 7 | 14 | 35 | 17 | 18 | null | null |
madmann91/Ape | src/Ape/Type.hs | lgpl-3.0 | bitCount (I8 n) = n * 8 | 24 | bitCount (I8 n) = n * 8 | 24 | bitCount (I8 n) = n * 8 | 24 | false | false | 0 | 7 | 7 | 19 | 9 | 10 | null | null |
AmpersandTarski/ampersand | src/Ampersand/FSpec/ToFSpec/NormalForms.hs | gpl-3.0 | rTermListForSets :: RTerm -> [RTerm]
rTermListForSets (RIsc s) = Set.toList s | 77 | rTermListForSets :: RTerm -> [RTerm]
rTermListForSets (RIsc s) = Set.toList s | 77 | rTermListForSets (RIsc s) = Set.toList s | 40 | false | true | 0 | 7 | 10 | 32 | 16 | 16 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Perseus/TeiEpidocHeaderParser.hs | mit | refsDeclState :: NodeParser [RefState]
refsDeclState = Xml.elementNS (teiNS "refsDecl") (many refState) | 103 | refsDeclState :: NodeParser [RefState]
refsDeclState = Xml.elementNS (teiNS "refsDecl") (many refState) | 103 | refsDeclState = Xml.elementNS (teiNS "refsDecl") (many refState) | 64 | false | true | 0 | 7 | 10 | 36 | 18 | 18 | null | null |
andir/ganeti | src/Ganeti/Query/Common.hs | bsd-2-clause | vTypeToQFT VTypeMaybeString = QFTOther | 38 | vTypeToQFT VTypeMaybeString = QFTOther | 38 | vTypeToQFT VTypeMaybeString = QFTOther | 38 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | newStablePtr_RDR :: RdrName
newStablePtr_RDR = nameRdrName newStablePtrName | 82 | newStablePtr_RDR :: RdrName
newStablePtr_RDR = nameRdrName newStablePtrName | 82 | newStablePtr_RDR = nameRdrName newStablePtrName | 54 | false | true | 0 | 5 | 13 | 14 | 7 | 7 | null | null |
alphalambda/codeworld | codeworld-api/src/CodeWorld/Color.hs | apache-2.0 | wrapNum :: Double -> Double -> Double
wrapNum lim x = x - fromInteger (floor (x / lim)) * lim | 93 | wrapNum :: Double -> Double -> Double
wrapNum lim x = x - fromInteger (floor (x / lim)) * lim | 93 | wrapNum lim x = x - fromInteger (floor (x / lim)) * lim | 55 | false | true | 0 | 11 | 19 | 48 | 24 | 24 | null | null |
forste/haReFork | refactorer/RefacFunDef.hs | bsd-3-clause | checkInPat (pat1@(Pat (HsPWildCard)):pats) exp
= checkInPat pats exp | 70 | checkInPat (pat1@(Pat (HsPWildCard)):pats) exp
= checkInPat pats exp | 70 | checkInPat (pat1@(Pat (HsPWildCard)):pats) exp
= checkInPat pats exp | 70 | false | false | 0 | 11 | 9 | 35 | 18 | 17 | null | null |
Minoru/hakyll | src/Hakyll/Web/Html.hs | bsd-3-clause | stripTags (x : xs) = x : stripTags xs | 39 | stripTags (x : xs) = x : stripTags xs | 39 | stripTags (x : xs) = x : stripTags xs | 39 | false | false | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
Warbo/mlspec-helper | test/Main.hs | gpl-3.0 | constraintsMonomorphised = True
where typeCheck = f undefined undefined
f = $(mono 'mappend) | 102 | constraintsMonomorphised = True
where typeCheck = f undefined undefined
f = $(mono 'mappend) | 102 | constraintsMonomorphised = True
where typeCheck = f undefined undefined
f = $(mono 'mappend) | 102 | false | false | 2 | 7 | 22 | 33 | 17 | 16 | null | null |
lessandro/contas | src/Contas/Httpd.hs | mit | -- IOError handler
errorHandler :: IOError -> IO String
errorHandler = const $ return "" | 88 | errorHandler :: IOError -> IO String
errorHandler = const $ return "" | 69 | errorHandler = const $ return "" | 32 | true | true | 0 | 6 | 14 | 26 | 13 | 13 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/SWHS/Body.hs | bsd-2-clause | ------------------------------
-- Data Constraint: Table 1 --
------------------------------
------------------------------
-- Data Constraint: Table 2 --
------------------------------
------------------------------
-- Data Constraint: Table 3 --
------------------------------
outputConstraints :: [ConstrConcept]
o... | 367 | outputConstraints :: [ConstrConcept]
outputConstraints = [tempW, tempPCM, watE, pcmE] | 85 | outputConstraints = [tempW, tempPCM, watE, pcmE] | 48 | true | true | 0 | 5 | 35 | 35 | 25 | 10 | null | null |
unitb/logic-function-tables | src/UnitB/FunctionTable/Spec/Doc.hs | bsd-3-clause | syntax :: QuasiQuoter
syntax = QuasiQuoter
{ quoteExp = quoteSyntax
, quoteDec = undefined
, quoteType = undefined
, quotePat = undefined } | 165 | syntax :: QuasiQuoter
syntax = QuasiQuoter
{ quoteExp = quoteSyntax
, quoteDec = undefined
, quoteType = undefined
, quotePat = undefined } | 164 | syntax = QuasiQuoter
{ quoteExp = quoteSyntax
, quoteDec = undefined
, quoteType = undefined
, quotePat = undefined } | 142 | false | true | 0 | 7 | 48 | 47 | 25 | 22 | null | null |
lambdageek/insomnia | src/Insomnia/Unify.hs | bsd-3-clause | injectUVar :: Partial w u => UVar w u -> u
injectUVar v = v^.re _UVar | 69 | injectUVar :: Partial w u => UVar w u -> u
injectUVar v = v^.re _UVar | 69 | injectUVar v = v^.re _UVar | 26 | false | true | 0 | 7 | 15 | 39 | 18 | 21 | null | null |
GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs | bsd-3-clause | appendArgLayoutPerms ctx1 ctx2 p (ALPerm_Exists mb_q) =
ALPerm_Exists $ fmap (\q -> appendArgLayoutPerms ctx1 ctx2 p q) mb_q | 126 | appendArgLayoutPerms ctx1 ctx2 p (ALPerm_Exists mb_q) =
ALPerm_Exists $ fmap (\q -> appendArgLayoutPerms ctx1 ctx2 p q) mb_q | 126 | appendArgLayoutPerms ctx1 ctx2 p (ALPerm_Exists mb_q) =
ALPerm_Exists $ fmap (\q -> appendArgLayoutPerms ctx1 ctx2 p q) mb_q | 126 | false | false | 0 | 9 | 19 | 47 | 23 | 24 | null | null |
yaxu/hstexture | Texture/UI.hs | gpl-3.0 | updateCursor :: TWord -> Scene -> Scene
updateCursor w scene = scene {cursor = topRight w} | 90 | updateCursor :: TWord -> Scene -> Scene
updateCursor w scene = scene {cursor = topRight w} | 90 | updateCursor w scene = scene {cursor = topRight w} | 50 | false | true | 0 | 7 | 15 | 35 | 18 | 17 | null | null |
begriffs/postgrest | src/PostgREST/OpenAPI.hs | mit | encodeOpenAPI :: [ProcDescription] -> [(Table, [Column], [Text])] -> (Text, Text, Integer, Text) -> Maybe Text -> [PrimaryKey] -> LByteString
encodeOpenAPI pds ti uri sd pks = encode $ postgrestSpec pds ti uri sd pks | 217 | encodeOpenAPI :: [ProcDescription] -> [(Table, [Column], [Text])] -> (Text, Text, Integer, Text) -> Maybe Text -> [PrimaryKey] -> LByteString
encodeOpenAPI pds ti uri sd pks = encode $ postgrestSpec pds ti uri sd pks | 217 | encodeOpenAPI pds ti uri sd pks = encode $ postgrestSpec pds ti uri sd pks | 74 | false | true | 0 | 11 | 34 | 101 | 54 | 47 | null | null |
deyaaeldeen/nAnnotizer | test/Main.hs | gpl-3.0 | test_sampleOne :: [Ann () Type] -> Int -> IO ([[Ann () Type]], [Interval Int])
test_sampleOne ts nb =
let ts' = map annotateTypeWithCount ts
p = getSum $ sum $ map getSnd ts'
is = genIntervals (fromIntegral nb) $ fromIntegral p/fromIntegral nb
seeds = map seedTFGen $ zipWith4 (,,,) [0..] [11..] [22.... | 405 | test_sampleOne :: [Ann () Type] -> Int -> IO ([[Ann () Type]], [Interval Int])
test_sampleOne ts nb =
let ts' = map annotateTypeWithCount ts
p = getSum $ sum $ map getSnd ts'
is = genIntervals (fromIntegral nb) $ fromIntegral p/fromIntegral nb
seeds = map seedTFGen $ zipWith4 (,,,) [0..] [11..] [22.... | 405 | test_sampleOne ts nb =
let ts' = map annotateTypeWithCount ts
p = getSum $ sum $ map getSnd ts'
is = genIntervals (fromIntegral nb) $ fromIntegral p/fromIntegral nb
seeds = map seedTFGen $ zipWith4 (,,,) [0..] [11..] [22..] [3..]
in do z <- zipWithM (sampleOneIO (p, ts')) is seeds
return (... | 326 | false | true | 0 | 14 | 95 | 207 | 104 | 103 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeDBClusterParameterGroups.hs | mpl-2.0 | -- | An optional pagination token provided by a previous
-- 'DescribeDBClusterParameterGroups' request. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by 'MaxRecords'.
ddcpgrsMarker :: Lens' DescribeDBClusterParameterGroupsResponse (Maybe Text)
ddcp... | 384 | ddcpgrsMarker :: Lens' DescribeDBClusterParameterGroupsResponse (Maybe Text)
ddcpgrsMarker = lens _ddcpgrsMarker (\ s a -> s{_ddcpgrsMarker = a}) | 145 | ddcpgrsMarker = lens _ddcpgrsMarker (\ s a -> s{_ddcpgrsMarker = a}) | 68 | true | true | 1 | 9 | 51 | 52 | 28 | 24 | null | null |
martinnj/PMPH2015 | Assignment1/Task2+3/PrimesQuicksort.hs | mit | :: Int -> [Int]
primesOpt n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesOpt sqrtN
composite = map (\ p -> let m = (n `div` p)
in map (\ j -> j * p ) (drop 2 (iota (m+1)))
) sq... | 783 | :: Int -> [Int]
primesOpt n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesOpt sqrtN
composite = map (\ p -> let m = (n `div` p)
in map (\ j -> j * p ) (drop 2 (iota (m+1)))
) sq... | 783 | :: Int -> [Int]
primesOpt n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesOpt sqrtN
composite = map (\ p -> let m = (n `div` p)
in map (\ j -> j * p ) (drop 2 (iota (m+1)))
) sq... | 783 | false | false | 0 | 21 | 316 | 321 | 166 | 155 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionInstanceGroups/List.hs | mpl-2.0 | -- | Project ID for this request.
riglProject :: Lens' RegionInstanceGroupsList Text
riglProject
= lens _riglProject (\ s a -> s{_riglProject = a}) | 149 | riglProject :: Lens' RegionInstanceGroupsList Text
riglProject
= lens _riglProject (\ s a -> s{_riglProject = a}) | 115 | riglProject
= lens _riglProject (\ s a -> s{_riglProject = a}) | 64 | true | true | 0 | 9 | 24 | 42 | 22 | 20 | null | null |
urbanslug/ghc | testsuite/tests/perf/compiler/T783.hs | bsd-3-clause | foo x | x == 192 = 192 | 22 | foo x | x == 192 = 192 | 22 | foo x | x == 192 = 192 | 22 | false | false | 0 | 8 | 7 | 23 | 9 | 14 | null | null |
Shimuuar/protobuf | Data/Protobuf/Serialize/VarInt.hs | bsd-3-clause | -- | Decode zigzag encoded 32-bit integer.
getZigzag32 :: Get Int32
getZigzag32 = dec32 <$> getVarWord32 | 104 | getZigzag32 :: Get Int32
getZigzag32 = dec32 <$> getVarWord32 | 61 | getZigzag32 = dec32 <$> getVarWord32 | 36 | true | true | 0 | 5 | 15 | 19 | 10 | 9 | null | null |
michalkonecny/aern | aern-order/tools/BenchCsvToGnuplot.hs | bsd-3-clause | usageAndQuit =
do
progName <- getProgName
putStrLn $ "usage: " ++ progName ++ " <file1>.csv [<file2>.csv ...]"
exitFailure | 142 | usageAndQuit =
do
progName <- getProgName
putStrLn $ "usage: " ++ progName ++ " <file1>.csv [<file2>.csv ...]"
exitFailure | 142 | usageAndQuit =
do
progName <- getProgName
putStrLn $ "usage: " ++ progName ++ " <file1>.csv [<file2>.csv ...]"
exitFailure | 142 | false | false | 0 | 9 | 37 | 31 | 14 | 17 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | The return policy ID. This should be set only if the method is
-- \`delete\` or \`get\`.
ret1ReturnPolicyId :: Lens' ReturnpolicyCustomBatchRequestEntry (Maybe Text)
ret1ReturnPolicyId
= lens _ret1ReturnPolicyId
(\ s a -> s{_ret1ReturnPolicyId = a}) | 262 | ret1ReturnPolicyId :: Lens' ReturnpolicyCustomBatchRequestEntry (Maybe Text)
ret1ReturnPolicyId
= lens _ret1ReturnPolicyId
(\ s a -> s{_ret1ReturnPolicyId = a}) | 168 | ret1ReturnPolicyId
= lens _ret1ReturnPolicyId
(\ s a -> s{_ret1ReturnPolicyId = a}) | 91 | true | true | 0 | 9 | 43 | 49 | 26 | 23 | null | null |
FranklinChen/maam | src/FP/Pretty.hs | bsd-3-clause | noFormatOut (MFApply (_, o)) = noFormatOut o | 44 | noFormatOut (MFApply (_, o)) = noFormatOut o | 44 | noFormatOut (MFApply (_, o)) = noFormatOut o | 44 | false | false | 0 | 7 | 6 | 25 | 12 | 13 | null | null |
keera-studios/pang-a-lambda | src/Game/Physics/Collisions.hs | gpl-3.0 | shapeCollisionPoint (Circle p1 s1) (Rectangle p2 s2) =
velCollitionSide $ fromJust $ responseCircleAABB (p1, s1) (rectangleToCentre (p2, s2)) | 146 | shapeCollisionPoint (Circle p1 s1) (Rectangle p2 s2) =
velCollitionSide $ fromJust $ responseCircleAABB (p1, s1) (rectangleToCentre (p2, s2)) | 146 | shapeCollisionPoint (Circle p1 s1) (Rectangle p2 s2) =
velCollitionSide $ fromJust $ responseCircleAABB (p1, s1) (rectangleToCentre (p2, s2)) | 146 | false | false | 3 | 9 | 22 | 63 | 30 | 33 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Key.hs | bsd-3-clause | keyTranslate "F11" = Fun 11 | 37 | keyTranslate "F11" = Fun 11 | 37 | keyTranslate "F11" = Fun 11 | 37 | false | false | 0 | 5 | 14 | 12 | 5 | 7 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/CodeGen/Flatten.hs | bsd-3-clause | flattenPrimOp t = \_ -> error $ "TODO: flattenPrimOp: " ++ show t | 66 | flattenPrimOp t = \_ -> error $ "TODO: flattenPrimOp: " ++ show t | 66 | flattenPrimOp t = \_ -> error $ "TODO: flattenPrimOp: " ++ show t | 66 | false | false | 0 | 7 | 13 | 25 | 12 | 13 | null | null |
ezyang/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | mkArrayArrayPrimTy :: Type
mkArrayArrayPrimTy = mkTyConTy arrayArrayPrimTyCon | 77 | mkArrayArrayPrimTy :: Type
mkArrayArrayPrimTy = mkTyConTy arrayArrayPrimTyCon | 77 | mkArrayArrayPrimTy = mkTyConTy arrayArrayPrimTyCon | 50 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
mietek/lambda-pi | LambdaArrow.hs | mit | {- Examples
========
>> assume (α :: *) (y :: α)
>> ((λx -> x) :: α -> α) y
y :: α
>> assume (β :: *)
>> ((λx y -> x) :: (β -> β) -> α -> β -> β) (λx -> x) y
λx -> x :: β -> β
-}
id', const' :: TermC
id' = Lam (Inf (Bound 0)) | 260 | id', const' :: TermC
id' = Lam (Inf (Bound 0)) | 49 | id' = Lam (Inf (Bound 0)) | 28 | true | true | 2 | 8 | 99 | 39 | 17 | 22 | null | null |
llllllllll/befunge | Befunge/Doublefunge.hs | gpl-2.0 | incPointerP st@(State {pDir = PLeft}) =
st { pLoc = second (flip (-) 1) $ pLoc st } | 87 | incPointerP st@(State {pDir = PLeft}) =
st { pLoc = second (flip (-) 1) $ pLoc st } | 87 | incPointerP st@(State {pDir = PLeft}) =
st { pLoc = second (flip (-) 1) $ pLoc st } | 87 | false | false | 0 | 10 | 21 | 52 | 28 | 24 | null | null |
mzini/qlogic | Qlogic/Formula.hs | gpl-3.0 | pprintFormula (Ite a b c) = parens $ text "ite" <+> (pprintFormula a $$ pprintFormula b $$ pprintFormula c) | 107 | pprintFormula (Ite a b c) = parens $ text "ite" <+> (pprintFormula a $$ pprintFormula b $$ pprintFormula c) | 107 | pprintFormula (Ite a b c) = parens $ text "ite" <+> (pprintFormula a $$ pprintFormula b $$ pprintFormula c) | 107 | false | false | 0 | 9 | 18 | 50 | 23 | 27 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Interface/AttachInstances.hs | gpl-3.0 | simplify (AppTy t1 t2) = SimpleType s (ts ++ [simplify t2])
where (SimpleType s ts) = simplify t1 | 99 | simplify (AppTy t1 t2) = SimpleType s (ts ++ [simplify t2])
where (SimpleType s ts) = simplify t1 | 99 | simplify (AppTy t1 t2) = SimpleType s (ts ++ [simplify t2])
where (SimpleType s ts) = simplify t1 | 99 | false | false | 0 | 8 | 19 | 57 | 26 | 31 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | confdReqfieldMnodePip :: Int
confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip | 94 | confdReqfieldMnodePip :: Int
confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip | 94 | confdReqfieldMnodePip = Types.confdReqFieldToRaw ReqFieldMNodePip | 65 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
eiji-a/sudoku | src/Sudoku/Solution.hs | bsd-3-clause | solutionX :: Solution -> Maybe Int
solutionX (p, v)
| xy == Nothing = Nothing
| otherwise = Just (fst (fromJust(xy)))
where
xy = posToXy p | 152 | solutionX :: Solution -> Maybe Int
solutionX (p, v)
| xy == Nothing = Nothing
| otherwise = Just (fst (fromJust(xy)))
where
xy = posToXy p | 152 | solutionX (p, v)
| xy == Nothing = Nothing
| otherwise = Just (fst (fromJust(xy)))
where
xy = posToXy p | 117 | false | true | 1 | 10 | 39 | 73 | 36 | 37 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT24.hs | gpl-3.0 | fac (S x) = S x * fac x | 23 | fac (S x) = S x * fac x | 23 | fac (S x) = S x * fac x | 23 | false | false | 0 | 6 | 8 | 26 | 11 | 15 | null | null |
gcampax/ghc | compiler/types/TypeRep.hs | bsd-3-clause | tidyFreeTyVars :: TidyEnv -> TyVarSet -> TidyEnv
-- ^ Add the free 'TyVar's to the env in tidy form,
-- so that we can tidy the type they are free in
tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 265 | tidyFreeTyVars :: TidyEnv -> TyVarSet -> TidyEnv
tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 164 | tidyFreeTyVars (full_occ_env, var_env) tyvars
= fst (tidyOpenTyVars (full_occ_env, var_env) (varSetElems tyvars)) | 115 | true | true | 0 | 9 | 43 | 55 | 30 | 25 | null | null |
urbanslug/ghc | testsuite/tests/simplCore/should_run/T5315.hs | bsd-3-clause | hFrom (Next p) l = case hFromWitness ∷ HFromWitness n l of
HFromNext → hFrom p (hTail l)
_ → undefined | 116 | hFrom (Next p) l = case hFromWitness ∷ HFromWitness n l of
HFromNext → hFrom p (hTail l)
_ → undefined | 116 | hFrom (Next p) l = case hFromWitness ∷ HFromWitness n l of
HFromNext → hFrom p (hTail l)
_ → undefined | 116 | false | false | 3 | 6 | 34 | 49 | 25 | 24 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.