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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x1F3F' = "\x0399\x0314\x0342" | 45 | decomposeChar '\x1F3F' = "\x0399\x0314\x0342" | 45 | decomposeChar '\x1F3F' = "\x0399\x0314\x0342" | 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
k0001/reflex | src/Reflex/Spider/Internal.hs | bsd-3-clause | askInvalidator :: BehaviorM (Maybe (Weak Invalidator))
askInvalidator = liftM (fmap fst) $ BehaviorM ask | 104 | askInvalidator :: BehaviorM (Maybe (Weak Invalidator))
askInvalidator = liftM (fmap fst) $ BehaviorM ask | 104 | askInvalidator = liftM (fmap fst) $ BehaviorM ask | 49 | false | true | 0 | 9 | 13 | 42 | 20 | 22 | null | null |
mcschroeder/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isTyVarExposed tv (AppTy fun arg) = isTyVarExposed tv fun
|| isTyVarExposed tv arg | 115 | isTyVarExposed tv (AppTy fun arg) = isTyVarExposed tv fun
|| isTyVarExposed tv arg | 115 | isTyVarExposed tv (AppTy fun arg) = isTyVarExposed tv fun
|| isTyVarExposed tv arg | 115 | false | false | 0 | 6 | 45 | 35 | 15 | 20 | null | null |
sdiehl/ghc | compiler/nativeGen/RegAlloc/Linear/State.hs | bsd-3-clause | runR :: DynFlags
-> BlockAssignment freeRegs
-> freeRegs
-> RegMap Loc
-> StackMap
-> UniqSupply
-> RegM freeRegs a
-> (BlockAssignment freeRegs, StackMap, RegAllocStats, a)
runR dflags block_assig freeregs assig stack us thing =
case unReg thing
(RA... | 886 | runR :: DynFlags
-> BlockAssignment freeRegs
-> freeRegs
-> RegMap Loc
-> StackMap
-> UniqSupply
-> RegM freeRegs a
-> (BlockAssignment freeRegs, StackMap, RegAllocStats, a)
runR dflags block_assig freeregs assig stack us thing =
case unReg thing
(RA_... | 885 | runR dflags block_assig freeregs assig stack us thing =
case unReg thing
(RA_State
{ ra_blockassig = block_assig
, ra_freeregs = freeregs
, ra_assig = assig
, ra_delta = 0{-???-}
, ra_stack = stack
... | 652 | false | true | 0 | 13 | 371 | 186 | 103 | 83 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | pprTickCts (CaseIdentity v) = ppr v | 47 | pprTickCts (CaseIdentity v) = ppr v | 47 | pprTickCts (CaseIdentity v) = ppr v | 47 | false | false | 0 | 7 | 17 | 18 | 8 | 10 | null | null |
corajr/cataskell | src/Cataskell/BoardGraph.hs | bsd-3-clause | -- | Add a hex to the graph at specified coordinate, reusing vertices if possible.
addHex :: BoardGraph -> CentralPoint -> BoardGraph
addHex gr centerPoint
= let (points, uEdges) = mkHexPointsAndEdges centerPoint
nodeGr = insNodesOnce points gr
gr' = insEdgesOnce uEdges nodeGr
in undir gr' | 313 | addHex :: BoardGraph -> CentralPoint -> BoardGraph
addHex gr centerPoint
= let (points, uEdges) = mkHexPointsAndEdges centerPoint
nodeGr = insNodesOnce points gr
gr' = insEdgesOnce uEdges nodeGr
in undir gr' | 230 | addHex gr centerPoint
= let (points, uEdges) = mkHexPointsAndEdges centerPoint
nodeGr = insNodesOnce points gr
gr' = insEdgesOnce uEdges nodeGr
in undir gr' | 179 | true | true | 0 | 9 | 67 | 69 | 34 | 35 | null | null |
mrmonday/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | zext ITBig _ _ = Nothing | 24 | zext ITBig _ _ = Nothing | 24 | zext ITBig _ _ = Nothing | 24 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
ganeti/htools | Ganeti/HTools/CLI.hs | gpl-2.0 | -- | Usage info
usageHelp :: String -> [OptType] -> String
usageHelp progname =
usageInfo (printf "%s %s\nUsage: %s [OPTION...]"
progname Version.version progname) | 182 | usageHelp :: String -> [OptType] -> String
usageHelp progname =
usageInfo (printf "%s %s\nUsage: %s [OPTION...]"
progname Version.version progname) | 166 | usageHelp progname =
usageInfo (printf "%s %s\nUsage: %s [OPTION...]"
progname Version.version progname) | 123 | true | true | 0 | 8 | 41 | 49 | 23 | 26 | null | null |
vialette/ppattern-tmp | src/Data/Algorithm/PPattern/Random.hs | mit | randShuffleAux' ([x]:xss) = (x, xss) | 40 | randShuffleAux' ([x]:xss) = (x, xss) | 40 | randShuffleAux' ([x]:xss) = (x, xss) | 40 | false | false | 0 | 8 | 8 | 25 | 14 | 11 | null | null |
SAdams601/HaRe | old/testing/duplication/D3_TokOut.hs | bsd-3-clause | anotherFun (x:xs) = sq x + anotherFun xs | 40 | anotherFun (x:xs) = sq x + anotherFun xs | 40 | anotherFun (x:xs) = sq x + anotherFun xs | 40 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
andreyk0/hs-send-gcode | send-gcode/App.hs | gpl-2.0 | runApp :: PrinterState -> App a -> IO a
runApp ps a = runReaderT (runSGApp a) ps | 80 | runApp :: PrinterState -> App a -> IO a
runApp ps a = runReaderT (runSGApp a) ps | 80 | runApp ps a = runReaderT (runSGApp a) ps | 40 | false | true | 0 | 7 | 16 | 41 | 19 | 22 | null | null |
elbrujohalcon/hPage | src/HPage/Control.hs | bsd-3-clause | showWithCurrent :: Show a => [a] -> Int -> String -> (String -> String) -> String
showWithCurrent allItems curItem sep mark =
drop (length sep) . concat $ map (showNth allItems curItem) [0..itemCount - 1]
where itemCount = length allItems
showNth list sel cur = sep ++ ((if sel == cur then mark e... | 349 | showWithCurrent :: Show a => [a] -> Int -> String -> (String -> String) -> String
showWithCurrent allItems curItem sep mark =
drop (length sep) . concat $ map (showNth allItems curItem) [0..itemCount - 1]
where itemCount = length allItems
showNth list sel cur = sep ++ ((if sel == cur then mark e... | 349 | showWithCurrent allItems curItem sep mark =
drop (length sep) . concat $ map (showNth allItems curItem) [0..itemCount - 1]
where itemCount = length allItems
showNth list sel cur = sep ++ ((if sel == cur then mark else id) $ show $ list !! cur) | 267 | false | true | 1 | 13 | 84 | 160 | 77 | 83 | null | null |
clockworkdevstudio/Idlewild-Lang | Options.hs | bsd-2-clause | addLibraryName :: String -> Options -> Options
addLibraryName name options =
options {optionLibraries = optionLibraries options ++ [name]} | 140 | addLibraryName :: String -> Options -> Options
addLibraryName name options =
options {optionLibraries = optionLibraries options ++ [name]} | 140 | addLibraryName name options =
options {optionLibraries = optionLibraries options ++ [name]} | 93 | false | true | 0 | 8 | 19 | 42 | 22 | 20 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F04.hs | bsd-3-clause | -- glCombinerParameterivNV -----------------------------------------------------
glCombinerParameterivNV
:: MonadIO m
=> GLenum -- ^ @pname@ of type [CombinerParameterNV](Graphics-GL-Groups.html#CombinerParameterNV).
-> Ptr GLint -- ^ @params@ pointing to @COMPSIZE(pname)@ elements of type @CheckedInt32@.
-> m... | 405 | glCombinerParameterivNV
:: MonadIO m
=> GLenum -- ^ @pname@ of type [CombinerParameterNV](Graphics-GL-Groups.html#CombinerParameterNV).
-> Ptr GLint -- ^ @params@ pointing to @COMPSIZE(pname)@ elements of type @CheckedInt32@.
-> m ()
glCombinerParameterivNV v1 v2 = liftIO $ dyn143 ptr_glCombinerParameterivNV v1... | 323 | glCombinerParameterivNV v1 v2 = liftIO $ dyn143 ptr_glCombinerParameterivNV v1 v2 | 81 | true | true | 0 | 10 | 49 | 57 | 27 | 30 | null | null |
gnn/Hets | OWL2/Extract.hs | gpl-2.0 | fromFB :: Extended -> FrameBit -> State Sign ()
fromFB ext fb = case fb of
ListFrameBit rel lfb -> do
fromExt ext
fromLFB rel lfb
AnnFrameBit an anf -> do
fromAnnos an
fromAFB anf
case anf of
AnnotationFrameBit Assertion -> case ext of
Misc _ -> return ()
_ -> fro... | 353 | fromFB :: Extended -> FrameBit -> State Sign ()
fromFB ext fb = case fb of
ListFrameBit rel lfb -> do
fromExt ext
fromLFB rel lfb
AnnFrameBit an anf -> do
fromAnnos an
fromAFB anf
case anf of
AnnotationFrameBit Assertion -> case ext of
Misc _ -> return ()
_ -> fro... | 353 | fromFB ext fb = case fb of
ListFrameBit rel lfb -> do
fromExt ext
fromLFB rel lfb
AnnFrameBit an anf -> do
fromAnnos an
fromAFB anf
case anf of
AnnotationFrameBit Assertion -> case ext of
Misc _ -> return ()
_ -> fromExt ext
_ -> fromExt ext | 305 | false | true | 0 | 18 | 120 | 140 | 60 | 80 | null | null |
chalmers-kandidat14/off-lattice | OffLattice/Folder.hs | bsd-3-clause | toHPN (H:xs) = 'N' : ' ' : 'H' : ' ' : toHPN xs | 47 | toHPN (H:xs) = 'N' : ' ' : 'H' : ' ' : toHPN xs | 47 | toHPN (H:xs) = 'N' : ' ' : 'H' : ' ' : toHPN xs | 47 | false | false | 2 | 7 | 14 | 37 | 17 | 20 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | getInferTerm, getInferType :: Term -> Term
getInferTerm (Bind n b sc) = Bind n b $ getInferTerm sc | 98 | getInferTerm, getInferType :: Term -> Term
getInferTerm (Bind n b sc) = Bind n b $ getInferTerm sc | 98 | getInferTerm (Bind n b sc) = Bind n b $ getInferTerm sc | 55 | false | true | 2 | 6 | 17 | 50 | 22 | 28 | null | null |
wouwouwou/2017_module_8 | src/haskell/series2/series2.hs | apache-2.0 | getAge :: (String, Int, Char, String) -> Int
getAge (a,b,c,d) = b | 69 | getAge :: (String, Int, Char, String) -> Int
getAge (a,b,c,d) = b | 69 | getAge (a,b,c,d) = b | 24 | false | true | 0 | 6 | 15 | 46 | 26 | 20 | null | null |
entropia/tip-toi-reveng | src/TipToiYaml.hs | mit | parseInitRegs :: Parser [(Register, Word16)]
parseInitRegs = many $ do
r <- parseReg
P.reservedOp lexer ":="
v <- parseWord16
return (r,v) | 154 | parseInitRegs :: Parser [(Register, Word16)]
parseInitRegs = many $ do
r <- parseReg
P.reservedOp lexer ":="
v <- parseWord16
return (r,v) | 154 | parseInitRegs = many $ do
r <- parseReg
P.reservedOp lexer ":="
v <- parseWord16
return (r,v) | 109 | false | true | 0 | 9 | 36 | 63 | 31 | 32 | null | null |
mikeizbicki/hmm | dist/build/autogen/Paths_hmm.hs | bsd-3-clause | getDataDir = catchIO (getEnv "hmm_datadir") (\_ -> return datadir) | 66 | getDataDir = catchIO (getEnv "hmm_datadir") (\_ -> return datadir) | 66 | getDataDir = catchIO (getEnv "hmm_datadir") (\_ -> return datadir) | 66 | false | false | 1 | 8 | 8 | 32 | 14 | 18 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexOffAddrOp_Addr args = doIndexOffAddrOp Nothing (bWord dflags) res args | 111 | emitPrimOp dflags res IndexOffAddrOp_Addr args = doIndexOffAddrOp Nothing (bWord dflags) res args | 111 | emitPrimOp dflags res IndexOffAddrOp_Addr args = doIndexOffAddrOp Nothing (bWord dflags) res args | 111 | false | false | 0 | 7 | 25 | 34 | 14 | 20 | null | null |
OpenXT/manager | apptool/Import/Images.hs | gpl-2.0 | getDiskImportedKeyPath :: Disk -> DIM -> Maybe FilePath
getDiskImportedKeyPath d dim = join (idiKeyPath' <$> getImportedDiskImage d dim) | 136 | getDiskImportedKeyPath :: Disk -> DIM -> Maybe FilePath
getDiskImportedKeyPath d dim = join (idiKeyPath' <$> getImportedDiskImage d dim) | 136 | getDiskImportedKeyPath d dim = join (idiKeyPath' <$> getImportedDiskImage d dim) | 80 | false | true | 0 | 8 | 17 | 46 | 21 | 25 | null | null |
tjakway/ghcjvm | compiler/iface/BinIface.hs | bsd-3-clause | putTupleName_ :: BinHandle -> TyCon -> TupleSort -> Word32 -> IO ()
putTupleName_ bh tc tup_sort thing_tag
= -- ASSERT(arity < 2^(30 :: Int))
put_ bh (0x80000000 .|. (sort_tag `shiftL` 28) .|. (thing_tag `shiftL` 26) .|. arity)
where
(sort_tag, arity) = case tup_sort of
BoxedTuple -> (0, fromInte... | 595 | putTupleName_ :: BinHandle -> TyCon -> TupleSort -> Word32 -> IO ()
putTupleName_ bh tc tup_sort thing_tag
= -- ASSERT(arity < 2^(30 :: Int))
put_ bh (0x80000000 .|. (sort_tag `shiftL` 28) .|. (thing_tag `shiftL` 26) .|. arity)
where
(sort_tag, arity) = case tup_sort of
BoxedTuple -> (0, fromInte... | 595 | putTupleName_ bh tc tup_sort thing_tag
= -- ASSERT(arity < 2^(30 :: Int))
put_ bh (0x80000000 .|. (sort_tag `shiftL` 28) .|. (thing_tag `shiftL` 26) .|. arity)
where
(sort_tag, arity) = case tup_sort of
BoxedTuple -> (0, fromIntegral (tyConArity tc))
UnboxedTuple -> (1, fromIntegral (tyC... | 527 | false | true | 0 | 12 | 127 | 171 | 90 | 81 | null | null |
adhalanay/Examen | src/Main.hs | gpl-3.0 | disp_ls (x:xs) = do
disp x
disp_ls xs | 49 | disp_ls (x:xs) = do
disp x
disp_ls xs | 49 | disp_ls (x:xs) = do
disp x
disp_ls xs | 49 | false | false | 0 | 7 | 19 | 28 | 12 | 16 | null | null |
jano017/Discord.hs | src/Network/Discord/Framework.hs | mit | handle a@(ChannelCreateEvent p) (D.ChannelCreate o)
= runAsync (clientProxy a) $ p o | 98 | handle a@(ChannelCreateEvent p) (D.ChannelCreate o)
= runAsync (clientProxy a) $ p o | 98 | handle a@(ChannelCreateEvent p) (D.ChannelCreate o)
= runAsync (clientProxy a) $ p o | 98 | false | false | 0 | 8 | 25 | 44 | 21 | 23 | null | null |
kazu-yamamoto/parsec3 | Text/Parsec/Prim.hs | bsd-2-clause | mkPT :: Monad m => (State s u -> m (Consumed (m (Reply s u a)))) -> ParsecT s u m a
mkPT k = ParsecT $ \s cok cerr eok eerr -> do
cons <- k s
case cons of
Consumed mrep -> do
rep <- mrep
case rep of
Ok x s' err -> ... | 579 | mkPT :: Monad m => (State s u -> m (Consumed (m (Reply s u a)))) -> ParsecT s u m a
mkPT k = ParsecT $ \s cok cerr eok eerr -> do
cons <- k s
case cons of
Consumed mrep -> do
rep <- mrep
case rep of
Ok x s' err -> ... | 579 | mkPT k = ParsecT $ \s cok cerr eok eerr -> do
cons <- k s
case cons of
Consumed mrep -> do
rep <- mrep
case rep of
Ok x s' err -> cok x s' err
Error err -> cerr err
Empty mrep ... | 495 | false | true | 0 | 17 | 328 | 215 | 98 | 117 | null | null |
ciderpunx/57-exercises-for-programmers | src/P24Anagram.hs | gpl-3.0 | sameLength :: [a] -> [a] -> Bool
sameLength xs ys =
length xs == length ys | 78 | sameLength :: [a] -> [a] -> Bool
sameLength xs ys =
length xs == length ys | 78 | sameLength xs ys =
length xs == length ys | 45 | false | true | 0 | 7 | 19 | 40 | 20 | 20 | null | null |
hakoja/SHA3 | Data/Digest/GroestlMutable.hs | bsd-3-clause | permPM 1024 x = V.foldM' rnd1024PM x (V.enumFromStepN 0 0x0100000000000000 14) | 78 | permPM 1024 x = V.foldM' rnd1024PM x (V.enumFromStepN 0 0x0100000000000000 14) | 78 | permPM 1024 x = V.foldM' rnd1024PM x (V.enumFromStepN 0 0x0100000000000000 14) | 78 | false | false | 1 | 8 | 10 | 34 | 15 | 19 | null | null |
Happy0/haskellscrabble | src/Wordify/Rules/Tile.hs | gpl-3.0 | tileLetter (Blank (Just char)) = Just char | 42 | tileLetter (Blank (Just char)) = Just char | 42 | tileLetter (Blank (Just char)) = Just char | 42 | false | false | 0 | 9 | 6 | 24 | 11 | 13 | null | null |
Hidowga/Projetos | dist/build/autogen/Paths_Test.hs | bsd-3-clause | prefix, bindirrel :: FilePath
prefix = "C:\\Users\\Pichau\\AppData\\Roaming\\cabal" | 90 | prefix, bindirrel :: FilePath
prefix = "C:\\Users\\Pichau\\AppData\\Roaming\\cabal" | 90 | prefix = "C:\\Users\\Pichau\\AppData\\Roaming\\cabal" | 60 | false | true | 0 | 4 | 13 | 13 | 8 | 5 | null | null |
phikal/brainduck | haskell/brainfuck.hs | mit | chr2bf :: Char -> [Char]
chr2bf c = take (ord c) (repeat '+') ++ ".>" | 69 | chr2bf :: Char -> [Char]
chr2bf c = take (ord c) (repeat '+') ++ ".>" | 69 | chr2bf c = take (ord c) (repeat '+') ++ ".>" | 44 | false | true | 0 | 8 | 14 | 49 | 22 | 27 | null | null |
beni55/text | tests/Tests/Properties.hs | bsd-2-clause | tl_isInfixOf s = L.isInfixOf s `eqP` TL.isInfixOf (packS s) | 62 | tl_isInfixOf s = L.isInfixOf s `eqP` TL.isInfixOf (packS s) | 62 | tl_isInfixOf s = L.isInfixOf s `eqP` TL.isInfixOf (packS s) | 62 | false | false | 0 | 8 | 11 | 31 | 15 | 16 | null | null |
urbanslug/ghc | testsuite/tests/rename/should_fail/rnfail047.hs | bsd-3-clause | = x
| 5 | v = x | 5 | v = x | 5 | false | false | 1 | 4 | 2 | 6 | 2 | 4 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/FixedPoint.hs | bsd-3-clause | fixfromRational :: forall a . (Integral a) =>
Prelude.Rational -> Fix a
fixfromRational inp = Fix e m
where
inpAsFloat :: Float
inpAsFloat = fromRational inp
intPart :: Float
intPart = fromRational $ toRational $ Prelude.floor inpAsFloat
intPartWidth :: IntN
int... | 605 | fixfromRational :: forall a . (Integral a) =>
Prelude.Rational -> Fix a
fixfromRational inp = Fix e m
where
inpAsFloat :: Float
inpAsFloat = fromRational inp
intPart :: Float
intPart = fromRational $ toRational $ Prelude.floor inpAsFloat
intPartWidth :: IntN
int... | 605 | fixfromRational inp = Fix e m
where
inpAsFloat :: Float
inpAsFloat = fromRational inp
intPart :: Float
intPart = fromRational $ toRational $ Prelude.floor inpAsFloat
intPartWidth :: IntN
intPartWidth = Prelude.ceiling $ Prelude.logBase 2 intPart
fracPartWith :: IntN
f... | 514 | false | true | 2 | 9 | 163 | 186 | 92 | 94 | null | null |
tort/mud-drifter | src/ServerInputParser.hs | mit | cs :: A.Parser ()
cs = do C.char '\ESC'
C.char '['
return () | 76 | cs :: A.Parser ()
cs = do C.char '\ESC'
C.char '['
return () | 76 | cs = do C.char '\ESC'
C.char '['
return () | 58 | false | true | 0 | 9 | 28 | 48 | 19 | 29 | null | null |
batterseapower/chsc | StaticFlags.hs | bsd-3-clause | mATCH_REDUCED :: Bool
mATCH_REDUCED = "--match-reduced" `elem` aRGS | 67 | mATCH_REDUCED :: Bool
mATCH_REDUCED = "--match-reduced" `elem` aRGS | 67 | mATCH_REDUCED = "--match-reduced" `elem` aRGS | 45 | false | true | 0 | 5 | 7 | 17 | 10 | 7 | null | null |
achudnov/hurl | Hurl.hs | bsd-3-clause | printResponseS :: Command -> Response String -> IO ()
printResponseS cmd rsp@(Response _ _ _ body) =
let ob = onlyBody cmd
in do h <- maybe (return stdout) (`openBinaryFile` WriteMode) (file cmd)
unless ob $ hPrint h rsp
hPutStr h body
when (isJust $ file cmd) (hClose h) | 299 | printResponseS :: Command -> Response String -> IO ()
printResponseS cmd rsp@(Response _ _ _ body) =
let ob = onlyBody cmd
in do h <- maybe (return stdout) (`openBinaryFile` WriteMode) (file cmd)
unless ob $ hPrint h rsp
hPutStr h body
when (isJust $ file cmd) (hClose h) | 299 | printResponseS cmd rsp@(Response _ _ _ body) =
let ob = onlyBody cmd
in do h <- maybe (return stdout) (`openBinaryFile` WriteMode) (file cmd)
unless ob $ hPrint h rsp
hPutStr h body
when (isJust $ file cmd) (hClose h) | 245 | false | true | 6 | 9 | 76 | 132 | 67 | 65 | null | null |
Mokosha/Lambency | lib/Lambency/Shader/OpenGL.hs | mit | buildSwizzle (v1, Just v2, Just v3, Just v4) = BS.concat $ map getSwizzleBS [v1, v2, v3, v4] | 92 | buildSwizzle (v1, Just v2, Just v3, Just v4) = BS.concat $ map getSwizzleBS [v1, v2, v3, v4] | 92 | buildSwizzle (v1, Just v2, Just v3, Just v4) = BS.concat $ map getSwizzleBS [v1, v2, v3, v4] | 92 | false | false | 0 | 7 | 16 | 53 | 28 | 25 | null | null |
andir/ganeti | src/Ganeti/Confd/Server.hs | bsd-2-clause | serializeResponse :: Result StatusAnswer -> ConfdReply
serializeResponse r =
let (status, result, serial) = case r of
Bad err -> (ReplyStatusError, J.showJSON err, 0)
Ok (code, val, ser) -> (code, val, ser)
in ConfdReply { confdReplyProtocol = 1
, confdR... | 439 | serializeResponse :: Result StatusAnswer -> ConfdReply
serializeResponse r =
let (status, result, serial) = case r of
Bad err -> (ReplyStatusError, J.showJSON err, 0)
Ok (code, val, ser) -> (code, val, ser)
in ConfdReply { confdReplyProtocol = 1
, confdR... | 439 | serializeResponse r =
let (status, result, serial) = case r of
Bad err -> (ReplyStatusError, J.showJSON err, 0)
Ok (code, val, ser) -> (code, val, ser)
in ConfdReply { confdReplyProtocol = 1
, confdReplyStatus = status
, confdReplyAns... | 384 | false | true | 0 | 14 | 158 | 122 | 68 | 54 | null | null |
ggazzi/hzen | src/Reactive/Banana/Monitors/Internal/Procfs.hs | mit | meminfoLine :: Set Text -> Map Text Int -> Parser (Map Text Int)
meminfoLine relevant acc = do
label <- P.takeWhile notColon <* char ':'
(if label `S.member` relevant
then M.insert label <$> (skipSpace *> decimal)
else pure id) <*> pure acc
<* skipWhile (not . isEndOfLine)
<* skipWhile isE... | 381 | meminfoLine :: Set Text -> Map Text Int -> Parser (Map Text Int)
meminfoLine relevant acc = do
label <- P.takeWhile notColon <* char ':'
(if label `S.member` relevant
then M.insert label <$> (skipSpace *> decimal)
else pure id) <*> pure acc
<* skipWhile (not . isEndOfLine)
<* skipWhile isE... | 381 | meminfoLine relevant acc = do
label <- P.takeWhile notColon <* char ':'
(if label `S.member` relevant
then M.insert label <$> (skipSpace *> decimal)
else pure id) <*> pure acc
<* skipWhile (not . isEndOfLine)
<* skipWhile isEndOfLine
where notColon c = c /= ':' && not (isEndOfLine c) | 316 | false | true | 1 | 14 | 92 | 166 | 77 | 89 | null | null |
tismith/tlisp | write-yourself-a-scheme/listings/listing7.hs | mit | numBoolBinop = boolBinop unpackNum | 34 | numBoolBinop = boolBinop unpackNum | 34 | numBoolBinop = boolBinop unpackNum | 34 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
ivanperez-keera/Yampa | yampa/tests/HaddockCoverage.hs | bsd-3-clause | getSources :: IO [FilePath]
getSources = filter isHaskellFile <$> go "src"
where
go dir = do
(dirs, files) <- getFilesAndDirectories dir
(files ++) . concat <$> mapM go dirs
isHaskellFile fp = (isSuffixOf ".hs" fp || isSuffixOf ".lhs" fp)
&& not (any (`isSuffixOf` fp) exclude... | 376 | getSources :: IO [FilePath]
getSources = filter isHaskellFile <$> go "src"
where
go dir = do
(dirs, files) <- getFilesAndDirectories dir
(files ++) . concat <$> mapM go dirs
isHaskellFile fp = (isSuffixOf ".hs" fp || isSuffixOf ".lhs" fp)
&& not (any (`isSuffixOf` fp) exclude... | 376 | getSources = filter isHaskellFile <$> go "src"
where
go dir = do
(dirs, files) <- getFilesAndDirectories dir
(files ++) . concat <$> mapM go dirs
isHaskellFile fp = (isSuffixOf ".hs" fp || isSuffixOf ".lhs" fp)
&& not (any (`isSuffixOf` fp) excludedFiles)
excludedFiles =... | 348 | false | true | 0 | 9 | 99 | 131 | 67 | 64 | null | null |
psibi/yesod | yesod-form/Yesod/Form/Bootstrap3.hs | mit | toOffset (ColMd 0) = "" | 23 | toOffset (ColMd 0) = "" | 23 | toOffset (ColMd 0) = "" | 23 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
QuickChick/Luck | luck/src/Outer/Types.hs | mit | substExp s (App e1 e2) = App (substExp s e1) (substExp s e2) | 60 | substExp s (App e1 e2) = App (substExp s e1) (substExp s e2) | 60 | substExp s (App e1 e2) = App (substExp s e1) (substExp s e2) | 60 | false | false | 0 | 7 | 12 | 42 | 19 | 23 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/IO/Handle/Text.hs | bsd-3-clause | -- ---------------------------------------------------------------------------
-- Simple input operations
-- If hWaitForInput finds anything in the Handle's buffer, it
-- immediately returns. If not, it tries to read from the underlying
-- OS handle. Notice that for buffered Handles connected to terminals
-- this mea... | 2,882 | hWaitForInput :: Handle -> Int -> IO Bool
hWaitForInput h msecs = do
wantReadableHandle_ "hWaitForInput" h $ \ handle_@Handle__{..} -> do
cbuf <- readIORef haCharBuffer
if not (isEmptyBuffer cbuf) then return True else do
if msecs < 0
then do cbuf' <- readTextDevice handle_ cbuf
writeI... | 1,606 | hWaitForInput h msecs = do
wantReadableHandle_ "hWaitForInput" h $ \ handle_@Handle__{..} -> do
cbuf <- readIORef haCharBuffer
if not (isEmptyBuffer cbuf) then return True else do
if msecs < 0
then do cbuf' <- readTextDevice handle_ cbuf
writeIORef haCharBuffer cbuf'
re... | 1,564 | true | true | 0 | 24 | 771 | 261 | 143 | 118 | null | null |
osa1/rho-torrent | src/Rho/Utils.hs | bsd-3-clause | dt :: TimeSpec -> TimeSpec -> TimeSpec
dt (TimeSpec s1 ns1) ts2@(TimeSpec s2 ns2)
| ns1 < ns2 = dt (TimeSpec (s1 - 1) (ns1 + 10^9)) ts2
| otherwise = TimeSpec (s1 - s2) (ns1 - ns2) | 184 | dt :: TimeSpec -> TimeSpec -> TimeSpec
dt (TimeSpec s1 ns1) ts2@(TimeSpec s2 ns2)
| ns1 < ns2 = dt (TimeSpec (s1 - 1) (ns1 + 10^9)) ts2
| otherwise = TimeSpec (s1 - s2) (ns1 - ns2) | 184 | dt (TimeSpec s1 ns1) ts2@(TimeSpec s2 ns2)
| ns1 < ns2 = dt (TimeSpec (s1 - 1) (ns1 + 10^9)) ts2
| otherwise = TimeSpec (s1 - s2) (ns1 - ns2) | 145 | false | true | 2 | 10 | 41 | 116 | 57 | 59 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_B_KEYWORD :: Int
wxSTC_B_KEYWORD = 3 | 42 | wxSTC_B_KEYWORD :: Int
wxSTC_B_KEYWORD = 3 | 42 | wxSTC_B_KEYWORD = 3 | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
avieth/postgresql-simple | src/Database/PostgreSQL/Simple/BuiltinTypes.hs | bsd-3-clause | name :: ByteString
name = "name" | 32 | name :: ByteString
name = "name" | 32 | name = "name" | 13 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
Fuuzetsu/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | psForceDirty PSUpstream{} = False | 33 | psForceDirty PSUpstream{} = False | 33 | psForceDirty PSUpstream{} = False | 33 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
cryptica/slapnet | src/Printer.hs | gpl-3.0 | renderShow :: (Show a) => a -> Builder
renderShow = stringUtf8 . show | 69 | renderShow :: (Show a) => a -> Builder
renderShow = stringUtf8 . show | 69 | renderShow = stringUtf8 . show | 30 | false | true | 0 | 6 | 12 | 28 | 15 | 13 | null | null |
meiersi/scyther-proof | src/Extension/Data/Accessor.hs | gpl-3.0 | -- | A direct accessor for maps. Will fail at runtime, if the element is not
-- present.
mapDirect :: Ord k => k -> Accessor (M.Map k v) v
mapDirect k = accessor (M.! k) (\v -> M.insert k v) | 190 | mapDirect :: Ord k => k -> Accessor (M.Map k v) v
mapDirect k = accessor (M.! k) (\v -> M.insert k v) | 101 | mapDirect k = accessor (M.! k) (\v -> M.insert k v) | 51 | true | true | 0 | 11 | 40 | 74 | 36 | 38 | null | null |
keera-studios/hsQt | Qtc/Classes/Script.hs | bsd-2-clause | globalObject :: QScriptEngine a -> IO (QScriptValue ())
globalObject _qsce
= withQScriptValueResult $
withObjectPtr _qsce $ \cobj_qsce ->
qtc_QScriptEngine_globalObject cobj_qsce | 188 | globalObject :: QScriptEngine a -> IO (QScriptValue ())
globalObject _qsce
= withQScriptValueResult $
withObjectPtr _qsce $ \cobj_qsce ->
qtc_QScriptEngine_globalObject cobj_qsce | 188 | globalObject _qsce
= withQScriptValueResult $
withObjectPtr _qsce $ \cobj_qsce ->
qtc_QScriptEngine_globalObject cobj_qsce | 132 | false | true | 4 | 10 | 29 | 58 | 25 | 33 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes.hs | bsd-3-clause | fetchPointType (PTID46 _ ) bs = PTID46 $ decodeToEither $ runGetIncremental pointType46Parser `pushChunks` bs | 110 | fetchPointType (PTID46 _ ) bs = PTID46 $ decodeToEither $ runGetIncremental pointType46Parser `pushChunks` bs | 110 | fetchPointType (PTID46 _ ) bs = PTID46 $ decodeToEither $ runGetIncremental pointType46Parser `pushChunks` bs | 110 | false | false | 1 | 7 | 14 | 35 | 17 | 18 | null | null |
gregberns/HaskellKoans | src/koans/HPatternMatching.hs | apache-2.0 | koans :: Koan
koans = describe "Pattern Matching" $ do
koanSignHigh
koanSignLow
koanCheckHead
koanCheckEmpty
koanCompareLess
koanCompareMore | 146 | koans :: Koan
koans = describe "Pattern Matching" $ do
koanSignHigh
koanSignLow
koanCheckHead
koanCheckEmpty
koanCompareLess
koanCompareMore | 146 | koans = describe "Pattern Matching" $ do
koanSignHigh
koanSignLow
koanCheckHead
koanCheckEmpty
koanCompareLess
koanCompareMore | 132 | false | true | 0 | 8 | 21 | 43 | 16 | 27 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.10/base/GHC/List.hs | bsd-3-clause | foldl k z0 xs =
foldr (\(v::a) (fn::b->b) -> oneShot (\(z::b) -> fn (k z v))) (id :: b -> b) xs z0 | 100 | foldl k z0 xs =
foldr (\(v::a) (fn::b->b) -> oneShot (\(z::b) -> fn (k z v))) (id :: b -> b) xs z0 | 100 | foldl k z0 xs =
foldr (\(v::a) (fn::b->b) -> oneShot (\(z::b) -> fn (k z v))) (id :: b -> b) xs z0 | 100 | false | false | 1 | 13 | 24 | 95 | 47 | 48 | null | null |
wskplho/stack | src/Stack/Types/StackT.hs | bsd-3-clause | logSticky :: Q Exp
logSticky =
logOther "sticky" | 52 | logSticky :: Q Exp
logSticky =
logOther "sticky" | 52 | logSticky =
logOther "sticky" | 33 | false | true | 0 | 5 | 11 | 17 | 8 | 9 | null | null |
kim/amazonka | amazonka-ecs/gen/Network/AWS/ECS/Types.hs | mpl-2.0 | -- | The type of the resource, such as 'INTEGER', 'DOUBLE', 'LONG', or 'STRINGSET'.
rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\s a -> s { _rType = a }) | 167 | rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\s a -> s { _rType = a }) | 83 | rType = lens _rType (\s a -> s { _rType = a }) | 46 | true | true | 0 | 9 | 32 | 46 | 25 | 21 | null | null |
ibnuda/.xmonad | xmonad.hs | gpl-2.0 | xfceScreenshooter :: [Char]
xfceScreenshooter = "xfce4-screenshooter" | 69 | xfceScreenshooter :: [Char]
xfceScreenshooter = "xfce4-screenshooter" | 69 | xfceScreenshooter = "xfce4-screenshooter" | 41 | false | true | 0 | 5 | 5 | 14 | 8 | 6 | null | null |
kolmodin/cabal | cabal-install/Distribution/Client/Types.hs | bsd-3-clause | maybeRepoRemote (RepoSecure r _localDir) = Just r | 49 | maybeRepoRemote (RepoSecure r _localDir) = Just r | 49 | maybeRepoRemote (RepoSecure r _localDir) = Just r | 49 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
sdiehl/ghc | testsuite/tests/codeGen/should_run/cgrun044.hs | bsd-3-clause | pos_zero :: (Show a, RealFloat a) => [a] -> String
pos_zero numbers =
unlines
( ""
: "*********************************"
: ("Positive zero: " ++ doubleOrFloat numbers)
: ""
: map showPerform numbers)
where
showPerform = showAndPerform (==0) "isPosZero" | 283 | pos_zero :: (Show a, RealFloat a) => [a] -> String
pos_zero numbers =
unlines
( ""
: "*********************************"
: ("Positive zero: " ++ doubleOrFloat numbers)
: ""
: map showPerform numbers)
where
showPerform = showAndPerform (==0) "isPosZero" | 283 | pos_zero numbers =
unlines
( ""
: "*********************************"
: ("Positive zero: " ++ doubleOrFloat numbers)
: ""
: map showPerform numbers)
where
showPerform = showAndPerform (==0) "isPosZero" | 232 | false | true | 0 | 12 | 67 | 90 | 46 | 44 | null | null |
ichistmeinname/holumbus | src/Holumbus/Crawler/URIs.hs | mit | unionURIs :: URIs -> URIs -> URIs
unionURIs = S.union | 81 | unionURIs :: URIs -> URIs -> URIs
unionURIs = S.union | 81 | unionURIs = S.union | 33 | false | true | 0 | 6 | 37 | 21 | 11 | 10 | null | null |
JoshuaGross/haskell-learning-log | code/tpl-haskell/src/MakeClassySubclassing.hs | mit | splitStr f str =
let splitStr' f prev str' = strCase [prev] str' (\s ss -> if s == f then (prev : splitStr' f "" ss) else splitStr' f (prev ++ [s]) ss) in
splitStr' f "" str | 177 | splitStr f str =
let splitStr' f prev str' = strCase [prev] str' (\s ss -> if s == f then (prev : splitStr' f "" ss) else splitStr' f (prev ++ [s]) ss) in
splitStr' f "" str | 177 | splitStr f str =
let splitStr' f prev str' = strCase [prev] str' (\s ss -> if s == f then (prev : splitStr' f "" ss) else splitStr' f (prev ++ [s]) ss) in
splitStr' f "" str | 177 | false | false | 0 | 16 | 42 | 99 | 50 | 49 | null | null |
honux77/practice | haskell/day4/ex4.hs | mit | trueman (False:xs) = trueman xs | 31 | trueman (False:xs) = trueman xs | 31 | trueman (False:xs) = trueman xs | 31 | false | false | 0 | 6 | 4 | 20 | 9 | 11 | null | null |
brendanhay/gogol | gogol-jobs/gen/Network/Google/Jobs/Types/Product.hs | mpl-2.0 | -- | Number of jobs that match the specified query. Note: This size is
-- precise only if the total is less than 100,000.
sjrTotalSize :: Lens' SearchJobsResponse (Maybe Int32)
sjrTotalSize
= lens _sjrTotalSize (\ s a -> s{_sjrTotalSize = a})
. mapping _Coerce | 268 | sjrTotalSize :: Lens' SearchJobsResponse (Maybe Int32)
sjrTotalSize
= lens _sjrTotalSize (\ s a -> s{_sjrTotalSize = a})
. mapping _Coerce | 146 | sjrTotalSize
= lens _sjrTotalSize (\ s a -> s{_sjrTotalSize = a})
. mapping _Coerce | 91 | true | true | 0 | 10 | 51 | 56 | 29 | 27 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Core/Types.hs | bsd-3-clause | -- | Type equality on 'TypeRep'
typeEq :: TypeRep a -> TypeRep b -> Maybe (TypeEq a b)
typeEq UnitType UnitType = Just TypeEq | 125 | typeEq :: TypeRep a -> TypeRep b -> Maybe (TypeEq a b)
typeEq UnitType UnitType = Just TypeEq | 93 | typeEq UnitType UnitType = Just TypeEq | 38 | true | true | 0 | 10 | 23 | 50 | 22 | 28 | null | null |
minad/omega | vendor/algorithm-p/Types.hs | bsd-3-clause | --------- Frequently used types
botType = TyVar "a" | 58 | botType = TyVar "a" | 25 | botType = TyVar "a" | 25 | true | false | 0 | 5 | 14 | 10 | 5 | 5 | null | null |
manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/StorageErrorCallback.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/StorageErrorCallback Mozilla StorageErrorCallback documentation>
newStorageErrorCallbackAsync ::
(MonadIO m) =>
(Maybe DOMException -> IO ()) -> m StorageErrorCallback
newStorageErrorCallbackAsync callbac... | 484 | newStorageErrorCallbackAsync ::
(MonadIO m) =>
(Maybe DOMException -> IO ()) -> m StorageErrorCallback
newStorageErrorCallbackAsync callback
= liftIO
(StorageErrorCallback <$>
asyncCallback1
(\ error ->
fromJSValUnchec... | 363 | newStorageErrorCallbackAsync callback
= liftIO
(StorageErrorCallback <$>
asyncCallback1
(\ error ->
fromJSValUnchecked error >>= \ error' -> callback error')) | 200 | true | true | 0 | 13 | 139 | 82 | 41 | 41 | null | null |
michaelschade/hs-stripe | src/Web/Stripe/Customer.hs | bsd-3-clause | updateCustomer :: MonadIO m => Customer -> Maybe RequestCard -> Maybe CpnId
-> Maybe Email -> Maybe Description -> StripeT m Customer
updateCustomer = updateCustomerById . custId | 194 | updateCustomer :: MonadIO m => Customer -> Maybe RequestCard -> Maybe CpnId
-> Maybe Email -> Maybe Description -> StripeT m Customer
updateCustomer = updateCustomerById . custId | 194 | updateCustomer = updateCustomerById . custId | 45 | false | true | 0 | 12 | 42 | 65 | 28 | 37 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Protocol.hs | bsd-3-clause | parseQueryResult (IfThenElseI8I16 _ _ _) (IfThenElseI16Reply r) = Just $ ExprRight $ lit r | 90 | parseQueryResult (IfThenElseI8I16 _ _ _) (IfThenElseI16Reply r) = Just $ ExprRight $ lit r | 90 | parseQueryResult (IfThenElseI8I16 _ _ _) (IfThenElseI16Reply r) = Just $ ExprRight $ lit r | 90 | false | false | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
bogwonch/SecPAL | src/SecPAL.hs | gpl-3.0 | usage :: IO ()
usage = do
prog <- getProgName
let header = "Usage: "
++ prog
++ " -f FILE [options]"
putStrLn $ usageInfo header options | 172 | usage :: IO ()
usage = do
prog <- getProgName
let header = "Usage: "
++ prog
++ " -f FILE [options]"
putStrLn $ usageInfo header options | 172 | usage = do
prog <- getProgName
let header = "Usage: "
++ prog
++ " -f FILE [options]"
putStrLn $ usageInfo header options | 157 | false | true | 0 | 11 | 62 | 52 | 24 | 28 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | harmonicrecv :: Pattern Int -> ControlPattern
harmonicrecv busid = pI "^harmonic" busid | 87 | harmonicrecv :: Pattern Int -> ControlPattern
harmonicrecv busid = pI "^harmonic" busid | 87 | harmonicrecv busid = pI "^harmonic" busid | 41 | false | true | 0 | 7 | 11 | 33 | 13 | 20 | null | null |
brendanhay/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Delete.hs | mpl-2.0 | -- | Identifier of the course to delete. This identifier can be either the
-- Classroom-assigned identifier or an alias.
cdId :: Lens' CoursesDelete Text
cdId = lens _cdId (\ s a -> s{_cdId = a}) | 195 | cdId :: Lens' CoursesDelete Text
cdId = lens _cdId (\ s a -> s{_cdId = a}) | 74 | cdId = lens _cdId (\ s a -> s{_cdId = a}) | 41 | true | true | 1 | 9 | 35 | 47 | 23 | 24 | null | null |
tjakway/ghcjvm | libraries/ghc-boot/GHC/PackageDb.hs | bsd-3-clause | -- TODO: we may be able to replace the following with utils from the binary
-- package in future.
-- | Feed a 'Get' decoder with data chunks from a file.
--
decodeFromFile :: FilePath -> Get a -> IO a
decodeFromFile file decoder =
withBinaryFile file ReadMode $ \hnd ->
feed hnd (runGetIncremental decoder)
... | 863 | decodeFromFile :: FilePath -> Get a -> IO a
decodeFromFile file decoder =
withBinaryFile file ReadMode $ \hnd ->
feed hnd (runGetIncremental decoder)
where
feed hnd (Partial k) = do chunk <- BS.hGet hnd BS.Lazy.defaultChunkSize
if BS.null chunk
... | 705 | decodeFromFile file decoder =
withBinaryFile file ReadMode $ \hnd ->
feed hnd (runGetIncremental decoder)
where
feed hnd (Partial k) = do chunk <- BS.hGet hnd BS.Lazy.defaultChunkSize
if BS.null chunk
then feed hnd (k Nothing)
... | 661 | true | true | 0 | 12 | 277 | 219 | 109 | 110 | null | null |
hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/VertexArrays.hs | bsd-3-clause | interleavedArrays :: InterleavedArrays -> Stride -> Ptr a -> IO ()
interleavedArrays = glInterleavedArrays . marshalInterleavedArrays | 133 | interleavedArrays :: InterleavedArrays -> Stride -> Ptr a -> IO ()
interleavedArrays = glInterleavedArrays . marshalInterleavedArrays | 133 | interleavedArrays = glInterleavedArrays . marshalInterleavedArrays | 66 | false | true | 0 | 10 | 15 | 41 | 18 | 23 | null | null |
innovimax/bond | compiler/Bond/Template/Cpp/Util.hs | mit | -- schema metadata static member definitions
schemaMetadata :: MappingContext -> Declaration -> Text
schemaMetadata cpp s@Struct {..} = [lt|
#{template s}const bond::Metadata #{structName s}::Schema::metadata
= #{structName s}::Schema::GetMetadata();#{newlineBeginSep 1 staticDef structFields}|]
where
... | 1,352 | schemaMetadata :: MappingContext -> Declaration -> Text
schemaMetadata cpp s@Struct {..} = [lt|
#{template s}const bond::Metadata #{structName s}::Schema::metadata
= #{structName s}::Schema::GetMetadata();#{newlineBeginSep 1 staticDef structFields}|]
where
-- static member definition for field metadat... | 1,307 | schemaMetadata cpp s@Struct {..} = [lt|
#{template s}const bond::Metadata #{structName s}::Schema::metadata
= #{structName s}::Schema::GetMetadata();#{newlineBeginSep 1 staticDef structFields}|]
where
-- static member definition for field metadata
staticDef f@Field {..}
| fieldModifier == ... | 1,251 | true | true | 0 | 12 | 256 | 207 | 114 | 93 | null | null |
OpenXT/manager | apptool/ApplianceOVF.hs | gpl-2.0 | convertRpcRule r = return r | 27 | convertRpcRule r = return r | 27 | convertRpcRule r = return r | 27 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
AndreasPK/stack | src/Stack/Types/Config.hs | bsd-3-clause | configMonoidOverrideGccPathName :: Text
configMonoidOverrideGccPathName = "with-gcc" | 84 | configMonoidOverrideGccPathName :: Text
configMonoidOverrideGccPathName = "with-gcc" | 84 | configMonoidOverrideGccPathName = "with-gcc" | 44 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
foreverbell/parakeet | src/Parakeet/Parser/Stage1.hs | mit | terminate :: Parser [Token]
terminate = do
s <- getState
guard $ null s
eof
return [] | 93 | terminate :: Parser [Token]
terminate = do
s <- getState
guard $ null s
eof
return [] | 93 | terminate = do
s <- getState
guard $ null s
eof
return [] | 65 | false | true | 0 | 9 | 24 | 51 | 21 | 30 | null | null |
samscott89/tamarin-prover | lib/term/src/Term/Term.hs | gpl-3.0 | isUnion _ = False | 39 | isUnion _ = False | 39 | isUnion _ = False | 39 | false | false | 0 | 4 | 25 | 10 | 4 | 6 | null | null |
brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs | mpl-2.0 | -- | Charging state constraint.
aicChargingStateConstraint :: Lens' AutoInstallConstraint (Maybe AutoInstallConstraintChargingStateConstraint)
aicChargingStateConstraint
= lens _aicChargingStateConstraint
(\ s a -> s{_aicChargingStateConstraint = a}) | 258 | aicChargingStateConstraint :: Lens' AutoInstallConstraint (Maybe AutoInstallConstraintChargingStateConstraint)
aicChargingStateConstraint
= lens _aicChargingStateConstraint
(\ s a -> s{_aicChargingStateConstraint = a}) | 226 | aicChargingStateConstraint
= lens _aicChargingStateConstraint
(\ s a -> s{_aicChargingStateConstraint = a}) | 115 | true | true | 0 | 8 | 29 | 49 | 25 | 24 | null | null |
martinvlk/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | freeVars :: CondTree ConfVar c a -> [FlagName]
freeVars t = [ f | Flag f <- freeVars' t ]
where
freeVars' (CondNode _ _ ifs) = concatMap compfv ifs
compfv (c, ct, mct) = condfv c ++ freeVars' ct ++ maybe [] freeVars' mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c' ... | 555 | freeVars :: CondTree ConfVar c a -> [FlagName]
freeVars t = [ f | Flag f <- freeVars' t ]
where
freeVars' (CondNode _ _ ifs) = concatMap compfv ifs
compfv (c, ct, mct) = condfv c ++ freeVars' ct ++ maybe [] freeVars' mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c' ... | 555 | freeVars t = [ f | Flag f <- freeVars' t ]
where
freeVars' (CondNode _ _ ifs) = concatMap compfv ifs
compfv (c, ct, mct) = condfv c ++ freeVars' ct ++ maybe [] freeVars' mct
condfv c = case c of
Var v -> [v]
Lit _ -> []
CNot c' -> condfv c'
COr c1 c2 -> condfv c1 ++ c... | 507 | false | true | 2 | 11 | 154 | 200 | 96 | 104 | null | null |
joe9/barrelfish | tools/mackerel/BitFieldDriver.hs | mit | -- translation function mapped to every argument, for generic conversion
-- (eg. types or names) before rendering those arguments in C code
convert_arg (Arg "addr" x) = Arg "mackerel_addr_t" x | 193 | convert_arg (Arg "addr" x) = Arg "mackerel_addr_t" x | 52 | convert_arg (Arg "addr" x) = Arg "mackerel_addr_t" x | 52 | true | false | 0 | 7 | 30 | 24 | 12 | 12 | null | null |
quchen/HaskellEuler | src/ProjectEuler.hs | bsd-3-clause | euler 10 = Just Problem10.solution | 34 | euler 10 = Just Problem10.solution | 34 | euler 10 = Just Problem10.solution | 34 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
siddhanathan/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc Id) arg -> LFieldOcc Id
hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl | 134 | hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc Id) arg -> LFieldOcc Id
hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl | 134 | hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl | 59 | false | true | 0 | 8 | 14 | 36 | 17 | 19 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Haddock.hs | bsd-3-clause | getExeSourceFiles :: LocalBuildInfo
-> Executable
-> IO [(ModuleName.ModuleName, FilePath)]
getExeSourceFiles lbi exe = do
moduleFiles <- getSourceFiles searchpaths modules
srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe)
return ((ModuleName.main, srcMainP... | 493 | getExeSourceFiles :: LocalBuildInfo
-> Executable
-> IO [(ModuleName.ModuleName, FilePath)]
getExeSourceFiles lbi exe = do
moduleFiles <- getSourceFiles searchpaths modules
srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe)
return ((ModuleName.main, srcMainP... | 493 | getExeSourceFiles lbi exe = do
moduleFiles <- getSourceFiles searchpaths modules
srcMainPath <- findFile (hsSourceDirs bi) (modulePath exe)
return ((ModuleName.main, srcMainPath) : moduleFiles)
where
bi = buildInfo exe
modules = otherModules bi
searchpaths = autogenModulesDir lbi ... | 359 | false | true | 2 | 11 | 131 | 138 | 67 | 71 | null | null |
PierreR/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | stream
:: Process.CreateProcess
-- ^ Command
-> Shell Line
-- ^ Lines of standard input
-> Shell Line
-- ^ Lines of standard output
stream p s = do
let p' = p
{ Process.std_in = Process.CreatePipe
, Process.std_out = Process.CreatePipe
, Process.std_err =... | 1,133 | stream
:: Process.CreateProcess
-- ^ Command
-> Shell Line
-- ^ Lines of standard input
-> Shell Line
stream p s = do
let p' = p
{ Process.std_in = Process.CreatePipe
, Process.std_out = Process.CreatePipe
, Process.std_err = Process.Inherit
}
... | 1,099 | stream p s = do
let p' = p
{ Process.std_in = Process.CreatePipe
, Process.std_out = Process.CreatePipe
, Process.std_err = Process.Inherit
}
let open = do
(Just hIn, Just hOut, Nothing, ph) <- liftIO (Process.createProcess p')
IO.hSetBuf... | 977 | true | true | 0 | 19 | 352 | 400 | 197 | 203 | null | null |
synsem/texhs | src/Text/TeX/Context/Types.hs | gpl-3.0 | intoCmdArg ctx = failStep ctx | 29 | intoCmdArg ctx = failStep ctx | 29 | intoCmdArg ctx = failStep ctx | 29 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
rueshyna/gogol | gogol-replicapool/gen/Network/Google/ReplicaPool/Types/Product.hs | mpl-2.0 | -- | [Output Only] Metadata value for this warning.
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a}) | 176 | owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a}) | 124 | owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a}) | 61 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
brendanhay/gogol | gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/AcceleratorTypes/Get.hs | mpl-2.0 | -- | OAuth access token.
platgAccessToken :: Lens' ProjectsLocationsAcceleratorTypesGet (Maybe Text)
platgAccessToken
= lens _platgAccessToken
(\ s a -> s{_platgAccessToken = a}) | 186 | platgAccessToken :: Lens' ProjectsLocationsAcceleratorTypesGet (Maybe Text)
platgAccessToken
= lens _platgAccessToken
(\ s a -> s{_platgAccessToken = a}) | 161 | platgAccessToken
= lens _platgAccessToken
(\ s a -> s{_platgAccessToken = a}) | 85 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
jdve/xchat-plugin | src/Network/IRC/XChat/Plugin.hs | gpl-2.0 | {- |
[Undocumented]
/Description:/
@
'xChatGettext' /str/
@
Converts a string to its internal XChat representation.
I automatically free it to avoid memory leak, although as
I don't know what it really does, it may be a bad idea.
The original code had an unused plugin handle.
/Arguments:/
[str] The string to con... | 513 | xChatGettext :: String -> IO String
xChatGettext s =
newCString s >>= \ cs ->
xChatGettextFFI nullPtr cs >>= \ ds ->
peekCString ds >>= \ t ->
free ds >>
free cs >>
return t | 185 | xChatGettext s =
newCString s >>= \ cs ->
xChatGettextFFI nullPtr cs >>= \ ds ->
peekCString ds >>= \ t ->
free ds >>
free cs >>
return t | 149 | true | true | 0 | 13 | 108 | 77 | 37 | 40 | null | null |
yav/type-nat-solver | docs/Examples.hs | bsd-3-clause | bSucc (Even x) = Odd x | 23 | bSucc (Even x) = Odd x | 23 | bSucc (Even x) = Odd x | 23 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
li-zhirui/EoplLangs | src/NamelessIntp/Data.hs | bsd-3-clause | apply :: NamelessEnvironment -> Integer -> Maybe ExpressedValue
apply (x:_) 0 = Just x | 87 | apply :: NamelessEnvironment -> Integer -> Maybe ExpressedValue
apply (x:_) 0 = Just x | 87 | apply (x:_) 0 = Just x | 23 | false | true | 0 | 10 | 14 | 41 | 19 | 22 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QMessageBox.hs | bsd-2-clause | fButtonMask :: QMessageBoxStandardButtons
fButtonMask
= ifQMessageBoxStandardButtons $ -769 | 93 | fButtonMask :: QMessageBoxStandardButtons
fButtonMask
= ifQMessageBoxStandardButtons $ -769 | 93 | fButtonMask
= ifQMessageBoxStandardButtons $ -769 | 51 | false | true | 0 | 6 | 9 | 23 | 10 | 13 | null | null |
bgamari/model-fit | ModelFit/Model/Packed.hs | bsd-3-clause | vectorIx :: VG.Vector v a => Int -> Traversal' (v a) a
vectorIx i f v
| 0 <= i && i < VG.length v = f (v VG.! i) <&> \a -> v VG.// [(i, a)]
| otherwise = pure v | 180 | vectorIx :: VG.Vector v a => Int -> Traversal' (v a) a
vectorIx i f v
| 0 <= i && i < VG.length v = f (v VG.! i) <&> \a -> v VG.// [(i, a)]
| otherwise = pure v | 180 | vectorIx i f v
| 0 <= i && i < VG.length v = f (v VG.! i) <&> \a -> v VG.// [(i, a)]
| otherwise = pure v | 125 | false | true | 1 | 10 | 61 | 113 | 56 | 57 | null | null |
grnet/snf-ganeti | src/Ganeti/Utils.hs | bsd-2-clause | -- | Show the first parameter before returning the second one.
debugXy :: Show a => a -> b -> b
debugXy = seq . debug | 117 | debugXy :: Show a => a -> b -> b
debugXy = seq . debug | 54 | debugXy = seq . debug | 21 | true | true | 0 | 7 | 25 | 31 | 16 | 15 | null | null |
wavewave/ttbar | lib/HEP/Physics/TTBar/Reconstruction/Combined.hs | gpl-3.0 | y4 :: SemiLepTopBothMom -> Double
y4 einfo = sqr4 (mom_had_Wj1 einfo `plus` mom_had_Wj2 einfo) - mw^(2 :: Int) | 111 | y4 :: SemiLepTopBothMom -> Double
y4 einfo = sqr4 (mom_had_Wj1 einfo `plus` mom_had_Wj2 einfo) - mw^(2 :: Int) | 110 | y4 einfo = sqr4 (mom_had_Wj1 einfo `plus` mom_had_Wj2 einfo) - mw^(2 :: Int) | 76 | false | true | 0 | 10 | 18 | 50 | 26 | 24 | null | null |
zmeadows/zwerg | lib/Zwerg/Entity/AI.hs | mit | runAI :: ( HasCallStack
, HasComponents s
, HasZwergEventQueue s
, MonadState s m
, MonadRandom m
) => UUID -> m ()
runAI uuid = do
cmps <- getComponents
ait <- aiType <@> uuid
ranWord <- getRandom
let (AI a) = enact uuid ait
(_,evts) = runReader (runStateT (... | 388 | runAI :: ( HasCallStack
, HasComponents s
, HasZwergEventQueue s
, MonadState s m
, MonadRandom m
) => UUID -> m ()
runAI uuid = do
cmps <- getComponents
ait <- aiType <@> uuid
ranWord <- getRandom
let (AI a) = enact uuid ait
(_,evts) = runReader (runStateT (... | 388 | runAI uuid = do
cmps <- getComponents
ait <- aiType <@> uuid
ranWord <- getRandom
let (AI a) = enact uuid ait
(_,evts) = runReader (runStateT (evalRandT a $ pureRanGen ranWord) zDefault) cmps
mergeEventsM evts | 227 | false | true | 0 | 15 | 120 | 146 | 69 | 77 | null | null |
jean-edouard/manager | updatemgr/UpdateMgr/Logic.hs | gpl-2.0 | -- continue update from some current state
continueUpdate :: Update ()
continueUpdate = fromState =<< getUpdateState where
fromState NoUpdate = return ()
fromState DownloadingReleasesInfo = cancelUpdate
fromState DownloadedReleasesInfo = cancelUpdate
fromState DownloadingMeta = cancelUpdate
fromStat... | 547 | continueUpdate :: Update ()
continueUpdate = fromState =<< getUpdateState where
fromState NoUpdate = return ()
fromState DownloadingReleasesInfo = cancelUpdate
fromState DownloadedReleasesInfo = cancelUpdate
fromState DownloadingMeta = cancelUpdate
fromState DownloadedMeta = cancelUpdate
fromSta... | 504 | continueUpdate = fromState =<< getUpdateState where
fromState NoUpdate = return ()
fromState DownloadingReleasesInfo = cancelUpdate
fromState DownloadedReleasesInfo = cancelUpdate
fromState DownloadingMeta = cancelUpdate
fromState DownloadedMeta = cancelUpdate
fromState DownloadingFiles = cancel... | 476 | true | true | 7 | 7 | 98 | 136 | 56 | 80 | null | null |
ksaveljev/sliding-puzzle | SlidingPuzzle.hs | mit | -- | Check if all the tiles are at the correct place
isSolutionFound :: PuzzleState -> Bool
isSolutionFound puzzleState = distance puzzleState == 0 | 147 | isSolutionFound :: PuzzleState -> Bool
isSolutionFound puzzleState = distance puzzleState == 0 | 94 | isSolutionFound puzzleState = distance puzzleState == 0 | 55 | true | true | 0 | 6 | 23 | 26 | 13 | 13 | null | null |
yanhan/bin-src | tests/BinSrc/GitUtils/Tests.hs | bsd-3-clause | assert_notruncate_eq_terminal_width :: Assertion
assert_notruncate_eq_terminal_width =
let orgText = "i hope this line is not truncated"
orgTextLen = T.length orgText
actual = truncate_colorized_line orgTextLen orgText
in
orgText @=? actual | 260 | assert_notruncate_eq_terminal_width :: Assertion
assert_notruncate_eq_terminal_width =
let orgText = "i hope this line is not truncated"
orgTextLen = T.length orgText
actual = truncate_colorized_line orgTextLen orgText
in
orgText @=? actual | 260 | assert_notruncate_eq_terminal_width =
let orgText = "i hope this line is not truncated"
orgTextLen = T.length orgText
actual = truncate_colorized_line orgTextLen orgText
in
orgText @=? actual | 211 | false | true | 2 | 10 | 47 | 57 | 26 | 31 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.