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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
christiaanb/ghc | ghc/GhciMonad.hs | bsd-3-clause | modifyGHCiState :: (GHCiState -> GHCiState) -> GHCi ()
modifyGHCiState f = GHCi $ \r -> liftIO $ readIORef r >>= writeIORef r . f | 129 | modifyGHCiState :: (GHCiState -> GHCiState) -> GHCi ()
modifyGHCiState f = GHCi $ \r -> liftIO $ readIORef r >>= writeIORef r . f | 129 | modifyGHCiState f = GHCi $ \r -> liftIO $ readIORef r >>= writeIORef r . f | 74 | false | true | 0 | 10 | 23 | 62 | 29 | 33 | null | null |
sgillespie/ghc | compiler/stranal/WwLib.hs | bsd-3-clause | deepSplitCprType_maybe _ _ _ = Nothing | 38 | deepSplitCprType_maybe _ _ _ = Nothing | 38 | deepSplitCprType_maybe _ _ _ = Nothing | 38 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
emc2/HUnit-Plus | test/Tests/Test/HUnitPlus/Filter.hs | bsd-3-clause | innerPath :: Selector -> Selector
innerPath inner = Selector { selectorInners = HashMap.singleton "Inner" inner,
selectorTags = Nothing } | 166 | innerPath :: Selector -> Selector
innerPath inner = Selector { selectorInners = HashMap.singleton "Inner" inner,
selectorTags = Nothing } | 166 | innerPath inner = Selector { selectorInners = HashMap.singleton "Inner" inner,
selectorTags = Nothing } | 132 | false | true | 0 | 9 | 47 | 48 | 23 | 25 | null | null |
cchalmers/optical | src/Optical/Containers.hs | bsd-3-clause | toHashMap :: (FoldableWithIndex k f, Hashable k, Eq k) => f a -> HashMap.HashMap k a
toHashMap = toHashMapOf ifolded | 116 | toHashMap :: (FoldableWithIndex k f, Hashable k, Eq k) => f a -> HashMap.HashMap k a
toHashMap = toHashMapOf ifolded | 116 | toHashMap = toHashMapOf ifolded | 31 | false | true | 0 | 9 | 19 | 57 | 26 | 31 | null | null |
LukaHorvat/Halt | src/Halt/Parsing/Elements.hs | mit | charNum :: CharStream s m => ParsecT s u m Char
charNum = toEnum <$> fromInteger <$> num
where num = decimal
<|> (char 'o' *> number 8 octDigit)
<|> (char 'x' *> number 16 hexDigit) | 210 | charNum :: CharStream s m => ParsecT s u m Char
charNum = toEnum <$> fromInteger <$> num
where num = decimal
<|> (char 'o' *> number 8 octDigit)
<|> (char 'x' *> number 16 hexDigit) | 210 | charNum = toEnum <$> fromInteger <$> num
where num = decimal
<|> (char 'o' *> number 8 octDigit)
<|> (char 'x' *> number 16 hexDigit) | 162 | false | true | 0 | 11 | 64 | 82 | 40 | 42 | null | null |
nakaji-dayo/persistent | persistent-postgresql/Database/Persist/Postgresql.hs | mit | getColumn _ _ x =
return $ Left $ T.pack $ "Invalid result from information_schema: " ++ show x | 99 | getColumn _ _ x =
return $ Left $ T.pack $ "Invalid result from information_schema: " ++ show x | 99 | getColumn _ _ x =
return $ Left $ T.pack $ "Invalid result from information_schema: " ++ show x | 99 | false | false | 0 | 8 | 22 | 34 | 16 | 18 | null | null |
flowbox-public/language-c-quote | Language/C/Quote/Base.hs | bsd-3-clause | qqStmP _ = Nothing | 32 | qqStmP _ = Nothing | 32 | qqStmP _ = Nothing | 32 | false | false | 0 | 5 | 17 | 9 | 4 | 5 | null | null |
abakst/symmetry | checker/src/cloud-haskell-tests/Pipe.hs | mit | init_pipe f n next = do
new <- spawnLocal (pipe_node f next)
pid <- init_pipe f (n-1) new
return pid | 169 | init_pipe f n next = do
new <- spawnLocal (pipe_node f next)
pid <- init_pipe f (n-1) new
return pid | 169 | init_pipe f n next = do
new <- spawnLocal (pipe_node f next)
pid <- init_pipe f (n-1) new
return pid | 169 | false | false | 0 | 10 | 88 | 60 | 26 | 34 | null | null |
ribag/ganeti-experiments | src/Ganeti/Constants.hs | gpl-2.0 | dsDefaults :: Map String Int
dsDefaults =
Map.fromList
[(dsDiskTotal, 0),
(dsDiskReserved, 0),
(dsDiskOverhead, 0)] | 125 | dsDefaults :: Map String Int
dsDefaults =
Map.fromList
[(dsDiskTotal, 0),
(dsDiskReserved, 0),
(dsDiskOverhead, 0)] | 125 | dsDefaults =
Map.fromList
[(dsDiskTotal, 0),
(dsDiskReserved, 0),
(dsDiskOverhead, 0)] | 96 | false | true | 0 | 6 | 23 | 48 | 28 | 20 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | The average time period (in /us/) to wait between two @fork@ attempts.
-- The forking thread wait a random time period between @0@ and twice the
-- number, and with each attempt it doubles the step.
-- See 'luxidRetryForkCount'.
luxidRetryForkStepUS :: Int
luxidRetryForkStepUS = 500000 | 291 | luxidRetryForkStepUS :: Int
luxidRetryForkStepUS = 500000 | 57 | luxidRetryForkStepUS = 500000 | 29 | true | true | 0 | 4 | 46 | 15 | 10 | 5 | null | null |
brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Operations/List.hs | mpl-2.0 | -- | The standard list page size.
olPageSize :: Lens' OperationsList (Maybe Int32)
olPageSize
= lens _olPageSize (\ s a -> s{_olPageSize = a}) .
mapping _Coerce | 168 | olPageSize :: Lens' OperationsList (Maybe Int32)
olPageSize
= lens _olPageSize (\ s a -> s{_olPageSize = a}) .
mapping _Coerce | 134 | olPageSize
= lens _olPageSize (\ s a -> s{_olPageSize = a}) .
mapping _Coerce | 85 | true | true | 0 | 10 | 34 | 55 | 28 | 27 | null | null |
frontrowed/stratosphere | examples/s3-copy.hs | mit | main :: IO ()
main = B.putStrLn $ encodeTemplate myTemplate | 59 | main :: IO ()
main = B.putStrLn $ encodeTemplate myTemplate | 59 | main = B.putStrLn $ encodeTemplate myTemplate | 45 | false | true | 0 | 6 | 9 | 25 | 12 | 13 | null | null |
keithodulaigh/Hets | Haskell/HatAna.hs | gpl-2.0 | hatAna :: (HsDecls, Sign, GlobalAnnos) ->
Result (HsDecls, ExtSign Sign (), [Named (TiDecl PNT)])
hatAna (HsDecls hs, e, ga) = do
(decls, accSig, sens) <-
hatAna2 (HsDecls hs, addSign e preludeSign, ga)
return (decls, mkExtSign (diffSign accSig preludeSign), sens) | 290 | hatAna :: (HsDecls, Sign, GlobalAnnos) ->
Result (HsDecls, ExtSign Sign (), [Named (TiDecl PNT)])
hatAna (HsDecls hs, e, ga) = do
(decls, accSig, sens) <-
hatAna2 (HsDecls hs, addSign e preludeSign, ga)
return (decls, mkExtSign (diffSign accSig preludeSign), sens) | 290 | hatAna (HsDecls hs, e, ga) = do
(decls, accSig, sens) <-
hatAna2 (HsDecls hs, addSign e preludeSign, ga)
return (decls, mkExtSign (diffSign accSig preludeSign), sens) | 182 | false | true | 0 | 11 | 64 | 136 | 71 | 65 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1634 = 1633 | 11 | 1634 = 1633 | 11 | 1634 = 1633 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
psibi/shakespeare | Text/Css.hs | mit | topLevelsToCassius :: [TopLevel Unresolved]
-> Q Exp
topLevelsToCassius a = do
r <- newName "_render"
lamE [varP r] $ appE [|CssNoWhitespace . foldr ($) []|] $ fmap ListE $ go r [] a
where
go _ _ [] = return []
go r scope (TopBlock b:rest) = do
e <- [|(++) $ map TopBlock ($(... | 866 | topLevelsToCassius :: [TopLevel Unresolved]
-> Q Exp
topLevelsToCassius a = do
r <- newName "_render"
lamE [varP r] $ appE [|CssNoWhitespace . foldr ($) []|] $ fmap ListE $ go r [] a
where
go _ _ [] = return []
go r scope (TopBlock b:rest) = do
e <- [|(++) $ map TopBlock ($(... | 866 | topLevelsToCassius a = do
r <- newName "_render"
lamE [varP r] $ appE [|CssNoWhitespace . foldr ($) []|] $ fmap ListE $ go r [] a
where
go _ _ [] = return []
go r scope (TopBlock b:rest) = do
e <- [|(++) $ map TopBlock ($(blockToCss r scope b) [])|]
es <- go r scope rest
return... | 794 | false | true | 0 | 12 | 281 | 338 | 164 | 174 | null | null |
harrisi/on-being-better | list-expansion/Haskell/cis194/spring13/04/HigherOrder.hs | cc0-1.0 | fun2 n
| even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 73 | fun2 n
| even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 73 | fun2 n
| even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 73 | false | false | 2 | 8 | 24 | 64 | 29 | 35 | null | null |
deggis/CV-web | src/Main.hs | mit | viewerPopup :: App -> Snap ()
viewerPopup app = do
Just (b,t) <- renderTemplate
(appHeist app)
"viewer"
modifyResponse (setContentType t)
writeBuilder b | 180 | viewerPopup :: App -> Snap ()
viewerPopup app = do
Just (b,t) <- renderTemplate
(appHeist app)
"viewer"
modifyResponse (setContentType t)
writeBuilder b | 180 | viewerPopup app = do
Just (b,t) <- renderTemplate
(appHeist app)
"viewer"
modifyResponse (setContentType t)
writeBuilder b | 150 | false | true | 0 | 11 | 49 | 73 | 32 | 41 | null | null |
urbanslug/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Dumping
dumpIfSet :: DynFlags -> Bool -> String -> SDoc -> IO ()
dumpIfSet dflags flag hdr doc
| not flag = return ()
| otherwise = log_action dflags dflags SevDump noSrcSpan defaultDumpStyle (mkDumpDoc hdr doc) | 303 | dumpIfSet :: DynFlags -> Bool -> String -> SDoc -> IO ()
dumpIfSet dflags flag hdr doc
| not flag = return ()
| otherwise = log_action dflags dflags SevDump noSrcSpan defaultDumpStyle (mkDumpDoc hdr doc) | 210 | dumpIfSet dflags flag hdr doc
| not flag = return ()
| otherwise = log_action dflags dflags SevDump noSrcSpan defaultDumpStyle (mkDumpDoc hdr doc) | 153 | true | true | 0 | 10 | 46 | 94 | 43 | 51 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/PeekPoke.hs | bsd-3-clause | poke1 :: Storable a => Ptr a -> a -> IO ()
poke1 ptr x =
pokeElemOff ptr 0 x | 79 | poke1 :: Storable a => Ptr a -> a -> IO ()
poke1 ptr x =
pokeElemOff ptr 0 x | 79 | poke1 ptr x =
pokeElemOff ptr 0 x | 36 | false | true | 0 | 9 | 22 | 46 | 21 | 25 | null | null |
lepoticka/ExcellingCabbage | EXParser.hs | gpl-2.0 | evaluateHelper (Mult a b) = liftM2 (*) (evaluateHelper a) (evaluateHelper b) | 76 | evaluateHelper (Mult a b) = liftM2 (*) (evaluateHelper a) (evaluateHelper b) | 76 | evaluateHelper (Mult a b) = liftM2 (*) (evaluateHelper a) (evaluateHelper b) | 76 | false | false | 0 | 7 | 10 | 38 | 19 | 19 | null | null |
AlexeyRaga/eta | compiler/ETA/BasicTypes/Literal.hs | bsd-3-clause | inIntRange, inWordRange :: DynFlags -> Integer -> Bool
inIntRange _ x = x >= minInt
&& x <= maxInt | 119 | inIntRange, inWordRange :: DynFlags -> Integer -> Bool
inIntRange _ x = x >= minInt
&& x <= maxInt | 119 | inIntRange _ x = x >= minInt
&& x <= maxInt | 64 | false | true | 2 | 7 | 39 | 43 | 20 | 23 | null | null |
bflyblue/octree | Octree.hs | unlicense | modify :: Eq a => (Octree a -> Octree a) -> Position -> Octree a -> Octree a
modify f pos = collapse . modify' . expand
where
modify' octree@(Node h o0 o1 o2 o3 o4 o5 o6 o7)
= case step h pos of Nothing -> f octree
... | 1,354 | modify :: Eq a => (Octree a -> Octree a) -> Position -> Octree a -> Octree a
modify f pos = collapse . modify' . expand
where
modify' octree@(Node h o0 o1 o2 o3 o4 o5 o6 o7)
= case step h pos of Nothing -> f octree
... | 1,354 | modify f pos = collapse . modify' . expand
where
modify' octree@(Node h o0 o1 o2 o3 o4 o5 o6 o7)
= case step h pos of Nothing -> f octree
Just O... | 1,277 | false | true | 0 | 14 | 904 | 410 | 209 | 201 | null | null |
vTurbine/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | isGiven _ = False | 17 | isGiven _ = False | 17 | isGiven _ = False | 17 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
TransformingMusicology/tabcode-haskell | src/TabCode/Serialiser/MEIXML/Elements.hs | gpl-3.0 | getChildren (MEIAnnot _ cs) = cs | 32 | getChildren (MEIAnnot _ cs) = cs | 32 | getChildren (MEIAnnot _ cs) = cs | 32 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
pavolzetor/openexr-write | src/Graphics/OpenEXR.hs | gpl-3.0 | attrSize (Float _) = 4 | 22 | attrSize (Float _) = 4 | 22 | attrSize (Float _) = 4 | 22 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
kawu/skladnica-with-walenty | src/NLP/Skladnica/Map.hs | bsd-2-clause | readWalenty walentyPath expansionPath = do
expMap <- W.readExpMap expansionPath
walenty <-
S.toList . S.fromList
. mapMaybe P.pruneVerb
-- NEW 01/06/2016: additional pruning is needed to remove non-lexical
-- constraints introduced during in the process of expansion
. map (W.expandVerb ex... | 607 | readWalenty walentyPath expansionPath = do
expMap <- W.readExpMap expansionPath
walenty <-
S.toList . S.fromList
. mapMaybe P.pruneVerb
-- NEW 01/06/2016: additional pruning is needed to remove non-lexical
-- constraints introduced during in the process of expansion
. map (W.expandVerb ex... | 607 | readWalenty walentyPath expansionPath = do
expMap <- W.readExpMap expansionPath
walenty <-
S.toList . S.fromList
. mapMaybe P.pruneVerb
-- NEW 01/06/2016: additional pruning is needed to remove non-lexical
-- constraints introduced during in the process of expansion
. map (W.expandVerb ex... | 607 | false | false | 0 | 15 | 137 | 95 | 45 | 50 | null | null |
bamboo/idris-cil | src/IRTS/Cil/MaxStack.hs | bsd-3-clause | netStackChange _ Conv_i4 = 0 | 35 | netStackChange _ Conv_i4 = 0 | 35 | netStackChange _ Conv_i4 = 0 | 35 | false | false | 0 | 5 | 11 | 11 | 5 | 6 | null | null |
kim/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types.hs | mpl-2.0 | -- | One or more substitution tokens for attribute names in an expression. The
-- following are some use cases for using /ExpressionAttributeNames/:
--
-- To access an attribute whose name conflicts with a DynamoDB reserved word.
--
-- To create a placeholder for repeating occurrences of an attribute name in
-- an expr... | 1,703 | kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text)
kaaExpressionAttributeNames =
lens _kaaExpressionAttributeNames
(\s a -> s { _kaaExpressionAttributeNames = a })
. _Map | 218 | kaaExpressionAttributeNames =
lens _kaaExpressionAttributeNames
(\s a -> s { _kaaExpressionAttributeNames = a })
. _Map | 143 | true | true | 0 | 10 | 260 | 82 | 58 | 24 | null | null |
stevely/hspirv | src/SpirV/Builder/Raw.hs | bsd-3-clause | -- Id 1: Result type
-- Id 2: Pointer, must point to scalar integer type
atomicIIncrement :: Id -> Id -> ExecutionScope -> [MemorySemantics]
-> Builder Id
atomicIIncrement = fiveOp OpAtomicIIncrement | 216 | atomicIIncrement :: Id -> Id -> ExecutionScope -> [MemorySemantics]
-> Builder Id
atomicIIncrement = fiveOp OpAtomicIIncrement | 143 | atomicIIncrement = fiveOp OpAtomicIIncrement | 44 | true | true | 0 | 9 | 47 | 38 | 20 | 18 | null | null |
nomeata/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | -- both unused (SDM):
-- pprInstr PUSHA = ptext (sLit "\tpushal")
-- pprInstr POPA = ptext (sLit "\tpopal")
pprInstr NOP = ptext (sLit "\tnop") | 144 | pprInstr NOP = ptext (sLit "\tnop") | 35 | pprInstr NOP = ptext (sLit "\tnop") | 35 | true | false | 0 | 7 | 24 | 21 | 11 | 10 | null | null |
rjwright/js-typeomatic | LabelJSAST.hs | apache-2.0 | abelJSAST (AWSF (WSCase ex body) sourceFragment) n =
((LabCase field1 field2), (childWSGetLabel field2) + 1, sourceFragment)
where
field1 = labelExpression ex n
field2 = labelJSAST body (childWSGetLabel field1)
| 235 | labelJSAST (AWSF (WSCase ex body) sourceFragment) n =
((LabCase field1 field2), (childWSGetLabel field2) + 1, sourceFragment)
where
field1 = labelExpression ex n
field2 = labelJSAST body (childWSGetLabel field1) | 235 | labelJSAST (AWSF (WSCase ex body) sourceFragment) n =
((LabCase field1 field2), (childWSGetLabel field2) + 1, sourceFragment)
where
field1 = labelExpression ex n
field2 = labelJSAST body (childWSGetLabel field1) | 235 | false | false | 1 | 9 | 52 | 83 | 42 | 41 | null | null |
g-deluca/yts-dl | app/Eval.hs | gpl-3.0 | evalList :: FList -> StateError [Film]
evalList (New p) = do let params = genRequest p
fl <- liftIO (getResponse params)
case fl of
[] -> throw BadParams
_ -> return fl | 271 | evalList :: FList -> StateError [Film]
evalList (New p) = do let params = genRequest p
fl <- liftIO (getResponse params)
case fl of
[] -> throw BadParams
_ -> return fl | 269 | evalList (New p) = do let params = genRequest p
fl <- liftIO (getResponse params)
case fl of
[] -> throw BadParams
_ -> return fl | 230 | false | true | 0 | 11 | 134 | 90 | 40 | 50 | null | null |
karamellpelle/grid | designer/source/Game/Values.hs | gpl-3.0 | valuePerspectiveFOVY :: Float
valuePerspectiveFOVY =
1.047 | 62 | valuePerspectiveFOVY :: Float
valuePerspectiveFOVY =
1.047 | 62 | valuePerspectiveFOVY =
1.047 | 32 | false | true | 0 | 4 | 9 | 11 | 6 | 5 | null | null |
Zoetermeer/latro | src/Latro/Typecheck.hs | mit | liftContext ty = ty | 19 | liftContext ty = ty | 19 | liftContext ty = ty | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
phaazon/OpenGLRawgen | src/Spec/Parsing.hs | bsd-3-clause | versionLocs :: S.Set P.Feature -> LocationMap
versionLocs featureSet =
let features
= partitionBy P.featureApi $ S.toList featureSet
partitionBy :: Ord a => (b -> a) -> [b] -> [[b]]
partitionBy f = groupBy ((==) `on` f) . sortBy (compare `on` f)
-- | Subprocessor for a specific `... | 721 | versionLocs :: S.Set P.Feature -> LocationMap
versionLocs featureSet =
let features
= partitionBy P.featureApi $ S.toList featureSet
partitionBy :: Ord a => (b -> a) -> [b] -> [[b]]
partitionBy f = groupBy ((==) `on` f) . sortBy (compare `on` f)
-- | Subprocessor for a specific `... | 721 | versionLocs featureSet =
let features
= partitionBy P.featureApi $ S.toList featureSet
partitionBy :: Ord a => (b -> a) -> [b] -> [[b]]
partitionBy f = groupBy ((==) `on` f) . sortBy (compare `on` f)
-- | Subprocessor for a specific `P.ApiReference` (e.g. OpenGL or
-- Op... | 675 | false | true | 0 | 18 | 211 | 251 | 129 | 122 | null | null |
masatoko/tunagui | src/Tunagui/General/Data.hs | bsd-3-clause | newWindow :: WinConfig -> FrameEvents -> IO Window
newWindow cnf es = do
putStrLn "* creating window"
sWin <- SDL.createWindow (winTitle cnf) winConf
let winEvents = mkEvents sWin
win <- Window sWin winEvents
<$> (newMVar =<< SDL.createRenderer sWin (-1) SDL.defaultRenderer)
<*> atomically (... | 1,014 | newWindow :: WinConfig -> FrameEvents -> IO Window
newWindow cnf es = do
putStrLn "* creating window"
sWin <- SDL.createWindow (winTitle cnf) winConf
let winEvents = mkEvents sWin
win <- Window sWin winEvents
<$> (newMVar =<< SDL.createRenderer sWin (-1) SDL.defaultRenderer)
<*> atomically (... | 1,014 | newWindow cnf es = do
putStrLn "* creating window"
sWin <- SDL.createWindow (winTitle cnf) winConf
let winEvents = mkEvents sWin
win <- Window sWin winEvents
<$> (newMVar =<< SDL.createRenderer sWin (-1) SDL.defaultRenderer)
<*> atomically (newTMVar (Container DirV []))
<*> atomica... | 963 | false | true | 3 | 15 | 256 | 359 | 168 | 191 | null | null |
soenkehahn/fvar | Data/FVar.hs | bsd-3-clause | newFVarInDirectory :: FilePath -> a -> IO (FVar a)
newFVarInDirectory directory value = nyi | 91 | newFVarInDirectory :: FilePath -> a -> IO (FVar a)
newFVarInDirectory directory value = nyi | 91 | newFVarInDirectory directory value = nyi | 40 | false | true | 0 | 9 | 13 | 33 | 16 | 17 | null | null |
bobgru/tree-derivations | src/StickFigure3.hs | mit | --buildTree :: Tree TreeNode
buildTree = unfoldTree branches seed | 65 | buildTree = unfoldTree branches seed | 36 | buildTree = unfoldTree branches seed | 36 | true | false | 0 | 5 | 8 | 12 | 6 | 6 | null | null |
MichaelXavier/haproxy-haskell | src/System/HAProxy/Commands.hs | bsd-2-clause | -- Command Subset
cmdShowInfo :: Command (HAResp ShowInfoResp)
cmdShowInfo = liftF (CmdShowInfo ShowInfo id) | 108 | cmdShowInfo :: Command (HAResp ShowInfoResp)
cmdShowInfo = liftF (CmdShowInfo ShowInfo id) | 90 | cmdShowInfo = liftF (CmdShowInfo ShowInfo id) | 45 | true | true | 2 | 6 | 13 | 38 | 16 | 22 | null | null |
osa1/toylisp | src/Eval.hs | bsd-3-clause | applyCont (EvalCont _ cont) val = applyCont cont val | 52 | applyCont (EvalCont _ cont) val = applyCont cont val | 52 | applyCont (EvalCont _ cont) val = applyCont cont val | 52 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.PrimopWrappers.hs | bsd-3-clause | writeInt16Array# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
writeInt16Array# a1 a2 a3 a4 = (GHC.Prim.writeInt16Array#) a1 a2 a3 a4 | 150 | writeInt16Array# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
writeInt16Array# a1 a2 a3 a4 = (GHC.Prim.writeInt16Array#) a1 a2 a3 a4 | 150 | writeInt16Array# a1 a2 a3 a4 = (GHC.Prim.writeInt16Array#) a1 a2 a3 a4 | 70 | false | true | 0 | 9 | 24 | 60 | 29 | 31 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/ConfigDeliveryChannel.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-deliverychannel.html#cfn-config-deliverychannel-s3keyprefix
cdcS3KeyPrefix :: Lens' ConfigDeliveryChannel (Maybe (Val Text))
cdcS3KeyPrefix = lens _configDeliveryChannelS3KeyPrefix (\s a -> s { _configDeliveryChannelS3KeyPrefix = a }... | 321 | cdcS3KeyPrefix :: Lens' ConfigDeliveryChannel (Maybe (Val Text))
cdcS3KeyPrefix = lens _configDeliveryChannelS3KeyPrefix (\s a -> s { _configDeliveryChannelS3KeyPrefix = a }) | 174 | cdcS3KeyPrefix = lens _configDeliveryChannelS3KeyPrefix (\s a -> s { _configDeliveryChannelS3KeyPrefix = a }) | 109 | true | true | 1 | 9 | 22 | 57 | 28 | 29 | null | null |
nkartashov/haskell | hw10/Writer/Main.hs | gpl-2.0 | fac :: Int -> Writer String Int
fac 0 = do
tell "1"
return 1 | 62 | fac :: Int -> Writer String Int
fac 0 = do
tell "1"
return 1 | 62 | fac 0 = do
tell "1"
return 1 | 30 | false | true | 0 | 8 | 16 | 40 | 16 | 24 | null | null |
bergmark/hlint | src/Settings.hs | bsd-3-clause | getNames :: [Pat_] -> Exp_ -> [String]
getNames ps _ | ps /= [] && all isPString ps = map fromPString ps | 104 | getNames :: [Pat_] -> Exp_ -> [String]
getNames ps _ | ps /= [] && all isPString ps = map fromPString ps | 104 | getNames ps _ | ps /= [] && all isPString ps = map fromPString ps | 65 | false | true | 0 | 10 | 21 | 56 | 27 | 29 | null | null |
rsasse/tamarin-prover | lib/theory/src/Theory/Tools/Wellformedness.hs | gpl-3.0 | checkWellformednessDiff :: OpenDiffTheory
-> WfErrorReport
checkWellformednessDiff thy = -- trace ("checkWellformednessDiff: " ++ show thy) $
concatMap ($ thy)
[ unboundReportDiff
, freshNamesReportDiff
, publicNamesReportDiff
, ruleSortsReportDiff
, factReportsDiff
-- , ru... | 429 | checkWellformednessDiff :: OpenDiffTheory
-> WfErrorReport
checkWellformednessDiff thy = -- trace ("checkWellformednessDiff: " ++ show thy) $
concatMap ($ thy)
[ unboundReportDiff
, freshNamesReportDiff
, publicNamesReportDiff
, ruleSortsReportDiff
, factReportsDiff
-- , ru... | 429 | checkWellformednessDiff thy = -- trace ("checkWellformednessDiff: " ++ show thy) $
concatMap ($ thy)
[ unboundReportDiff
, freshNamesReportDiff
, publicNamesReportDiff
, ruleSortsReportDiff
, factReportsDiff
-- , ruleNameReportDiff
, formulaReportsDiff
, lemmaAttributeReportDiff
, ... | 350 | false | true | 0 | 6 | 100 | 54 | 32 | 22 | null | null |
permeakra/source | Data/Source/String/Located.hs | bsd-3-clause | mkSrc :: String -> String -> Src
mkSrc nm = Src (SrcLoc nm 0 0 0) | 65 | mkSrc :: String -> String -> Src
mkSrc nm = Src (SrcLoc nm 0 0 0) | 65 | mkSrc nm = Src (SrcLoc nm 0 0 0) | 32 | false | true | 0 | 7 | 15 | 37 | 18 | 19 | null | null |
kalouantonis/kriek | src/hs/Kriek/Runtime.hs | mit | findMacro :: (Maybe String,String) -> Runtime (Maybe (Fn Runtime RT))
findMacro (ns,n) = do c <- get
let d = c ^. maybe (current c) namedModule ns . defs . at n
return $ case d of
Just (RMacro f _) -> Just f
_ -> Nothing | 312 | findMacro :: (Maybe String,String) -> Runtime (Maybe (Fn Runtime RT))
findMacro (ns,n) = do c <- get
let d = c ^. maybe (current c) namedModule ns . defs . at n
return $ case d of
Just (RMacro f _) -> Just f
_ -> Nothing | 312 | findMacro (ns,n) = do c <- get
let d = c ^. maybe (current c) namedModule ns . defs . at n
return $ case d of
Just (RMacro f _) -> Just f
_ -> Nothing | 242 | false | true | 0 | 15 | 138 | 136 | 64 | 72 | null | null |
alphalambda/codeworld | codeworld-compiler/src/CodeWorld/Compile/Stages.hs | apache-2.0 | checkAndOnPrograms :: MonadCompile m => m ()
checkAndOnPrograms =
getMainParsedCode >>= \parsed -> case parsed of
Parsed mod ->
addDiagnostics $ dedupErrorSpans $
everything (++) (mkQ [] andOnPrograms) mod
_ -> return ()
where
andOnPrograms :: Exp SrcSpanInfo -> [Diagnostic]
andOnProgr... | 1,265 | checkAndOnPrograms :: MonadCompile m => m ()
checkAndOnPrograms =
getMainParsedCode >>= \parsed -> case parsed of
Parsed mod ->
addDiagnostics $ dedupErrorSpans $
everything (++) (mkQ [] andOnPrograms) mod
_ -> return ()
where
andOnPrograms :: Exp SrcSpanInfo -> [Diagnostic]
andOnProgr... | 1,265 | checkAndOnPrograms =
getMainParsedCode >>= \parsed -> case parsed of
Parsed mod ->
addDiagnostics $ dedupErrorSpans $
everything (++) (mkQ [] andOnPrograms) mod
_ -> return ()
where
andOnPrograms :: Exp SrcSpanInfo -> [Diagnostic]
andOnPrograms (InfixApp _ e1 (QVarOp loc (UnQual _ (Sym... | 1,220 | false | true | 10 | 20 | 344 | 431 | 215 | 216 | null | null |
tkonolige/dbignore | bytestring-trie/src/Data/Trie/Internal.hs | bsd-3-clause | {- -- Disable superfluous error checking.
-- @submap'@ would replace the first argument to @lookupBy_@
where
submap' Nothing Empty = errorEmptyAfterNothing "submap"
submap' Nothing (Arc _ _ _) = errorArcAfterNothing "submap"
submap' mx t = Arc q mx t
errorInvariantBroken... | 1,585 | alterBy :: (ByteString -> a -> Maybe a -> Maybe a)
-> ByteString -> a -> Trie a -> Trie a
alterBy f = alterBy_ (\k v mv t -> (f k v mv, t)) | 148 | alterBy f = alterBy_ (\k v mv t -> (f k v mv, t)) | 49 | true | true | 0 | 11 | 310 | 101 | 54 | 47 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Bare/OfType.hs | bsd-3-clause | -- import Language.Haskell.Liquid.Bare.RefToLogic
--------------------------------------------------------------------------------
ofBareType :: SourcePos -> BareType -> BareM SpecType
ofBareType l
= ofBRType expandRTAliasApp (resolve l <=< expandReft) | 256 | ofBareType :: SourcePos -> BareType -> BareM SpecType
ofBareType l
= ofBRType expandRTAliasApp (resolve l <=< expandReft) | 123 | ofBareType l
= ofBRType expandRTAliasApp (resolve l <=< expandReft) | 69 | true | true | 0 | 8 | 24 | 42 | 21 | 21 | null | null |
alexander-at-github/eta | compiler/ETA/BasicTypes/RdrName.hs | bsd-3-clause | isUnqual :: RdrName -> Bool
isUnqual (Unqual _) = True | 54 | isUnqual :: RdrName -> Bool
isUnqual (Unqual _) = True | 54 | isUnqual (Unqual _) = True | 26 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
deweyvm/labyrinth | src/Labyrinth/Maze.hs | mit | getCoord (Solid x) = x | 22 | getCoord (Solid x) = x | 22 | getCoord (Solid x) = x | 22 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
thalerjonathan/phd | thesis/code/sugarscape/src/SugarScape/Core/Init.hs | gpl-3.0 | agentDistribution :: RandomGen g
=> SugarScapeScenario
-> AgentDistribution
-> Rand g [(SugAgentDef g, SugAgentState)]
agentDistribution params CombatCorners = do
let agentCount = sgAgentCount params
halfCount = floor ((fromIntegral agentCount / 2) :: Dou... | 912 | agentDistribution :: RandomGen g
=> SugarScapeScenario
-> AgentDistribution
-> Rand g [(SugAgentDef g, SugAgentState)]
agentDistribution params CombatCorners = do
let agentCount = sgAgentCount params
halfCount = floor ((fromIntegral agentCount / 2) :: Dou... | 912 | agentDistribution params CombatCorners = do
let agentCount = sgAgentCount params
halfCount = floor ((fromIntegral agentCount / 2) :: Double)
aisTopRight = [1 .. halfCount]
aisBotLeft = [halfCount + 1 .. agentCount]
randCoordsTopRight <- randomCoords (30, 30) sugarscapeDimensions (length aisTo... | 739 | false | true | 0 | 15 | 201 | 296 | 153 | 143 | null | null |
urbanslug/ghc | compiler/types/Type.hs | bsd-3-clause | lookupTyVar :: TvSubst -> TyVar -> Maybe Type
-- See Note [Extending the TvSubst] in TypeRep
lookupTyVar (TvSubst _ tenv) tv = lookupVarEnv tenv tv | 156 | lookupTyVar :: TvSubst -> TyVar -> Maybe Type
lookupTyVar (TvSubst _ tenv) tv = lookupVarEnv tenv tv | 101 | lookupTyVar (TvSubst _ tenv) tv = lookupVarEnv tenv tv | 54 | true | true | 0 | 10 | 33 | 45 | 21 | 24 | null | null |
ProLambda/Times | Skeleton/Home.hs | gpl-3.0 | login :: SessionConfig
-> ScottyM ()
login sess = do
get "/login" $ do
salt <- liftIO saltValue
setSimpleCookie "Lambda" (T.toStrict salt)
file "./static/login.html"
post "/login" $ do
(username :: String) <- param "username"
(password :: String) <- param "password"
getuser <- liftIO (... | 864 | login :: SessionConfig
-> ScottyM ()
login sess = do
get "/login" $ do
salt <- liftIO saltValue
setSimpleCookie "Lambda" (T.toStrict salt)
file "./static/login.html"
post "/login" $ do
(username :: String) <- param "username"
(password :: String) <- param "password"
getuser <- liftIO (... | 864 | login sess = do
get "/login" $ do
salt <- liftIO saltValue
setSimpleCookie "Lambda" (T.toStrict salt)
file "./static/login.html"
post "/login" $ do
(username :: String) <- param "username"
(password :: String) <- param "password"
getuser <- liftIO (authUser username)
case getuser of
... | 821 | false | true | 0 | 22 | 289 | 292 | 132 | 160 | null | null |
DougBurke/swish | src/Swish/RDF/Vocabulary/FOAF.hs | lgpl-2.1 | -- | @foaf:page@ from <http://xmlns.com/foaf/spec/#term_page>.
foafpage :: ScopedName
foafpage = toF "page" | 108 | foafpage :: ScopedName
foafpage = toF "page" | 44 | foafpage = toF "page" | 21 | true | true | 0 | 5 | 12 | 15 | 8 | 7 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/KeyboardEvent.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.initKeyboardEvent Mozilla KeyboardEvent.initKeyboardEvent documentation>
initKeyboardEvent ::
(MonadDOM m, ToJSString type', ToJSString keyIdentifier) =>
KeyboardEvent ->
Maybe type' ->
... | 1,011 | initKeyboardEvent ::
(MonadDOM m, ToJSString type', ToJSString keyIdentifier) =>
KeyboardEvent ->
Maybe type' ->
Bool ->
Bool ->
Maybe Window ->
Maybe k... | 868 | initKeyboardEvent self type' canBubble cancelable view
keyIdentifier location ctrlKey altKey shiftKey metaKey altGraphKey
= liftDOM
(void
(self ^. jsf "initKeyboardEvent"
[toJSVal type', toJSVal canBubble, toJSVal cancelable,
toJSVal view, toJSVal keyIdentifier, toJSVal locat... | 441 | true | true | 0 | 19 | 357 | 212 | 103 | 109 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT36.hs | gpl-3.0 | S x == S y = x == y | 19 | S x == S y = x == y | 19 | S x == S y = x == y | 19 | false | false | 1 | 6 | 8 | 29 | 11 | 18 | null | null |
pyr/himpy | System/Himpy/Mib.hs | mit | ifAdminStatus = [1, 3, 6, 1, 2, 1, 2, 2, 1, 7] :: RawOID | 56 | ifAdminStatus = [1, 3, 6, 1, 2, 1, 2, 2, 1, 7] :: RawOID | 56 | ifAdminStatus = [1, 3, 6, 1, 2, 1, 2, 2, 1, 7] :: RawOID | 56 | false | false | 0 | 5 | 13 | 39 | 25 | 14 | null | null |
TomMD/io-streams | test/System/IO/Streams/Tests/Attoparsec.hs | bsd-3-clause | testParseFromStream :: Test
testParseFromStream = testCase "attoparsec/parseFromStream" $ do
is <- fromList ["1", "23", ", 4", ", 5, 6, 7"]
x0 <- parseFromStream testParser is
assertEqual "first parse" (Just 123) x0
l <- parserToInputStream testParser is >>= toList
assertEqual "rest" [4, 5, 6, 7... | 450 | testParseFromStream :: Test
testParseFromStream = testCase "attoparsec/parseFromStream" $ do
is <- fromList ["1", "23", ", 4", ", 5, 6, 7"]
x0 <- parseFromStream testParser is
assertEqual "first parse" (Just 123) x0
l <- parserToInputStream testParser is >>= toList
assertEqual "rest" [4, 5, 6, 7... | 450 | testParseFromStream = testCase "attoparsec/parseFromStream" $ do
is <- fromList ["1", "23", ", 4", ", 5, 6, 7"]
x0 <- parseFromStream testParser is
assertEqual "first parse" (Just 123) x0
l <- parserToInputStream testParser is >>= toList
assertEqual "rest" [4, 5, 6, 7] l
toList is >>= assert... | 422 | false | true | 0 | 10 | 82 | 124 | 60 | 64 | null | null |
gittywithexcitement/hindent | src/HIndent/Styles/JohanTibell.hs | bsd-3-clause | context ctx = prettyNoExt ctx | 29 | context ctx = prettyNoExt ctx | 29 | context ctx = prettyNoExt ctx | 29 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
cies/gelatin | gelatin-gl/src/Gelatin/GL/Renderer.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Updating uniforms
--------------------------------------------------------------------------------
modelviewProjection :: Transform -> M44 Float
modelviewProjection (Transform (V2 x y) (V2 w h) r) =
let sxy = V3 w h 1
txy = ... | 462 | modelviewProjection :: Transform -> M44 Float
modelviewProjection (Transform (V2 x y) (V2 w h) r) =
let sxy = V3 w h 1
txy = V3 x y 0
rxy = V3 0 0 1
rot = if r /= 0 then mat4Rotate r rxy else identity
in mat4Translate txy !*! rot !*! mat4Scale sxy | 279 | modelviewProjection (Transform (V2 x y) (V2 w h) r) =
let sxy = V3 w h 1
txy = V3 x y 0
rxy = V3 0 0 1
rot = if r /= 0 then mat4Rotate r rxy else identity
in mat4Translate txy !*! rot !*! mat4Scale sxy | 233 | true | true | 0 | 10 | 91 | 128 | 64 | 64 | null | null |
kojiromike/Idris-dev | src/Idris/Output.hs | bsd-3-clause | iPrintFunTypes bnd n overloads = do ist <- getIState
let ppo = ppOptionIst ist
let infixes = idris_infixes ist
let output = vsep (map (uncurry (ppOverload ppo infixes)) overloads)
... | 581 | iPrintFunTypes bnd n overloads = do ist <- getIState
let ppo = ppOptionIst ist
let infixes = idris_infixes ist
let output = vsep (map (uncurry (ppOverload ppo infixes)) overloads)
... | 581 | iPrintFunTypes bnd n overloads = do ist <- getIState
let ppo = ppOptionIst ist
let infixes = idris_infixes ist
let output = vsep (map (uncurry (ppOverload ppo infixes)) overloads)
... | 581 | false | false | 1 | 16 | 255 | 171 | 77 | 94 | null | null |
byorgey/Idris-dev | src/Core/TT.hs | bsd-3-clause | showSep sep (x:xs) = x ++ sep ++ showSep sep xs | 47 | showSep sep (x:xs) = x ++ sep ++ showSep sep xs | 47 | showSep sep (x:xs) = x ++ sep ++ showSep sep xs | 47 | false | false | 2 | 6 | 10 | 34 | 15 | 19 | null | null |
pdarragh/HaskQuest | src/HaskQuest/Game.hs | mit | showInventory :: Engine -> IO ()
showInventory e = do
print ""
print "You are carrying:"
mapM_ (printListItem . itemString (itemMap e)) (inventory e)
-- Displays the room description to the player. | 210 | showInventory :: Engine -> IO ()
showInventory e = do
print ""
print "You are carrying:"
mapM_ (printListItem . itemString (itemMap e)) (inventory e)
-- Displays the room description to the player. | 210 | showInventory e = do
print ""
print "You are carrying:"
mapM_ (printListItem . itemString (itemMap e)) (inventory e)
-- Displays the room description to the player. | 177 | false | true | 0 | 12 | 44 | 66 | 30 | 36 | null | null |
23Skidoo/xmlhtml | test/suite/Text/XmlHtml/Tests.hs | bsd-3-clause | renderHTMLRaw4 :: Bool
renderHTMLRaw4 = isBottom $
toByteString (render (HtmlDocument UTF8 Nothing [
Element "script" [("type", "text/javascript")] [
TextNode "</scri",
TextNode "pt>"
]
])) | 245 | renderHTMLRaw4 :: Bool
renderHTMLRaw4 = isBottom $
toByteString (render (HtmlDocument UTF8 Nothing [
Element "script" [("type", "text/javascript")] [
TextNode "</scri",
TextNode "pt>"
]
])) | 245 | renderHTMLRaw4 = isBottom $
toByteString (render (HtmlDocument UTF8 Nothing [
Element "script" [("type", "text/javascript")] [
TextNode "</scri",
TextNode "pt>"
]
])) | 222 | false | true | 0 | 14 | 79 | 65 | 34 | 31 | null | null |
mitochon/hoosalind | src/problems/lgis.hs | mit | -- | removes elements in the list that are not (>) or (<) than the previous
-- e.g. (>) -> [3,2,5,8,7] -> [3,5,8.7]
rmUnordered :: Ord t => (t -> t -> Bool) -> [t] -> [t]
rmUnordered ord [] = [] | 195 | rmUnordered :: Ord t => (t -> t -> Bool) -> [t] -> [t]
rmUnordered ord [] = [] | 78 | rmUnordered ord [] = [] | 23 | true | true | 0 | 9 | 42 | 54 | 29 | 25 | null | null |
ian-mi/hTorrent | Torrent.hs | gpl-3.0 | startTorrent :: MetaInfo -> PortNumber -> IO (Maybe TorrentEnv)
startTorrent m p = do
env <- initTorrent m p
tr <- trackerRequest (env ^. torrentInfo)
case tr of
Just (_, as) -> do
mapM (forkIO . peerThread env) as
return (Just env)
Nothing -> return Nothing | 311 | startTorrent :: MetaInfo -> PortNumber -> IO (Maybe TorrentEnv)
startTorrent m p = do
env <- initTorrent m p
tr <- trackerRequest (env ^. torrentInfo)
case tr of
Just (_, as) -> do
mapM (forkIO . peerThread env) as
return (Just env)
Nothing -> return Nothing | 311 | startTorrent m p = do
env <- initTorrent m p
tr <- trackerRequest (env ^. torrentInfo)
case tr of
Just (_, as) -> do
mapM (forkIO . peerThread env) as
return (Just env)
Nothing -> return Nothing | 247 | false | true | 0 | 15 | 98 | 123 | 57 | 66 | null | null |
DaMSL/K3 | src/Language/K3/Interpreter/Data/Accessors.hs | apache-2.0 | vQualOfType :: K3 Type -> VQualifier
vQualOfType t = onQualifiedType t MemImmut MemMut | 86 | vQualOfType :: K3 Type -> VQualifier
vQualOfType t = onQualifiedType t MemImmut MemMut | 86 | vQualOfType t = onQualifiedType t MemImmut MemMut | 49 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
kbiscanic/PUH | hw07a/homework.hs | mit | -- 4c) Define a variant of the scan function that works from right to left, called rscan.
rscan :: (a -> b -> b) -> b -> [a] -> [b]
rscan _ seed [] = [seed] | 156 | rscan :: (a -> b -> b) -> b -> [a] -> [b]
rscan _ seed [] = [seed] | 66 | rscan _ seed [] = [seed] | 24 | true | true | 0 | 10 | 35 | 59 | 30 | 29 | null | null |
supermario/stack | src/Stack/Types/Config.hs | bsd-3-clause | configMonoidExtraPathName :: Text
configMonoidExtraPathName = "extra-path" | 74 | configMonoidExtraPathName :: Text
configMonoidExtraPathName = "extra-path" | 74 | configMonoidExtraPathName = "extra-path" | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
mattias-lundell/timber-llvm | src/Desugar2.hs | bsd-3-clause | -- Modules ------------------------------------------------------------------
dsModule :: Module -> M s Module
dsModule (Module c is ds ps) = do ds <- dsDecls ds
return (Module c is ds ps)
-- Top level declarations --------------------------------------------------- | 309 | dsModule :: Module -> M s Module
dsModule (Module c is ds ps) = do ds <- dsDecls ds
return (Module c is ds ps)
-- Top level declarations --------------------------------------------------- | 230 | dsModule (Module c is ds ps) = do ds <- dsDecls ds
return (Module c is ds ps)
-- Top level declarations --------------------------------------------------- | 197 | true | true | 0 | 9 | 75 | 65 | 31 | 34 | null | null |
notogawa/yesod-websocket-sample | devel.hs | bsd-2-clause | loop :: IO ()
loop = do
threadDelay 100000
e <- doesFileExist "dist/devel-terminate"
if e then terminateDevel else loop | 125 | loop :: IO ()
loop = do
threadDelay 100000
e <- doesFileExist "dist/devel-terminate"
if e then terminateDevel else loop | 125 | loop = do
threadDelay 100000
e <- doesFileExist "dist/devel-terminate"
if e then terminateDevel else loop | 111 | false | true | 0 | 8 | 24 | 43 | 20 | 23 | null | null |
duplode/threepenny-gui | src/Graphics/UI/Threepenny/Elements.hs | bsd-3-clause | span = tag "span" | 33 | span = tag "span" | 33 | span = tag "span" | 33 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
premium-minds/h-queries | HQueries/TH.hs | lgpl-3.0 | makeLensQName :: Name -> Name
makeLensQName n = mkName $ (tail $ showName n) ++ "Q" | 83 | makeLensQName :: Name -> Name
makeLensQName n = mkName $ (tail $ showName n) ++ "Q" | 83 | makeLensQName n = mkName $ (tail $ showName n) ++ "Q" | 53 | false | true | 0 | 9 | 15 | 36 | 18 | 18 | null | null |
feuerbach/music | Melody/GameOfThrones.hs | mit | ----------------------------------------------------------------------
-- Treble
----------------------------------------------------------------------
pat1 = do
mono "g4" 1
mono "c4" 1
mono "e4b" 0.5
mono "f4" 0.5 | 265 | pat1 = do
mono "g4" 1
mono "c4" 1
mono "e4b" 0.5
mono "f4" 0.5 | 86 | pat1 = do
mono "g4" 1
mono "c4" 1
mono "e4b" 0.5
mono "f4" 0.5 | 86 | true | false | 1 | 8 | 69 | 45 | 18 | 27 | null | null |
the-real-blackh/hexpat | Text/XML/Expat/Cursor.hs | bsd-3-clause | -- | The last child of the given location - used for monadic node types.
lastChildM :: (NodeClass n c, Monoid tag) => CursorG n c tag text -> ItemM c (Maybe (CursorG n c tag text))
lastChildM loc = do
case downParents loc of
Just (l, ps) -> do
li <- runList (reverseL l)
return $ case... | 559 | lastChildM :: (NodeClass n c, Monoid tag) => CursorG n c tag text -> ItemM c (Maybe (CursorG n c tag text))
lastChildM loc = do
case downParents loc of
Just (l, ps) -> do
li <- runList (reverseL l)
return $ case li of
Cons t ts -> Just $ Cur { current = t, lefts = ts,... | 486 | lastChildM loc = do
case downParents loc of
Just (l, ps) -> do
li <- runList (reverseL l)
return $ case li of
Cons t ts -> Just $ Cur { current = t, lefts = ts, rights = mzero , parents = ps }
Nil -> Nothing
Nothing -> return $ Nothing
-... | 378 | true | true | 0 | 18 | 183 | 178 | 91 | 87 | null | null |
igraves/rabin-haskell | Primes.hs | gpl-3.0 | generateKeyPair :: IO (Integer,Integer)
generateKeyPair = do
key1 <- generateKeyMod3 --generatePrime
key2 <- generateKeyMod3 --generatePrime
return (key1,key2) | 219 | generateKeyPair :: IO (Integer,Integer)
generateKeyPair = do
key1 <- generateKeyMod3 --generatePrime
key2 <- generateKeyMod3 --generatePrime
return (key1,key2) | 219 | generateKeyPair = do
key1 <- generateKeyMod3 --generatePrime
key2 <- generateKeyMod3 --generatePrime
return (key1,key2) | 179 | false | true | 1 | 9 | 76 | 52 | 25 | 27 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QSlider x = qcl_QSlider [] x | 38 | qCastList_QSlider x = qcl_QSlider [] x | 38 | qCastList_QSlider x = qcl_QSlider [] x | 38 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
kmate/imperative-edsl | src/Language/Embedded/Signature.hs | bsd-3-clause | name :: (pred a, FreeExp exp, FreePred exp a)
=> String -> (exp a -> Signature exp pred b) -> Signature exp pred (a -> b)
name s f = Lam (Named s) $ \x -> f (valToExp x) | 174 | name :: (pred a, FreeExp exp, FreePred exp a)
=> String -> (exp a -> Signature exp pred b) -> Signature exp pred (a -> b)
name s f = Lam (Named s) $ \x -> f (valToExp x) | 174 | name s f = Lam (Named s) $ \x -> f (valToExp x) | 47 | false | true | 0 | 10 | 43 | 105 | 52 | 53 | null | null |
dysinger/amazonka | amazonka-ecs/gen/Network/AWS/ECS/ListTaskDefinitionFamilies.hs | mpl-2.0 | -- | 'ListTaskDefinitionFamilies' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'ltdfFamilyPrefix' @::@ 'Maybe' 'Text'
--
-- * 'ltdfMaxResults' @::@ 'Maybe' 'Int'
--
-- * 'ltdfNextToken' @::@ 'Maybe' 'Text'
--
listTaskDefinitionFamilies :: ListTaskDefinitionFamilies
listTaskDefiniti... | 467 | listTaskDefinitionFamilies :: ListTaskDefinitionFamilies
listTaskDefinitionFamilies = ListTaskDefinitionFamilies
{ _ltdfFamilyPrefix = Nothing
, _ltdfNextToken = Nothing
, _ltdfMaxResults = Nothing
} | 220 | listTaskDefinitionFamilies = ListTaskDefinitionFamilies
{ _ltdfFamilyPrefix = Nothing
, _ltdfNextToken = Nothing
, _ltdfMaxResults = Nothing
} | 163 | true | true | 0 | 7 | 74 | 45 | 30 | 15 | null | null |
kejace/ethereum-client-haskell | src/Blockchain/Data/Wire.hs | bsd-3-clause | obj2WireMessage 0x15 (RLPArray items) =
GetBlocks $ rlpDecode <$> items | 73 | obj2WireMessage 0x15 (RLPArray items) =
GetBlocks $ rlpDecode <$> items | 73 | obj2WireMessage 0x15 (RLPArray items) =
GetBlocks $ rlpDecode <$> items | 73 | false | false | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
psibi/cabal2nix | src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | bsd-3-clause | libNixName "libsoup-gnome-2.4" = return "libsoup" | 66 | libNixName "libsoup-gnome-2.4" = return "libsoup" | 66 | libNixName "libsoup-gnome-2.4" = return "libsoup" | 66 | false | false | 0 | 5 | 21 | 12 | 5 | 7 | null | null |
rfranek/duckling | Duckling/Time/HE/Rules.hs | bsd-3-clause | ruleDayofmonthOrdinal :: Rule
ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(token:_) -> do
n <- getIntValue token
tt . mkLatent $ dayOfMonth n
_ -> Nothing
} | 295 | ruleDayofmonthOrdinal :: Rule
ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(token:_) -> do
n <- getIntValue token
tt . mkLatent $ dayOfMonth n
_ -> Nothing
} | 295 | ruleDayofmonthOrdinal = Rule
{ name = "<day-of-month> (ordinal)"
, pattern =
[ Predicate isDOMOrdinal
]
, prod = \tokens -> case tokens of
(token:_) -> do
n <- getIntValue token
tt . mkLatent $ dayOfMonth n
_ -> Nothing
} | 265 | false | true | 0 | 15 | 86 | 93 | 48 | 45 | null | null |
LukaHorvat/ArtGallery | src/Geometry/Visibility.hs | mit | sameSide :: (Point -> Double) -> [Point] -> Bool
sameSide lineF pts = let xs = map lineF pts in all (>= 0) xs || all (<= 0) xs | 126 | sameSide :: (Point -> Double) -> [Point] -> Bool
sameSide lineF pts = let xs = map lineF pts in all (>= 0) xs || all (<= 0) xs | 126 | sameSide lineF pts = let xs = map lineF pts in all (>= 0) xs || all (<= 0) xs | 77 | false | true | 0 | 9 | 28 | 72 | 37 | 35 | null | null |
keera-studios/hsQt | Qtc/Gui/QUndoStack.hs | bsd-2-clause | endMacro :: QUndoStack a -> (()) -> IO ()
endMacro x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_endMacro cobj_x0 | 127 | endMacro :: QUndoStack a -> (()) -> IO ()
endMacro x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_endMacro cobj_x0 | 127 | endMacro x0 ()
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_endMacro cobj_x0 | 85 | false | true | 0 | 8 | 25 | 54 | 26 | 28 | null | null |
DavidAlphaFox/ghc | libraries/xhtml/Text/XHtml/Transitional/Elements.hs | bsd-3-clause | themenu :: Html -> Html
themenu = tag "menu" | 69 | themenu :: Html -> Html
themenu = tag "menu" | 69 | themenu = tag "menu" | 33 | false | true | 0 | 5 | 33 | 18 | 9 | 9 | null | null |
oldmanmike/sdl2-ttf | examples/font_test.hs | mit | pollEvent :: IO (Maybe SDL.Event)
pollEvent = alloca $ \ptr -> do
status <- SDL.pollEvent ptr
if status == 1
then maybePeek peek ptr
else return Nothing | 164 | pollEvent :: IO (Maybe SDL.Event)
pollEvent = alloca $ \ptr -> do
status <- SDL.pollEvent ptr
if status == 1
then maybePeek peek ptr
else return Nothing | 164 | pollEvent = alloca $ \ptr -> do
status <- SDL.pollEvent ptr
if status == 1
then maybePeek peek ptr
else return Nothing | 130 | false | true | 4 | 11 | 38 | 74 | 32 | 42 | null | null |
HIPERFIT/futhark | src/Futhark/Pass/ExtractKernels/BlockedKernel.hs | isc | segMap ::
(MonadFreshNames m, DistRep rep, HasScope rep m) =>
SegOpLevel rep ->
Pat rep ->
SubExp -> -- segment size
Lambda rep ->
[VName] ->
[(VName, SubExp)] -> -- ispace = pair of (gtid, size) for the maps on "top" of this map
[KernelInput] -> -- inps = inputs that can be looked up by using the gtids... | 578 | segMap ::
(MonadFreshNames m, DistRep rep, HasScope rep m) =>
SegOpLevel rep ->
Pat rep ->
SubExp -> -- segment size
Lambda rep ->
[VName] ->
[(VName, SubExp)] -> -- ispace = pair of (gtid, size) for the maps on "top" of this map
[KernelInput] -> -- inps = inputs that can be looked up by using the gtids... | 578 | segMap lvl pat w map_lam arrs ispace inps = runBuilder_ $ do
(kspace, kbody) <- prepareRedOrScan mempty w map_lam arrs ispace inps
letBind pat $
Op $
segOp $
SegMap lvl kspace (lambdaReturnType map_lam) kbody | 230 | false | true | 0 | 16 | 138 | 181 | 90 | 91 | null | null |
seereason/ghcjs | src/Compiler/Program.hs | mit | mkPreLoadMode :: PreLoadMode -> Mode
mkPreLoadMode = Right . Left | 65 | mkPreLoadMode :: PreLoadMode -> Mode
mkPreLoadMode = Right . Left | 65 | mkPreLoadMode = Right . Left | 28 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
Erdwolf/autotool-bonn | src/HeapSort/Semantics.hs | gpl-2.0 | swapAlong (L:_) (Branch _ Empty _) = do
fail "Ein Knoten kann nur nach links absinken, wenn er einen linken Unterbaum hat." | 128 | swapAlong (L:_) (Branch _ Empty _) = do
fail "Ein Knoten kann nur nach links absinken, wenn er einen linken Unterbaum hat." | 128 | swapAlong (L:_) (Branch _ Empty _) = do
fail "Ein Knoten kann nur nach links absinken, wenn er einen linken Unterbaum hat." | 128 | false | false | 0 | 7 | 26 | 34 | 16 | 18 | null | null |
jmikkola/Athena | src/Types.hs | mit | fromMaybe :: a -> Maybe a -> a
fromMaybe _ (Just x) = x | 55 | fromMaybe :: a -> Maybe a -> a
fromMaybe _ (Just x) = x | 55 | fromMaybe _ (Just x) = x | 24 | false | true | 0 | 10 | 13 | 39 | 17 | 22 | null | null |
jdimond/diplomarbeit | tools/Stats.hs | bsd-3-clause | main :: IO ()
main = do
args <- A.cmdArgs cmdArgs
putInfo "Loading document information..."
!coll <- C.loadDocCollection $ argCollectionDir args
let dids = C.enumerateDocIds coll
putStrLn $ "Number of documents: " ++ show (length dids)
let avgDocSize = avg $ map (C.documentLength coll) dids :: D... | 1,351 | main :: IO ()
main = do
args <- A.cmdArgs cmdArgs
putInfo "Loading document information..."
!coll <- C.loadDocCollection $ argCollectionDir args
let dids = C.enumerateDocIds coll
putStrLn $ "Number of documents: " ++ show (length dids)
let avgDocSize = avg $ map (C.documentLength coll) dids :: D... | 1,351 | main = do
args <- A.cmdArgs cmdArgs
putInfo "Loading document information..."
!coll <- C.loadDocCollection $ argCollectionDir args
let dids = C.enumerateDocIds coll
putStrLn $ "Number of documents: " ++ show (length dids)
let avgDocSize = avg $ map (C.documentLength coll) dids :: Double
putS... | 1,337 | false | true | 1 | 15 | 298 | 420 | 187 | 233 | null | null |
printedheart/Dao | src/Dao/Interval.hs | agpl-3.0 | interval :: (Ord c, InfBound c) => c -> c -> Interval c
interval lo hi = _mkSeg (Finite $ min lo hi) (Finite $ max lo hi) | 121 | interval :: (Ord c, InfBound c) => c -> c -> Interval c
interval lo hi = _mkSeg (Finite $ min lo hi) (Finite $ max lo hi) | 121 | interval lo hi = _mkSeg (Finite $ min lo hi) (Finite $ max lo hi) | 65 | false | true | 0 | 9 | 27 | 76 | 36 | 40 | null | null |
facebookincubator/duckling | Duckling/Numeral/KM/Rules.hs | bsd-3-clause | ruleTensMap :: HashMap Text Integer
ruleTensMap = HashMap.fromList
-- លេខ ១០ ២០ ៣០ ៤០ ៥០ ៦០ ៧០ ៨០ ៩០ អត់ត្រូវបានបញ្ចូលទេ ព្រោះមិនទាន់អាចរក
-- វិធីដកលេខ ០ ចេញ នៅពេលផ្គំុជាមួយលេខដទៃ។
-- ពពួក "សិប" ក៏មិនត្រូវបានបញ្ចូលដែរ ព្រោះមិនទាន់រកឃើញវិធីផ្គូរផ្គងត្រូវ។
[ ( "ដប់", 10 )
, ( "ម្ភៃ", 20 )
, ( "សាម", 30 )
, ... | 425 | ruleTensMap :: HashMap Text Integer
ruleTensMap = HashMap.fromList
-- លេខ ១០ ២០ ៣០ ៤០ ៥០ ៦០ ៧០ ៨០ ៩០ អត់ត្រូវបានបញ្ចូលទេ ព្រោះមិនទាន់អាចរក
-- វិធីដកលេខ ០ ចេញ នៅពេលផ្គំុជាមួយលេខដទៃ។
-- ពពួក "សិប" ក៏មិនត្រូវបានបញ្ចូលដែរ ព្រោះមិនទាន់រកឃើញវិធីផ្គូរផ្គងត្រូវ។
[ ( "ដប់", 10 )
, ( "ម្ភៃ", 20 )
, ( "សាម", 30 )
, ... | 425 | ruleTensMap = HashMap.fromList
-- លេខ ១០ ២០ ៣០ ៤០ ៥០ ៦០ ៧០ ៨០ ៩០ អត់ត្រូវបានបញ្ចូលទេ ព្រោះមិនទាន់អាចរក
-- វិធីដកលេខ ០ ចេញ នៅពេលផ្គំុជាមួយលេខដទៃ។
-- ពពួក "សិប" ក៏មិនត្រូវបានបញ្ចូលដែរ ព្រោះមិនទាន់រកឃើញវិធីផ្គូរផ្គងត្រូវ។
[ ( "ដប់", 10 )
, ( "ម្ភៃ", 20 )
, ( "សាម", 30 )
, ( "សែ", 40 )
, ( "ហា", 50 )
, ( ... | 389 | false | true | 0 | 6 | 102 | 105 | 67 | 38 | null | null |
fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/Types/Product.hs | mpl-2.0 | -- | The UTC time that the archive retrieval request completed. While the job
-- is in progress, the value will be null.
gjdCompletionDate :: Lens' GlacierJobDescription (Maybe Text)
gjdCompletionDate = lens _gjdCompletionDate (\ s a -> s{_gjdCompletionDate = a}) | 263 | gjdCompletionDate :: Lens' GlacierJobDescription (Maybe Text)
gjdCompletionDate = lens _gjdCompletionDate (\ s a -> s{_gjdCompletionDate = a}) | 142 | gjdCompletionDate = lens _gjdCompletionDate (\ s a -> s{_gjdCompletionDate = a}) | 80 | true | true | 0 | 9 | 39 | 47 | 26 | 21 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Sink.hs | bsd-3-clause | --
-- annotate each node with the set of registers live *after* the node
--
annotate :: DynFlags -> LocalRegSet -> [CmmNode O O] -> [(LocalRegSet, CmmNode O O)]
annotate dflags live nodes = snd $ foldr ann (live,[]) nodes
where ann n (live,nodes) = (gen_kill dflags n live, (live,n) : nodes)
--
-- Find the blocks tha... | 363 | annotate :: DynFlags -> LocalRegSet -> [CmmNode O O] -> [(LocalRegSet, CmmNode O O)]
annotate dflags live nodes = snd $ foldr ann (live,[]) nodes
where ann n (live,nodes) = (gen_kill dflags n live, (live,n) : nodes)
--
-- Find the blocks that have multiple successors (join points)
-- | 287 | annotate dflags live nodes = snd $ foldr ann (live,[]) nodes
where ann n (live,nodes) = (gen_kill dflags n live, (live,n) : nodes)
--
-- Find the blocks that have multiple successors (join points)
-- | 202 | true | true | 0 | 12 | 66 | 127 | 67 | 60 | null | null |
brendanhay/gogol | gogol-sourcerepo/gen/Network/Google/Resource/SourceRepo/Projects/Repos/TestIAMPermissions.hs | mpl-2.0 | -- | Multipart request metadata.
prtipPayload :: Lens' ProjectsReposTestIAMPermissions TestIAMPermissionsRequest
prtipPayload
= lens _prtipPayload (\ s a -> s{_prtipPayload = a}) | 180 | prtipPayload :: Lens' ProjectsReposTestIAMPermissions TestIAMPermissionsRequest
prtipPayload
= lens _prtipPayload (\ s a -> s{_prtipPayload = a}) | 147 | prtipPayload
= lens _prtipPayload (\ s a -> s{_prtipPayload = a}) | 67 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
knupfer/ninety-nine | test/Main.hs | gpl-2.0 | p25 :: [a] -> [a]
p25 xs = map (xs!!) . take (length xs) . nub . randomRs (0, length xs - 1) $ mkStdGen 0 | 105 | p25 :: [a] -> [a]
p25 xs = map (xs!!) . take (length xs) . nub . randomRs (0, length xs - 1) $ mkStdGen 0 | 105 | p25 xs = map (xs!!) . take (length xs) . nub . randomRs (0, length xs - 1) $ mkStdGen 0 | 87 | false | true | 3 | 9 | 25 | 83 | 39 | 44 | null | null |
olsner/ghc | compiler/main/HscMain.hs | bsd-3-clause | -- | Compile a decls
hscDeclsWithLocation :: HscEnv
-> String -- ^ The statement
-> String -- ^ The source
-> Int -- ^ Starting line
-> IO ([TyThing], InteractiveContext)
hscDeclsWithLocation hsc_env0 str source linenumber =
runInte... | 4,089 | hscDeclsWithLocation :: HscEnv
-> String -- ^ The statement
-> String -- ^ The source
-> Int -- ^ Starting line
-> IO ([TyThing], InteractiveContext)
hscDeclsWithLocation hsc_env0 str source linenumber =
runInteractiveHsc hsc_env0 $... | 4,068 | hscDeclsWithLocation hsc_env0 str source linenumber =
runInteractiveHsc hsc_env0 $ do
L _ (HsModule{ hsmodDecls = decls }) <-
hscParseThingWithLocation source linenumber parseModule str
{- Rename and typecheck it -}
hsc_env <- getHscEnv
tc_gblenv <- ioMsgMaybe $ tcRnDeclsi hsc_env decls
{... | 3,831 | true | true | 0 | 16 | 1,210 | 535 | 274 | 261 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.