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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
anchor/ceilometer-common | lib/Ceilometer/Types/Base.hs | bsd-3-clause | -- | An "improper" iso to convert between a Word64 and the raw compound.
--
-- It is improper because we only preserve the value and status in a "roundtrip".
-- This is fine for pollster since that's all we care about.
--
prCompoundPollster :: Iso' Word64 PRCompoundPollster
prCompoundPollster = iso getIt putIt
wh... | 885 | prCompoundPollster :: Iso' Word64 PRCompoundPollster
prCompoundPollster = iso getIt putIt
where getIt bytes = flip B.runGet (B.encode bytes) $ do
a <- B.getWord32be
_ <- B.getWord8 -- reserved bytes
_ <- B.getWord8 -- endpoint
_ <- B.getWord8 -- verb
e <- B.getWord8
... | 659 | prCompoundPollster = iso getIt putIt
where getIt bytes = flip B.runGet (B.encode bytes) $ do
a <- B.getWord32be
_ <- B.getWord8 -- reserved bytes
_ <- B.getWord8 -- endpoint
_ <- B.getWord8 -- verb
e <- B.getWord8
return $ PRCompoundPollster a e
putI... | 606 | true | true | 1 | 12 | 262 | 188 | 89 | 99 | null | null |
ocramz/sparse-linear-algebra | src/Data/Sparse/Internal/Utils.hs | gpl-3.0 | intersectWithCompare ::
(a1 -> a2 -> Ordering) ->
(a1 -> a2 -> a) ->
V.Vector a1 ->
V.Vector a2 ->
V.Vector a
intersectWithCompare fcomp g u_ v_ = V.create $ do
let n = min (V.length u_) (V.length v_)
vm <- VM.new n
let go u_ v_ i vm | V.null u_ || V.null v_ || i == n = return (vm, i)
... | 774 | intersectWithCompare ::
(a1 -> a2 -> Ordering) ->
(a1 -> a2 -> a) ->
V.Vector a1 ->
V.Vector a2 ->
V.Vector a
intersectWithCompare fcomp g u_ v_ = V.create $ do
let n = min (V.length u_) (V.length v_)
vm <- VM.new n
let go u_ v_ i vm | V.null u_ || V.null v_ || i == n = return (vm, i)
... | 774 | intersectWithCompare fcomp g u_ v_ = V.create $ do
let n = min (V.length u_) (V.length v_)
vm <- VM.new n
let go u_ v_ i vm | V.null u_ || V.null v_ || i == n = return (vm, i)
| otherwise = do
let (u,us) = (V.head u_, V.tail u_)
(v,vs) = (V.head v_, V.tail v_)
c... | 654 | false | true | 0 | 21 | 311 | 377 | 179 | 198 | null | null |
bamboo/sneerkell | src/Sneer/Protocol.hs | lgpl-3.0 | tryGetFromTransit :: T.FromTransit a => T.Transit -> T.KeyValuePairs -> Maybe a
tryGetFromTransit key kvs = tryGet key kvs >>= T.fromTransit | 140 | tryGetFromTransit :: T.FromTransit a => T.Transit -> T.KeyValuePairs -> Maybe a
tryGetFromTransit key kvs = tryGet key kvs >>= T.fromTransit | 140 | tryGetFromTransit key kvs = tryGet key kvs >>= T.fromTransit | 60 | false | true | 0 | 8 | 19 | 51 | 24 | 27 | null | null |
iblumenfeld/cryptol | cryptol/REPL/Haskeline.hs | bsd-3-clause | -- | Haskeline settings for the REPL.
replSettings :: Bool -> Settings REPL
replSettings isBatch = Settings
{ complete = cryptolCommand
, historyFile = Nothing
, autoAddHistory = not isBatch
} | 209 | replSettings :: Bool -> Settings REPL
replSettings isBatch = Settings
{ complete = cryptolCommand
, historyFile = Nothing
, autoAddHistory = not isBatch
} | 171 | replSettings isBatch = Settings
{ complete = cryptolCommand
, historyFile = Nothing
, autoAddHistory = not isBatch
} | 133 | true | true | 0 | 8 | 47 | 49 | 26 | 23 | null | null |
termite2/tsl | Frontend/NS.hs | bsd-3-clause | lookupIdent (ScopeProcess t p) n = listToMaybe $ catMaybes [local,tm,global]
where local = objLookup (ObjProcess t p) n
tm = objLookup (ObjTemplate t) n
global = objLookup ObjSpec n | 210 | lookupIdent (ScopeProcess t p) n = listToMaybe $ catMaybes [local,tm,global]
where local = objLookup (ObjProcess t p) n
tm = objLookup (ObjTemplate t) n
global = objLookup ObjSpec n | 210 | lookupIdent (ScopeProcess t p) n = listToMaybe $ catMaybes [local,tm,global]
where local = objLookup (ObjProcess t p) n
tm = objLookup (ObjTemplate t) n
global = objLookup ObjSpec n | 210 | false | false | 0 | 9 | 57 | 81 | 41 | 40 | null | null |
meiersi/blaze-builder | benchmarks/Throughput/BlazePutMonad.hs | bsd-3-clause | -- | Write a Word64 in little endian format
putWord64le :: Word64 -> Put
putWord64le = tell . B.fromWord64le | 124 | putWord64le :: Word64 -> Put
putWord64le = tell . B.fromWord64le | 80 | putWord64le = tell . B.fromWord64le | 43 | true | true | 1 | 7 | 34 | 30 | 13 | 17 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M03/D15/Solution.hs | mit | uwb :: [(String, Int)] -> String
uwb = unwords . concat . map (uncurry replicate . swap) | 88 | uwb :: [(String, Int)] -> String
uwb = unwords . concat . map (uncurry replicate . swap) | 88 | uwb = unwords . concat . map (uncurry replicate . swap) | 55 | false | true | 0 | 9 | 16 | 45 | 24 | 21 | null | null |
mpickering/HaRe | old/refactorer/RefacRmCon.hs | bsd-3-clause | refacRmCon args
= do let fileName = ghead "filename" args
--fileName'= moduleName fileName
--modName = Module fileName'
row = read (args!!1)::Int
col = read (args!!2)::Int
modName <-fileNameToModName fileName
(inscps, exps, mod, tokList)<-parseSourceFile f... | 1,954 | refacRmCon args
= do let fileName = ghead "filename" args
--fileName'= moduleName fileName
--modName = Module fileName'
row = read (args!!1)::Int
col = read (args!!2)::Int
modName <-fileNameToModName fileName
(inscps, exps, mod, tokList)<-parseSourceFile f... | 1,954 | refacRmCon args
= do let fileName = ghead "filename" args
--fileName'= moduleName fileName
--modName = Module fileName'
row = read (args!!1)::Int
col = read (args!!2)::Int
modName <-fileNameToModName fileName
(inscps, exps, mod, tokList)<-parseSourceFile f... | 1,954 | false | false | 0 | 24 | 852 | 497 | 253 | 244 | null | null |
jspahrsummers/documentalist | Text/Documentalist/SourceParser/Clang/Internal.hs | mit | toCStringArray
:: [String] -- ^ The input strings.
-> IO (Ptr CString, Int) -- ^ The C string array, and number of elements.
toCStringArray strs = do
ptr <- mapM newCString strs >>= newArray
return (ptr, length strs)
-- | Frees an array of C strings created with 'toCStringArray'. | 317 | toCStringArray
:: [String] -- ^ The input strings.
-> IO (Ptr CString, Int)
toCStringArray strs = do
ptr <- mapM newCString strs >>= newArray
return (ptr, length strs)
-- | Frees an array of C strings created with 'toCStringArray'. | 264 | toCStringArray strs = do
ptr <- mapM newCString strs >>= newArray
return (ptr, length strs)
-- | Frees an array of C strings created with 'toCStringArray'. | 164 | true | true | 0 | 10 | 85 | 72 | 35 | 37 | null | null |
michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Poly/Cheb/Tests.hs | bsd-3-clause | makeFnPositiveSmallRange :: Integer -> FnAndDescr (ChPoly MPBall) -> FnAndDescr (ChPoly MPBall)
makeFnPositiveSmallRange limit (FnAndDescr p pDescr) =
FnAndDescr res $ "makeFnPositiveSmallRange " ++ show limit ++ " (" ++ pDescr ++ ")"
where
res
| 1 !<=! lb && ub !<! limit = p
| b !<! limit = centreAsBall... | 1,048 | makeFnPositiveSmallRange :: Integer -> FnAndDescr (ChPoly MPBall) -> FnAndDescr (ChPoly MPBall)
makeFnPositiveSmallRange limit (FnAndDescr p pDescr) =
FnAndDescr res $ "makeFnPositiveSmallRange " ++ show limit ++ " (" ++ pDescr ++ ")"
where
res
| 1 !<=! lb && ub !<! limit = p
| b !<! limit = centreAsBall... | 1,048 | makeFnPositiveSmallRange limit (FnAndDescr p pDescr) =
FnAndDescr res $ "makeFnPositiveSmallRange " ++ show limit ++ " (" ++ pDescr ++ ")"
where
res
| 1 !<=! lb && ub !<! limit = p
| b !<! limit = centreAsBall $ p - lb + 1
| otherwise = centreAsBall $ (1 - lb + (limit * p /! b))
b = ub `max` (-lb)
... | 952 | false | true | 5 | 10 | 220 | 311 | 158 | 153 | null | null |
erisco/extensible-ast | example01/main.hs | mit | -- This is to make the compiler happy.
main :: IO ()
main = putStrLn "Hello World" | 83 | main :: IO ()
main = putStrLn "Hello World" | 43 | main = putStrLn "Hello World" | 29 | true | true | 0 | 6 | 17 | 20 | 10 | 10 | null | null |
unknownloner/calccomp | FORTH/Parser.hs | mit | baseWordDef :: String -> Parser a -> Parser (String, a)
baseWordDef symbol bodyParser = do
stringNoCase symbol
whiteSpace
nm <- identifier
whiteSpace >> char '{' >> whiteSpace
b <- bodyParser
char '}'
return (nm, b) | 243 | baseWordDef :: String -> Parser a -> Parser (String, a)
baseWordDef symbol bodyParser = do
stringNoCase symbol
whiteSpace
nm <- identifier
whiteSpace >> char '{' >> whiteSpace
b <- bodyParser
char '}'
return (nm, b) | 243 | baseWordDef symbol bodyParser = do
stringNoCase symbol
whiteSpace
nm <- identifier
whiteSpace >> char '{' >> whiteSpace
b <- bodyParser
char '}'
return (nm, b) | 187 | false | true | 0 | 10 | 62 | 96 | 42 | 54 | null | null |
nevrenato/Hets_Fork | Logic/Prover.hs | gpl-2.0 | -- | putting Sentences from a list into a map
toThSens :: Ord a => [AS_Anno.Named a] -> ThSens a b
toThSens = OMap.fromList . map
( \ v -> (AS_Anno.senAttr v, v { senAttr = ThmStatus [] }))
. nameAndDisambiguate | 219 | toThSens :: Ord a => [AS_Anno.Named a] -> ThSens a b
toThSens = OMap.fromList . map
( \ v -> (AS_Anno.senAttr v, v { senAttr = ThmStatus [] }))
. nameAndDisambiguate | 173 | toThSens = OMap.fromList . map
( \ v -> (AS_Anno.senAttr v, v { senAttr = ThmStatus [] }))
. nameAndDisambiguate | 120 | true | true | 1 | 11 | 48 | 83 | 42 | 41 | null | null |
dimara/ganeti | src/Ganeti/HTools/Cluster/Metrics.hs | bsd-2-clause | -- | Compute the /total/ variance.
compCVNodes :: [Node.Node] -> Double
compCVNodes = sum . zipWith (*) detailedCVWeights . compDetailedCV | 138 | compCVNodes :: [Node.Node] -> Double
compCVNodes = sum . zipWith (*) detailedCVWeights . compDetailedCV | 103 | compCVNodes = sum . zipWith (*) detailedCVWeights . compDetailedCV | 66 | true | true | 0 | 7 | 19 | 36 | 20 | 16 | null | null |
geraud/templater | src/Text/Templater.hs | mit | escapedOrVariableP :: Parser TemplateItem
escapedOrVariableP = char '%' *> choice [variableItemP, escapedPercentP]
where variableItemP = Variable <$> ("{" *> takeWhile (/= '}') <* "}")
escapedPercentP = Literal <$> "%" | 234 | escapedOrVariableP :: Parser TemplateItem
escapedOrVariableP = char '%' *> choice [variableItemP, escapedPercentP]
where variableItemP = Variable <$> ("{" *> takeWhile (/= '}') <* "}")
escapedPercentP = Literal <$> "%" | 234 | escapedOrVariableP = char '%' *> choice [variableItemP, escapedPercentP]
where variableItemP = Variable <$> ("{" *> takeWhile (/= '}') <* "}")
escapedPercentP = Literal <$> "%" | 192 | false | true | 1 | 10 | 44 | 73 | 36 | 37 | null | null |
mightymoose/liquidhaskell | benchmarks/hmatrix-0.15.0.1/lib/Numeric/GSL/ODE.hs | bsd-3-clause | odeSolveV (BSimp jac) = odeSolveV' 7 (Just jac) | 47 | odeSolveV (BSimp jac) = odeSolveV' 7 (Just jac) | 47 | odeSolveV (BSimp jac) = odeSolveV' 7 (Just jac) | 47 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
rvion/stack | src/Stack/Setup.hs | bsd-3-clause | getInstalledTool :: [Tool] -- ^ already installed
-> PackageName -- ^ package to find
-> (Version -> Bool) -- ^ which versions are acceptable
-> Maybe Tool
getInstalledTool installed name goodVersion =
if null available
then Nothing
... | 661 | getInstalledTool :: [Tool] -- ^ already installed
-> PackageName -- ^ package to find
-> (Version -> Bool) -- ^ which versions are acceptable
-> Maybe Tool
getInstalledTool installed name goodVersion =
if null available
then Nothing
... | 661 | getInstalledTool installed name goodVersion =
if null available
then Nothing
else Just $ Tool $ maximumBy (comparing packageIdentifierVersion) available
where
available = mapMaybe goodPackage installed
goodPackage (Tool pi') =
if packageIdentifierName pi' == name &&
good... | 437 | false | true | 3 | 10 | 218 | 153 | 73 | 80 | null | null |
abakst/liquidhaskell | tests/pos/selfList.hs | bsd-3-clause | goo [] = [] | 15 | goo [] = [] | 15 | goo [] = [] | 15 | false | false | 1 | 6 | 7 | 17 | 6 | 11 | null | null |
tych0/xcffib | generator/Data/XCB/Python/Parse.hs | apache-2.0 | structElemToPyPack ext m accessor (X.List n typ expr _) =
let name = accessor n
-- The convention seems to be either to have a <fieldref> nested in the
-- list, or use "%s_len" % name if there is no fieldref. We need to add
-- the _len to the arguments of the function but we don't need to pack
... | 1,103 | structElemToPyPack ext m accessor (X.List n typ expr _) =
let name = accessor n
-- The convention seems to be either to have a <fieldref> nested in the
-- list, or use "%s_len" % name if there is no fieldref. We need to add
-- the _len to the arguments of the function but we don't need to pack
... | 1,103 | structElemToPyPack ext m accessor (X.List n typ expr _) =
let name = accessor n
-- The convention seems to be either to have a <fieldref> nested in the
-- list, or use "%s_len" % name if there is no fieldref. We need to add
-- the _len to the arguments of the function but we don't need to pack
... | 1,103 | false | false | 0 | 23 | 523 | 239 | 126 | 113 | null | null |
mindriot101/pandoc | src/Text/Pandoc/Writers/Man.hs | gpl-2.0 | notesToMan :: WriterOptions -> [[Block]] -> State WriterState Doc
notesToMan opts notes =
if null notes
then return empty
else mapM (\(num, note) -> noteToMan opts num note) (zip [1..] notes) >>=
return . (text ".SH NOTES" $$) . vcat | 255 | notesToMan :: WriterOptions -> [[Block]] -> State WriterState Doc
notesToMan opts notes =
if null notes
then return empty
else mapM (\(num, note) -> noteToMan opts num note) (zip [1..] notes) >>=
return . (text ".SH NOTES" $$) . vcat | 255 | notesToMan opts notes =
if null notes
then return empty
else mapM (\(num, note) -> noteToMan opts num note) (zip [1..] notes) >>=
return . (text ".SH NOTES" $$) . vcat | 189 | false | true | 0 | 12 | 61 | 105 | 55 | 50 | null | null |
Solonarv/TicTacToe | TicTacToe.hs | mit | clearBoard :: Board
clearBoard = M.empty | 40 | clearBoard :: Board
clearBoard = M.empty | 40 | clearBoard = M.empty | 20 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
Bratiakina/sudoku-hs | src/Model/Parser.hs | bsd-3-clause | charToDigit '8' = Just D8 | 25 | charToDigit '8' = Just D8 | 25 | charToDigit '8' = Just D8 | 25 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
balez/ag-a-la-carte | Language/Grammars/AGalacarte/Attribute.hs | gpl-3.0 | fam_caseof :: FamCaseOf p n => FamCase p n
fam_caseof = fam_caseofP proxies | 75 | fam_caseof :: FamCaseOf p n => FamCase p n
fam_caseof = fam_caseofP proxies | 75 | fam_caseof = fam_caseofP proxies | 32 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
ozgurakgun/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | failMsg :: String -> TC a
failMsg str = Error (Msg str) | 55 | failMsg :: String -> TC a
failMsg str = Error (Msg str) | 55 | failMsg str = Error (Msg str) | 29 | false | true | 0 | 7 | 11 | 34 | 15 | 19 | null | null |
xmonad/xmonad-contrib | XMonad/Layout/MultiColumns.hs | bsd-3-clause | -- Should never occur...
getCol _ _ = -1 | 40 | getCol _ _ = -1 | 15 | getCol _ _ = -1 | 15 | true | false | 1 | 5 | 8 | 14 | 7 | 7 | null | null |
obcode/talkallocator_yesod | devel.hs | bsd-2-clause | main :: IO ()
main = do
putStrLn "Starting devel application"
(port, app) <- getApplicationDev
forkIO $ runSettings defaultSettings
{ settingsPort = port
} app
loop | 196 | main :: IO ()
main = do
putStrLn "Starting devel application"
(port, app) <- getApplicationDev
forkIO $ runSettings defaultSettings
{ settingsPort = port
} app
loop | 196 | main = do
putStrLn "Starting devel application"
(port, app) <- getApplicationDev
forkIO $ runSettings defaultSettings
{ settingsPort = port
} app
loop | 182 | false | true | 0 | 10 | 57 | 58 | 28 | 30 | null | null |
ezyang/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (ExplicitSum alt arity expr _)
= text "(#" <+> ppr_bars (alt - 1) <+> ppr expr <+> ppr_bars (arity - alt) <+> text "#)"
where
ppr_bars n = hsep (replicate n (char '|')) | 185 | ppr_expr (ExplicitSum alt arity expr _)
= text "(#" <+> ppr_bars (alt - 1) <+> ppr expr <+> ppr_bars (arity - alt) <+> text "#)"
where
ppr_bars n = hsep (replicate n (char '|')) | 185 | ppr_expr (ExplicitSum alt arity expr _)
= text "(#" <+> ppr_bars (alt - 1) <+> ppr expr <+> ppr_bars (arity - alt) <+> text "#)"
where
ppr_bars n = hsep (replicate n (char '|')) | 185 | false | false | 0 | 11 | 41 | 94 | 44 | 50 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeUserProfiles.hs | mpl-2.0 | -- | A 'Users' object that describes the specified users.
duprUserProfiles :: Lens' DescribeUserProfilesResponse [UserProfile]
duprUserProfiles = lens _duprUserProfiles (\s a -> s { _duprUserProfiles = a }) . _List | 214 | duprUserProfiles :: Lens' DescribeUserProfilesResponse [UserProfile]
duprUserProfiles = lens _duprUserProfiles (\s a -> s { _duprUserProfiles = a }) . _List | 156 | duprUserProfiles = lens _duprUserProfiles (\s a -> s { _duprUserProfiles = a }) . _List | 87 | true | true | 0 | 10 | 29 | 47 | 26 | 21 | null | null |
jecisc/TP_PF_L3 | PF-TP4/src/Main.hs | mit | -- Question 4
peigneGauche :: [(c,a)] -> Arbre c a
peigneGauche [] = Feuille | 77 | peigneGauche :: [(c,a)] -> Arbre c a
peigneGauche [] = Feuille | 62 | peigneGauche [] = Feuille | 25 | true | true | 0 | 7 | 14 | 35 | 19 | 16 | null | null |
ezyang/hackage-query | hackage-query.hs | bsd-3-clause | parseResultToMaybe _ = Nothing | 30 | parseResultToMaybe _ = Nothing | 30 | parseResultToMaybe _ = Nothing | 30 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Confd/Server.hs | gpl-2.0 | buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n ->... | 577 | buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n ->... | 577 | buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do
let cfg = fst cdata
node_name <- case confdRqQuery req of
PlainQuery str -> return str
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
node <-
case getNode cfg node_name of
Ok n ->... | 577 | false | false | 0 | 14 | 152 | 175 | 81 | 94 | null | null |
dmjio/lifted-async | benchmarks/Benchmarks.hs | bsd-3-clause | concurrently_liftedAsync :: IO (Int, Int)
concurrently_liftedAsync =
L.concurrently (return 1) (return 2) | 107 | concurrently_liftedAsync :: IO (Int, Int)
concurrently_liftedAsync =
L.concurrently (return 1) (return 2) | 107 | concurrently_liftedAsync =
L.concurrently (return 1) (return 2) | 65 | false | true | 0 | 7 | 13 | 39 | 20 | 19 | null | null |
jbracker/supermonad-plugin | src/Control/Super/Plugin/Utils.hs | bsd-3-clause | - | Retrieve the type constructor variables at the top level involved in the
-- given types. If there are nested type variables they are ignored.
-- There is no actual check if the returned type variables are actually type
-- constructor variables. Also associates the appearant arity of the given
-- type variab... | 976 | collectTopTcVarsWithArity :: [Type] -> Set.Set (TyVar, Arity)
collectTopTcVarsWithArity tys = Set.fromList $ catMaybes $ fmap getTyVarAndArity tys
where
getTyVarAndArity :: Type -> Maybe (TyVar, Arity)
getTyVarAndArity t = do
let (tf, _args) = splitAppTys t
tv <- getTyVar_maybe tf
return (tv... | 508 | collectTopTcVarsWithArity tys = Set.fromList $ catMaybes $ fmap getTyVarAndArity tys
where
getTyVarAndArity :: Type -> Maybe (TyVar, Arity)
getTyVarAndArity t = do
let (tf, _args) = splitAppTys t
tv <- getTyVar_maybe tf
return (tv, tyVarArity tv)
-- | Try to collect all type variables in a ... | 446 | true | true | 1 | 10 | 204 | 162 | 85 | 77 | null | null |
green-haskell/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Parallel array type constructor
parrTyConKey :: Unique
parrTyConKey = mkPreludeTyConUnique 82 | 123 | parrTyConKey :: Unique
parrTyConKey = mkPreludeTyConUnique 82 | 88 | parrTyConKey = mkPreludeTyConUnique 82 | 65 | true | true | 0 | 5 | 38 | 15 | 8 | 7 | null | null |
klpn/highlighting-kate | Text/Highlighting/Kate/Common.hs | gpl-2.0 | -- | Match filename against a glob pattern with asterisks.
matchGlob :: String -> String -> Bool
matchGlob ('*':xs) fn = any (matchGlob xs) (tails fn) | 150 | matchGlob :: String -> String -> Bool
matchGlob ('*':xs) fn = any (matchGlob xs) (tails fn) | 91 | matchGlob ('*':xs) fn = any (matchGlob xs) (tails fn) | 53 | true | true | 0 | 10 | 25 | 54 | 26 | 28 | null | null |
sdiehl/ghc | compiler/main/DynFlags.hs | bsd-3-clause | whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ()) | 145 | whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ()) | 145 | whenGeneratingDynamicToo dflags f = ifGeneratingDynamicToo dflags f (return ()) | 79 | false | true | 0 | 9 | 20 | 56 | 26 | 30 | null | null |
vasily-kartashov/playground | euler/problem-050.hs | apache-2.0 | maxLength n (c:cs) = max a b
where a = foldl' max (0, 0) [(l, d) | y <- takeWhile (\i -> snd i - snd c < n) cs,
let d = snd y - snd c,
isPrime d,
let l = fst y - fst c]
b = maxLength... | 325 | maxLength n (c:cs) = max a b
where a = foldl' max (0, 0) [(l, d) | y <- takeWhile (\i -> snd i - snd c < n) cs,
let d = snd y - snd c,
isPrime d,
let l = fst y - fst c]
b = maxLength... | 325 | maxLength n (c:cs) = max a b
where a = foldl' max (0, 0) [(l, d) | y <- takeWhile (\i -> snd i - snd c < n) cs,
let d = snd y - snd c,
isPrime d,
let l = fst y - fst c]
b = maxLength... | 325 | false | false | 2 | 14 | 190 | 153 | 71 | 82 | null | null |
hvr/hs-deepseq-th | Test/WhnfIsNf.hs | bsd-3-clause | typeWhnfIsNfExp :: Type -> Q Exp
typeWhnfIsNfExp t = do
r <- typeWhnfIsNf t
case r of
Nothing -> [e|Nothing|]
Just True -> [e|Just True|]
Just False -> [e|Just False|] | 203 | typeWhnfIsNfExp :: Type -> Q Exp
typeWhnfIsNfExp t = do
r <- typeWhnfIsNf t
case r of
Nothing -> [e|Nothing|]
Just True -> [e|Just True|]
Just False -> [e|Just False|] | 203 | typeWhnfIsNfExp t = do
r <- typeWhnfIsNf t
case r of
Nothing -> [e|Nothing|]
Just True -> [e|Just True|]
Just False -> [e|Just False|] | 170 | false | true | 0 | 10 | 65 | 74 | 40 | 34 | null | null |
kawu/ltag | src/NLP/LTAG/Earley5/Draw.hs | bsd-2-clause | drawLab graph AuxVert{..} = do
let nt = D.drawText' labelSize black $ toString nonTerm ++ "(" ++ show symID ++ ")"
tp <- D.drawNode graph topID
bt <- D.drawNode graph botID
return $ nt ||| ((tp === bt) # centerY)
-- | Construct a diagram from a given state. | 275 | drawLab graph AuxVert{..} = do
let nt = D.drawText' labelSize black $ toString nonTerm ++ "(" ++ show symID ++ ")"
tp <- D.drawNode graph topID
bt <- D.drawNode graph botID
return $ nt ||| ((tp === bt) # centerY)
-- | Construct a diagram from a given state. | 275 | drawLab graph AuxVert{..} = do
let nt = D.drawText' labelSize black $ toString nonTerm ++ "(" ++ show symID ++ ")"
tp <- D.drawNode graph topID
bt <- D.drawNode graph botID
return $ nt ||| ((tp === bt) # centerY)
-- | Construct a diagram from a given state. | 275 | false | false | 0 | 15 | 66 | 109 | 51 | 58 | null | null |
martyall/kafaka-test | src/QueryAlgebra.hs | bsd-3-clause | interpretPG :: Eff '[Reader AppEnv, Exc ServantErr, IO] ~> R.ReaderT AppEnv Handler
interpretPG m = R.ReaderT $ \e -> ExceptT $ runM $ runError $ runReader m e | 159 | interpretPG :: Eff '[Reader AppEnv, Exc ServantErr, IO] ~> R.ReaderT AppEnv Handler
interpretPG m = R.ReaderT $ \e -> ExceptT $ runM $ runError $ runReader m e | 159 | interpretPG m = R.ReaderT $ \e -> ExceptT $ runM $ runError $ runReader m e | 75 | false | true | 0 | 9 | 27 | 73 | 36 | 37 | null | null |
pmiddend/physie | src/Physie/Main.hs | mit | satIntersectsBodies :: RigidBody -> RigidBody -> Maybe (V2 Double)
satIntersectsBodies a b = case satIntersects (bodyLines a) (bodyLines b) of
Nothing -> Nothing
Just p -> Just $ if ((a ^. bodyPosition) - (b ^. bodyPosition)) `dot` p < 0
then p
else negate p | 300 | satIntersectsBodies :: RigidBody -> RigidBody -> Maybe (V2 Double)
satIntersectsBodies a b = case satIntersects (bodyLines a) (bodyLines b) of
Nothing -> Nothing
Just p -> Just $ if ((a ^. bodyPosition) - (b ^. bodyPosition)) `dot` p < 0
then p
else negate p | 300 | satIntersectsBodies a b = case satIntersects (bodyLines a) (bodyLines b) of
Nothing -> Nothing
Just p -> Just $ if ((a ^. bodyPosition) - (b ^. bodyPosition)) `dot` p < 0
then p
else negate p | 233 | false | true | 6 | 12 | 86 | 111 | 55 | 56 | null | null |
Shakadak/ft_turing | src/Machine.hs | mit | checkTransition :: Machine -> Transition -> Bool
checkTransition m t = from_state t `elem` states m
&& Machine.read t `elem` alphabet m
&& to_state t `elem` states m
&& Machine.write t `elem` alphabet m | 265 | checkTransition :: Machine -> Transition -> Bool
checkTransition m t = from_state t `elem` states m
&& Machine.read t `elem` alphabet m
&& to_state t `elem` states m
&& Machine.write t `elem` alphabet m | 265 | checkTransition m t = from_state t `elem` states m
&& Machine.read t `elem` alphabet m
&& to_state t `elem` states m
&& Machine.write t `elem` alphabet m | 216 | false | true | 0 | 12 | 96 | 88 | 44 | 44 | null | null |
notcome/liu-ms-adult | src/LiuMS/Config.hs | bsd-3-clause | askCacheManager :: (MonadReader Config m) => m CacheManager
askCacheManager = cacheManager <$> ask | 98 | askCacheManager :: (MonadReader Config m) => m CacheManager
askCacheManager = cacheManager <$> ask | 98 | askCacheManager = cacheManager <$> ask | 38 | false | true | 0 | 6 | 12 | 29 | 15 | 14 | null | null |
linzhp/Language-GLSL | src/Language/C/Syntax/Constants.hs | bsd-3-clause | -- | get the haskell representation of a char constant
getCChar :: CChar -> [Char]
getCChar (CChar c _) = [c] | 112 | getCChar :: CChar -> [Char]
getCChar (CChar c _) = [c] | 57 | getCChar (CChar c _) = [c] | 29 | true | true | 0 | 7 | 23 | 33 | 18 | 15 | null | null |
sol/pandoc | src/Text/Pandoc/Readers/RST.hs | gpl-2.0 | --
-- field list
--
rawFieldListItem :: String -> GenParser Char ParserState (String, String)
rawFieldListItem indent = try $ do
string indent
char ':'
name <- many1 $ alphaNum <|> spaceChar
string ": "
skipSpaces
first <- manyTill anyChar newline
rest <- option "" $ try $ do lookAhead (string indent >> ... | 438 | rawFieldListItem :: String -> GenParser Char ParserState (String, String)
rawFieldListItem indent = try $ do
string indent
char ':'
name <- many1 $ alphaNum <|> spaceChar
string ": "
skipSpaces
first <- manyTill anyChar newline
rest <- option "" $ try $ do lookAhead (string indent >> spaceChar)
... | 417 | rawFieldListItem indent = try $ do
string indent
char ':'
name <- many1 $ alphaNum <|> spaceChar
string ": "
skipSpaces
first <- manyTill anyChar newline
rest <- option "" $ try $ do lookAhead (string indent >> spaceChar)
indentedBlock
let raw = first ++ "\n" ++ rest ++ "\... | 343 | true | true | 0 | 16 | 116 | 161 | 73 | 88 | null | null |
bitemyapp/haskell-css-syntax | src/Data/CSS/Syntax/Tokens.hs | mit | parseName :: Parser Text
parseName = do
chars <- AP.many1' $
nameCodePoint <|> escapedCodePoint'
case chars of
'-':xs -> case xs of
_:_ -> return $ T.pack chars
_ -> fail "parseName: Not a valid name start"
_ -> return $ T.pack chars | 290 | parseName :: Parser Text
parseName = do
chars <- AP.many1' $
nameCodePoint <|> escapedCodePoint'
case chars of
'-':xs -> case xs of
_:_ -> return $ T.pack chars
_ -> fail "parseName: Not a valid name start"
_ -> return $ T.pack chars | 290 | parseName = do
chars <- AP.many1' $
nameCodePoint <|> escapedCodePoint'
case chars of
'-':xs -> case xs of
_:_ -> return $ T.pack chars
_ -> fail "parseName: Not a valid name start"
_ -> return $ T.pack chars | 265 | false | true | 0 | 15 | 99 | 95 | 45 | 50 | null | null |
gamelost/pcgen-rules | src/Bonus.hs | apache-2.0 | parseRawBonus :: PParser Bonus
parseRawBonus = (tag "BONUS" *> parseAnyBonus)
<|> TemporaryBonus <$> parseTemporaryBonus
<|> BonusDescription <$> parseBonusDescription | 191 | parseRawBonus :: PParser Bonus
parseRawBonus = (tag "BONUS" *> parseAnyBonus)
<|> TemporaryBonus <$> parseTemporaryBonus
<|> BonusDescription <$> parseBonusDescription | 191 | parseRawBonus = (tag "BONUS" *> parseAnyBonus)
<|> TemporaryBonus <$> parseTemporaryBonus
<|> BonusDescription <$> parseBonusDescription | 160 | false | true | 0 | 11 | 41 | 40 | 20 | 20 | null | null |
anchor/snaplet-httpauth | test/App/App.hs | bsd-3-clause | -- | A public tpl page
publicTpl :: Handler App App ()
publicTpl = render "snaplet_httpauth_test" | 97 | publicTpl :: Handler App App ()
publicTpl = render "snaplet_httpauth_test" | 74 | publicTpl = render "snaplet_httpauth_test" | 42 | true | true | 0 | 6 | 15 | 24 | 12 | 12 | null | null |
MarkX95/TinyHask | Lexer.hs | bsd-3-clause | langDef :: Tok.LanguageDef ()
langDef = Tok.LanguageDef
{ Tok.commentStart = ""
, Tok.commentEnd = ""
, Tok.commentLine = "--"
, Tok.nestedComments = False
, Tok.identStart = letter
, Tok.identLetter = alphaNum <|> char '_'
, Tok.opStart = oneOf ":!#$%&*+./<=>?@\\^|-~... | 719 | langDef :: Tok.LanguageDef ()
langDef = Tok.LanguageDef
{ Tok.commentStart = ""
, Tok.commentEnd = ""
, Tok.commentLine = "--"
, Tok.nestedComments = False
, Tok.identStart = letter
, Tok.identLetter = alphaNum <|> char '_'
, Tok.opStart = oneOf ":!#$%&*+./<=>?@\\^|-~"... | 718 | langDef = Tok.LanguageDef
{ Tok.commentStart = ""
, Tok.commentEnd = ""
, Tok.commentLine = "--"
, Tok.nestedComments = False
, Tok.identStart = letter
, Tok.identLetter = alphaNum <|> char '_'
, Tok.opStart = oneOf ":!#$%&*+./<=>?@\\^|-~"
, Tok.opLetter = on... | 688 | false | true | 0 | 8 | 212 | 196 | 117 | 79 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/HTools/Graph.hs | bsd-2-clause | -- | Specific check for the Dsatur algorithm.
prop_colorDsaturAllNodes :: TestableGraph -> Property
prop_colorDsaturAllNodes = prop_colorAllNodes colorDsatur | 157 | prop_colorDsaturAllNodes :: TestableGraph -> Property
prop_colorDsaturAllNodes = prop_colorAllNodes colorDsatur | 111 | prop_colorDsaturAllNodes = prop_colorAllNodes colorDsatur | 57 | true | true | 0 | 5 | 16 | 19 | 10 | 9 | null | null |
sjfloat/accelerate | Data/Array/Accelerate/Trafo/Base.hs | bsd-3-clause | bindExps (PushSup g b) = bindExps g . Let b | 43 | bindExps (PushSup g b) = bindExps g . Let b | 43 | bindExps (PushSup g b) = bindExps g . Let b | 43 | false | false | 0 | 7 | 9 | 27 | 12 | 15 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | luxiKeyVersion :: String
luxiKeyVersion = "version" | 51 | luxiKeyVersion :: String
luxiKeyVersion = "version" | 51 | luxiKeyVersion = "version" | 26 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
DavidAlphaFox/ghc | libraries/bytestring/bench/CSV.hs | bsd-3-clause | -- 1.36 ms
benchStringUtf8 :: Benchmark
benchStringUtf8 = bench "utf8 + renderTable maxiTable" $
nf (L.length . B.toLazyByteString . B.stringUtf8 . renderTable) maxiTable | 172 | benchStringUtf8 :: Benchmark
benchStringUtf8 = bench "utf8 + renderTable maxiTable" $
nf (L.length . B.toLazyByteString . B.stringUtf8 . renderTable) maxiTable | 161 | benchStringUtf8 = bench "utf8 + renderTable maxiTable" $
nf (L.length . B.toLazyByteString . B.stringUtf8 . renderTable) maxiTable | 132 | true | true | 0 | 10 | 24 | 52 | 24 | 28 | null | null |
shockkolate/containers | Data/IntMap/Base.hs | bsd-3-clause | {--------------------------------------------------------------------
Difference
--------------------------------------------------------------------}
-- | /O(n+m)/. Difference between two maps (based on keys).
--
-- > difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 3 "b"
diff... | 437 | difference :: IntMap a -> IntMap b -> IntMap a
difference m1 m2
= mergeWithKey (\_ _ _ -> Nothing) id (const Nil) m1 m2 | 121 | difference m1 m2
= mergeWithKey (\_ _ _ -> Nothing) id (const Nil) m1 m2 | 74 | true | true | 0 | 8 | 60 | 71 | 35 | 36 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Primitive.Mutable.hs | bsd-3-clause | splitAt = G.splitAt | 19 | splitAt = G.splitAt | 19 | splitAt = G.splitAt | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
brendanhay/gogol | gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs | mpl-2.0 | -- | An alias, which may be a branch or tag.
crscAliasContext :: Lens' CloudRepoSourceContext (Maybe AliasContext)
crscAliasContext
= lens _crscAliasContext
(\ s a -> s{_crscAliasContext = a}) | 200 | crscAliasContext :: Lens' CloudRepoSourceContext (Maybe AliasContext)
crscAliasContext
= lens _crscAliasContext
(\ s a -> s{_crscAliasContext = a}) | 155 | crscAliasContext
= lens _crscAliasContext
(\ s a -> s{_crscAliasContext = a}) | 85 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH5/PrettyStub.hs | mit | where ch a b = (a, ['\\', b]) | 29 | where ch a b = (a, ['\\', b]) | 29 | where ch a b = (a, ['\\', b]) | 29 | false | false | 0 | 6 | 7 | 25 | 14 | 11 | null | null |
Changaco/haskell-plugins | testsuite/makewith/merge00/Main.hs | lgpl-2.1 | a = "Foo.hs" | 15 | a = "Foo.hs" | 15 | a = "Foo.hs" | 15 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
ml9951/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- * Misc functions
--------------------------------------------------------------------------------
ppCommaJoin :: (Outputable a) => [a] -> SDoc
ppCommaJoin strs = hsep $ punctuate comma (map ppr strs) | 284 | ppCommaJoin :: (Outputable a) => [a] -> SDoc
ppCommaJoin strs = hsep $ punctuate comma (map ppr strs) | 101 | ppCommaJoin strs = hsep $ punctuate comma (map ppr strs) | 56 | true | true | 2 | 8 | 24 | 57 | 28 | 29 | null | null |
mightybyte/reflex-dom-stubs | src/GHCJS/DOM/HTMLTextAreaElement.hs | bsd-3-clause | htmlTextAreaElementGetWrap = undefined | 38 | htmlTextAreaElementGetWrap = undefined | 38 | htmlTextAreaElementGetWrap = undefined | 38 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
aforemny/haskell-raf | src/Data/RAF/LowLevel.hs | bsd-3-clause | relativePathLength :: PathListEntry -> Word32
relativePathLength = subtract 1 . pathLength | 90 | relativePathLength :: PathListEntry -> Word32
relativePathLength = subtract 1 . pathLength | 90 | relativePathLength = subtract 1 . pathLength | 44 | false | true | 1 | 7 | 10 | 30 | 12 | 18 | null | null |
gbwey/persistentold | persistent-sqlite/Database/Persist/Sqlite.hs | mit | open' :: Text -> IO Connection
open' = Sqlite.open >=> wrapConnection | 69 | open' :: Text -> IO Connection
open' = Sqlite.open >=> wrapConnection | 69 | open' = Sqlite.open >=> wrapConnection | 38 | false | true | 2 | 7 | 10 | 32 | 14 | 18 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | toName MH = "Marshall Islands" | 30 | toName MH = "Marshall Islands" | 30 | toName MH = "Marshall Islands" | 30 | false | false | 0 | 4 | 4 | 10 | 4 | 6 | null | null |
meoblast001/quotum-snap | src/Auth/Register.hs | mit | -- | Handle new user form submit
handleNewUser :: Handler App (AuthManager App) ()
handleNewUser = do
(view', result) <- runForm "new_user" loginForm
case result of
Just user -> do
auth' <- createUser
(user ^. username)
(user ^. password . to encodeUtf8)
case auth' of... | 553 | handleNewUser :: Handler App (AuthManager App) ()
handleNewUser = do
(view', result) <- runForm "new_user" loginForm
case result of
Just user -> do
auth' <- createUser
(user ^. username)
(user ^. password . to encodeUtf8)
case auth' of
Left e -> liftIO (print... | 520 | handleNewUser = do
(view', result) <- runForm "new_user" loginForm
case result of
Just user -> do
auth' <- createUser
(user ^. username)
(user ^. password . to encodeUtf8)
case auth' of
Left e -> liftIO (print e) >> heistLocal (bindDigestiveSplices view') (re... | 470 | true | true | 0 | 18 | 144 | 178 | 84 | 94 | null | null |
sdiehl/ghc | compiler/main/Settings.hs | bsd-3-clause | sGccSupportsNoPie :: Settings -> Bool
sGccSupportsNoPie = toolSettings_ccSupportsNoPie . sToolSettings | 102 | sGccSupportsNoPie :: Settings -> Bool
sGccSupportsNoPie = toolSettings_ccSupportsNoPie . sToolSettings | 102 | sGccSupportsNoPie = toolSettings_ccSupportsNoPie . sToolSettings | 64 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
tittoassini/typed | test/Test/Data/Values.hs | bsd-3-clause | f3 = Roll [Roll [Pure 3],Pure 4] | 32 | f3 = Roll [Roll [Pure 3],Pure 4] | 32 | f3 = Roll [Roll [Pure 3],Pure 4] | 32 | false | false | 1 | 9 | 6 | 30 | 13 | 17 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Concrete/FingerTree.hs | mit | addDigits1 m1 (Four a b c d) e (Three f g h) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 | 115 | addDigits1 m1 (Four a b c d) e (Three f g h) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 | 115 | addDigits1 m1 (Four a b c d) e (Three f g h) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node2 g h) m2 | 115 | false | false | 1 | 7 | 35 | 87 | 38 | 49 | null | null |
mgsloan/instance-templates | Rewriter.hs | bsd-3-clause | isInstance, isClass :: Decl a -> Bool
isInstance (InstDecl _ _ _ _) = True | 75 | isInstance, isClass :: Decl a -> Bool
isInstance (InstDecl _ _ _ _) = True | 74 | isInstance (InstDecl _ _ _ _) = True | 36 | false | true | 0 | 7 | 15 | 35 | 18 | 17 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags) | 62 | translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags) | 62 | translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags) | 62 | false | false | 1 | 7 | 10 | 24 | 9 | 15 | null | null |
tittoassini/flat | src/Flat/Encoder/Size.hs | bsd-3-clause | sDouble :: NumBits
sDouble = 64 | 31 | sDouble :: NumBits
sDouble = 64 | 31 | sDouble = 64 | 12 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
flocc-net/flocc | v0.1/Compiler/Front/Common.hs | apache-2.0 | -- |Runs an idx state computation
evalIdxState :: Int -> (State IdxSet a) -> a
evalIdxState numGlobNames m = evalState m (initIdxSet numGlobNames) | 146 | evalIdxState :: Int -> (State IdxSet a) -> a
evalIdxState numGlobNames m = evalState m (initIdxSet numGlobNames) | 112 | evalIdxState numGlobNames m = evalState m (initIdxSet numGlobNames) | 67 | true | true | 0 | 8 | 22 | 44 | 22 | 22 | null | null |
bfpg/talks | site.hs | cc0-1.0 | feedConfiguration :: FeedConfiguration
feedConfiguration = FeedConfiguration
{ feedTitle = "BFPG Talks"
, feedDescription = concat [
"The Brisbane Functional Programming Group holds both a monthly talks and hack nights to help people learn "
, "functional programing at all levels. We aim to foster a... | 529 | feedConfiguration :: FeedConfiguration
feedConfiguration = FeedConfiguration
{ feedTitle = "BFPG Talks"
, feedDescription = concat [
"The Brisbane Functional Programming Group holds both a monthly talks and hack nights to help people learn "
, "functional programing at all levels. We aim to foster a... | 529 | feedConfiguration = FeedConfiguration
{ feedTitle = "BFPG Talks"
, feedDescription = concat [
"The Brisbane Functional Programming Group holds both a monthly talks and hack nights to help people learn "
, "functional programing at all levels. We aim to foster an environment friendly to both beginner... | 490 | false | true | 0 | 9 | 114 | 59 | 35 | 24 | null | null |
tdammers/templar | src/Web/Sprinkles/TemplateContext.hs | bsd-3-clause | gfnRandomStr :: Ginger.Function (Ginger.Run p IO h)
gfnRandomStr args = do
let defaultAlphabet = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] :: String
argSpec :: [(Text, Ginger.GVal (Ginger.Run p IO h))]
argSpec = [ ("length", toGVal (8 :: Int))
, ("alphabet", toGVal defaultAlphabet)
... | 1,003 | gfnRandomStr :: Ginger.Function (Ginger.Run p IO h)
gfnRandomStr args = do
let defaultAlphabet = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] :: String
argSpec :: [(Text, Ginger.GVal (Ginger.Run p IO h))]
argSpec = [ ("length", toGVal (8 :: Int))
, ("alphabet", toGVal defaultAlphabet)
... | 1,003 | gfnRandomStr args = do
let defaultAlphabet = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] :: String
argSpec :: [(Text, Ginger.GVal (Ginger.Run p IO h))]
argSpec = [ ("length", toGVal (8 :: Int))
, ("alphabet", toGVal defaultAlphabet)
]
case Ginger.extractArgsDefL ar... | 951 | false | true | 0 | 17 | 310 | 295 | 148 | 147 | null | null |
doctau/garbagehat | GarbageHat/Parser.hs | epl-1.0 | parseG1ConcurrentRootRegionScanStart = parseG1StartEvent "concurrent-root-region-scan-start" mkG1ConcurrentRootRegionScanStart | 126 | parseG1ConcurrentRootRegionScanStart = parseG1StartEvent "concurrent-root-region-scan-start" mkG1ConcurrentRootRegionScanStart | 126 | parseG1ConcurrentRootRegionScanStart = parseG1StartEvent "concurrent-root-region-scan-start" mkG1ConcurrentRootRegionScanStart | 126 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
sdiehl/ghc | testsuite/tests/simplCore/should_compile/T11562.hs | bsd-3-clause | sub :: a => (b => r) -> (C2D a b) -> r
sub r (Sub Dict) = r | 59 | sub :: a => (b => r) -> (C2D a b) -> r
sub r (Sub Dict) = r | 59 | sub r (Sub Dict) = r | 20 | false | true | 0 | 9 | 18 | 51 | 25 | 26 | null | null |
green-haskell/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | countArgs (ApplyToVal { sc_cont = cont }) = 1 + countArgs cont | 62 | countArgs (ApplyToVal { sc_cont = cont }) = 1 + countArgs cont | 62 | countArgs (ApplyToVal { sc_cont = cont }) = 1 + countArgs cont | 62 | false | false | 0 | 9 | 11 | 28 | 14 | 14 | null | null |
colah/ImplicitCAD | Graphics/Implicit/ExtOpenScad/Parser/Lexer.hs | agpl-3.0 | -- | Match the else keyword.
matchElse :: GenParser Char st ()
matchElse = P.reserved lexer "else" | 98 | matchElse :: GenParser Char st ()
matchElse = P.reserved lexer "else" | 69 | matchElse = P.reserved lexer "else" | 35 | true | true | 1 | 6 | 16 | 33 | 14 | 19 | null | null |
khajavi/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | -- | Remove all code elements from list of inline elements
-- (because it's illegal to have verbatim inside some command arguments)
deVerb :: [Inline] -> [Inline]
deVerb [] = [] | 177 | deVerb :: [Inline] -> [Inline]
deVerb [] = [] | 45 | deVerb [] = [] | 14 | true | true | 0 | 8 | 30 | 36 | 18 | 18 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Undelete.hs | mpl-2.0 | -- | Multipart request metadata.
uuPayload :: Lens' UsersUndelete UserUndelete
uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a}) | 137 | uuPayload :: Lens' UsersUndelete UserUndelete
uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a}) | 104 | uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a}) | 58 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
vladimir-ipatov/ganeti | test/hs/Test/Ganeti/HTools/ExtLoader.hs | gpl-2.0 | -- | Test a MonD data file.
case_parseMonDData :: HUnit.Assertion
case_parseMonDData = do
let mond_data_file = "mond-data.txt"
n1 = "node1.example.com"
n2 = "node2.example.com"
t1 = 1379507272000000000
t2 = 1379507280000000000
cpu_number1 = 4
cpu_number2 = 2
cpus1 = [ 0.04108... | 1,284 | case_parseMonDData :: HUnit.Assertion
case_parseMonDData = do
let mond_data_file = "mond-data.txt"
n1 = "node1.example.com"
n2 = "node2.example.com"
t1 = 1379507272000000000
t2 = 1379507280000000000
cpu_number1 = 4
cpu_number2 = 2
cpus1 = [ 0.04108859597350646,0.0445655452816... | 1,256 | case_parseMonDData = do
let mond_data_file = "mond-data.txt"
n1 = "node1.example.com"
n2 = "node2.example.com"
t1 = 1379507272000000000
t2 = 1379507280000000000
cpu_number1 = 4
cpu_number2 = 2
cpus1 = [ 0.04108859597350646,0.04456554528165781
, 0.06203619909502... | 1,218 | true | true | 0 | 14 | 306 | 295 | 158 | 137 | null | null |
jstolarek/ghc | libraries/base/Data/Foldable.hs | bsd-3-clause | msum = asum | 11 | msum = asum | 11 | msum = asum | 11 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
xnning/fcore | testsuite/TransCFSpec.hs | bsd-2-clause | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
CindyLinz/Haskell-HVG | src/HVG/Context2D.hs | bsd-3-clause | isPointInPath :: Point -> IO Bool
isPointInPath (Point x y) = error "Can't check inPointInPath" | 95 | isPointInPath :: Point -> IO Bool
isPointInPath (Point x y) = error "Can't check inPointInPath" | 95 | isPointInPath (Point x y) = error "Can't check inPointInPath" | 61 | false | true | 0 | 9 | 14 | 36 | 16 | 20 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | checkOnOff :: NameSpaces -> Element -> QName -> Maybe Bool
checkOnOff ns rPr tag
| Just t <- findChild tag rPr
, Just val <- findAttr (elemName ns "w" "val") t =
Just $ case val of
"true" -> True
"false" -> False
"on" -> True
"off" -> False
"1" -> True
"0" -> F... | 391 | checkOnOff :: NameSpaces -> Element -> QName -> Maybe Bool
checkOnOff ns rPr tag
| Just t <- findChild tag rPr
, Just val <- findAttr (elemName ns "w" "val") t =
Just $ case val of
"true" -> True
"false" -> False
"on" -> True
"off" -> False
"1" -> True
"0" -> F... | 391 | checkOnOff ns rPr tag
| Just t <- findChild tag rPr
, Just val <- findAttr (elemName ns "w" "val") t =
Just $ case val of
"true" -> True
"false" -> False
"on" -> True
"off" -> False
"1" -> True
"0" -> False
_ -> False
| Just _ <- findChild tag rPr... | 332 | false | true | 0 | 11 | 140 | 154 | 71 | 83 | null | null |
pawel-n/semi-iso | Control/SIArrow.hs | mit | sisequence (x:xs) = _Cons /$/ x /*/ sisequence xs | 49 | sisequence (x:xs) = _Cons /$/ x /*/ sisequence xs | 49 | sisequence (x:xs) = _Cons /$/ x /*/ sisequence xs | 49 | false | false | 0 | 6 | 8 | 28 | 13 | 15 | null | null |
gridaphobe/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mk_co_app_fn :: (a -> HsWrapper) -> [a] -> HsWrapper
-- For applications, the *first* argument must
-- come *last* in the composition sequence
mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 204 | mk_co_app_fn :: (a -> HsWrapper) -> [a] -> HsWrapper
mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 114 | mk_co_app_fn f as = foldr (\x wrap -> wrap <.> f x) WpHole as | 61 | true | true | 0 | 9 | 36 | 60 | 32 | 28 | null | null |
romanb/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/UpdateBatchPrediction.hs | mpl-2.0 | -- | The ID assigned to the 'BatchPrediction' during creation.
ubpBatchPredictionId :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionId =
lens _ubpBatchPredictionId (\s a -> s { _ubpBatchPredictionId = a }) | 215 | ubpBatchPredictionId :: Lens' UpdateBatchPrediction Text
ubpBatchPredictionId =
lens _ubpBatchPredictionId (\s a -> s { _ubpBatchPredictionId = a }) | 152 | ubpBatchPredictionId =
lens _ubpBatchPredictionId (\s a -> s { _ubpBatchPredictionId = a }) | 95 | true | true | 0 | 9 | 31 | 40 | 22 | 18 | null | null |
jean-edouard/manager | xenmgr/XenMgr/Expose/VmDiskObject.hs | gpl-2.0 | _GetShared :: ID -> Rpc Bool
_GetShared id = _get_field id diskShared | 69 | _GetShared :: ID -> Rpc Bool
_GetShared id = _get_field id diskShared | 69 | _GetShared id = _get_field id diskShared | 40 | false | true | 0 | 7 | 11 | 30 | 13 | 17 | null | null |
karamellpelle/grid | source/Game/Grid/GridData/Fancy/ShadeGeneral.hs | gpl-3.0 | loadShadeGeneral :: IO ShadeGeneral
loadShadeGeneral = do
vsh <- fileStaticData "shaders/General.vsh"
fsh <- fileStaticData "shaders/General.fsh"
prg <- createPrg vsh fsh [ (attPos, "a_pos"),
(attTexCoord, "a_texcoord") ]
[ (tex0, "u_tex") ]
... | 636 | loadShadeGeneral :: IO ShadeGeneral
loadShadeGeneral = do
vsh <- fileStaticData "shaders/General.vsh"
fsh <- fileStaticData "shaders/General.fsh"
prg <- createPrg vsh fsh [ (attPos, "a_pos"),
(attTexCoord, "a_texcoord") ]
[ (tex0, "u_tex") ]
... | 636 | loadShadeGeneral = do
vsh <- fileStaticData "shaders/General.vsh"
fsh <- fileStaticData "shaders/General.fsh"
prg <- createPrg vsh fsh [ (attPos, "a_pos"),
(attTexCoord, "a_texcoord") ]
[ (tex0, "u_tex") ]
uAlpha <- getUniformLocation prg "... | 600 | false | true | 0 | 10 | 216 | 127 | 65 | 62 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1ServerAddressByClientCIDRServerAddress' Lens
v1ServerAddressByClientCIDRServerAddressL :: Lens_' V1ServerAddressByClientCIDR (Text)
v1ServerAddressByClientCIDRServerAddressL f V1ServerAddressByClientCIDR{..} = (\v1ServerAddressByClientCIDRServerAddress -> V1ServerAddressByClientCIDR { v1ServerAddressByClientCID... | 388 | v1ServerAddressByClientCIDRServerAddressL :: Lens_' V1ServerAddressByClientCIDR (Text)
v1ServerAddressByClientCIDRServerAddressL f V1ServerAddressByClientCIDR{..} = (\v1ServerAddressByClientCIDRServerAddress -> V1ServerAddressByClientCIDR { v1ServerAddressByClientCIDRServerAddress, ..} ) <$> f v1ServerAddressByClientCI... | 335 | v1ServerAddressByClientCIDRServerAddressL f V1ServerAddressByClientCIDR{..} = (\v1ServerAddressByClientCIDRServerAddress -> V1ServerAddressByClientCIDR { v1ServerAddressByClientCIDRServerAddress, ..} ) <$> f v1ServerAddressByClientCIDRServerAddress | 248 | true | true | 0 | 8 | 22 | 54 | 29 | 25 | null | null |
jgoerzen/dtmconv | HaXml-1.12/src/Text/XML/HaXml/Haskell2Xml.hs | gpl-2.0 | fWriteXml :: Haskell2Xml a => FilePath -> a -> IO ()
fWriteXml fp v = do
f <- openFile fp WriteMode
(hPutStrLn f . render . PP.document . toXml) v
hClose f
-- | Read a Haskell value from an XML document transmitted through the
-- given 'Handle'. | 261 | fWriteXml :: Haskell2Xml a => FilePath -> a -> IO ()
fWriteXml fp v = do
f <- openFile fp WriteMode
(hPutStrLn f . render . PP.document . toXml) v
hClose f
-- | Read a Haskell value from an XML document transmitted through the
-- given 'Handle'. | 261 | fWriteXml fp v = do
f <- openFile fp WriteMode
(hPutStrLn f . render . PP.document . toXml) v
hClose f
-- | Read a Haskell value from an XML document transmitted through the
-- given 'Handle'. | 208 | false | true | 0 | 12 | 63 | 82 | 38 | 44 | null | null |
andrewberls/btable-haskell | src/Data/BTable/Get.hs | mit | getVersion :: FilePath -> IO Int
getVersion path = do
contents <- BL.readFile path
return $ runGet readVersion contents | 123 | getVersion :: FilePath -> IO Int
getVersion path = do
contents <- BL.readFile path
return $ runGet readVersion contents | 123 | getVersion path = do
contents <- BL.readFile path
return $ runGet readVersion contents | 90 | false | true | 0 | 10 | 22 | 50 | 21 | 29 | null | null |
wilbowma/accelerate | accelerate-examples/tests/primitives/Stencil.hs | bsd-3-clause | test_stencil1D :: Int -> IO (() -> UArray Int Float, () -> Acc (Vector Float))
test_stencil1D n = withSystemRandom $ \gen -> do
vec <- randomUArrayR (-1,1) gen n
vec' <- convertUArray vec
return (\() -> run_ref vec, \() -> run_acc vec')
where
run_acc = stencil stencil1D Clamp . use
run_ref v =
... | 735 | test_stencil1D :: Int -> IO (() -> UArray Int Float, () -> Acc (Vector Float))
test_stencil1D n = withSystemRandom $ \gen -> do
vec <- randomUArrayR (-1,1) gen n
vec' <- convertUArray vec
return (\() -> run_ref vec, \() -> run_acc vec')
where
run_acc = stencil stencil1D Clamp . use
run_ref v =
... | 735 | test_stencil1D n = withSystemRandom $ \gen -> do
vec <- randomUArrayR (-1,1) gen n
vec' <- convertUArray vec
return (\() -> run_ref vec, \() -> run_acc vec')
where
run_acc = stencil stencil1D Clamp . use
run_ref v =
let (minx,maxx) = bounds v
clamp x = minx `max` x `min` maxx
... | 656 | false | true | 0 | 16 | 251 | 313 | 158 | 155 | null | null |
agrafix/hackage-server | Distribution/Server/Pages/Index.hs | bsd-3-clause | blacklist :: [String]
blacklist = ["Application", "Foreign binding", "Tool", "Type", "Various", "Unclassified"] | 111 | blacklist :: [String]
blacklist = ["Application", "Foreign binding", "Tool", "Type", "Various", "Unclassified"] | 111 | blacklist = ["Application", "Foreign binding", "Tool", "Type", "Various", "Unclassified"] | 89 | false | true | 0 | 5 | 11 | 32 | 20 | 12 | null | null |
atsukotakahashi/wi | src/library/Yi/KillRing.hs | gpl-2.0 | -- | Push a string in the killring.
push :: R.YiString -> NonEmpty R.YiString -> NonEmpty R.YiString
push s r@(h :| t) = s :| if R.length h <= 1 then t else take maxDepth r | 172 | push :: R.YiString -> NonEmpty R.YiString -> NonEmpty R.YiString
push s r@(h :| t) = s :| if R.length h <= 1 then t else take maxDepth r | 136 | push s r@(h :| t) = s :| if R.length h <= 1 then t else take maxDepth r | 71 | true | true | 1 | 9 | 35 | 82 | 38 | 44 | null | null |
gnn/Hets | TPTP/Pretty.hs | gpl-2.0 | printTFF_formula_tuple_list :: TFF_formula_tuple_list -> Doc
printTFF_formula_tuple_list = sepByCommas . map pretty | 115 | printTFF_formula_tuple_list :: TFF_formula_tuple_list -> Doc
printTFF_formula_tuple_list = sepByCommas . map pretty | 115 | printTFF_formula_tuple_list = sepByCommas . map pretty | 54 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
mpkh/Idris-dev | src/Idris/Directives.hs | bsd-3-clause | directiveAction (DLogging lvl) = setLogLevel (fromInteger lvl) | 62 | directiveAction (DLogging lvl) = setLogLevel (fromInteger lvl) | 62 | directiveAction (DLogging lvl) = setLogLevel (fromInteger lvl) | 62 | false | false | 0 | 7 | 6 | 24 | 11 | 13 | null | null |
olsner/ghc | compiler/basicTypes/Var.hs | bsd-3-clause | isId :: Var -> Bool
isId (Id {}) = True | 39 | isId :: Var -> Bool
isId (Id {}) = True | 39 | isId (Id {}) = True | 19 | false | true | 0 | 7 | 9 | 25 | 13 | 12 | null | null |
bitemyapp/roshask | src/Ros/Logging.hs | bsd-3-clause | -- Publish a log message.
sendMsg :: Log -> IO ()
sendMsg msg = do n <- readIORef nodeName
let msg' = msg { Log.name = n }
($ msg') =<< readIORef showLevel
writeChan rosOutChan msg'
-- Prints messages whose level is greater than or equal to the
-- specified level. | 316 | sendMsg :: Log -> IO ()
sendMsg msg = do n <- readIORef nodeName
let msg' = msg { Log.name = n }
($ msg') =<< readIORef showLevel
writeChan rosOutChan msg'
-- Prints messages whose level is greater than or equal to the
-- specified level. | 290 | sendMsg msg = do n <- readIORef nodeName
let msg' = msg { Log.name = n }
($ msg') =<< readIORef showLevel
writeChan rosOutChan msg'
-- Prints messages whose level is greater than or equal to the
-- specified level. | 266 | true | true | 0 | 11 | 102 | 77 | 38 | 39 | null | null |
mettekou/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | floatTy :: Type
floatTy = mkTyConTy floatTyCon | 46 | floatTy :: Type
floatTy = mkTyConTy floatTyCon | 46 | floatTy = mkTyConTy floatTyCon | 30 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.