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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
matkli/hscheme | Parse.hs | gpl-3.0 | -- | Read (possibly multiple) scheme expressions
readExprs :: String -> ThrowsError [Expr]
readExprs str = case parse (whiteSpace >> many (whiteSpace >> expr)) "" str of
Left err -> throwError $ ParseError err
Right val -> return val
-- | Read a /single/ scheme expression. | 314 | readExprs :: String -> ThrowsError [Expr]
readExprs str = case parse (whiteSpace >> many (whiteSpace >> expr)) "" str of
Left err -> throwError $ ParseError err
Right val -> return val
-- | Read a /single/ scheme expression. | 265 | readExprs str = case parse (whiteSpace >> many (whiteSpace >> expr)) "" str of
Left err -> throwError $ ParseError err
Right val -> return val
-- | Read a /single/ scheme expression. | 223 | true | true | 0 | 11 | 86 | 85 | 41 | 44 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M01/D11/Exercise.hs | mit | lookupTable :: Connection -> String -> IO LookupTable
lookupTable conn tableName = undefined | 92 | lookupTable :: Connection -> String -> IO LookupTable
lookupTable conn tableName = undefined | 92 | lookupTable conn tableName = undefined | 38 | false | true | 0 | 7 | 12 | 32 | 14 | 18 | null | null |
haskellbr/missingh | package-splitter/src/Main.hs | mit | main :: IO ()
main = do
args <- getArgs
case args of
(dirName:_) -> do
pkg <- packageAtDirectory dirName
splitPackage pkg
_ -> error "Invalid arguments" | 200 | main :: IO ()
main = do
args <- getArgs
case args of
(dirName:_) -> do
pkg <- packageAtDirectory dirName
splitPackage pkg
_ -> error "Invalid arguments" | 200 | main = do
args <- getArgs
case args of
(dirName:_) -> do
pkg <- packageAtDirectory dirName
splitPackage pkg
_ -> error "Invalid arguments" | 186 | false | true | 0 | 13 | 74 | 68 | 31 | 37 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Locked.hs | bsd-3-clause | lockedZipWith4UP
:: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e)
=> (a -> b -> c -> d -> e)
-> Vector a -> Vector b -> Vector c -> Vector d
-> Vector e
lockedZipWith4UP f as bs cs ds
= joinD theGang balanced
$ mapD (What "lockedWith4P") theGang
(\((a, b), c, d) -> lockedZipWith4SU f a b c d)
$ zip3D (zipD (splitD theGang balanced as)
(splitD theGang balanced bs))
(splitD theGang balanced cs)
(splitD theGang balanced ds) | 557 | lockedZipWith4UP
:: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e)
=> (a -> b -> c -> d -> e)
-> Vector a -> Vector b -> Vector c -> Vector d
-> Vector e
lockedZipWith4UP f as bs cs ds
= joinD theGang balanced
$ mapD (What "lockedWith4P") theGang
(\((a, b), c, d) -> lockedZipWith4SU f a b c d)
$ zip3D (zipD (splitD theGang balanced as)
(splitD theGang balanced bs))
(splitD theGang balanced cs)
(splitD theGang balanced ds) | 556 | lockedZipWith4UP f as bs cs ds
= joinD theGang balanced
$ mapD (What "lockedWith4P") theGang
(\((a, b), c, d) -> lockedZipWith4SU f a b c d)
$ zip3D (zipD (splitD theGang balanced as)
(splitD theGang balanced bs))
(splitD theGang balanced cs)
(splitD theGang balanced ds) | 370 | false | true | 4 | 12 | 214 | 236 | 113 | 123 | null | null |
jaalonso/I1M-Cod-Temas | src/Tema_25/rectangulo_positivo.hs | gpl-2.0 | rectanguloPositivo :: Picture
rectanguloPositivo = rectangleUpperWire 200 100 | 77 | rectanguloPositivo :: Picture
rectanguloPositivo = rectangleUpperWire 200 100 | 77 | rectanguloPositivo = rectangleUpperWire 200 100 | 47 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
markhibberd/fp-syd-free | src/Talks/Free/Language.hs | bsd-3-clause | describe (Free (GetPassword key next)) =
("Get a password word with key " <> key) : describe (next (Just "<password>")) | 121 | describe (Free (GetPassword key next)) =
("Get a password word with key " <> key) : describe (next (Just "<password>")) | 121 | describe (Free (GetPassword key next)) =
("Get a password word with key " <> key) : describe (next (Just "<password>")) | 121 | false | false | 0 | 10 | 21 | 49 | 24 | 25 | null | null |
urbanslug/ghc | testsuite/tests/concurrent/prog003/ImmList.hs | bsd-3-clause | newList :: IO (ListHandle a)
newList = do
r <- newIORef S.empty
return (ListHandle r) | 89 | newList :: IO (ListHandle a)
newList = do
r <- newIORef S.empty
return (ListHandle r) | 89 | newList = do
r <- newIORef S.empty
return (ListHandle r) | 60 | false | true | 0 | 10 | 18 | 50 | 21 | 29 | null | null |
green-haskell/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | mkSysTvName :: Unique -> FastString -> Name
mkSysTvName uniq fs = mkSystemName uniq (mkOccNameFS tvName fs) | 107 | mkSysTvName :: Unique -> FastString -> Name
mkSysTvName uniq fs = mkSystemName uniq (mkOccNameFS tvName fs) | 107 | mkSysTvName uniq fs = mkSystemName uniq (mkOccNameFS tvName fs) | 63 | false | true | 0 | 7 | 15 | 41 | 19 | 22 | null | null |
christiaanb/ghc | compiler/main/GhcMake.hs | bsd-3-clause | mkBuildModule :: ModSummary -> BuildModule
mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot) | 119 | mkBuildModule :: ModSummary -> BuildModule
mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot) | 119 | mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot) | 76 | false | true | 0 | 7 | 16 | 38 | 20 | 18 | null | null |
input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/InjectFail.hs | mit | testFInject :: MonadIO m => FInjectsHandle -> FInject -> m Bool
testFInject (FInjectsHandle Nothing) _ = pure False | 115 | testFInject :: MonadIO m => FInjectsHandle -> FInject -> m Bool
testFInject (FInjectsHandle Nothing) _ = pure False | 115 | testFInject (FInjectsHandle Nothing) _ = pure False | 51 | false | true | 0 | 11 | 17 | 47 | 21 | 26 | null | null |
psibi/yesod | yesod-static/Yesod/EmbeddedStatic/Css/Util.hs | mit | cssProductionImageFilter :: (FilePath -> IO BL.ByteString) -> Location -> FilePath -> Entry
cssProductionImageFilter prodFilter loc file =
(cssProductionFilter prodFilter loc file)
{ ebDevelReload = [| develBgImgB64 $(litE (stringL loc)) $(litE (stringL file)) |]
, ebDevelExtraFiles = Just [| develExtraFiles $(litE (stringL loc)) |]
} | 350 | cssProductionImageFilter :: (FilePath -> IO BL.ByteString) -> Location -> FilePath -> Entry
cssProductionImageFilter prodFilter loc file =
(cssProductionFilter prodFilter loc file)
{ ebDevelReload = [| develBgImgB64 $(litE (stringL loc)) $(litE (stringL file)) |]
, ebDevelExtraFiles = Just [| develExtraFiles $(litE (stringL loc)) |]
} | 350 | cssProductionImageFilter prodFilter loc file =
(cssProductionFilter prodFilter loc file)
{ ebDevelReload = [| develBgImgB64 $(litE (stringL loc)) $(litE (stringL file)) |]
, ebDevelExtraFiles = Just [| develExtraFiles $(litE (stringL loc)) |]
} | 258 | false | true | 0 | 9 | 57 | 79 | 43 | 36 | null | null |
jmct/IterativeCompiler | frontend/LambdaLift.hs | mit | renameDecls :: CoreProgram -> Fresh CoreProgram
renameDecls prog = mapM renameRhs prog | 86 | renameDecls :: CoreProgram -> Fresh CoreProgram
renameDecls prog = mapM renameRhs prog | 86 | renameDecls prog = mapM renameRhs prog | 38 | false | true | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
flowbox-public/accelerate-cuda | Data/Array/Accelerate/CUDA/Analysis/Launch.hs | bsd-3-clause | sharedMem _ Use{} _ = $internalError "sharedMem" "Use" | 59 | sharedMem _ Use{} _ = $internalError "sharedMem" "Use" | 59 | sharedMem _ Use{} _ = $internalError "sharedMem" "Use" | 59 | false | false | 0 | 6 | 12 | 23 | 10 | 13 | null | null |
slon1024/haskell_read_data | Html.hs | mit | main = runX $ fromUrl "http://www.datatau.com" >>> css "td.title a" !"href" | 75 | main = runX $ fromUrl "http://www.datatau.com" >>> css "td.title a" !"href" | 75 | main = runX $ fromUrl "http://www.datatau.com" >>> css "td.title a" !"href" | 75 | false | false | 0 | 8 | 10 | 24 | 11 | 13 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/abs_1.hs | mit | primCmpInt (Neg Zero) (Pos Zero) = EQ | 37 | primCmpInt (Neg Zero) (Pos Zero) = EQ | 37 | primCmpInt (Neg Zero) (Pos Zero) = EQ | 37 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
BlackBears/alanduncan.me | Pandoc/Pandoc.hs | mit | abbreviations abbrs (Plain inlines) = Plain $ walk (substituteAbbreviation abbrs) inlines | 89 | abbreviations abbrs (Plain inlines) = Plain $ walk (substituteAbbreviation abbrs) inlines | 89 | abbreviations abbrs (Plain inlines) = Plain $ walk (substituteAbbreviation abbrs) inlines | 89 | false | false | 0 | 8 | 10 | 32 | 15 | 17 | null | null |
input-output-hk/pos-haskell-prototype | binary/test/Test/Pos/Cbor/RefImpl.hs | mit | encodeTerm (TBytes len ws) = encodeToken (MT2_ByteString len ws) | 64 | encodeTerm (TBytes len ws) = encodeToken (MT2_ByteString len ws) | 64 | encodeTerm (TBytes len ws) = encodeToken (MT2_ByteString len ws) | 64 | false | false | 0 | 7 | 8 | 29 | 13 | 16 | null | null |
adk9/pbbs-haskell | PBBS/FileReader.hs | bsd-3-clause | readNatsPartial :: forall nty . (U.Unbox nty, Num nty, Eq nty) => S.ByteString -> IO (PartialNums nty)
readNatsPartial bs
| bs == S.empty = return (Single (MiddleFrag 0 0))
| otherwise = do
let hd = S.head bs
charsTotal = S.length bs
initV <- M.new (vecSize charsTotal)
(vs,lfrg) <- scanfwd charsTotal 0 initV [] hd (S.tail bs)
-- putStrLn$ " Got back "++show(length vs)++" partial reads"
-- Once we are done looping we need some logic to figure out the corner cases:
----------------------------------------
let total = sum $ map U.length vs
if digit hd then
(let first = U.head $ head vs -- The first (possibly partial) number parsed.
rest = U.tail (head vs) : tail vs
-- If we start in the middle of a number, then the RightFrag goes till the first whitespace:
rfrag = Just (RightFrag (fromJust$ S.findIndex (not . digit) bs) first) in
if total == 0
then case lfrg of
Nothing -> return (Compound rfrag [] Nothing)
Just (LeftFrag w) -> return (Single$ MiddleFrag charsTotal w)
else return (Compound rfrag rest lfrg)) -- Rfrag gobbles first.
else return (Compound Nothing vs lfrg) -- May be completely empty (whitespace only).
----------------------------------------
where
-- Given the number of characters left, how big of a vector chunk shall we allocate?
-- vecSize n = min chunkSize ((n `quot` 2) + 1) -- At minimum numbers must be one character.
vecSize n = ((n `quot` 4) + 1) -- Assume at least 3 digit numbers... tunable parameter.
-- loop :: Int -> Int -> nty -> M.IOVector nty -> Word8 -> S.ByteString ->
-- IO (M.IOVector nty, Maybe (LeftFrag nty), Int)
loop !lmt !ind !acc !vec !vecacc !nxt !rst
-- Extend the currently accumulating number in 'acc':
| digit nxt =
let acc' = (10*acc + (fromIntegral nxt-48)) in
if lmt == 1
then closeOff vec vecacc ind (Just (LeftFrag acc'))
else loop (lmt-1) ind acc' vec vecacc (unsafeHead rst) (unsafeTail rst)
-- When we fill one chunk we move to the next:
| ind >= M.length vec = do
-- putStrLn$ " [!] Overflow at "++show ind++", next chunk!"
-- putStr$ show ind ++ " "
fresh <- M.new (vecSize$ S.length rst) :: IO (M.IOVector nty)
vec' <- U.unsafeFreeze vec
loop lmt 0 acc fresh (vec':vecacc) nxt rst
| otherwise =
do M.write vec ind acc
if lmt == 1
then closeOff vec vecacc (ind+1) Nothing
else scanfwd (lmt-1) (ind+1) vec vecacc (unsafeHead rst) (unsafeTail rst)
scanfwd !lmt !ind !vec !vecacc !nxt !rst
| digit nxt = loop lmt ind 0 vec vecacc nxt rst -- We've started a number.
| otherwise = if lmt == 1
then closeOff vec vecacc ind Nothing
else scanfwd (lmt-1) ind vec vecacc (unsafeHead rst) (unsafeTail rst)
digit nxt = nxt >= 48 && nxt <= 57
closeOff vec vecacc ind frag =
do vec' <- U.unsafeFreeze (M.take ind vec)
return (reverse (vec':vecacc), frag)
--------------------------------------------------------------------------------
-- Unit Tests
-------------------------------------------------------------------------------- | 3,279 | readNatsPartial :: forall nty . (U.Unbox nty, Num nty, Eq nty) => S.ByteString -> IO (PartialNums nty)
readNatsPartial bs
| bs == S.empty = return (Single (MiddleFrag 0 0))
| otherwise = do
let hd = S.head bs
charsTotal = S.length bs
initV <- M.new (vecSize charsTotal)
(vs,lfrg) <- scanfwd charsTotal 0 initV [] hd (S.tail bs)
-- putStrLn$ " Got back "++show(length vs)++" partial reads"
-- Once we are done looping we need some logic to figure out the corner cases:
----------------------------------------
let total = sum $ map U.length vs
if digit hd then
(let first = U.head $ head vs -- The first (possibly partial) number parsed.
rest = U.tail (head vs) : tail vs
-- If we start in the middle of a number, then the RightFrag goes till the first whitespace:
rfrag = Just (RightFrag (fromJust$ S.findIndex (not . digit) bs) first) in
if total == 0
then case lfrg of
Nothing -> return (Compound rfrag [] Nothing)
Just (LeftFrag w) -> return (Single$ MiddleFrag charsTotal w)
else return (Compound rfrag rest lfrg)) -- Rfrag gobbles first.
else return (Compound Nothing vs lfrg) -- May be completely empty (whitespace only).
----------------------------------------
where
-- Given the number of characters left, how big of a vector chunk shall we allocate?
-- vecSize n = min chunkSize ((n `quot` 2) + 1) -- At minimum numbers must be one character.
vecSize n = ((n `quot` 4) + 1) -- Assume at least 3 digit numbers... tunable parameter.
-- loop :: Int -> Int -> nty -> M.IOVector nty -> Word8 -> S.ByteString ->
-- IO (M.IOVector nty, Maybe (LeftFrag nty), Int)
loop !lmt !ind !acc !vec !vecacc !nxt !rst
-- Extend the currently accumulating number in 'acc':
| digit nxt =
let acc' = (10*acc + (fromIntegral nxt-48)) in
if lmt == 1
then closeOff vec vecacc ind (Just (LeftFrag acc'))
else loop (lmt-1) ind acc' vec vecacc (unsafeHead rst) (unsafeTail rst)
-- When we fill one chunk we move to the next:
| ind >= M.length vec = do
-- putStrLn$ " [!] Overflow at "++show ind++", next chunk!"
-- putStr$ show ind ++ " "
fresh <- M.new (vecSize$ S.length rst) :: IO (M.IOVector nty)
vec' <- U.unsafeFreeze vec
loop lmt 0 acc fresh (vec':vecacc) nxt rst
| otherwise =
do M.write vec ind acc
if lmt == 1
then closeOff vec vecacc (ind+1) Nothing
else scanfwd (lmt-1) (ind+1) vec vecacc (unsafeHead rst) (unsafeTail rst)
scanfwd !lmt !ind !vec !vecacc !nxt !rst
| digit nxt = loop lmt ind 0 vec vecacc nxt rst -- We've started a number.
| otherwise = if lmt == 1
then closeOff vec vecacc ind Nothing
else scanfwd (lmt-1) ind vec vecacc (unsafeHead rst) (unsafeTail rst)
digit nxt = nxt >= 48 && nxt <= 57
closeOff vec vecacc ind frag =
do vec' <- U.unsafeFreeze (M.take ind vec)
return (reverse (vec':vecacc), frag)
--------------------------------------------------------------------------------
-- Unit Tests
-------------------------------------------------------------------------------- | 3,279 | readNatsPartial bs
| bs == S.empty = return (Single (MiddleFrag 0 0))
| otherwise = do
let hd = S.head bs
charsTotal = S.length bs
initV <- M.new (vecSize charsTotal)
(vs,lfrg) <- scanfwd charsTotal 0 initV [] hd (S.tail bs)
-- putStrLn$ " Got back "++show(length vs)++" partial reads"
-- Once we are done looping we need some logic to figure out the corner cases:
----------------------------------------
let total = sum $ map U.length vs
if digit hd then
(let first = U.head $ head vs -- The first (possibly partial) number parsed.
rest = U.tail (head vs) : tail vs
-- If we start in the middle of a number, then the RightFrag goes till the first whitespace:
rfrag = Just (RightFrag (fromJust$ S.findIndex (not . digit) bs) first) in
if total == 0
then case lfrg of
Nothing -> return (Compound rfrag [] Nothing)
Just (LeftFrag w) -> return (Single$ MiddleFrag charsTotal w)
else return (Compound rfrag rest lfrg)) -- Rfrag gobbles first.
else return (Compound Nothing vs lfrg) -- May be completely empty (whitespace only).
----------------------------------------
where
-- Given the number of characters left, how big of a vector chunk shall we allocate?
-- vecSize n = min chunkSize ((n `quot` 2) + 1) -- At minimum numbers must be one character.
vecSize n = ((n `quot` 4) + 1) -- Assume at least 3 digit numbers... tunable parameter.
-- loop :: Int -> Int -> nty -> M.IOVector nty -> Word8 -> S.ByteString ->
-- IO (M.IOVector nty, Maybe (LeftFrag nty), Int)
loop !lmt !ind !acc !vec !vecacc !nxt !rst
-- Extend the currently accumulating number in 'acc':
| digit nxt =
let acc' = (10*acc + (fromIntegral nxt-48)) in
if lmt == 1
then closeOff vec vecacc ind (Just (LeftFrag acc'))
else loop (lmt-1) ind acc' vec vecacc (unsafeHead rst) (unsafeTail rst)
-- When we fill one chunk we move to the next:
| ind >= M.length vec = do
-- putStrLn$ " [!] Overflow at "++show ind++", next chunk!"
-- putStr$ show ind ++ " "
fresh <- M.new (vecSize$ S.length rst) :: IO (M.IOVector nty)
vec' <- U.unsafeFreeze vec
loop lmt 0 acc fresh (vec':vecacc) nxt rst
| otherwise =
do M.write vec ind acc
if lmt == 1
then closeOff vec vecacc (ind+1) Nothing
else scanfwd (lmt-1) (ind+1) vec vecacc (unsafeHead rst) (unsafeTail rst)
scanfwd !lmt !ind !vec !vecacc !nxt !rst
| digit nxt = loop lmt ind 0 vec vecacc nxt rst -- We've started a number.
| otherwise = if lmt == 1
then closeOff vec vecacc ind Nothing
else scanfwd (lmt-1) ind vec vecacc (unsafeHead rst) (unsafeTail rst)
digit nxt = nxt >= 48 && nxt <= 57
closeOff vec vecacc ind frag =
do vec' <- U.unsafeFreeze (M.take ind vec)
return (reverse (vec':vecacc), frag)
--------------------------------------------------------------------------------
-- Unit Tests
-------------------------------------------------------------------------------- | 3,176 | false | true | 1 | 20 | 878 | 937 | 460 | 477 | null | null |
nomeata/ghc | compiler/cmm/CmmRewriteAssignments.hs | bsd-3-clause | assignmentTransfer :: Platform
-> FwdTransfer (WithRegUsage CmmNode) AssignmentMap
assignmentTransfer platform
= mkFTransfer3 (flip const)
(middleAssignment platform)
((mkFactBase assignmentLattice .) . lastAssignment) | 279 | assignmentTransfer :: Platform
-> FwdTransfer (WithRegUsage CmmNode) AssignmentMap
assignmentTransfer platform
= mkFTransfer3 (flip const)
(middleAssignment platform)
((mkFactBase assignmentLattice .) . lastAssignment) | 279 | assignmentTransfer platform
= mkFTransfer3 (flip const)
(middleAssignment platform)
((mkFactBase assignmentLattice .) . lastAssignment) | 177 | false | true | 0 | 9 | 81 | 62 | 31 | 31 | null | null |
siddhanathan/ghc | compiler/main/DynFlags.hs | bsd-3-clause | ghcUsagePath :: DynFlags -> FilePath
ghcUsagePath dflags = sGhcUsagePath (settings dflags) | 99 | ghcUsagePath :: DynFlags -> FilePath
ghcUsagePath dflags = sGhcUsagePath (settings dflags) | 99 | ghcUsagePath dflags = sGhcUsagePath (settings dflags) | 53 | false | true | 0 | 7 | 19 | 32 | 14 | 18 | null | null |
peterokagey/haskellOEIS | src/Helpers/GridLabeling.hs | apache-2.0 | pairs :: [(Integer, Integer)]
pairs = map tableByAntidiagonals [0..] | 68 | pairs :: [(Integer, Integer)]
pairs = map tableByAntidiagonals [0..] | 68 | pairs = map tableByAntidiagonals [0..] | 38 | false | true | 0 | 6 | 8 | 28 | 16 | 12 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'DatafeedstatusesListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dlrlNextPageToken'
--
-- * 'dlrlKind'
--
-- * 'dlrlResources'
datafeedstatusesListResponse
:: DatafeedstatusesListResponse
datafeedstatusesListResponse =
DatafeedstatusesListResponse'
{ _dlrlNextPageToken = Nothing
, _dlrlKind = "content#datafeedstatusesListResponse"
, _dlrlResources = Nothing
} | 509 | datafeedstatusesListResponse
:: DatafeedstatusesListResponse
datafeedstatusesListResponse =
DatafeedstatusesListResponse'
{ _dlrlNextPageToken = Nothing
, _dlrlKind = "content#datafeedstatusesListResponse"
, _dlrlResources = Nothing
} | 258 | datafeedstatusesListResponse =
DatafeedstatusesListResponse'
{ _dlrlNextPageToken = Nothing
, _dlrlKind = "content#datafeedstatusesListResponse"
, _dlrlResources = Nothing
} | 193 | true | true | 1 | 7 | 84 | 47 | 29 | 18 | null | null |
snoyberg/ghc | compiler/coreSyn/PprCore.hs | bsd-3-clause | ppr_expr :: OutputableBndr b => (SDoc -> SDoc) -> Expr b -> SDoc
-- The function adds parens in context that need
-- an atomic value (e.g. function args)
ppr_expr _ (Var name) = ppr name | 212 | ppr_expr :: OutputableBndr b => (SDoc -> SDoc) -> Expr b -> SDoc
ppr_expr _ (Var name) = ppr name | 106 | ppr_expr _ (Var name) = ppr name | 41 | true | true | 0 | 8 | 61 | 52 | 26 | 26 | null | null |
khibino/haskell-hdbc-tool.201303 | src/Database/HDBC/TH.hs | bsd-3-clause | varCamelcaseName :: String -> VarName
varCamelcaseName = toVarName . camelcaseUpper | 84 | varCamelcaseName :: String -> VarName
varCamelcaseName = toVarName . camelcaseUpper | 84 | varCamelcaseName = toVarName . camelcaseUpper | 46 | false | true | 0 | 5 | 10 | 19 | 10 | 9 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvUseBootloader :: String
hvUseBootloader = "use_bootloader" | 60 | hvUseBootloader :: String
hvUseBootloader = "use_bootloader" | 60 | hvUseBootloader = "use_bootloader" | 34 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ [res] PopCnt64Op [w] = emitPopCntCall res w W64 | 65 | emitPrimOp _ [res] PopCnt64Op [w] = emitPopCntCall res w W64 | 65 | emitPrimOp _ [res] PopCnt64Op [w] = emitPopCntCall res w W64 | 65 | false | false | 1 | 5 | 14 | 32 | 14 | 18 | null | null |
greole/calendula | Calendula.hs | bsd-3-clause | wrapDiv :: String -> String
wrapDiv x = "<div class=\"article\">\n\n\n" ++ x ++ "\n\n</div>\n\n" | 96 | wrapDiv :: String -> String
wrapDiv x = "<div class=\"article\">\n\n\n" ++ x ++ "\n\n</div>\n\n" | 96 | wrapDiv x = "<div class=\"article\">\n\n\n" ++ x ++ "\n\n</div>\n\n" | 68 | false | true | 0 | 7 | 13 | 32 | 14 | 18 | null | null |
badp/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | pReadd :: Field
pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 97 | pReadd :: Field
pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 97 | pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 81 | false | true | 0 | 6 | 18 | 21 | 10 | 11 | null | null |
bitemyapp/tandoori | src/Tandoori/Typing/Pretty.hs | bsd-3-clause | prettyPolyPredM (cls, α) = do α' <- prettyTvM α
return $ (cls, α') | 96 | prettyPolyPredM (cls, α) = do α' <- prettyTvM α
return $ (cls, α') | 96 | prettyPolyPredM (cls, α) = do α' <- prettyTvM α
return $ (cls, α') | 96 | false | false | 0 | 8 | 42 | 38 | 19 | 19 | null | null |
hesselink/regex-crossword | src/Crossword/Regex.hs | bsd-3-clause | ppr (Option r) = ppr r ++ "?" | 29 | ppr (Option r) = ppr r ++ "?" | 29 | ppr (Option r) = ppr r ++ "?" | 29 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
bitemyapp/lets-lens | src/Lets/StoreLens.hs | bsd-3-clause | -- |
--
-- >>> setStreet fred "Some Other St"
-- Person 24 "Fred" (Address "Some Other St" "Fredville" (Locality "Fredmania" "New South Fred" "Fredalia"))
--
-- >>> setStreet mary "Some Other St"
-- Person 28 "Mary" (Address "Some Other St" "Maryland" (Locality "Mary Mary" "Western Mary" "Maristan"))
setStreet ::
Person
-> String
-> Person
setStreet =
error "todo: setStreet" | 385 | setStreet ::
Person
-> String
-> Person
setStreet =
error "todo: setStreet" | 83 | setStreet =
error "todo: setStreet" | 37 | true | true | 0 | 8 | 67 | 32 | 18 | 14 | null | null |
thomasbrus/imperia | src/Processor/Exec.hs | mit | exec prog state (i:is)
| prog!!(pc state)==EndProg = []
| otherwise = output prog state' : exec prog state' is
where
state' = sprockell prog state i | 167 | exec prog state (i:is)
| prog!!(pc state)==EndProg = []
| otherwise = output prog state' : exec prog state' is
where
state' = sprockell prog state i | 167 | exec prog state (i:is)
| prog!!(pc state)==EndProg = []
| otherwise = output prog state' : exec prog state' is
where
state' = sprockell prog state i | 167 | false | false | 1 | 11 | 45 | 81 | 38 | 43 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Txt2Tags.hs | gpl-2.0 | underline :: T2T Inlines
underline = inlineMarkup inline B.emph '_' (B.str) | 75 | underline :: T2T Inlines
underline = inlineMarkup inline B.emph '_' (B.str) | 75 | underline = inlineMarkup inline B.emph '_' (B.str) | 50 | false | true | 0 | 7 | 10 | 30 | 15 | 15 | null | null |
tibbe/event | src/System/Event/PSQ.hs | bsd-2-clause | rsingleLeft k1 p1 v1 t1 m1 (RLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k2 p2 v2 (rloser k1 p1 v1 t1 m1 t2) m2 t3 | 114 | rsingleLeft k1 p1 v1 t1 m1 (RLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k2 p2 v2 (rloser k1 p1 v1 t1 m1 t2) m2 t3 | 114 | rsingleLeft k1 p1 v1 t1 m1 (RLoser _ (E k2 p2 v2) t2 m2 t3) =
rloser k2 p2 v2 (rloser k1 p1 v1 t1 m1 t2) m2 t3 | 114 | false | false | 0 | 9 | 32 | 80 | 35 | 45 | null | null |
nbrunt/JSHOP | src/CodeCompressor.hs | mit | genNewExpr (NNewExpr newExpr) = do
emit "new "
newExpr' <- genNewExpr newExpr
genMaybe genPrimExpr newExpr'
return Nothing
-- | Call expression | 167 | genNewExpr (NNewExpr newExpr) = do
emit "new "
newExpr' <- genNewExpr newExpr
genMaybe genPrimExpr newExpr'
return Nothing
-- | Call expression | 167 | genNewExpr (NNewExpr newExpr) = do
emit "new "
newExpr' <- genNewExpr newExpr
genMaybe genPrimExpr newExpr'
return Nothing
-- | Call expression | 167 | false | false | 0 | 8 | 44 | 46 | 19 | 27 | null | null |
jfeltz/tasty-integrate | src/Source/ImportDecl.hs | bsd-2-clause | noSrcPragma :: Bool
noSrcPragma = False | 39 | noSrcPragma :: Bool
noSrcPragma = False | 39 | noSrcPragma = False | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
paradoxix/haskellplayground | src/Lib.hs | bsd-3-clause | newDbConn :: ConnectInfo -> IO Connection
newDbConn conf = connect conf | 71 | newDbConn :: ConnectInfo -> IO Connection
newDbConn conf = connect conf | 71 | newDbConn conf = connect conf | 29 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
yi-editor/word-trie | src/Data/Trie.hs | gpl-2.0 | -- | Take a list of String and compress it into a Trie
fromList :: [String] -> Trie
fromList = foldr insert empty | 113 | fromList :: [String] -> Trie
fromList = foldr insert empty | 58 | fromList = foldr insert empty | 29 | true | true | 0 | 6 | 22 | 24 | 13 | 11 | null | null |
unknownloner/calccomp | Asm/InstrBytes.hs | mit | instrBytes LD (Reg16Index l:Num r:_) = regIndex l <> w8 0x21 <> w16 r | 79 | instrBytes LD (Reg16Index l:Num r:_) = regIndex l <> w8 0x21 <> w16 r | 79 | instrBytes LD (Reg16Index l:Num r:_) = regIndex l <> w8 0x21 <> w16 r | 79 | false | false | 0 | 9 | 23 | 45 | 20 | 25 | null | null |
HS-Carbon/hs-carbon-aggregator | 3rd-party/python-pickle/Language/Python/Pickle.hs | apache-2.0 | -- Tuples
empty_tuple, tuple, tuple1, tuple2, tuple3 :: Parser OpCode
empty_tuple = string ")" *> return EMPTY_TUPLE | 117 | empty_tuple, tuple, tuple1, tuple2, tuple3 :: Parser OpCode
empty_tuple = string ")" *> return EMPTY_TUPLE | 106 | empty_tuple = string ")" *> return EMPTY_TUPLE | 46 | true | true | 0 | 6 | 17 | 33 | 20 | 13 | null | null |
timjs/idris-clean | Sources/IRTS/CodegenClean.hs | mit | cgPrim (LAnd ty) = cgPrimOp (cgITy ty) "bitand" | 49 | cgPrim (LAnd ty) = cgPrimOp (cgITy ty) "bitand" | 49 | cgPrim (LAnd ty) = cgPrimOp (cgITy ty) "bitand" | 49 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
plumlife/cabal | Cabal/Distribution/Package.hs | bsd-3-clause | -- | Simplify the 'VersionRange' expression in a 'Dependency'.
-- See 'simplifyVersionRange'.
--
simplifyDependency :: Dependency -> Dependency
simplifyDependency (Dependency name range) =
Dependency name (simplifyVersionRange range) | 235 | simplifyDependency :: Dependency -> Dependency
simplifyDependency (Dependency name range) =
Dependency name (simplifyVersionRange range) | 138 | simplifyDependency (Dependency name range) =
Dependency name (simplifyVersionRange range) | 91 | true | true | 0 | 7 | 28 | 40 | 21 | 19 | null | null |
facebookincubator/duckling | Duckling/TimeGrain/RU/Rules.hs | bsd-3-clause | grains :: [(Text, String, Grain)]
grains = [ ("second (grain) ", "сек(унд(а|у|ы)?)?", Second)
, ("minute (grain)" , "мин(ут(а|у|ы)?)?", Minute)
, ("hour (grain)" , "ч(ас(а|ов)?)?", Hour)
, ("day (grain)" , "день|дня|дней", Day)
, ("week (grain)" , "недел(ь|я|и|ю)?", Week)
, ("month (grain)" , "месяц(а|ев)?", Month)
, ("quarter (grain)", "квартал(а)?", Quarter)
, ("year (grain)" , "года?|лет", Year)
] | 531 | grains :: [(Text, String, Grain)]
grains = [ ("second (grain) ", "сек(унд(а|у|ы)?)?", Second)
, ("minute (grain)" , "мин(ут(а|у|ы)?)?", Minute)
, ("hour (grain)" , "ч(ас(а|ов)?)?", Hour)
, ("day (grain)" , "день|дня|дней", Day)
, ("week (grain)" , "недел(ь|я|и|ю)?", Week)
, ("month (grain)" , "месяц(а|ев)?", Month)
, ("quarter (grain)", "квартал(а)?", Quarter)
, ("year (grain)" , "года?|лет", Year)
] | 531 | grains = [ ("second (grain) ", "сек(унд(а|у|ы)?)?", Second)
, ("minute (grain)" , "мин(ут(а|у|ы)?)?", Minute)
, ("hour (grain)" , "ч(ас(а|ов)?)?", Hour)
, ("day (grain)" , "день|дня|дней", Day)
, ("week (grain)" , "недел(ь|я|и|ю)?", Week)
, ("month (grain)" , "месяц(а|ев)?", Month)
, ("quarter (grain)", "квартал(а)?", Quarter)
, ("year (grain)" , "года?|лет", Year)
] | 497 | false | true | 0 | 8 | 182 | 126 | 79 | 47 | null | null |
jwiegley/hnix | tests/EvalTests.hs | bsd-3-clause | -- case_function_equals1 =
-- constantEqualText "true" "{f = x: x;} == {f = x: x;}"
-- case_function_equals2 =
-- constantEqualText "true" "[(x: x)] == [(x: x)]"
case_function_equals3 =
constantEqualText "false" "(let a = (x: x); in a == a)" | 255 | case_function_equals3 =
constantEqualText "false" "(let a = (x: x); in a == a)" | 83 | case_function_equals3 =
constantEqualText "false" "(let a = (x: x); in a == a)" | 83 | true | false | 1 | 5 | 52 | 19 | 9 | 10 | null | null |
geraldus/yesod | yesod-core/src/Yesod/Core/Content.hs | mit | typeCss :: ContentType
typeCss = "text/css; charset=utf-8" | 58 | typeCss :: ContentType
typeCss = "text/css; charset=utf-8" | 58 | typeCss = "text/css; charset=utf-8" | 35 | false | true | 0 | 4 | 6 | 11 | 6 | 5 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT14.hs | gpl-3.0 | -- Theorem
prop_T14 :: [Nat] -> Prop
prop_T14 x = proveBool (sorted (isort x)) | 79 | prop_T14 :: [Nat] -> Prop
prop_T14 x = proveBool (sorted (isort x)) | 67 | prop_T14 x = proveBool (sorted (isort x)) | 41 | true | true | 0 | 9 | 14 | 43 | 20 | 23 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX42.hs | lgpl-2.1 | mBidResponse :: FIXMessageSpec
mBidResponse = FMSpec
{ msName = "BidResponse"
, msType = C.pack "l"
, msHeader = headerFIX42
, msBody = mBidResponseBody
, msTrailer = trailerFIX42 }
where
mBidResponseBody =
LT.insert (tnum tBidID) tBidID $
LT.insert (tnum tClientBidID) tClientBidID $
LT.insert (tnum tNoBidComponents) gNoBidComponents''' LT.new
where
gNoBidComponents''' = FIXTag
{ tName = "NoBidComponents"
, tnum = tnum tNoBidComponents
, tparser = gNoBidComponentsP'''
, arbitraryValue = arbibtraryFIXGroup gNoBidComponentsSpec''' }
gNoBidComponentsP''' = groupP gNoBidComponentsSpec'''
gNoBidComponentsSpec''' = FGSpec
{ gsLength = tNoBidComponents
, gsSeperator = tCommission
, gsBody = gNoBidComponentsBody''' }
where
gNoBidComponentsBody''' =
LT.insert (tnum tCommType) tCommType $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCountry) tCountry $
LT.insert (tnum tSide) tSide $
LT.insert (tnum tPrice) tPrice $
LT.insert (tnum tPriceType) tPriceType $
LT.insert (tnum tFairValue) tFairValue $
LT.insert (tnum tNetGrossInd) tNetGrossInd $
LT.insert (tnum tSettlmntTyp) tSettlmntTyp $
LT.insert (tnum tFutSettDate) tFutSettDate $
LT.insert (tnum tTradingSessionID) tTradingSessionID $
LT.insert (tnum tText) tText $
LT.insert (tnum tEncodedTextLen) tEncodedTextLen $
LT.insert (tnum tEncodedText) tEncodedText LT.new | 1,743 | mBidResponse :: FIXMessageSpec
mBidResponse = FMSpec
{ msName = "BidResponse"
, msType = C.pack "l"
, msHeader = headerFIX42
, msBody = mBidResponseBody
, msTrailer = trailerFIX42 }
where
mBidResponseBody =
LT.insert (tnum tBidID) tBidID $
LT.insert (tnum tClientBidID) tClientBidID $
LT.insert (tnum tNoBidComponents) gNoBidComponents''' LT.new
where
gNoBidComponents''' = FIXTag
{ tName = "NoBidComponents"
, tnum = tnum tNoBidComponents
, tparser = gNoBidComponentsP'''
, arbitraryValue = arbibtraryFIXGroup gNoBidComponentsSpec''' }
gNoBidComponentsP''' = groupP gNoBidComponentsSpec'''
gNoBidComponentsSpec''' = FGSpec
{ gsLength = tNoBidComponents
, gsSeperator = tCommission
, gsBody = gNoBidComponentsBody''' }
where
gNoBidComponentsBody''' =
LT.insert (tnum tCommType) tCommType $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCountry) tCountry $
LT.insert (tnum tSide) tSide $
LT.insert (tnum tPrice) tPrice $
LT.insert (tnum tPriceType) tPriceType $
LT.insert (tnum tFairValue) tFairValue $
LT.insert (tnum tNetGrossInd) tNetGrossInd $
LT.insert (tnum tSettlmntTyp) tSettlmntTyp $
LT.insert (tnum tFutSettDate) tFutSettDate $
LT.insert (tnum tTradingSessionID) tTradingSessionID $
LT.insert (tnum tText) tText $
LT.insert (tnum tEncodedTextLen) tEncodedTextLen $
LT.insert (tnum tEncodedText) tEncodedText LT.new | 1,743 | mBidResponse = FMSpec
{ msName = "BidResponse"
, msType = C.pack "l"
, msHeader = headerFIX42
, msBody = mBidResponseBody
, msTrailer = trailerFIX42 }
where
mBidResponseBody =
LT.insert (tnum tBidID) tBidID $
LT.insert (tnum tClientBidID) tClientBidID $
LT.insert (tnum tNoBidComponents) gNoBidComponents''' LT.new
where
gNoBidComponents''' = FIXTag
{ tName = "NoBidComponents"
, tnum = tnum tNoBidComponents
, tparser = gNoBidComponentsP'''
, arbitraryValue = arbibtraryFIXGroup gNoBidComponentsSpec''' }
gNoBidComponentsP''' = groupP gNoBidComponentsSpec'''
gNoBidComponentsSpec''' = FGSpec
{ gsLength = tNoBidComponents
, gsSeperator = tCommission
, gsBody = gNoBidComponentsBody''' }
where
gNoBidComponentsBody''' =
LT.insert (tnum tCommType) tCommType $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCountry) tCountry $
LT.insert (tnum tSide) tSide $
LT.insert (tnum tPrice) tPrice $
LT.insert (tnum tPriceType) tPriceType $
LT.insert (tnum tFairValue) tFairValue $
LT.insert (tnum tNetGrossInd) tNetGrossInd $
LT.insert (tnum tSettlmntTyp) tSettlmntTyp $
LT.insert (tnum tFutSettDate) tFutSettDate $
LT.insert (tnum tTradingSessionID) tTradingSessionID $
LT.insert (tnum tText) tText $
LT.insert (tnum tEncodedTextLen) tEncodedTextLen $
LT.insert (tnum tEncodedText) tEncodedText LT.new | 1,712 | false | true | 0 | 26 | 575 | 423 | 216 | 207 | null | null |
diku-dk/futhark | src/Futhark/CLI/Literate.hs | isc | newFileContents :: Env -> FilePath -> (FilePath -> ScriptM ()) -> ScriptM T.Text
newFileContents env template m =
liftIO . T.readFile . fst =<< newFileWorker env template m | 174 | newFileContents :: Env -> FilePath -> (FilePath -> ScriptM ()) -> ScriptM T.Text
newFileContents env template m =
liftIO . T.readFile . fst =<< newFileWorker env template m | 174 | newFileContents env template m =
liftIO . T.readFile . fst =<< newFileWorker env template m | 93 | false | true | 0 | 11 | 29 | 68 | 33 | 35 | null | null |
DaMSL/K3 | src/Language/K3/TypeSystem/TypeDecision/AnnotationInlining.hs | apache-2.0 | concatReprs :: forall m. (TypeErrorI m, Monad m)
=> [AnnRepr] -> m AnnRepr
concatReprs = foldM appendRepr emptyRepr | 126 | concatReprs :: forall m. (TypeErrorI m, Monad m)
=> [AnnRepr] -> m AnnRepr
concatReprs = foldM appendRepr emptyRepr | 126 | concatReprs = foldM appendRepr emptyRepr | 40 | false | true | 0 | 8 | 28 | 46 | 24 | 22 | null | null |
ml9951/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | contIsTrivial (CastIt _ k) = contIsTrivial k | 81 | contIsTrivial (CastIt _ k) = contIsTrivial k | 81 | contIsTrivial (CastIt _ k) = contIsTrivial k | 81 | false | false | 0 | 7 | 43 | 20 | 9 | 11 | null | null |
snowmantw/Frag | src/Main.hs | gpl-2.0 | actuate :: GameData -> ReactHandle a b ->
Bool -> (Event (), [ObsObjState]) -> IO Bool
actuate gd _ _ (e, noos) = do
when (force (noos) `seq` isEvent e)
(render gd noos)
return False | 200 | actuate :: GameData -> ReactHandle a b ->
Bool -> (Event (), [ObsObjState]) -> IO Bool
actuate gd _ _ (e, noos) = do
when (force (noos) `seq` isEvent e)
(render gd noos)
return False | 200 | actuate gd _ _ (e, noos) = do
when (force (noos) `seq` isEvent e)
(render gd noos)
return False | 110 | false | true | 0 | 11 | 52 | 104 | 52 | 52 | null | null |
ardumont/haskell-lab | src/programming-in-haskell/ch1.hs | gpl-2.0 | pdt (x:xs) = x * pdt xs | 23 | pdt (x:xs) = x * pdt xs | 23 | pdt (x:xs) = x * pdt xs | 23 | false | false | 0 | 6 | 6 | 24 | 11 | 13 | null | null |
rzil/honours | LeavittPathAlgebras/Example15.hs | mit | g1 = edge "g" | 13 | g1 = edge "g" | 13 | g1 = edge "g" | 13 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
shouya/gximemo | GxiMemo/GxiMemo.hs | mit | -- worked
toPattern (MPair ("sequence", xs)) =
liftM Sequence (mapM toPattern $ getMList $ expandSequence xs) | 111 | toPattern (MPair ("sequence", xs)) =
liftM Sequence (mapM toPattern $ getMList $ expandSequence xs) | 101 | toPattern (MPair ("sequence", xs)) =
liftM Sequence (mapM toPattern $ getMList $ expandSequence xs) | 101 | true | false | 0 | 8 | 17 | 46 | 22 | 24 | null | null |
k-bx/snap-server | test/Snap/Test/Common.hs | bsd-3-clause | expectException :: IO a -> IO ()
expectException m = do
e <- try m
case e of
Left (z::SomeException) -> length (show z) `seq` return ()
Right _ -> assertFailure "expected exception, didn't get it"
------------------------------------------------------------------------------ | 297 | expectException :: IO a -> IO ()
expectException m = do
e <- try m
case e of
Left (z::SomeException) -> length (show z) `seq` return ()
Right _ -> assertFailure "expected exception, didn't get it"
------------------------------------------------------------------------------ | 297 | expectException m = do
e <- try m
case e of
Left (z::SomeException) -> length (show z) `seq` return ()
Right _ -> assertFailure "expected exception, didn't get it"
------------------------------------------------------------------------------ | 264 | false | true | 0 | 13 | 58 | 92 | 43 | 49 | null | null |
biegunka/biegunka | src/Control/Biegunka/Namespace.hs | mit | -- | Save namespace data to disk
close :: Db -> IO ()
close = _close | 68 | close :: Db -> IO ()
close = _close | 35 | close = _close | 14 | true | true | 0 | 7 | 15 | 21 | 11 | 10 | null | null |
kmate/HaRe | old/testing/generativeFold/RecordIn6_TokOut.hs | bsd-3-clause | {- map2 xs = map (\y -> y {x = 1}) xs -}
map2 xs = (case ((\ y -> y {x = 1}), xs,42) of
(f, [], n) -> []
(f, (x : xs),n) -> (f x) : (map (\ y -> y {x = n}) xs)) | 191 | map2 xs = (case ((\ y -> y {x = 1}), xs,42) of
(f, [], n) -> []
(f, (x : xs),n) -> (f x) : (map (\ y -> y {x = n}) xs)) | 149 | map2 xs = (case ((\ y -> y {x = 1}), xs,42) of
(f, [], n) -> []
(f, (x : xs),n) -> (f x) : (map (\ y -> y {x = n}) xs)) | 149 | true | false | 1 | 16 | 78 | 121 | 68 | 53 | null | null |
bmillwood/dice | src/Main.hs | bsd-3-clause | rollerSelectForm :: Html
rollerSelectForm = form ! A.method "get" ! A.id "rollerSelect" $ do
text "See dice rolls for: "
textInput formKey
submitButton "Fetch!" | 166 | rollerSelectForm :: Html
rollerSelectForm = form ! A.method "get" ! A.id "rollerSelect" $ do
text "See dice rolls for: "
textInput formKey
submitButton "Fetch!" | 166 | rollerSelectForm = form ! A.method "get" ! A.id "rollerSelect" $ do
text "See dice rolls for: "
textInput formKey
submitButton "Fetch!" | 141 | false | true | 0 | 9 | 29 | 51 | 22 | 29 | null | null |
MichielDerhaeg/stack | src/Stack/New.hs | bsd-3-clause | -- | Default web URL to get a yaml file containing template metadata.
defaultTemplateInfoUrl :: String
defaultTemplateInfoUrl =
"https://raw.githubusercontent.com/commercialhaskell/stack-templates/master/template-info.yaml" | 227 | defaultTemplateInfoUrl :: String
defaultTemplateInfoUrl =
"https://raw.githubusercontent.com/commercialhaskell/stack-templates/master/template-info.yaml" | 157 | defaultTemplateInfoUrl =
"https://raw.githubusercontent.com/commercialhaskell/stack-templates/master/template-info.yaml" | 124 | true | true | 0 | 4 | 22 | 12 | 7 | 5 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QFontInfo x = qcl_QFontInfo [] x | 42 | qCastList_QFontInfo x = qcl_QFontInfo [] x | 42 | qCastList_QFontInfo x = qcl_QFontInfo [] x | 42 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
brendanhay/gogol | gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/URLChannels/List.hs | mpl-2.0 | -- | Account to which the ad client belongs.
auclAccountId :: Lens' AccountsURLChannelsList Text
auclAccountId
= lens _auclAccountId
(\ s a -> s{_auclAccountId = a}) | 173 | auclAccountId :: Lens' AccountsURLChannelsList Text
auclAccountId
= lens _auclAccountId
(\ s a -> s{_auclAccountId = a}) | 128 | auclAccountId
= lens _auclAccountId
(\ s a -> s{_auclAccountId = a}) | 76 | true | true | 0 | 9 | 32 | 42 | 22 | 20 | null | null |
bitemyapp/haskell-jwt | src/Web/JWT.hs | mit | signature (Verified _ _ s) = Just s | 35 | signature (Verified _ _ s) = Just s | 35 | signature (Verified _ _ s) = Just s | 35 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
erochest/github | Github/Issues.hs | bsd-3-clause | -- | Details on a specific issue, given the repo owner and name, and the issue
-- number.
--
-- > issue "thoughtbot" "paperclip" "462"
issue :: String -> String -> Int -> IO (Either Error Issue)
issue = issue' Nothing | 217 | issue :: String -> String -> Int -> IO (Either Error Issue)
issue = issue' Nothing | 82 | issue = issue' Nothing | 22 | true | true | 0 | 11 | 40 | 47 | 23 | 24 | null | null |
green-haskell/ghc | libraries/base/GHC/Arr.hs | bsd-3-clause | cmpIntArray :: Ord e => Array Int e -> Array Int e -> Ordering
cmpIntArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
if n1 == 0 then
if n2 == 0 then EQ else LT
else if n2 == 0 then GT
else case compare l1 l2 of
EQ -> foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
other -> other
where
cmp i rest = case compare (unsafeAt arr1 i) (unsafeAt arr2 i) of
EQ -> rest
other -> other
| 463 | cmpIntArray :: Ord e => Array Int e -> Array Int e -> Ordering
cmpIntArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
if n1 == 0 then
if n2 == 0 then EQ else LT
else if n2 == 0 then GT
else case compare l1 l2 of
EQ -> foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
other -> other
where
cmp i rest = case compare (unsafeAt arr1 i) (unsafeAt arr2 i) of
EQ -> rest
other -> other
| 463 | cmpIntArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
if n1 == 0 then
if n2 == 0 then EQ else LT
else if n2 == 0 then GT
else case compare l1 l2 of
EQ -> foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
other -> other
where
cmp i rest = case compare (unsafeAt arr1 i) (unsafeAt arr2 i) of
EQ -> rest
other -> other
| 400 | false | true | 14 | 9 | 164 | 218 | 111 | 107 | null | null |
spacekitteh/smcghc | compiler/cmm/PprC.hs | bsd-3-clause | pprTop (CmmData _section (Statics lbl lits)) =
pprDataExterns lits $$
pprWordArray lbl lits | 95 | pprTop (CmmData _section (Statics lbl lits)) =
pprDataExterns lits $$
pprWordArray lbl lits | 95 | pprTop (CmmData _section (Statics lbl lits)) =
pprDataExterns lits $$
pprWordArray lbl lits | 95 | false | false | 0 | 9 | 16 | 37 | 17 | 20 | null | null |
NightRa/FurnitureAI | src/Main.hs | mit | selectDoorOrigin :: Grid -> Point -> IO (Point,Maybe Point)
selectDoorOrigin = selectOrigin markDoorBlock isValidDoor "Select the door's origin" move2D | 151 | selectDoorOrigin :: Grid -> Point -> IO (Point,Maybe Point)
selectDoorOrigin = selectOrigin markDoorBlock isValidDoor "Select the door's origin" move2D | 151 | selectDoorOrigin = selectOrigin markDoorBlock isValidDoor "Select the door's origin" move2D | 91 | false | true | 0 | 9 | 18 | 40 | 20 | 20 | null | null |
urbanslug/ghc | testsuite/tests/rename/should_compile/timing003.hs | bsd-3-clause | a148 = [] | 9 | a148 = [] | 9 | a148 = [] | 9 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
allonsy/mailServer | test/TestMail.hs | mit | isIn :: String -> [String] -> Bool
isIn targ ls = elem targ ls | 62 | isIn :: String -> [String] -> Bool
isIn targ ls = elem targ ls | 62 | isIn targ ls = elem targ ls | 27 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Operations/List.hs | mpl-2.0 | -- | V1 error format.
olXgafv :: Lens' OperationsList (Maybe Xgafv)
olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a}) | 118 | olXgafv :: Lens' OperationsList (Maybe Xgafv)
olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a}) | 96 | olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a}) | 50 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | A version-specific identifier for the watched resource.
cResourceURI :: Lens' Channel (Maybe Text)
cResourceURI
= lens _cResourceURI (\ s a -> s{_cResourceURI = a}) | 171 | cResourceURI :: Lens' Channel (Maybe Text)
cResourceURI
= lens _cResourceURI (\ s a -> s{_cResourceURI = a}) | 110 | cResourceURI
= lens _cResourceURI (\ s a -> s{_cResourceURI = a}) | 67 | true | true | 0 | 9 | 27 | 48 | 25 | 23 | null | null |
ihc/futhark | src/Futhark/Representation/Primitive.hs | isc | convOpType (FPToUI from to) = (FloatType from, IntType to) | 58 | convOpType (FPToUI from to) = (FloatType from, IntType to) | 58 | convOpType (FPToUI from to) = (FloatType from, IntType to) | 58 | false | false | 0 | 7 | 8 | 29 | 14 | 15 | null | null |
david-christiansen/final-pretty-printer | Text/PrettyPrint/Final.hs | mit | nest :: (MonadPretty w ann fmt m) => w -> m a -> m a
nest = localNesting . (+) | 78 | nest :: (MonadPretty w ann fmt m) => w -> m a -> m a
nest = localNesting . (+) | 78 | nest = localNesting . (+) | 25 | false | true | 1 | 9 | 19 | 53 | 25 | 28 | null | null |
stefanjanjic90/DroidThatYouAreLookingFor | Main.hs | bsd-3-clause | handleKeyEvents (EventKey (MouseButton LeftButton) Up _ mousePosition) gameState@(Play _ clickNumber duration timePassed cards matchingCards) = gameState { clickNumber = clickNumber', cards = cards', matchingCards = matchingCards' }
where
clickedCard = getClickedCard cards
cards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then map checkCardClick cards
else cards
clickNumber' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then clickNumber + 1
else clickNumber
-- | Based on conditions and click number set the click card into a correct matchingCards slot.
matchingCards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then if clickNumber' `mod` 2 /= 0
then ( clickedCard , Nothing) -- | On first click place it in a first slot.
else ( fst matchingCards , clickedCard) -- | On a secon click place it in a second slot.
else matchingCards
-- | Function checks if a card is clicked and starts its animation if it is.
checkCardClick :: Card -> Card
checkCardClick card@(Card front back isFlipped isAnimating _ _ _) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then
Card.startFlipAnimation card
else
card
-- | returns a clicked card out of the list of cards, if there is such a card.
getClickedCard :: [Card] -> Maybe Card
getClickedCard [] = Nothing
getClickedCard (card@(Card front back isFlipped isAnimating _ _ _) : cards) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then Just card
else getClickedCard cards
-- | Check whether the left mouse click is disabled. It is disabled in case when we are matching two cards (two cards are flipped face up).
isClickDisabled :: (Maybe Card, Maybe Card) -> Bool
isClickDisabled (Nothing, Nothing) = False
isClickDisabled (Just card, Nothing) = False
isClickDisabled (Nothing, Just card) = False
isClickDisabled (Just card1 , Just card2) = True | 3,107 | handleKeyEvents (EventKey (MouseButton LeftButton) Up _ mousePosition) gameState@(Play _ clickNumber duration timePassed cards matchingCards) = gameState { clickNumber = clickNumber', cards = cards', matchingCards = matchingCards' }
where
clickedCard = getClickedCard cards
cards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then map checkCardClick cards
else cards
clickNumber' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then clickNumber + 1
else clickNumber
-- | Based on conditions and click number set the click card into a correct matchingCards slot.
matchingCards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then if clickNumber' `mod` 2 /= 0
then ( clickedCard , Nothing) -- | On first click place it in a first slot.
else ( fst matchingCards , clickedCard) -- | On a secon click place it in a second slot.
else matchingCards
-- | Function checks if a card is clicked and starts its animation if it is.
checkCardClick :: Card -> Card
checkCardClick card@(Card front back isFlipped isAnimating _ _ _) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then
Card.startFlipAnimation card
else
card
-- | returns a clicked card out of the list of cards, if there is such a card.
getClickedCard :: [Card] -> Maybe Card
getClickedCard [] = Nothing
getClickedCard (card@(Card front back isFlipped isAnimating _ _ _) : cards) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then Just card
else getClickedCard cards
-- | Check whether the left mouse click is disabled. It is disabled in case when we are matching two cards (two cards are flipped face up).
isClickDisabled :: (Maybe Card, Maybe Card) -> Bool
isClickDisabled (Nothing, Nothing) = False
isClickDisabled (Just card, Nothing) = False
isClickDisabled (Nothing, Just card) = False
isClickDisabled (Just card1 , Just card2) = True | 3,107 | handleKeyEvents (EventKey (MouseButton LeftButton) Up _ mousePosition) gameState@(Play _ clickNumber duration timePassed cards matchingCards) = gameState { clickNumber = clickNumber', cards = cards', matchingCards = matchingCards' }
where
clickedCard = getClickedCard cards
cards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then map checkCardClick cards
else cards
clickNumber' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then clickNumber + 1
else clickNumber
-- | Based on conditions and click number set the click card into a correct matchingCards slot.
matchingCards' = if (not $ isClickDisabled $ matchingCards) && (isJust clickedCard)
then if clickNumber' `mod` 2 /= 0
then ( clickedCard , Nothing) -- | On first click place it in a first slot.
else ( fst matchingCards , clickedCard) -- | On a secon click place it in a second slot.
else matchingCards
-- | Function checks if a card is clicked and starts its animation if it is.
checkCardClick :: Card -> Card
checkCardClick card@(Card front back isFlipped isAnimating _ _ _) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then
Card.startFlipAnimation card
else
card
-- | returns a clicked card out of the list of cards, if there is such a card.
getClickedCard :: [Card] -> Maybe Card
getClickedCard [] = Nothing
getClickedCard (card@(Card front back isFlipped isAnimating _ _ _) : cards) = if not isFlipped && not isAnimating && LivePicture.isClicked back mousePosition
then Just card
else getClickedCard cards
-- | Check whether the left mouse click is disabled. It is disabled in case when we are matching two cards (two cards are flipped face up).
isClickDisabled :: (Maybe Card, Maybe Card) -> Bool
isClickDisabled (Nothing, Nothing) = False
isClickDisabled (Just card, Nothing) = False
isClickDisabled (Nothing, Just card) = False
isClickDisabled (Just card1 , Just card2) = True | 3,107 | false | false | 2 | 10 | 1,478 | 494 | 260 | 234 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Key.hs | bsd-3-clause | keyTranslateWeb "9" True = KP '9' | 42 | keyTranslateWeb "9" True = KP '9' | 42 | keyTranslateWeb "9" True = KP '9' | 42 | false | false | 0 | 5 | 14 | 14 | 6 | 8 | null | null |
mbezjak/grailsproject | src/Grails/Parser/BuildConfig.hs | mit | parse :: FilePath -> EIO Plugins
parse = parseFile onlyPlugins | 62 | parse :: FilePath -> EIO Plugins
parse = parseFile onlyPlugins | 62 | parse = parseFile onlyPlugins | 29 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
alonho/bottle | src/Graphics/UI/Bottle/Widget.hs | gpl-3.0 | atEventMap :: (EventHandlers f -> EventHandlers f) -> Widget f -> Widget f
atEventMap = atUserIO . atUioEventMap | 112 | atEventMap :: (EventHandlers f -> EventHandlers f) -> Widget f -> Widget f
atEventMap = atUserIO . atUioEventMap | 112 | atEventMap = atUserIO . atUioEventMap | 37 | false | true | 1 | 9 | 17 | 49 | 21 | 28 | null | null |
nuttycom/haskoin | Network/Haskoin/Crypto/NormalizedKeys.hs | unlicense | extPubKeys :: AccPubKey -> KeyIndex -> [(AddrPubKey,KeyIndex)]
extPubKeys a i = mapMaybe f $ cycleIndex i
where f j = liftM2 (,) (extPubKey a j) (return j)
-- | Cyclic list of all internal 'AddrPrvKey' derived from a 'AccPrvKey' and
-- starting from an offset index. | 271 | extPubKeys :: AccPubKey -> KeyIndex -> [(AddrPubKey,KeyIndex)]
extPubKeys a i = mapMaybe f $ cycleIndex i
where f j = liftM2 (,) (extPubKey a j) (return j)
-- | Cyclic list of all internal 'AddrPrvKey' derived from a 'AccPrvKey' and
-- starting from an offset index. | 271 | extPubKeys a i = mapMaybe f $ cycleIndex i
where f j = liftM2 (,) (extPubKey a j) (return j)
-- | Cyclic list of all internal 'AddrPrvKey' derived from a 'AccPrvKey' and
-- starting from an offset index. | 208 | false | true | 0 | 9 | 50 | 79 | 41 | 38 | null | null |
GaloisInc/saw-script | src/SAWScript/AutoMatch/Interaction.hs | bsd-3-clause | -- | Match two arguments at given indices together
-- Removes the two of them from consideration and dumps the matching into the output stream
matchArgs :: (Arg, Int) -> (Arg, Int) -> ArgMatch ()
matchArgs (Arg ln lt, li) (Arg rn rt, ri) = do
modify (removeName ln *** removeName rn)
tell [((Arg ln lt, li), (Arg rn rt, ri))]
-- Smart constructors for match actions...
-- | Print information to the user | 413 | matchArgs :: (Arg, Int) -> (Arg, Int) -> ArgMatch ()
matchArgs (Arg ln lt, li) (Arg rn rt, ri) = do
modify (removeName ln *** removeName rn)
tell [((Arg ln lt, li), (Arg rn rt, ri))]
-- Smart constructors for match actions...
-- | Print information to the user | 268 | matchArgs (Arg ln lt, li) (Arg rn rt, ri) = do
modify (removeName ln *** removeName rn)
tell [((Arg ln lt, li), (Arg rn rt, ri))]
-- Smart constructors for match actions...
-- | Print information to the user | 215 | true | true | 0 | 11 | 83 | 123 | 66 | 57 | null | null |
gabesoft/kapi | test/PersistenceUserPostsSpec.hs | bsd-3-clause | inputValidWithDates :: Record
inputValidWithDates =
Record
[ mkBoolField "read" True
, mkStrField "subscriptionId" "56d7de07c788cb1d6eb91a82"
, mkStrField "postId" "56d7d88bc788cb1d6eb919a1"
, mkStrField "feedId" "to be overwritten"
, mkStrField "userId" "to be overwritten"
, "post" =: [mkStrField "author" "unknown"]
, mkStrListField "tags" ["haskell", "javascript"]
, updatedAtLabel =: date "2016-02-23T01:21:15.513Z"
, createdAtLabel =: date "2016-01-23T01:21:15.513Z"
] | 516 | inputValidWithDates :: Record
inputValidWithDates =
Record
[ mkBoolField "read" True
, mkStrField "subscriptionId" "56d7de07c788cb1d6eb91a82"
, mkStrField "postId" "56d7d88bc788cb1d6eb919a1"
, mkStrField "feedId" "to be overwritten"
, mkStrField "userId" "to be overwritten"
, "post" =: [mkStrField "author" "unknown"]
, mkStrListField "tags" ["haskell", "javascript"]
, updatedAtLabel =: date "2016-02-23T01:21:15.513Z"
, createdAtLabel =: date "2016-01-23T01:21:15.513Z"
] | 516 | inputValidWithDates =
Record
[ mkBoolField "read" True
, mkStrField "subscriptionId" "56d7de07c788cb1d6eb91a82"
, mkStrField "postId" "56d7d88bc788cb1d6eb919a1"
, mkStrField "feedId" "to be overwritten"
, mkStrField "userId" "to be overwritten"
, "post" =: [mkStrField "author" "unknown"]
, mkStrListField "tags" ["haskell", "javascript"]
, updatedAtLabel =: date "2016-02-23T01:21:15.513Z"
, createdAtLabel =: date "2016-01-23T01:21:15.513Z"
] | 486 | false | true | 0 | 8 | 93 | 103 | 53 | 50 | null | null |
gip/cinq-cloches-ledger | src/Main.hs | mit | main :: IO ()
main = do
ledger <- createLedger
runDB ledger $ runMigration migrateAll
createAccount ledger (adminName ledger) (Just $ adminPassword ledger) True
ledger' <- if useHoldAccount ledger
then createAccount ledger "hold" Nothing False >>= (\k -> return $ ledger { holdAccountK = k })
else return ledger
forkIO $ expiryMonitorThread ledger'
run (port ledger') $ logStdoutDev $ basicAuth ledger' $ (app ledger') | 462 | main :: IO ()
main = do
ledger <- createLedger
runDB ledger $ runMigration migrateAll
createAccount ledger (adminName ledger) (Just $ adminPassword ledger) True
ledger' <- if useHoldAccount ledger
then createAccount ledger "hold" Nothing False >>= (\k -> return $ ledger { holdAccountK = k })
else return ledger
forkIO $ expiryMonitorThread ledger'
run (port ledger') $ logStdoutDev $ basicAuth ledger' $ (app ledger') | 462 | main = do
ledger <- createLedger
runDB ledger $ runMigration migrateAll
createAccount ledger (adminName ledger) (Just $ adminPassword ledger) True
ledger' <- if useHoldAccount ledger
then createAccount ledger "hold" Nothing False >>= (\k -> return $ ledger { holdAccountK = k })
else return ledger
forkIO $ expiryMonitorThread ledger'
run (port ledger') $ logStdoutDev $ basicAuth ledger' $ (app ledger') | 448 | false | true | 0 | 14 | 107 | 161 | 76 | 85 | null | null |
fmthoma/ghc | compiler/types/TypeRep.hs | bsd-3-clause | pprTvBndrs :: [TyVar] -> SDoc
pprTvBndrs tvs = sep (map pprTvBndr tvs) | 70 | pprTvBndrs :: [TyVar] -> SDoc
pprTvBndrs tvs = sep (map pprTvBndr tvs) | 70 | pprTvBndrs tvs = sep (map pprTvBndr tvs) | 40 | false | true | 0 | 7 | 11 | 32 | 16 | 16 | null | null |
Fuuzetsu/haddock | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | bsd-2-clause | -- a box for displaying code
declElem :: Html -> Html
declElem = paragraph ! [theclass "src"] | 93 | declElem :: Html -> Html
declElem = paragraph ! [theclass "src"] | 64 | declElem = paragraph ! [theclass "src"] | 39 | true | true | 2 | 7 | 16 | 34 | 15 | 19 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_P_WORD :: Int
wxSTC_P_WORD = 5 | 36 | wxSTC_P_WORD :: Int
wxSTC_P_WORD = 5 | 36 | wxSTC_P_WORD = 5 | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
uduki/hsQt | Qtc/Core/QUrl.hs | bsd-2-clause | qUrlToPunycode :: ((String)) -> IO (String)
qUrlToPunycode (x1)
= withStringResult $
withCWString x1 $ \cstr_x1 ->
qtc_QUrl_toPunycode cstr_x1 | 152 | qUrlToPunycode :: ((String)) -> IO (String)
qUrlToPunycode (x1)
= withStringResult $
withCWString x1 $ \cstr_x1 ->
qtc_QUrl_toPunycode cstr_x1 | 152 | qUrlToPunycode (x1)
= withStringResult $
withCWString x1 $ \cstr_x1 ->
qtc_QUrl_toPunycode cstr_x1 | 108 | false | true | 0 | 7 | 27 | 52 | 27 | 25 | null | null |
ddssff/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | descItem :: LP (Inlines, [Blocks])
descItem = do
blocks -- skip blocks before item
controlSeq "item"
optional sp
ils <- opt
bs <- blocks
return (ils, [bs]) | 167 | descItem :: LP (Inlines, [Blocks])
descItem = do
blocks -- skip blocks before item
controlSeq "item"
optional sp
ils <- opt
bs <- blocks
return (ils, [bs]) | 167 | descItem = do
blocks -- skip blocks before item
controlSeq "item"
optional sp
ils <- opt
bs <- blocks
return (ils, [bs]) | 132 | false | true | 0 | 9 | 38 | 68 | 33 | 35 | null | null |
gbwey/persistent | persistent-template/Database/Persist/TH.hs | mit | liftAndFixKey :: EntityMap -> FieldDef -> Q Exp
liftAndFixKey entityMap (FieldDef a b c sqlTyp e f fieldRef mcomments) =
[|FieldDef a b c $(sqlTyp') e f fieldRef' mcomments|]
where
(fieldRef', sqlTyp') = fromMaybe (fieldRef, lift sqlTyp) $
case fieldRef of
ForeignRef refName _ft -> case M.lookup refName entityMap of
Nothing -> Nothing
Just ent ->
case fieldReference $ entityId ent of
fr@(ForeignRef _Name ft) -> Just (fr, lift $ SqlTypeExp ft)
_ -> Nothing
_ -> Nothing | 564 | liftAndFixKey :: EntityMap -> FieldDef -> Q Exp
liftAndFixKey entityMap (FieldDef a b c sqlTyp e f fieldRef mcomments) =
[|FieldDef a b c $(sqlTyp') e f fieldRef' mcomments|]
where
(fieldRef', sqlTyp') = fromMaybe (fieldRef, lift sqlTyp) $
case fieldRef of
ForeignRef refName _ft -> case M.lookup refName entityMap of
Nothing -> Nothing
Just ent ->
case fieldReference $ entityId ent of
fr@(ForeignRef _Name ft) -> Just (fr, lift $ SqlTypeExp ft)
_ -> Nothing
_ -> Nothing | 564 | liftAndFixKey entityMap (FieldDef a b c sqlTyp e f fieldRef mcomments) =
[|FieldDef a b c $(sqlTyp') e f fieldRef' mcomments|]
where
(fieldRef', sqlTyp') = fromMaybe (fieldRef, lift sqlTyp) $
case fieldRef of
ForeignRef refName _ft -> case M.lookup refName entityMap of
Nothing -> Nothing
Just ent ->
case fieldReference $ entityId ent of
fr@(ForeignRef _Name ft) -> Just (fr, lift $ SqlTypeExp ft)
_ -> Nothing
_ -> Nothing | 516 | false | true | 0 | 18 | 169 | 178 | 89 | 89 | null | null |
Chobbes/free | src/Control/Monad/Free/TH.hs | bsd-3-clause | mapRet f e = f e | 16 | mapRet f e = f e | 16 | mapRet f e = f e | 16 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
scvalex/ltc | src/Ltc/Network/RedisAdapter.hs | gpl-3.0 | toError :: String -> RedisMessage
toError = Error . strict . BL.pack | 68 | toError :: String -> RedisMessage
toError = Error . strict . BL.pack | 68 | toError = Error . strict . BL.pack | 34 | false | true | 1 | 7 | 11 | 33 | 14 | 19 | null | null |
lucasdicioccio/stampede | Stampede/Dump.hs | apache-2.0 | dumpServerCommand Message = "MESSAGE" | 37 | dumpServerCommand Message = "MESSAGE" | 37 | dumpServerCommand Message = "MESSAGE" | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
suhailshergill/extensible-effects | src/Control/Eff/Writer/Strict.hs | mit | -- | Handle Writer requests, using a user-provided function to accumulate
-- values and returning the final accumulated values.
execWriter :: (w -> b -> b) -> b -> Eff (Writer w ': r) a -> Eff r b
execWriter accum b = fmap snd . runWriter accum b | 248 | execWriter :: (w -> b -> b) -> b -> Eff (Writer w ': r) a -> Eff r b
execWriter accum b = fmap snd . runWriter accum b | 118 | execWriter accum b = fmap snd . runWriter accum b | 49 | true | true | 0 | 11 | 50 | 75 | 37 | 38 | null | null |
EFulmer/haskell-scheme-wikibook | src/Exercises/Ch2/Pt2/Base.hs | bsd-3-clause | spaces :: Parser ()
spaces = skipMany1 space | 44 | spaces :: Parser ()
spaces = skipMany1 space | 44 | spaces = skipMany1 space | 24 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
BartAdv/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | intToStr _ = Nothing | 20 | intToStr _ = Nothing | 20 | intToStr _ = Nothing | 20 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
cnr/haskellirc | IRC/Parser.hs | mit | noneOf :: String -> Parser Char
noneOf xs = satisfy (`notElem` xs) | 66 | noneOf :: String -> Parser Char
noneOf xs = satisfy (`notElem` xs) | 66 | noneOf xs = satisfy (`notElem` xs) | 34 | false | true | 0 | 7 | 11 | 35 | 17 | 18 | null | null |
bjornbm/astro | src/Astro/Time.hs | bsd-3-clause | (.-) :: Num a => E t a -> E t a -> Time a
(.-) = diffEpoch | 59 | (.-) :: Num a => E t a -> E t a -> Time a
(.-) = diffEpoch | 59 | (.-) = diffEpoch | 16 | false | true | 0 | 8 | 18 | 43 | 22 | 21 | null | null |
damianfral/clay | src/Clay/Pseudo.hs | bsd-3-clause | visited = ":visited" | 23 | visited = ":visited" | 23 | visited = ":visited" | 23 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
nyorem/cghs | Cghs/Algorithms/Triangulation2.hs | mit | findEarPolygon2 (p:ps)
| b = xs
| otherwise = findEarPolygon2 ps
where (b, xs) = isEarPolygon2 (p:ps) p
-- | Determines if a vertex is an ear of a polygon. | 172 | findEarPolygon2 (p:ps)
| b = xs
| otherwise = findEarPolygon2 ps
where (b, xs) = isEarPolygon2 (p:ps) p
-- | Determines if a vertex is an ear of a polygon. | 172 | findEarPolygon2 (p:ps)
| b = xs
| otherwise = findEarPolygon2 ps
where (b, xs) = isEarPolygon2 (p:ps) p
-- | Determines if a vertex is an ear of a polygon. | 172 | false | false | 0 | 9 | 46 | 61 | 30 | 31 | null | null |
stefan-hoeck/labeled-graph | Data/Graph/Simple/Edge.hs | bsd-3-clause | -- ** Construction
-- | Wraps a list of edges without sorting or checking
-- for dublicates
--
-- USE WITH CARE: Call this function only if you know that your list
-- of edges is sorted and without dublicates
unsafeEdges ∷ [Edge] → Edges
unsafeEdges = Edges | 264 | unsafeEdges ∷ [Edge] → Edges
unsafeEdges = Edges | 48 | unsafeEdges = Edges | 19 | true | true | 0 | 6 | 54 | 24 | 16 | 8 | null | null |
supki/wybor | src/Ansi.hs | bsd-2-clause | -- | Swap foreground and background colors
swap :: Text
swap = sgr (Ansi.SetSwapForegroundBackground True) | 106 | swap :: Text
swap = sgr (Ansi.SetSwapForegroundBackground True) | 63 | swap = sgr (Ansi.SetSwapForegroundBackground True) | 50 | true | true | 0 | 7 | 14 | 29 | 13 | 16 | null | null |
meiersi/scyther-proof | src/Scyther/Facts.hs | gpl-3.0 | -- | Check if all logical variables in an message are quantified.
msgQuantified :: Facts -> Message -> CertResult
msgQuantified facts m =
foldMap (tidQuantified facts) (msgTIDs m) ><
foldMap (arbMsgIdQuantified facts) (msgAMIDs m) | 246 | msgQuantified :: Facts -> Message -> CertResult
msgQuantified facts m =
foldMap (tidQuantified facts) (msgTIDs m) ><
foldMap (arbMsgIdQuantified facts) (msgAMIDs m) | 180 | msgQuantified facts m =
foldMap (tidQuantified facts) (msgTIDs m) ><
foldMap (arbMsgIdQuantified facts) (msgAMIDs m) | 132 | true | true | 0 | 8 | 49 | 70 | 32 | 38 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_31 (86#) = happyGoto action_27 | 37 | action_31 (86#) = happyGoto action_27 | 37 | action_31 (86#) = happyGoto action_27 | 37 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.