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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rzetterberg/orgmode-sql | test/TestImport.hs | bsd-3-clause | getExample :: FilePath -> IO Text
getExample fname = T.readFile $ "test/examples/" ++ fname | 91 | getExample :: FilePath -> IO Text
getExample fname = T.readFile $ "test/examples/" ++ fname | 91 | getExample fname = T.readFile $ "test/examples/" ++ fname | 57 | false | true | 0 | 7 | 13 | 31 | 15 | 16 | null | null |
chengzh2008/hpffp | src/ch09-List/ownFunctions.hs | bsd-3-clause | myReverse :: [a] -> [a]
myReverse [] = [] | 41 | myReverse :: [a] -> [a]
myReverse [] = [] | 41 | myReverse [] = [] | 17 | false | true | 0 | 6 | 8 | 28 | 15 | 13 | null | null |
acowley/ghc | libraries/base/Control/Exception/Base.hs | bsd-3-clause | typeError s = throw (TypeError (unpackCStringUtf8# s)) | 76 | typeError s = throw (TypeError (unpackCStringUtf8# s)) | 76 | typeError s = throw (TypeError (unpackCStringUtf8# s)) | 76 | false | false | 1 | 9 | 28 | 28 | 11 | 17 | null | null |
rueshyna/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Get.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pmvgUploadProtocol :: Lens' ProjectsModelsVersionsGet (Maybe Text)
pmvgUploadProtocol
= lens _pmvgUploadProtocol
(\ s a -> s{_pmvgUploadProtocol = a}) | 220 | pmvgUploadProtocol :: Lens' ProjectsModelsVersionsGet (Maybe Text)
pmvgUploadProtocol
= lens _pmvgUploadProtocol
(\ s a -> s{_pmvgUploadProtocol = a}) | 158 | pmvgUploadProtocol
= lens _pmvgUploadProtocol
(\ s a -> s{_pmvgUploadProtocol = a}) | 91 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
uuhan/Idris-dev | src/IRTS/JavaScript/AST.hs | bsd-3-clause | jsAst2Text (JsNew fn args) =
T.concat ["new ", jsAst2Text fn, "(", T.intercalate ", " $ map jsAst2Text args, ")"] | 115 | jsAst2Text (JsNew fn args) =
T.concat ["new ", jsAst2Text fn, "(", T.intercalate ", " $ map jsAst2Text args, ")"] | 115 | jsAst2Text (JsNew fn args) =
T.concat ["new ", jsAst2Text fn, "(", T.intercalate ", " $ map jsAst2Text args, ")"] | 115 | false | false | 0 | 9 | 20 | 54 | 27 | 27 | null | null |
kaoskorobase/freesound | src/Sound/Freesound/Search/Filter.hs | bsd-2-clause | -- | File size in bytes.
filesize :: Numerical Integer -> Filters
filesize = fromFilter . F_filesize | 100 | filesize :: Numerical Integer -> Filters
filesize = fromFilter . F_filesize | 75 | filesize = fromFilter . F_filesize | 34 | true | true | 1 | 7 | 16 | 31 | 13 | 18 | null | null |
mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Stream/Monadic.nocpp.hs | bsd-3-clause | unfoldr f = unfoldrM (return . f) | 33 | unfoldr f = unfoldrM (return . f) | 33 | unfoldr f = unfoldrM (return . f) | 33 | false | false | 1 | 7 | 6 | 23 | 9 | 14 | null | null |
TrevorBender/lithp | src/Lisp.hs | gpl-3.0 | throwIOError :: LispError -> IOThrowsError a
throwIOError = liftThrows . throwError | 83 | throwIOError :: LispError -> IOThrowsError a
throwIOError = liftThrows . throwError | 83 | throwIOError = liftThrows . throwError | 38 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
ekmett/reactive | src/Test/Integ.hs | agpl-3.0 | itst b = occs (it b `snapshot_` e') | 35 | itst b = occs (it b `snapshot_` e') | 35 | itst b = occs (it b `snapshot_` e') | 35 | false | false | 1 | 8 | 7 | 27 | 12 | 15 | null | null |
prikhi/hkredmine | src/Web/HTTP/Redmine.hs | gpl-3.0 | getVersion :: VersionId -> Redmine Version
getVersion v = do versions <- getAllVersions
let versionIds = map versionId versions
if v `elem` versionIds
then getEndPoint (GetVersion v) []
... | 419 | getVersion :: VersionId -> Redmine Version
getVersion v = do versions <- getAllVersions
let versionIds = map versionId versions
if v `elem` versionIds
then getEndPoint (GetVersion v) []
... | 419 | getVersion v = do versions <- getAllVersions
let versionIds = map versionId versions
if v `elem` versionIds
then getEndPoint (GetVersion v) []
else redmineLeft "Version does... | 376 | false | true | 0 | 11 | 189 | 80 | 38 | 42 | null | null |
GaloisInc/saw-script | src/SAWScript/Prover/MRSolver/Solver.hs | bsd-3-clause | applyCompFun CompFunReturn t =
return $ CompReturn t | 54 | applyCompFun CompFunReturn t =
return $ CompReturn t | 54 | applyCompFun CompFunReturn t =
return $ CompReturn t | 54 | false | false | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
vincenthz/cryptonite | Crypto/ECC/Simple/Types.hs | bsd-3-clause | typeSEC_p256k1 = CurvePrime $ CurvePrimeParam 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f | 112 | typeSEC_p256k1 = CurvePrime $ CurvePrimeParam 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f | 112 | typeSEC_p256k1 = CurvePrime $ CurvePrimeParam 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f | 112 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
AlexMckey/FP101x-ItFP_Haskell | Sources/LuhnAlgoCheck.hs | cc0-1.0 | -- Checks
checkSumDigits1 = sumDigits [8,14,6,10] == 20 | 55 | checkSumDigits1 = sumDigits [8,14,6,10] == 20 | 45 | checkSumDigits1 = sumDigits [8,14,6,10] == 20 | 45 | true | false | 0 | 7 | 7 | 26 | 15 | 11 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-utils/Utils/Drasil/Misc.hs | bsd-2-clause | --Ideally this would create a reference to the equation too
--Doesn't use equation concept so utils doesn't depend on data
eqN :: Int -> Sentence
eqN n = S "Equation" +:+ sParen (S $ show n) | 190 | eqN :: Int -> Sentence
eqN n = S "Equation" +:+ sParen (S $ show n) | 67 | eqN n = S "Equation" +:+ sParen (S $ show n) | 44 | true | true | 0 | 9 | 35 | 45 | 21 | 24 | null | null |
stefanocerruti/haskell-primer-alpha | src/Playground11.hs | bsd-3-clause | patientInfo' :: PatientName -> Age -> Height -> String
patientInfo' (fname, lname) age height = name ++ " " ++ ageHeight
where name = lname ++ ", " ++ fname
ageHeight = "(" ++ show age ++ "yrs. " ++ show height ++ "in.)" | 239 | patientInfo' :: PatientName -> Age -> Height -> String
patientInfo' (fname, lname) age height = name ++ " " ++ ageHeight
where name = lname ++ ", " ++ fname
ageHeight = "(" ++ show age ++ "yrs. " ++ show height ++ "in.)" | 238 | patientInfo' (fname, lname) age height = name ++ " " ++ ageHeight
where name = lname ++ ", " ++ fname
ageHeight = "(" ++ show age ++ "yrs. " ++ show height ++ "in.)" | 183 | false | true | 1 | 10 | 62 | 89 | 44 | 45 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/OldList.hs | bsd-3-clause | -- | The 'unzip6' function takes a list of six-tuples and returns six
-- lists, analogous to 'unzip'.
unzip6 :: [(a,b,c,d,e,f)] -> ([a],[b],[c],[d],[e],[f])
unzip6 = foldr (\(a,b,c,d,e,f) ~(as,bs,cs,ds,es,fs) ->
(a:as,b:bs,c:cs,d:ds,e:es,f:fs))
... | 372 | unzip6 :: [(a,b,c,d,e,f)] -> ([a],[b],[c],[d],[e],[f])
unzip6 = foldr (\(a,b,c,d,e,f) ~(as,bs,cs,ds,es,fs) ->
(a:as,b:bs,c:cs,d:ds,e:es,f:fs))
([],[],[],[],[],[]) | 270 | unzip6 = foldr (\(a,b,c,d,e,f) ~(as,bs,cs,ds,es,fs) ->
(a:as,b:bs,c:cs,d:ds,e:es,f:fs))
([],[],[],[],[],[]) | 198 | true | true | 0 | 9 | 138 | 198 | 122 | 76 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/RedshiftCluster.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-cluster.html#cfn-redshift-cluster-nodetype
rcNodeType :: Lens' RedshiftCluster (Val Text)
rcNodeType = lens _redshiftClusterNodeType (\s a -> s { _redshiftClusterNodeType = a }) | 266 | rcNodeType :: Lens' RedshiftCluster (Val Text)
rcNodeType = lens _redshiftClusterNodeType (\s a -> s { _redshiftClusterNodeType = a }) | 134 | rcNodeType = lens _redshiftClusterNodeType (\s a -> s { _redshiftClusterNodeType = a }) | 87 | true | true | 1 | 9 | 21 | 51 | 25 | 26 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | 'CreateVolumePermissionModifications' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'cvpmAdd' @::@ ['CreateVolumePermission']
--
-- * 'cvpmRemove' @::@ ['CreateVolumePermission']
--
createVolumePermissionModifications :: CreateVolumePermissionModifications
createVolumePermissio... | 432 | createVolumePermissionModifications :: CreateVolumePermissionModifications
createVolumePermissionModifications = CreateVolumePermissionModifications
{ _cvpmAdd = mempty
, _cvpmRemove = mempty
} | 208 | createVolumePermissionModifications = CreateVolumePermissionModifications
{ _cvpmAdd = mempty
, _cvpmRemove = mempty
} | 133 | true | true | 0 | 7 | 55 | 37 | 24 | 13 | null | null |
spechub/Hets | Taxonomy/OntoParser.hs | gpl-2.0 | comment :: GenParser Char st Char
comment = char '%' >> manyTill anyChar newline >> return '%' | 94 | comment :: GenParser Char st Char
comment = char '%' >> manyTill anyChar newline >> return '%' | 94 | comment = char '%' >> manyTill anyChar newline >> return '%' | 60 | false | true | 0 | 7 | 16 | 37 | 17 | 20 | null | null |
nebuta/dom-selector | examples/example2.hs | bsd-3-clause | test :: Cursor -> Int -> IO ()
test c n = do
let cs = (axes !! n) c
(putStrLn . (++" elements") . show . length) cs
TI.writeFile ("output2."++(show n)++".html") (toHtml cs)
-- Axis is a Cursor -> [Cursor] type. Cursor represents one position in a DOM tree.
-- Axis takes a cursor and returns a traversing result ... | 601 | test :: Cursor -> Int -> IO ()
test c n = do
let cs = (axes !! n) c
(putStrLn . (++" elements") . show . length) cs
TI.writeFile ("output2."++(show n)++".html") (toHtml cs)
-- Axis is a Cursor -> [Cursor] type. Cursor represents one position in a DOM tree.
-- Axis takes a cursor and returns a traversing result ... | 601 | test c n = do
let cs = (axes !! n) c
(putStrLn . (++" elements") . show . length) cs
TI.writeFile ("output2."++(show n)++".html") (toHtml cs)
-- Axis is a Cursor -> [Cursor] type. Cursor represents one position in a DOM tree.
-- Axis takes a cursor and returns a traversing result as a list of cursors.
-- For de... | 570 | false | true | 0 | 13 | 121 | 117 | 59 | 58 | null | null |
JsWatt/Free-Parking | hacker_rank/functional_programming/recursion/fib.hs | mit | fib 1 = 0 | 9 | fib 1 = 0 | 9 | fib 1 = 0 | 9 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
paulp/unison | parser-typechecker/src/Unison/Parsers.hs | mit | unsafeGetRight :: Either String a -> a
unsafeGetRight = either error id | 71 | unsafeGetRight :: Either String a -> a
unsafeGetRight = either error id | 71 | unsafeGetRight = either error id | 32 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
olorin/http-proxy | Test/Gen.hs | bsd-2-clause | genQueryString :: Gen ByteString
genQueryString = do
list <- genQuery
case list of
[] -> pure ""
_ -> return $ "?" <> BS.intercalate "&" (map mkPair list)
where
mkPair (name, value) = name <> maybe "" ("=" <>) value | 245 | genQueryString :: Gen ByteString
genQueryString = do
list <- genQuery
case list of
[] -> pure ""
_ -> return $ "?" <> BS.intercalate "&" (map mkPair list)
where
mkPair (name, value) = name <> maybe "" ("=" <>) value | 245 | genQueryString = do
list <- genQuery
case list of
[] -> pure ""
_ -> return $ "?" <> BS.intercalate "&" (map mkPair list)
where
mkPair (name, value) = name <> maybe "" ("=" <>) value | 212 | false | true | 0 | 13 | 69 | 101 | 49 | 52 | null | null |
AndrewRademacher/game-of-life-accelerate | src/Profile.hs | mit | argsProfile :: Profile
argsProfile = Profile
{ width_ = 200 &= help "The number of cells across the game board."
, height_ = 200 &= help "The number of cells tall."
, generations_ = 100 &= help "The number of generations to calculate."
} | 280 | argsProfile :: Profile
argsProfile = Profile
{ width_ = 200 &= help "The number of cells across the game board."
, height_ = 200 &= help "The number of cells tall."
, generations_ = 100 &= help "The number of generations to calculate."
} | 280 | argsProfile = Profile
{ width_ = 200 &= help "The number of cells across the game board."
, height_ = 200 &= help "The number of cells tall."
, generations_ = 100 &= help "The number of generations to calculate."
} | 257 | false | true | 0 | 8 | 86 | 52 | 28 | 24 | null | null |
silky/csound-expression | src/Csound/Tab.hs | bsd-3-clause | -- | Sets an absolute size value. As you can do it in the Csound files.
setSize :: Int -> Tab -> Tab
setSize n = updateTabSize $ const (SizePlain n) | 148 | setSize :: Int -> Tab -> Tab
setSize n = updateTabSize $ const (SizePlain n) | 76 | setSize n = updateTabSize $ const (SizePlain n) | 47 | true | true | 0 | 8 | 30 | 41 | 19 | 22 | null | null |
michalkonecny/aern | aern-double/demos/Riemann.hs | bsd-3-clause | riemann' _ _ _ [] result = result | 37 | riemann' _ _ _ [] result = result | 37 | riemann' _ _ _ [] result = result | 37 | false | false | 0 | 6 | 11 | 19 | 9 | 10 | null | null |
stefan-hoeck/labeled-graph | test/GraphTests.hs | bsd-3-clause | prop_chain ∷ Property
prop_chain = forAll chainGraph valid
where valid g = all (\v → adjacent g v (v+1)) $ init (vertices g) | 128 | prop_chain ∷ Property
prop_chain = forAll chainGraph valid
where valid g = all (\v → adjacent g v (v+1)) $ init (vertices g) | 128 | prop_chain = forAll chainGraph valid
where valid g = all (\v → adjacent g v (v+1)) $ init (vertices g) | 106 | false | true | 0 | 10 | 26 | 69 | 33 | 36 | null | null |
gridaphobe/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | These -X<blah> flags cannot be reversed with -XNo<blah>
-- They are used to place hard requirements on what GHC Haskell language
-- features can be used.
safeHaskellFlags :: [FlagSpec SafeHaskellMode]
safeHaskellFlags = [mkF Sf_Unsafe, mkF Sf_Trustworthy, mkF Sf_Safe]
where mkF flag = flagSpec (show flag) flag... | 383 | safeHaskellFlags :: [FlagSpec SafeHaskellMode]
safeHaskellFlags = [mkF Sf_Unsafe, mkF Sf_Trustworthy, mkF Sf_Safe]
where mkF flag = flagSpec (show flag) flag
-- | These -X<blah> flags can all be reversed with -XNo<blah> | 224 | safeHaskellFlags = [mkF Sf_Unsafe, mkF Sf_Trustworthy, mkF Sf_Safe]
where mkF flag = flagSpec (show flag) flag
-- | These -X<blah> flags can all be reversed with -XNo<blah> | 177 | true | true | 0 | 7 | 63 | 61 | 32 | 29 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2020/M12/D10/Exercise.hs | mit | {--
>>> let rels = mapMaybe (relinkCapitals acm) ccs
>>> rels
[Rel (Country {country = "China"}) CAPITAL (Capital "Beijing")]
>>> cyphIt url rels
"{\"results\":[{\"columns\":[],\"data\":[]}],\"errors\":[]}"
Yay! Now we can delete this relation from PRC, ...
MATCH p=(c:Country)-[r:CAPITAL]-(d:Capital)
WHERE d.name = ... | 520 | singletonNodesQuery :: Cypher
singletonNodesQuery =
"MATCH (c) WHERE NOT ()-->(c) AND NOT (c)-->() RETURN c.name" | 116 | singletonNodesQuery =
"MATCH (c) WHERE NOT ()-->(c) AND NOT (c)-->() RETURN c.name" | 86 | true | true | 0 | 4 | 75 | 12 | 7 | 5 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH10/PGM.hs | mit | handleReturn (Wrong b) = print $ "出错" ++ show b | 47 | handleReturn (Wrong b) = print $ "出错" ++ show b | 47 | handleReturn (Wrong b) = print $ "出错" ++ show b | 47 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
olsner/ghc | compiler/main/HscTypes.hs | bsd-3-clause | isImplicitTyThing (ACoAxiom ax) = isImplicitCoAxiom ax | 54 | isImplicitTyThing (ACoAxiom ax) = isImplicitCoAxiom ax | 54 | isImplicitTyThing (ACoAxiom ax) = isImplicitCoAxiom ax | 54 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | coercionRole :: Coercion -> Role
coercionRole = snd . coercionKindRole | 70 | coercionRole :: Coercion -> Role
coercionRole = snd . coercionKindRole | 70 | coercionRole = snd . coercionKindRole | 37 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
PierreR/streaming | benchmarks/StreamingTest.hs | bsd-3-clause | stream_basic :: IO Int
stream_basic = do
xs <- Str.toListM $ Str.each [1..1000000]
& Str.filter even
& Str.map (+1)
& Str.drop 1000
& Str.map (+1)
& Str.filter (\x -> x `mod` 2 == 0)
assert (Prelude.length xs == 499000) $
return (Prelude.length (xs :: [Int])) | 305 | stream_basic :: IO Int
stream_basic = do
xs <- Str.toListM $ Str.each [1..1000000]
& Str.filter even
& Str.map (+1)
& Str.drop 1000
& Str.map (+1)
& Str.filter (\x -> x `mod` 2 == 0)
assert (Prelude.length xs == 499000) $
return (Prelude.length (xs :: [Int])) | 305 | stream_basic = do
xs <- Str.toListM $ Str.each [1..1000000]
& Str.filter even
& Str.map (+1)
& Str.drop 1000
& Str.map (+1)
& Str.filter (\x -> x `mod` 2 == 0)
assert (Prelude.length xs == 499000) $
return (Prelude.length (xs :: [Int])) | 282 | false | true | 0 | 15 | 90 | 150 | 76 | 74 | null | null |
ollef/Grempa | Data/Parser/Grempa/Parser/Table.hs | bsd-3-clause | unError :: Action s -> [Tok s]
unError (Error es) = es | 54 | unError :: Action s -> [Tok s]
unError (Error es) = es | 54 | unError (Error es) = es | 23 | false | true | 0 | 7 | 11 | 33 | 16 | 17 | null | null |
vimus/vimus | src/Vimus/Widget/ListWidget.hs | mit | update :: (a -> a -> Bool) -> ListWidget f a -> [a] -> ListWidget f a
update eq widget@ListWidget{..} list = setPosition (setElements widget list) (fromMaybe 0 mNewPos)
where
mNewPos = asum $ ys ++ reverse xs
where
(xs, ys) = splitAt getPosition $ map ((`findIndex` list) . eq) getElements
-- IMPORT... | 373 | update :: (a -> a -> Bool) -> ListWidget f a -> [a] -> ListWidget f a
update eq widget@ListWidget{..} list = setPosition (setElements widget list) (fromMaybe 0 mNewPos)
where
mNewPos = asum $ ys ++ reverse xs
where
(xs, ys) = splitAt getPosition $ map ((`findIndex` list) . eq) getElements
-- IMPORT... | 373 | update eq widget@ListWidget{..} list = setPosition (setElements widget list) (fromMaybe 0 mNewPos)
where
mNewPos = asum $ ys ++ reverse xs
where
(xs, ys) = splitAt getPosition $ map ((`findIndex` list) . eq) getElements
-- IMPORTANT: You must call `setPosition` after `setElements`! | 303 | false | true | 0 | 11 | 79 | 143 | 74 | 69 | null | null |
ajhc/drift | src/GetOpt.hs | mit | fmtLong :: ArgDescr a -> String -> String
fmtLong (NoArg _ ) lo = "--" ++ lo | 79 | fmtLong :: ArgDescr a -> String -> String
fmtLong (NoArg _ ) lo = "--" ++ lo | 79 | fmtLong (NoArg _ ) lo = "--" ++ lo | 37 | false | true | 0 | 10 | 19 | 43 | 19 | 24 | null | null |
tjakway/ghcjvm | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | boolToRecFlag :: Bool -> RecFlag
boolToRecFlag True = Recursive | 64 | boolToRecFlag :: Bool -> RecFlag
boolToRecFlag True = Recursive | 64 | boolToRecFlag True = Recursive | 31 | false | true | 0 | 7 | 9 | 24 | 10 | 14 | null | null |
DanielG/deepcopy | Generics/DeepCopy/TH/Ty.hs | bsd-3-clause | simplifyApp (ConT t) = [Ty t []] | 32 | simplifyApp (ConT t) = [Ty t []] | 32 | simplifyApp (ConT t) = [Ty t []] | 32 | false | false | 0 | 7 | 6 | 25 | 12 | 13 | null | null |
angerman/data-bitcode-edsl | src/EDSL/Monad/Instructions.hs | bsd-3-clause | call' :: (HasCallStack, Monad m) => TailCallKind -> CallingConv -> Symbol -> [Symbol] -> EdslT m (Maybe Symbol)
call' tck cc f args
| not . isFunctionPtr . ty $ f
= sthrowE $ text "Cannot call: " <+> pretty (ty f) <+> text "must be a function pointer."
-- TODO: length should be equal, if not vararg.
| length ar... | 1,481 | call' :: (HasCallStack, Monad m) => TailCallKind -> CallingConv -> Symbol -> [Symbol] -> EdslT m (Maybe Symbol)
call' tck cc f args
| not . isFunctionPtr . ty $ f
= sthrowE $ text "Cannot call: " <+> pretty (ty f) <+> text "must be a function pointer."
-- TODO: length should be equal, if not vararg.
| length ar... | 1,481 | call' tck cc f args
| not . isFunctionPtr . ty $ f
= sthrowE $ text "Cannot call: " <+> pretty (ty f) <+> text "must be a function pointer."
-- TODO: length should be equal, if not vararg.
| length args < length (funParamTys (ty f))
= sthrowE $ text "Cannot call: " <+> (pretty f <+> text "with insufficent arg... | 1,369 | false | true | 1 | 21 | 446 | 367 | 177 | 190 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DeleteNetworkACLEntry.hs | mpl-2.0 | -- | The ID of the network ACL.
dnaeNetworkACLId :: Lens' DeleteNetworkACLEntry Text
dnaeNetworkACLId = lens _dnaeNetworkACLId (\ s a -> s{_dnaeNetworkACLId = a}) | 162 | dnaeNetworkACLId :: Lens' DeleteNetworkACLEntry Text
dnaeNetworkACLId = lens _dnaeNetworkACLId (\ s a -> s{_dnaeNetworkACLId = a}) | 130 | dnaeNetworkACLId = lens _dnaeNetworkACLId (\ s a -> s{_dnaeNetworkACLId = a}) | 77 | true | true | 0 | 9 | 23 | 40 | 22 | 18 | null | null |
joelburget/haste-compiler | src/haste-boot.hs | bsd-3-clause | buildLibs :: Cfg -> Shell ()
buildLibs cfg = do
-- Set up dirs and copy includes
mkdir True $ pkgSysLibDir
cpDir "include" hasteSysDir
run_ hastePkgBinary ["update", "--global", "libraries" </> "rts.pkg"] ""
inDirectory "libraries" $ do
-- Install ghc-prim
inDirectory "ghc-prim" $ d... | 2,017 | buildLibs :: Cfg -> Shell ()
buildLibs cfg = do
-- Set up dirs and copy includes
mkdir True $ pkgSysLibDir
cpDir "include" hasteSysDir
run_ hastePkgBinary ["update", "--global", "libraries" </> "rts.pkg"] ""
inDirectory "libraries" $ do
-- Install ghc-prim
inDirectory "ghc-prim" $ d... | 2,017 | buildLibs cfg = do
-- Set up dirs and copy includes
mkdir True $ pkgSysLibDir
cpDir "include" hasteSysDir
run_ hastePkgBinary ["update", "--global", "libraries" </> "rts.pkg"] ""
inDirectory "libraries" $ do
-- Install ghc-prim
inDirectory "ghc-prim" $ do
hasteInst ["configu... | 1,988 | false | true | 0 | 21 | 546 | 529 | 263 | 266 | null | null |
iron-codegen/iron | library/Iron/IR.hs | bsd-3-clause | mkDeclRefExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> d -> t
mkDeclRefExpr a = embed . EnvT a . DeclRefExpr | 111 | mkDeclRefExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> d -> t
mkDeclRefExpr a = embed . EnvT a . DeclRefExpr | 111 | mkDeclRefExpr a = embed . EnvT a . DeclRefExpr | 46 | false | true | 2 | 9 | 21 | 58 | 25 | 33 | null | null |
jqyu/bustle-chi | src/Rad/QL/Define/Object.hs | bsd-3-clause | fieldResolverName :: GraphQLFieldDef m a -> Name
fieldResolverName = fieldDefName . fieldDef | 92 | fieldResolverName :: GraphQLFieldDef m a -> Name
fieldResolverName = fieldDefName . fieldDef | 92 | fieldResolverName = fieldDefName . fieldDef | 43 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
np/lens | src/Control/Lens/Loupe.hs | bsd-3-clause | -- | Replace the target of a 'Loupe' in the current monadic state, returning the new value.
(<#=) :: MonadState s m => Loupe s s a b -> b -> m b
l <#= b = do
l #= b
return b
------------------------------------------------------------------------------
-- Deprecated
------------------------------------------------... | 396 | (<#=) :: MonadState s m => Loupe s s a b -> b -> m b
l <#= b = do
l #= b
return b
------------------------------------------------------------------------------
-- Deprecated
------------------------------------------------------------------------------
-- | @type 'SimpleLoupe' = 'Simple' 'Loupe'@ | 304 | l <#= b = do
l #= b
return b
------------------------------------------------------------------------------
-- Deprecated
------------------------------------------------------------------------------
-- | @type 'SimpleLoupe' = 'Simple' 'Loupe'@ | 251 | true | true | 0 | 10 | 59 | 70 | 34 | 36 | null | null |
oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Release17/Version.hs | bsd-3-clause | majorVersion :: String
majorVersion = "1.7" | 43 | majorVersion :: String
majorVersion = "1.7" | 43 | majorVersion = "1.7" | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Typechecker/Context.hs | mit | wantRequest
:: Var v
=> Ord loc
=> Term v loc
-> Type v loc
-> (Type v loc, Wanted v loc)
wantRequest loc ~(Type.Effect'' es t) = (t, fmap (Just loc,) es) | 164 | wantRequest
:: Var v
=> Ord loc
=> Term v loc
-> Type v loc
-> (Type v loc, Wanted v loc)
wantRequest loc ~(Type.Effect'' es t) = (t, fmap (Just loc,) es) | 164 | wantRequest loc ~(Type.Effect'' es t) = (t, fmap (Just loc,) es) | 64 | false | true | 0 | 13 | 42 | 100 | 47 | 53 | null | null |
romanb/amazonka | amazonka-s3/gen/Network/AWS/S3/GetObjectTorrent.hs | mpl-2.0 | gotKey :: Lens' GetObjectTorrent Text
gotKey = lens _gotKey (\s a -> s { _gotKey = a }) | 87 | gotKey :: Lens' GetObjectTorrent Text
gotKey = lens _gotKey (\s a -> s { _gotKey = a }) | 87 | gotKey = lens _gotKey (\s a -> s { _gotKey = a }) | 49 | false | true | 0 | 9 | 17 | 39 | 21 | 18 | null | null |
rahulmutt/ghcvm | compiler/Eta/Types/TyCon.hs | bsd-3-clause | -- | Extract the 'TupleSort' of the given 'TyCon', if it is a 'TupleTyCon'.
-- Panics otherwise
tupleTyConSort :: TyCon -> TupleSort
tupleTyConSort tc = tyConTupleSort tc | 170 | tupleTyConSort :: TyCon -> TupleSort
tupleTyConSort tc = tyConTupleSort tc | 74 | tupleTyConSort tc = tyConTupleSort tc | 37 | true | true | 0 | 7 | 26 | 28 | 13 | 15 | null | null |
svenssonjoel/ObsidianGFX | Obsidian/CodeGen/Program.hs | bsd-3-clause | usesTid :: IMList t -> Bool
usesTid = any (go . fst)
where
go (SDistrPar _ _ im) = usesTid im
go (SForAll Block _ _) = True
go _ = False | 151 | usesTid :: IMList t -> Bool
usesTid = any (go . fst)
where
go (SDistrPar _ _ im) = usesTid im
go (SForAll Block _ _) = True
go _ = False | 151 | usesTid = any (go . fst)
where
go (SDistrPar _ _ im) = usesTid im
go (SForAll Block _ _) = True
go _ = False | 123 | false | true | 0 | 7 | 46 | 88 | 39 | 49 | null | null |
denoptic/app | src/Main.hs | bsd-3-clause | -- secretPage :: SpockAction conn Session st ()
-- secretPage = do
-- sess <- readSession
-- when (isNothing sess) $ redirect "/login"
-- site $ H.h1 "the secret"
-- secretPage :: SpockAction conn Session st ()
-- secretPage = do
-- records <- runSQL $ selectList [] []
-- site $
-- do H.h1 ... | 1,185 | loginAction :: SpockAction conn Session st ()
loginAction = do
let formView = F.renderForm loginFormSpec
f <- runForm "loginForm" loginForm
case f of
(view, Nothing) ->
site $ formView view
(view, Just loginReq) ->
if lrUser loginReq == "admin" && lrPassword loginReq ... | 615 | loginAction = do
let formView = F.renderForm loginFormSpec
f <- runForm "loginForm" loginForm
case f of
(view, Nothing) ->
site $ formView view
(view, Just loginReq) ->
if lrUser loginReq == "admin" && lrPassword loginReq == "assword"
then do sessionRe... | 569 | true | true | 0 | 16 | 395 | 178 | 91 | 87 | null | null |
Chasego/nie | proj/lang/C++/cpp_primer_5th/[SUPPORT] learning-master/real-world-haskell/ch4/myListFunctions.hs | gpl-3.0 | (x:xs) = x | 10 | (x:xs) = x | 10 | (x:xs) = x | 10 | false | false | 0 | 6 | 2 | 14 | 7 | 7 | null | null |
sinelaw/lamdu | test/InferTests.hs | gpl-3.0 | -- | depApply (t : Type) (rt : t -> Type) (f : (d : t) -> rt d) (x : t) = f x
depApply =
testInfer "dep apply" $
lambda "t" set $ \t ->
lambda "rt" (t ~> set) $ \rt ->
lambda "f" (piType "d" t (\d -> rt $$ d)) $ \f ->
lambda "x" t $ \x -> f $$ x | 255 | depApply =
testInfer "dep apply" $
lambda "t" set $ \t ->
lambda "rt" (t ~> set) $ \rt ->
lambda "f" (piType "d" t (\d -> rt $$ d)) $ \f ->
lambda "x" t $ \x -> f $$ x | 177 | depApply =
testInfer "dep apply" $
lambda "t" set $ \t ->
lambda "rt" (t ~> set) $ \rt ->
lambda "f" (piType "d" t (\d -> rt $$ d)) $ \f ->
lambda "x" t $ \x -> f $$ x | 177 | true | false | 0 | 15 | 76 | 103 | 53 | 50 | null | null |
sdiehl/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | -------------------------------------------------------------------------------
-- * Role
nominalR, representationalR, phantomR, inferR :: Role
nominalR = NominalR | 175 | nominalR, representationalR, phantomR, inferR :: Role
nominalR = NominalR | 82 | nominalR = NominalR | 28 | true | true | 0 | 4 | 24 | 19 | 14 | 5 | null | null |
shedatc/push | push.hs | gpl-3.0 | rsyncDeleteOption :: FilePath -> IO [String]
rsyncDeleteOption conf = do noDelete <- haveOption "no-delete"
if noDelete
then return []
else return ["--delete"]
where haveOption = haveOption' conf | 313 | rsyncDeleteOption :: FilePath -> IO [String]
rsyncDeleteOption conf = do noDelete <- haveOption "no-delete"
if noDelete
then return []
else return ["--delete"]
where haveOption = haveOption' conf | 313 | rsyncDeleteOption conf = do noDelete <- haveOption "no-delete"
if noDelete
then return []
else return ["--delete"]
where haveOption = haveOption' conf | 268 | false | true | 0 | 9 | 144 | 71 | 33 | 38 | null | null |
bergey/demos | spheres1.hs | bsd-3-clause | cam = mm50Camera # translate (r3 (0,0,10)) | 42 | cam = mm50Camera # translate (r3 (0,0,10)) | 42 | cam = mm50Camera # translate (r3 (0,0,10)) | 42 | false | false | 3 | 8 | 6 | 32 | 15 | 17 | null | null |
rootzlevel/device-manager | src/Brick/Widgets/DeviceList.hs | bsd-3-clause | minColumnWidth :: Text -> (Device -> Text) -> Vector Device -> Int
minColumnWidth header content devs = max maxWidth (T.length header) + 2
where maxWidth
| V.null devs = 0
| otherwise = V.maximum $ V.map (T.length . content) devs | 252 | minColumnWidth :: Text -> (Device -> Text) -> Vector Device -> Int
minColumnWidth header content devs = max maxWidth (T.length header) + 2
where maxWidth
| V.null devs = 0
| otherwise = V.maximum $ V.map (T.length . content) devs | 252 | minColumnWidth header content devs = max maxWidth (T.length header) + 2
where maxWidth
| V.null devs = 0
| otherwise = V.maximum $ V.map (T.length . content) devs | 185 | false | true | 0 | 10 | 62 | 107 | 51 | 56 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/AutoScalingPlansScalingPlanPredefinedLoadMetricSpecification.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-predefinedloadmetricspecification.html#cfn-autoscalingplans-scalingplan-predefinedloadmetricspecification-predefinedloadmetrictype
aspspplmsPredefinedLoadMetricType :: Lens' AutoScalingPlansScalingPlanPredefin... | 589 | aspspplmsPredefinedLoadMetricType :: Lens' AutoScalingPlansScalingPlanPredefinedLoadMetricSpecification (Val Text)
aspspplmsPredefinedLoadMetricType = lens _autoScalingPlansScalingPlanPredefinedLoadMetricSpecificationPredefinedLoadMetricType (\s a -> s { _autoScalingPlansScalingPlanPredefinedLoadMetricSpecificationPred... | 347 | aspspplmsPredefinedLoadMetricType = lens _autoScalingPlansScalingPlanPredefinedLoadMetricSpecificationPredefinedLoadMetricType (\s a -> s { _autoScalingPlansScalingPlanPredefinedLoadMetricSpecificationPredefinedLoadMetricType = a }) | 232 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/TermParser.hs | mit | bang :: Var v => TermP v
bang = P.label "bang" $ do
start <- reserved "!"
e <- termLeaf
pure $ DD.forceTerm (ann start <> ann e) (ann start) e | 148 | bang :: Var v => TermP v
bang = P.label "bang" $ do
start <- reserved "!"
e <- termLeaf
pure $ DD.forceTerm (ann start <> ann e) (ann start) e | 148 | bang = P.label "bang" $ do
start <- reserved "!"
e <- termLeaf
pure $ DD.forceTerm (ann start <> ann e) (ann start) e | 123 | false | true | 0 | 12 | 36 | 82 | 37 | 45 | null | null |
dolio/vector | Data/Vector/Storable/Mutable.hs | bsd-3-clause | unsafeNew = G.unsafeNew | 23 | unsafeNew = G.unsafeNew | 23 | unsafeNew = G.unsafeNew | 23 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
pauldoo/scratch | NBody/example/Example.hs | isc | idle angle = do
a <- get angle
angle $=! (a + 0.1) -- The parens are necessary due to a precedence bug in StateVar
postRedisplay Nothing -- Only required on Mac OS X, which double-buffers internally | 210 | idle angle = do
a <- get angle
angle $=! (a + 0.1) -- The parens are necessary due to a precedence bug in StateVar
postRedisplay Nothing -- Only required on Mac OS X, which double-buffers internally | 210 | idle angle = do
a <- get angle
angle $=! (a + 0.1) -- The parens are necessary due to a precedence bug in StateVar
postRedisplay Nothing -- Only required on Mac OS X, which double-buffers internally | 210 | false | false | 0 | 9 | 48 | 41 | 19 | 22 | null | null |
chriseidhof/objc-value-objects | Parser.hs | mit | parser :: A.Parser Value
parser = Value <$> parseStart <*> parseFields | 70 | parser :: A.Parser Value
parser = Value <$> parseStart <*> parseFields | 70 | parser = Value <$> parseStart <*> parseFields | 45 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1144 = 1143 | 11 | 1144 = 1143 | 11 | 1144 = 1143 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F26.hs | bsd-3-clause | ptr_glTexCoordPointerListIBM :: FunPtr (GLint -> GLenum -> GLint -> Ptr (Ptr a) -> GLint -> IO ())
ptr_glTexCoordPointerListIBM = unsafePerformIO $ getCommand "glTexCoordPointerListIBM" | 185 | ptr_glTexCoordPointerListIBM :: FunPtr (GLint -> GLenum -> GLint -> Ptr (Ptr a) -> GLint -> IO ())
ptr_glTexCoordPointerListIBM = unsafePerformIO $ getCommand "glTexCoordPointerListIBM" | 185 | ptr_glTexCoordPointerListIBM = unsafePerformIO $ getCommand "glTexCoordPointerListIBM" | 86 | false | true | 0 | 13 | 22 | 58 | 28 | 30 | null | null |
lamdu/lamdu | src/Lamdu/Builtins/Anchors.hs | gpl-3.0 | listTid :: T.NominalId
listTid = bi "stream" | 44 | listTid :: T.NominalId
listTid = bi "stream" | 44 | listTid = bi "stream" | 21 | false | true | 0 | 7 | 6 | 23 | 9 | 14 | null | null |
lennart/Tidal | Sound/Tidal/Dirt.hs | gpl-3.0 | bandf = makeF dirt "bandf" | 33 | bandf = makeF dirt "bandf" | 33 | bandf = makeF dirt "bandf" | 33 | false | false | 0 | 5 | 11 | 11 | 5 | 6 | null | null |
alexandrelucchesi/pfec | server-common/src/Util/JSONWebToken.hs | apache-2.0 | fromB64JSON :: FromJSON a => C.ByteString -> IO (Maybe a)
fromB64JSON = return . decode . B64.decode' | 101 | fromB64JSON :: FromJSON a => C.ByteString -> IO (Maybe a)
fromB64JSON = return . decode . B64.decode' | 101 | fromB64JSON = return . decode . B64.decode' | 43 | false | true | 0 | 9 | 16 | 43 | 21 | 22 | null | null |
lostbean/VirMat | src/VirMat/Run3D.hs | gpl-3.0 | -- ============================== 3D ======================================
samplePoints :: JobRequest -> IO (DistributedPoints Vec3)
samplePoints VoronoiJob{..} = case structSize of
NGrains n -> genGrainDistributionByNumber (1, 1, 1) seed gsDist n
SizeBox (x, y, z) -> let
box = Box3D {xMax3D = x, xMin3D = 0, ... | 416 | samplePoints :: JobRequest -> IO (DistributedPoints Vec3)
samplePoints VoronoiJob{..} = case structSize of
NGrains n -> genGrainDistributionByNumber (1, 1, 1) seed gsDist n
SizeBox (x, y, z) -> let
box = Box3D {xMax3D = x, xMin3D = 0, yMax3D = y, yMin3D = 0, zMax3D = z, zMin3D = 0}
in genGrainDistributionBy... | 339 | samplePoints VoronoiJob{..} = case structSize of
NGrains n -> genGrainDistributionByNumber (1, 1, 1) seed gsDist n
SizeBox (x, y, z) -> let
box = Box3D {xMax3D = x, xMin3D = 0, yMax3D = y, yMin3D = 0, zMax3D = z, zMin3D = 0}
in genGrainDistributionByBox seed gsDist box | 281 | true | true | 22 | 7 | 71 | 134 | 73 | 61 | null | null |
utsav2601/cmpe295A | tools/flounder/UMPCommon.hs | mit | my_bindvar = C.Variable my_bind_var_name | 40 | my_bindvar = C.Variable my_bind_var_name | 40 | my_bindvar = C.Variable my_bind_var_name | 40 | false | false | 1 | 5 | 3 | 15 | 5 | 10 | null | null |
geekingfrog/advent-of-code | src/Y2015/Day19.hs | bsd-3-clause | reduce :: [(String, String)] -> String -> [String]
reduce rplList input =
map (replaceOne input) (findFarthestReplacements rplList input) | 141 | reduce :: [(String, String)] -> String -> [String]
reduce rplList input =
map (replaceOne input) (findFarthestReplacements rplList input) | 141 | reduce rplList input =
map (replaceOne input) (findFarthestReplacements rplList input) | 90 | false | true | 0 | 9 | 21 | 62 | 30 | 32 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Misc.hs | bsd-3-clause | mkEither :: Bool -> s -> a -> Either s a
-------------------------------------------------------------------------------
mkEither True _ a = Right a | 149 | mkEither :: Bool -> s -> a -> Either s a
mkEither True _ a = Right a | 69 | mkEither True _ a = Right a | 28 | true | true | 0 | 9 | 19 | 44 | 20 | 24 | null | null |
emilaxelsson/ag-graph | src/Dag.hs | bsd-3-clause | bisim :: forall f . (Eq (f ()), Functor f, Foldable f) => Dag f -> Dag f -> Bool
bisim Dag {root=r1,edges=e1} Dag {root=r2,edges=e2} = runF r1 r2
where run :: (Free f Node, Free f Node) -> Bool
run (t1, t2) = runF (step e1 t1) (step e2 t2)
step :: Edges f -> Free f Node -> f (Free f Node)
... | 631 | bisim :: forall f . (Eq (f ()), Functor f, Foldable f) => Dag f -> Dag f -> Bool
bisim Dag {root=r1,edges=e1} Dag {root=r2,edges=e2} = runF r1 r2
where run :: (Free f Node, Free f Node) -> Bool
run (t1, t2) = runF (step e1 t1) (step e2 t2)
step :: Edges f -> Free f Node -> f (Free f Node)
... | 631 | bisim Dag {root=r1,edges=e1} Dag {root=r2,edges=e2} = runF r1 r2
where run :: (Free f Node, Free f Node) -> Bool
run (t1, t2) = runF (step e1 t1) (step e2 t2)
step :: Edges f -> Free f Node -> f (Free f Node)
step e (Ret n) = e IntMap.! n
step _ (In t) = t
runF :: ... | 549 | false | true | 8 | 10 | 236 | 325 | 157 | 168 | null | null |
prt2121/haskell-practice | parconc/other/BingTranslate.hs | apache-2.0 | -- New v2 API:
getlanguagesUri = "http://api.microsofttranslator.com/v2/Http.svc/GetLanguagesForTranslate?appId=" ++ myAppId | 124 | getlanguagesUri = "http://api.microsofttranslator.com/v2/Http.svc/GetLanguagesForTranslate?appId=" ++ myAppId | 109 | getlanguagesUri = "http://api.microsofttranslator.com/v2/Http.svc/GetLanguagesForTranslate?appId=" ++ myAppId | 109 | true | false | 1 | 5 | 8 | 14 | 6 | 8 | null | null |
jasoncarr0/reddit-switcharoo-crawler | SwitchCrawler/GraphBuilder.hs | mit | emptyGraphBuilder :: GraphBuilder a
emptyGraphBuilder = GraphBuilder [] M.empty | 79 | emptyGraphBuilder :: GraphBuilder a
emptyGraphBuilder = GraphBuilder [] M.empty | 79 | emptyGraphBuilder = GraphBuilder [] M.empty | 43 | false | true | 0 | 6 | 8 | 23 | 11 | 12 | null | null |
framp/postgrest | src/PostgREST/Auth.hs | mit | resetUserId :: H.Tx P.Postgres s ()
resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|] | 92 | resetUserId :: H.Tx P.Postgres s ()
resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|] | 92 | resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|] | 56 | false | true | 0 | 6 | 10 | 35 | 19 | 16 | null | null |
oldmanmike/ghc | utils/genapply/Main.hs | bsd-3-clause | tickForArity _ = text "W_[TOTAL_CALLS] = W_[TOTAL_CALLS] + 1;" | 62 | tickForArity _ = text "W_[TOTAL_CALLS] = W_[TOTAL_CALLS] + 1;" | 62 | tickForArity _ = text "W_[TOTAL_CALLS] = W_[TOTAL_CALLS] + 1;" | 62 | false | false | 0 | 5 | 8 | 12 | 5 | 7 | null | null |
manyoo/reflex-dom | src/Reflex/Dom/Xhr.hs | bsd-3-clause | -- | Issues a collection of requests when the supplied Event fires. When ALL requests from a given firing complete, the results are collected and returned via the return Event.
performRequestsAsync :: (MonadIO (Performable m), HasWebView (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f, IsXhrPayload ... | 460 | performRequestsAsync :: (MonadIO (Performable m), HasWebView (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f, IsXhrPayload a) => Event t (f (XhrRequest a)) -> m (Event t (f XhrResponse))
performRequestsAsync = performRequestsAsync' newXMLHttpRequest . fmap return | 282 | performRequestsAsync = performRequestsAsync' newXMLHttpRequest . fmap return | 76 | true | true | 0 | 11 | 67 | 115 | 57 | 58 | null | null |
tittoassini/flat | src/Flat/Decoder/Prim.hs | bsd-3-clause | -- |Decode an Array (a list of chunks up to 255 bytes long) returning the pointer to the first data byte and a list of chunk sizes
getChunksInfo :: Get (Ptr Word8, [Int])
getChunksInfo = Get $ \endPtr s -> do
let getChunks srcPtr l = do
ensureBits endPtr s 8
!n <- fromIntegral <$> peek srcPtr
... | 1,042 | getChunksInfo :: Get (Ptr Word8, [Int])
getChunksInfo = Get $ \endPtr s -> do
let getChunks srcPtr l = do
ensureBits endPtr s 8
!n <- fromIntegral <$> peek srcPtr
if n==0
then return (srcPtr `plusPtr` 1,l [])
else do
ensureBits endPtr s ((n+1)*8)
... | 911 | getChunksInfo = Get $ \endPtr s -> do
let getChunks srcPtr l = do
ensureBits endPtr s 8
!n <- fromIntegral <$> peek srcPtr
if n==0
then return (srcPtr `plusPtr` 1,l [])
else do
ensureBits endPtr s ((n+1)*8)
getChunks (srcPtr `plusPtr`... | 871 | true | true | 4 | 20 | 261 | 277 | 143 | 134 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Delete.hs | mpl-2.0 | -- | Creates a value of 'TokensDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tdClientId'
--
-- * 'tdUserKey'
tokensDelete
:: Text -- ^ 'tdClientId'
-> Text -- ^ 'tdUserKey'
-> TokensDelete
tokensDelete pTdClientI... | 424 | tokensDelete
:: Text -- ^ 'tdClientId'
-> Text -- ^ 'tdUserKey'
-> TokensDelete
tokensDelete pTdClientId_ pTdUserKey_ =
TokensDelete'
{ _tdClientId = pTdClientId_
, _tdUserKey = pTdUserKey_
} | 219 | tokensDelete pTdClientId_ pTdUserKey_ =
TokensDelete'
{ _tdClientId = pTdClientId_
, _tdUserKey = pTdUserKey_
} | 127 | true | true | 0 | 8 | 92 | 56 | 32 | 24 | null | null |
input-output-hk/pos-haskell-prototype | x509/test/Test/Cardano/X509/Configuration/Arbitrary.hs | mit | arbitraryInvalid :: (Show a, Arbitrary (Invalid a)) => Gen a
arbitraryInvalid =
fmap getInvalid arbitrary | 109 | arbitraryInvalid :: (Show a, Arbitrary (Invalid a)) => Gen a
arbitraryInvalid =
fmap getInvalid arbitrary | 109 | arbitraryInvalid =
fmap getInvalid arbitrary | 48 | false | true | 0 | 8 | 18 | 40 | 20 | 20 | null | null |
headprogrammingczar/cabal | cabal-install/tests/UnitTests/Distribution/Client/UserConfig.hs | bsd-3-clause | bracketTest :: (FilePath -> IO ()) -> Assertion
bracketTest =
bracket testSetup testTearDown
where
testSetup :: IO FilePath
testSetup = fmap (</> "test-user-config") getCurrentDirectory
testTearDown :: FilePath -> IO ()
testTearDown configFile =
mapM_ removeExistingFile [configFile, confi... | 339 | bracketTest :: (FilePath -> IO ()) -> Assertion
bracketTest =
bracket testSetup testTearDown
where
testSetup :: IO FilePath
testSetup = fmap (</> "test-user-config") getCurrentDirectory
testTearDown :: FilePath -> IO ()
testTearDown configFile =
mapM_ removeExistingFile [configFile, confi... | 339 | bracketTest =
bracket testSetup testTearDown
where
testSetup :: IO FilePath
testSetup = fmap (</> "test-user-config") getCurrentDirectory
testTearDown :: FilePath -> IO ()
testTearDown configFile =
mapM_ removeExistingFile [configFile, configFile ++ ".backup"] | 291 | false | true | 1 | 10 | 69 | 108 | 50 | 58 | null | null |
Luizss/TheSystem | src/StateAndInfer.hs | bsd-3-clause | ----- From Standard Types
fromTotalStd :: TotalStd -> Totaltime
fromTotalStd = Totaltime . floor | 97 | fromTotalStd :: TotalStd -> Totaltime
fromTotalStd = Totaltime . floor | 70 | fromTotalStd = Totaltime . floor | 32 | true | true | 0 | 5 | 14 | 20 | 11 | 9 | null | null |
tjakway/ghcjvm | compiler/llvmGen/Llvm/PpLlvm.hs | bsd-3-clause | ppAtomicOp LAO_Sub = text "sub" | 32 | ppAtomicOp LAO_Sub = text "sub" | 32 | ppAtomicOp LAO_Sub = text "sub" | 32 | false | false | 0 | 5 | 5 | 12 | 5 | 7 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Simulator/Prims.hs | bsd-3-clause | joinOp :: Monad m => (w -> V.Vector b) -> (w -> w -> w) -> Value m b w e
joinOp unpack app =
constFun $
constFun $
constFun $
strictFun $ \x ->
case x of
VVector xv -> do
vv <- V.mapM force xv
return (V.foldr (appV unpack app) (VVector V.empty) vv)
_ -> error "Verifier.SAW.Simulator.Prims.... | 327 | joinOp :: Monad m => (w -> V.Vector b) -> (w -> w -> w) -> Value m b w e
joinOp unpack app =
constFun $
constFun $
constFun $
strictFun $ \x ->
case x of
VVector xv -> do
vv <- V.mapM force xv
return (V.foldr (appV unpack app) (VVector V.empty) vv)
_ -> error "Verifier.SAW.Simulator.Prims.... | 327 | joinOp unpack app =
constFun $
constFun $
constFun $
strictFun $ \x ->
case x of
VVector xv -> do
vv <- V.mapM force xv
return (V.foldr (appV unpack app) (VVector V.empty) vv)
_ -> error "Verifier.SAW.Simulator.Prims.joinOp" | 254 | false | true | 0 | 17 | 88 | 154 | 74 | 80 | null | null |
input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Block/Bi.hs | mit | --------------------------------------------------------------------------------
-- BlockSignature
--------------------------------------------------------------------------------
golden_BlockSignature :: Property
golden_BlockSignature = goldenTestBi exampleBlockSignature "test/golden/bi/block/BlockSignature" | 311 | golden_BlockSignature :: Property
golden_BlockSignature = goldenTestBi exampleBlockSignature "test/golden/bi/block/BlockSignature" | 130 | golden_BlockSignature = goldenTestBi exampleBlockSignature "test/golden/bi/block/BlockSignature" | 96 | true | true | 0 | 5 | 12 | 19 | 11 | 8 | null | null |
aartamonau/gossim | src/Gossim/Internal/Simulator.hs | lgpl-3.0 | processSideEffect :: SideEffect -> Gossim ()
processSideEffect (Message dst msg) = do
messageQueues %= IntMap.update (Just . (|> msg)) dst
setRunnable dst | 158 | processSideEffect :: SideEffect -> Gossim ()
processSideEffect (Message dst msg) = do
messageQueues %= IntMap.update (Just . (|> msg)) dst
setRunnable dst | 158 | processSideEffect (Message dst msg) = do
messageQueues %= IntMap.update (Just . (|> msg)) dst
setRunnable dst | 113 | false | true | 0 | 11 | 25 | 62 | 30 | 32 | null | null |
felixsch/simplelisp | src/Interpreter/Builtin.hs | gpl-2.0 | lispQuote :: [LispExp] -> Ctx LispExp
lispQuote (x:[]) = return x | 65 | lispQuote :: [LispExp] -> Ctx LispExp
lispQuote (x:[]) = return x | 65 | lispQuote (x:[]) = return x | 27 | false | true | 0 | 8 | 10 | 36 | 18 | 18 | null | null |
brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs | mpl-2.0 | -- | Windows details get their own format because the information format and
-- model don\'t match a normal detail. Specifically Windows updates are
-- done as patches, thus Windows vulnerabilities really are a missing
-- package, rather than a package being at an incorrect version.
vWindowsDetails :: Lens' Vulnerabili... | 454 | vWindowsDetails :: Lens' Vulnerability [WindowsDetail]
vWindowsDetails
= lens _vWindowsDetails
(\ s a -> s{_vWindowsDetails = a})
. _Default
. _Coerce | 170 | vWindowsDetails
= lens _vWindowsDetails
(\ s a -> s{_vWindowsDetails = a})
. _Default
. _Coerce | 115 | true | true | 2 | 8 | 85 | 60 | 31 | 29 | null | null |
hvr/lens | src/Control/Lens/Indexed.hs | bsd-3-clause | skip :: a -> ()
skip _ = () | 27 | skip :: a -> ()
skip _ = () | 27 | skip _ = () | 11 | false | true | 0 | 6 | 8 | 26 | 12 | 14 | null | null |
cheme/nanomsg-hs | test/C.hs | mit | getErr (Just a) = showEr a | 26 | getErr (Just a) = showEr a | 26 | getErr (Just a) = showEr a | 26 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
Lainepress/hledger | hledger-lib/Hledger/Data/Posting.hs | gpl-3.0 | -- |Is this posting cleared? If this posting was individually marked
-- as cleared, returns True. Otherwise, return the parent
-- transaction's cleared status or, if there is no parent
-- transaction, return False.
postingCleared :: Posting -> Bool
postingCleared p = if pstatus p
then True
... | 372 | postingCleared :: Posting -> Bool
postingCleared p = if pstatus p
then True
else maybe False tstatus $ ptransaction p | 157 | postingCleared p = if pstatus p
then True
else maybe False tstatus $ ptransaction p | 123 | true | true | 0 | 7 | 93 | 45 | 24 | 21 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | gHC_CLASSES = mkPrimModule (fsLit "GHC.Classes") | 52 | gHC_CLASSES = mkPrimModule (fsLit "GHC.Classes") | 52 | gHC_CLASSES = mkPrimModule (fsLit "GHC.Classes") | 52 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
habbler/GridFlowCover | test/Test.hs | bsd-3-clause | testGrid = Grid (2,2) [EndPoints (0,0) (0,1) ] | 46 | testGrid = Grid (2,2) [EndPoints (0,0) (0,1) ] | 46 | testGrid = Grid (2,2) [EndPoints (0,0) (0,1) ] | 46 | false | false | 1 | 7 | 7 | 41 | 21 | 20 | null | null |
jamesdarcy/DicomH | src/Data/Dicom/UID.hs | bsd-3-clause | -- | Enhanced PET Image Storage
eNHANCED_PET_IMAGE_STORAGE :: UID
eNHANCED_PET_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.130" | 124 | eNHANCED_PET_IMAGE_STORAGE :: UID
eNHANCED_PET_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.130" | 92 | eNHANCED_PET_IMAGE_STORAGE = "1.2.840.10008.5.1.4.1.1.130" | 58 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
ckaestne/CIDE | CIDE_Language_Haskell/test/WSP/Webserver/Request.hs | gpl-3.0 | parseReqURI (uri@('/' : _)) = Just (AbsPath (unEscapeString uri)) | 65 | parseReqURI (uri@('/' : _)) = Just (AbsPath (unEscapeString uri)) | 65 | parseReqURI (uri@('/' : _)) = Just (AbsPath (unEscapeString uri)) | 65 | false | false | 0 | 9 | 8 | 37 | 19 | 18 | null | null |
phischu/fragnix | benchmarks/containers/Data.Sequence.hs | bsd-3-clause | tailsDigit (Two a b) = Two (Two a b) (One b) | 44 | tailsDigit (Two a b) = Two (Two a b) (One b) | 44 | tailsDigit (Two a b) = Two (Two a b) (One b) | 44 | false | false | 0 | 6 | 10 | 38 | 17 | 21 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | The machine type to use for instances that are created from this
-- template.
ipMachineType :: Lens' InstanceProperties (Maybe Text)
ipMachineType
= lens _ipMachineType
(\ s a -> s{_ipMachineType = a}) | 214 | ipMachineType :: Lens' InstanceProperties (Maybe Text)
ipMachineType
= lens _ipMachineType
(\ s a -> s{_ipMachineType = a}) | 131 | ipMachineType
= lens _ipMachineType
(\ s a -> s{_ipMachineType = a}) | 76 | true | true | 1 | 9 | 40 | 53 | 26 | 27 | null | null |
gereeter/bounded-intmap | src/Data/IntMap/Bounded/Lazy.hs | mit | -- | /O(n)/. Map a function over all values in the map.
--
-- > let f key x = (show key) ++ ":" ++ x
-- > mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]
mapWithKey :: (Key -> a -> b) -> IntMap a -> IntMap b
mapWithKey f (IntMap m) = IntMap (W.mapWithKey (f . w2i) m) | 299 | mapWithKey :: (Key -> a -> b) -> IntMap a -> IntMap b
mapWithKey f (IntMap m) = IntMap (W.mapWithKey (f . w2i) m) | 113 | mapWithKey f (IntMap m) = IntMap (W.mapWithKey (f . w2i) m) | 59 | true | true | 0 | 10 | 62 | 76 | 38 | 38 | null | null |
joeyinbox/space-invaders-haskell | src/Dataset.hs | gpl-2.0 | getBunkerPlain1Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_,_),_)) = a | 92 | getBunkerPlain1Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_,_),_)) = a | 92 | getBunkerPlain1Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_,_),_)) = a | 92 | false | false | 0 | 7 | 3 | 112 | 72 | 40 | null | null |
basvandijk/lifted-base | Control/Concurrent/QSem/Lifted.hs | bsd-3-clause | -- | Generalized version of 'QSem.signalQSem'.
signalQSem :: MonadBase IO m => QSem -> m ()
signalQSem = liftBase . QSem.signalQSem | 131 | signalQSem :: MonadBase IO m => QSem -> m ()
signalQSem = liftBase . QSem.signalQSem | 84 | signalQSem = liftBase . QSem.signalQSem | 39 | true | true | 0 | 9 | 20 | 42 | 19 | 23 | null | null |
MichJP/hplar-hs | src/Lib.hs | bsd-3-clause | prettyPrint (Atom x) = x | 24 | prettyPrint (Atom x) = x | 24 | prettyPrint (Atom x) = x | 24 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.