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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mfine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | setDepMakefile :: FilePath -> DynFlags -> DynFlags
setDepMakefile f d = d { depMakefile = f } | 93 | setDepMakefile :: FilePath -> DynFlags -> DynFlags
setDepMakefile f d = d { depMakefile = f } | 93 | setDepMakefile f d = d { depMakefile = f } | 42 | false | true | 0 | 6 | 16 | 32 | 17 | 15 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Protocol.hs | bsd-3-clause | parseQueryResult (IfThenElseFloatI _ _ _) (IfThenElseI32Reply r) = Just $ ExprRight $ lit (fromIntegral r) | 106 | parseQueryResult (IfThenElseFloatI _ _ _) (IfThenElseI32Reply r) = Just $ ExprRight $ lit (fromIntegral r) | 106 | parseQueryResult (IfThenElseFloatI _ _ _) (IfThenElseI32Reply r) = Just $ ExprRight $ lit (fromIntegral r) | 106 | false | false | 0 | 8 | 14 | 44 | 21 | 23 | null | null |
kazu-yamamoto/iproute | Data/IP/Mask.hs | bsd-3-clause | shiftL128 :: (Word64, Word64) -> Int -> (Word64, Word64)
shiftL128 (h, l) i =
( (h `shiftL` i) .|. (l `shift` (i - 64) ), (l `shiftL` i)) | 145 | shiftL128 :: (Word64, Word64) -> Int -> (Word64, Word64)
shiftL128 (h, l) i =
( (h `shiftL` i) .|. (l `shift` (i - 64) ), (l `shiftL` i)) | 145 | shiftL128 (h, l) i =
( (h `shiftL` i) .|. (l `shift` (i - 64) ), (l `shiftL` i)) | 88 | false | true | 0 | 11 | 35 | 92 | 53 | 39 | null | null |
GaloisInc/saw-script | saw-core/src/Verifier/SAW/Prim.hs | bsd-3-clause | bvEq, bvult, bvule, bvugt, bvuge, bvsgt, bvsge, bvslt, bvsle
:: Int -> BitVector -> BitVector -> Bool
bvEq _ x y = unsigned x == unsigned y | 144 | bvEq, bvult, bvule, bvugt, bvuge, bvsgt, bvsge, bvslt, bvsle
:: Int -> BitVector -> BitVector -> Bool
bvEq _ x y = unsigned x == unsigned y | 144 | bvEq _ x y = unsigned x == unsigned y | 38 | false | true | 3 | 7 | 31 | 58 | 34 | 24 | null | null |
sitewisely/zellige | test/Data/Geometry/ClipSpec.hs | apache-2.0 | linesTst :: Sequence.Seq VectorTile.LineString
linesTst = Sequence.fromList
[ VectorTile.LineString (SpecHelper.tupleToPts [(11, 11), (59, 59)])
, VectorTile.LineString (SpecHelper.tupleToPts [(0, 0), (0, 100)])
, VectorTile.LineString (SpecHelper.tupleToPts [(5, 5), (45, 50), (90, 140)])
, VectorTile.LineStrin... | 504 | linesTst :: Sequence.Seq VectorTile.LineString
linesTst = Sequence.fromList
[ VectorTile.LineString (SpecHelper.tupleToPts [(11, 11), (59, 59)])
, VectorTile.LineString (SpecHelper.tupleToPts [(0, 0), (0, 100)])
, VectorTile.LineString (SpecHelper.tupleToPts [(5, 5), (45, 50), (90, 140)])
, VectorTile.LineStrin... | 504 | linesTst = Sequence.fromList
[ VectorTile.LineString (SpecHelper.tupleToPts [(11, 11), (59, 59)])
, VectorTile.LineString (SpecHelper.tupleToPts [(0, 0), (0, 100)])
, VectorTile.LineString (SpecHelper.tupleToPts [(5, 5), (45, 50), (90, 140)])
, VectorTile.LineString (SpecHelper.tupleToPts [(0, 0), (10, 10)])
... | 457 | false | true | 0 | 10 | 62 | 236 | 137 | 99 | null | null |
solidsnack/shuttercat | shuttercat.hs | bsd-3-clause | records :: (ByteString -> (ByteString, ByteString))
-> Bool -> Int -> Maybe ByteString -> Maybe ByteString -> Handle
-> IO ()
records split timed millis above below h = do
(segmented, batched) <- atomically ctx
_ <- async $ reader segmented
_ <- async $ handoff segmented batched
c <- async $ wr... | 635 | records :: (ByteString -> (ByteString, ByteString))
-> Bool -> Int -> Maybe ByteString -> Maybe ByteString -> Handle
-> IO ()
records split timed millis above below h = do
(segmented, batched) <- atomically ctx
_ <- async $ reader segmented
_ <- async $ handoff segmented batched
c <- async $ wr... | 635 | records split timed millis above below h = do
(segmented, batched) <- atomically ctx
_ <- async $ reader segmented
_ <- async $ handoff segmented batched
c <- async $ writer batched
wait c
exitSuccess
where ctx = (,) <$> newTChan <*> newTChan
handoff = transfer millis tick performGC
... | 493 | false | true | 6 | 12 | 187 | 232 | 110 | 122 | null | null |
kyagrd/mininax | src/Syntax.hs | bsd-2-clause | isTy (Var _) = True | 21 | isTy (Var _) = True | 21 | isTy (Var _) = True | 21 | false | false | 0 | 7 | 6 | 15 | 7 | 8 | null | null |
holmisen/xml-extractors | src/Text/XML/Light/Extractors/Internal.hs | bsd-3-clause | throwFatal = lift . R.throwFatal | 32 | throwFatal = lift . R.throwFatal | 32 | throwFatal = lift . R.throwFatal | 32 | false | false | 0 | 6 | 4 | 12 | 6 | 6 | null | null |
ben-schulz/Idris-dev | src/Idris/IdeMode.hs | bsd-3-clause | constTy (B64 _) = "Bits64" | 26 | constTy (B64 _) = "Bits64" | 26 | constTy (B64 _) = "Bits64" | 26 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
ecaustin/haskhol-core | src/HaskHOL/Core/Basics.hs | bsd-2-clause | mkArgs s avoid tys = mkRec 0 s avoid tys
where mkRec :: Int -> Text -> [HOLTerm] -> [HOLType] -> [HOLTerm]
mkRec _ _ _ [] = []
mkRec n x avs (y:ys) =
let v' = variant avs $ mkVar (x `append` pack (show n)) y
vs = mkRec (n + 1) x (v':avs) ys in
(v':vs)
{-|
Return... | 423 | mkArgs s avoid tys = mkRec 0 s avoid tys
where mkRec :: Int -> Text -> [HOLTerm] -> [HOLType] -> [HOLTerm]
mkRec _ _ _ [] = []
mkRec n x avs (y:ys) =
let v' = variant avs $ mkVar (x `append` pack (show n)) y
vs = mkRec (n + 1) x (v':avs) ys in
(v':vs)
{-|
Return... | 423 | mkArgs s avoid tys = mkRec 0 s avoid tys
where mkRec :: Int -> Text -> [HOLTerm] -> [HOLType] -> [HOLTerm]
mkRec _ _ _ [] = []
mkRec n x avs (y:ys) =
let v' = variant avs $ mkVar (x `append` pack (show n)) y
vs = mkRec (n + 1) x (v':avs) ys in
(v':vs)
{-|
Return... | 423 | false | false | 6 | 16 | 139 | 172 | 88 | 84 | null | null |
mzini/TcT | source/Tct/Method/Mpo.hs | gpl-3.0 | orderingConstraints :: (S.Solver s l, Eq l, Show l, Ord l) => Bool -> Bool -> Trs -> Trs -> MemoFormula MpoArg s l
orderingConstraints allowAF useProd strict weak =
strict `orientStrictBy` mpoSt && weak `orientWeakBy` mpoEq
where orientBy ob trs ord = bigAnd [atom (ob r) --> lhs r `ord` rhs r | r <- rules tr... | 928 | orderingConstraints :: (S.Solver s l, Eq l, Show l, Ord l) => Bool -> Bool -> Trs -> Trs -> MemoFormula MpoArg s l
orderingConstraints allowAF useProd strict weak =
strict `orientStrictBy` mpoSt && weak `orientWeakBy` mpoEq
where orientBy ob trs ord = bigAnd [atom (ob r) --> lhs r `ord` rhs r | r <- rules tr... | 928 | orderingConstraints allowAF useProd strict weak =
strict `orientStrictBy` mpoSt && weak `orientWeakBy` mpoEq
where orientBy ob trs ord = bigAnd [atom (ob r) --> lhs r `ord` rhs r | r <- rules trs]
orientStrictBy = orientBy strictlyOriented
orientWeakBy = orientBy weaklyOriented
... | 813 | false | true | 0 | 11 | 350 | 297 | 150 | 147 | null | null |
phischu/fragnix | builtins/base/GHC.Event.PSQ.hs | bsd-3-clause | -- | /O(n)/ Convert to a list of key/priority/value tuples.
toList :: PSQ a -> [Elem a]
toList = toAscList | 106 | toList :: PSQ a -> [Elem a]
toList = toAscList | 46 | toList = toAscList | 18 | true | true | 0 | 7 | 19 | 25 | 13 | 12 | null | null |
ambiata/delorean | src/Delorean/Local/Time.hs | bsd-3-clause | secondOfMinuteFromInt :: Int -> Maybe SecondOfMinute
secondOfMinuteFromInt n =
valueOrEmpty (n >= 0 && n < 60) $ SecondOfMinute n | 131 | secondOfMinuteFromInt :: Int -> Maybe SecondOfMinute
secondOfMinuteFromInt n =
valueOrEmpty (n >= 0 && n < 60) $ SecondOfMinute n | 131 | secondOfMinuteFromInt n =
valueOrEmpty (n >= 0 && n < 60) $ SecondOfMinute n | 78 | false | true | 0 | 9 | 21 | 50 | 23 | 27 | null | null |
Copilot-Language/sbv-for-copilot | Data/SBV/BitVectors/Symbolic.hs | bsd-3-clause | -- | Extract the 'Kind'.
svKind :: SVal -> Kind
svKind (SVal k _) = k | 69 | svKind :: SVal -> Kind
svKind (SVal k _) = k | 44 | svKind (SVal k _) = k | 21 | true | true | 0 | 9 | 15 | 33 | 15 | 18 | null | null |
BartAdv/Idris-dev | src/Idris/DSL.hs | bsd-3-clause | expandSugar dsl (PAlternative a as) = PAlternative a (map (expandSugar dsl) as) | 79 | expandSugar dsl (PAlternative a as) = PAlternative a (map (expandSugar dsl) as) | 79 | expandSugar dsl (PAlternative a as) = PAlternative a (map (expandSugar dsl) as) | 79 | false | false | 0 | 9 | 11 | 38 | 18 | 20 | null | null |
bitemyapp/ghc | compiler/main/HscTypes.hs | bsd-3-clause | mkHsSOName :: Platform -> FilePath -> FilePath
mkHsSOName platform root = ("lib" ++ root) <.> soExt platform | 108 | mkHsSOName :: Platform -> FilePath -> FilePath
mkHsSOName platform root = ("lib" ++ root) <.> soExt platform | 108 | mkHsSOName platform root = ("lib" ++ root) <.> soExt platform | 61 | false | true | 0 | 8 | 16 | 43 | 20 | 23 | null | null |
rudymatela/llcheck | src/Test/LeanCheck/Utils/Types.hs | bsd-3-clause | word2 :: Int -> Word2; word2 = Word2 . narrowU 2 | 49 | word2 :: Int -> Word2
word2 = Word2 . narrowU 2 | 47 | word2 = Word2 . narrowU 2 | 25 | false | true | 0 | 6 | 11 | 26 | 13 | 13 | null | null |
TomMD/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Primitive types and values
gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 80 | gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 50 | gHC_TYPES = mkPrimModule (fsLit "GHC.Types") | 50 | true | false | 0 | 7 | 15 | 16 | 8 | 8 | null | null |
keithodulaigh/Hets | CSL/ReduceProve.hs | gpl-2.0 | -- | the prover
reduceProver :: Prover Sign CMD Morphism () [EXPRESSION]
reduceProver = mkProverTemplateWithLemmaExport reduceS () reduceProve | 142 | reduceProver :: Prover Sign CMD Morphism () [EXPRESSION]
reduceProver = mkProverTemplateWithLemmaExport reduceS () reduceProve | 126 | reduceProver = mkProverTemplateWithLemmaExport reduceS () reduceProve | 69 | true | true | 0 | 6 | 17 | 37 | 19 | 18 | null | null |
thsutton/aeson-diff | lib/Data/Aeson/Patch.hs | bsd-2-clause | isRep _ = False | 15 | isRep _ = False | 15 | isRep _ = False | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Spec/CoreToLogic.hs | bsd-3-clause | coreToPred :: C.CoreExpr -> LogicM Pred
coreToPred (C.Let b p) = subst1 <$> coreToPred p <*> makesub b | 104 | coreToPred :: C.CoreExpr -> LogicM Pred
coreToPred (C.Let b p) = subst1 <$> coreToPred p <*> makesub b | 104 | coreToPred (C.Let b p) = subst1 <$> coreToPred p <*> makesub b | 64 | false | true | 0 | 7 | 19 | 51 | 23 | 28 | null | null |
TransformingMusicology/libaudioDB-haskell | src/Sound/Audio/Features/ReadCSV.hs | gpl-3.0 | readCSVFeaturesOnly key featuresFile = readFeaturesFile key featuresFile parseCSVFeaturesWithoutTimesFile Nothing | 131 | readCSVFeaturesOnly key featuresFile = readFeaturesFile key featuresFile parseCSVFeaturesWithoutTimesFile Nothing | 131 | readCSVFeaturesOnly key featuresFile = readFeaturesFile key featuresFile parseCSVFeaturesWithoutTimesFile Nothing | 131 | false | false | 0 | 5 | 26 | 20 | 9 | 11 | null | null |
Peaker/git-pushq | Git/CLI.hs | gpl-2.0 | onFail :: IO a -> IO a -> IO a
act `onFail` handler = act `catch` \GitCommandFailed {} -> handler | 97 | onFail :: IO a -> IO a -> IO a
act `onFail` handler = act `catch` \GitCommandFailed {} -> handler | 97 | act `onFail` handler = act `catch` \GitCommandFailed {} -> handler | 66 | false | true | 1 | 8 | 19 | 52 | 25 | 27 | null | null |
bgamari/pandoc | src/Text/Pandoc/Writers/ConTeXt.hs | gpl-2.0 | inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils | 54 | inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils | 54 | inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils | 54 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
kosmoskatten/ghost-lang | ghost-shell/src/Shell.hs | mit | nodeListGlobalCounter :: MonadIO m => IORef State
-> m (Either String PatternCounter)
nodeListGlobalCounter state = do
(mgr, baseUrl) <- nodeParams <$> liftIO (readIORef state)
liftIO $ listGlobalCounter mgr baseUrl | 242 | nodeListGlobalCounter :: MonadIO m => IORef State
-> m (Either String PatternCounter)
nodeListGlobalCounter state = do
(mgr, baseUrl) <- nodeParams <$> liftIO (readIORef state)
liftIO $ listGlobalCounter mgr baseUrl | 242 | nodeListGlobalCounter state = do
(mgr, baseUrl) <- nodeParams <$> liftIO (readIORef state)
liftIO $ listGlobalCounter mgr baseUrl | 133 | false | true | 0 | 11 | 55 | 77 | 36 | 41 | null | null |
davidledwards/rpn-haskell | src/Token.hs | apache-2.0 | lexeme CaretToken = "^" | 23 | lexeme CaretToken = "^" | 23 | lexeme CaretToken = "^" | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
np/lens | src/Control/Lens/Fold.hs | bsd-3-clause | -- | Fold over the elements of a structure, associating to the left, but strictly.
--
-- @'Data.Foldable.foldl'' ≡ 'foldlOf'' 'folded'@
--
-- @
-- 'foldlOf'' :: 'Getter' s a -> (r -> a -> r) -> r -> s -> r
-- 'foldlOf'' :: 'Fold' s a -> (r -> a -> r) -> r -> s -> r
-- 'foldlOf'' :: 'Simple' 'Contr... | 704 | foldlOf' :: Getting (Endo (r -> r)) s t a b -> (r -> a -> r) -> r -> s -> r
foldlOf' l f z0 xs = foldrOf l f' id xs z0
where f' x k z = k $! f z x
| 149 | foldlOf' l f z0 xs = foldrOf l f' id xs z0
where f' x k z = k $! f z x
| 73 | true | true | 0 | 10 | 200 | 116 | 63 | 53 | null | null |
tangboyun/bio-web-api | Bio/Web/MicroTV4/Parser.hs | bsd-3-clause | parseRI :: Parser MiRNA_impl
parseRI = do
string "Name:" *> skipSpace
mi' <- takeWhile1 (not . isSpace) <* skipSpace <* char '\160' <* skipSpace <?> "ERROR: parsing miRNA id."
string "Alternative description:" *> skipSpace
miAcc <- takeWhile1 (not . isSpace) <* skipSpace <?> "ERROR: parsing miRNA accession."
... | 867 | parseRI :: Parser MiRNA_impl
parseRI = do
string "Name:" *> skipSpace
mi' <- takeWhile1 (not . isSpace) <* skipSpace <* char '\160' <* skipSpace <?> "ERROR: parsing miRNA id."
string "Alternative description:" *> skipSpace
miAcc <- takeWhile1 (not . isSpace) <* skipSpace <?> "ERROR: parsing miRNA accession."
... | 867 | parseRI = do
string "Name:" *> skipSpace
mi' <- takeWhile1 (not . isSpace) <* skipSpace <* char '\160' <* skipSpace <?> "ERROR: parsing miRNA id."
string "Alternative description:" *> skipSpace
miAcc <- takeWhile1 (not . isSpace) <* skipSpace <?> "ERROR: parsing miRNA accession."
string "Related names:" *> ... | 838 | false | true | 0 | 14 | 198 | 257 | 120 | 137 | null | null |
brendanhay/numbersd | src/Numbers/Types.hs | mpl-2.0 | quantile :: Key -> V.Vector Double -> Int -> [Point]
quantile k xs q =
[ P ("timers" <> k <> a "mean_") $ mean ys
, P ("timers" <> k <> a "upper_") $ V.last ys
, P ("timers" <> k <> a "sum_") $ V.sum ys
]
where
a = Key . (`BS.append` BS.pack (show q))
n = round $ fromIntegral q / 100 * (f... | 377 | quantile :: Key -> V.Vector Double -> Int -> [Point]
quantile k xs q =
[ P ("timers" <> k <> a "mean_") $ mean ys
, P ("timers" <> k <> a "upper_") $ V.last ys
, P ("timers" <> k <> a "sum_") $ V.sum ys
]
where
a = Key . (`BS.append` BS.pack (show q))
n = round $ fromIntegral q / 100 * (f... | 377 | quantile k xs q =
[ P ("timers" <> k <> a "mean_") $ mean ys
, P ("timers" <> k <> a "upper_") $ V.last ys
, P ("timers" <> k <> a "sum_") $ V.sum ys
]
where
a = Key . (`BS.append` BS.pack (show q))
n = round $ fromIntegral q / 100 * (fromIntegral $ V.length xs :: Double)
ys = V.take ... | 324 | false | true | 0 | 10 | 112 | 201 | 101 | 100 | null | null |
rgrinberg/zeromq3-conduit | src/Data/Conduit/ZMQ3.hs | lgpl-2.1 | -- | Turn a 'ZMQ.Socket' into a 'Sink', using 'ZMQ.send'
zmqSink :: (MonadIO m, ZMQ.Sender s) => ZMQ.Socket s
-> [ZMQ.Flag]
-> GSink BS.ByteString m ()
zmqSink sock flags = zmqSinkGeneric $ ZMQ.send sock flags | 283 | zmqSink :: (MonadIO m, ZMQ.Sender s) => ZMQ.Socket s
-> [ZMQ.Flag]
-> GSink BS.ByteString m ()
zmqSink sock flags = zmqSinkGeneric $ ZMQ.send sock flags | 226 | zmqSink sock flags = zmqSinkGeneric $ ZMQ.send sock flags | 57 | true | true | 0 | 9 | 108 | 74 | 37 | 37 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ShowXmlLazy.hs | gpl-3.0 | systemliteral :: SystemLiteral -> [Char]
systemliteral (SystemLiteral s)
| '"' `elem` s = text "'" <> text s <> text "'"
| otherwise = text "\"" <> text s <> text "\"" | 202 | systemliteral :: SystemLiteral -> [Char]
systemliteral (SystemLiteral s)
| '"' `elem` s = text "'" <> text s <> text "'"
| otherwise = text "\"" <> text s <> text "\"" | 202 | systemliteral (SystemLiteral s)
| '"' `elem` s = text "'" <> text s <> text "'"
| otherwise = text "\"" <> text s <> text "\"" | 161 | false | true | 0 | 8 | 66 | 82 | 38 | 44 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/elem_5.hs | mit | any :: (a -> MyBool) -> (List a) -> MyBool;
any p = pt or (map p) | 71 | any :: (a -> MyBool) -> (List a) -> MyBool
any p = pt or (map p) | 70 | any p = pt or (map p) | 21 | false | true | 1 | 8 | 22 | 53 | 25 | 28 | null | null |
m4dc4p/haskelldb | test/DBTest.hs | bsd-3-clause | withDB :: (Database -> IO a) -> Conn -> IO a
withDB f db = dbConn db f | 70 | withDB :: (Database -> IO a) -> Conn -> IO a
withDB f db = dbConn db f | 70 | withDB f db = dbConn db f | 25 | false | true | 0 | 8 | 17 | 42 | 20 | 22 | null | null |
unvirtual/Ziped | src/Editor.hs | bsd-2-clause | actionMap MoveBegin = Just . moveEnd Bwd | 45 | actionMap MoveBegin = Just . moveEnd Bwd | 45 | actionMap MoveBegin = Just . moveEnd Bwd | 45 | false | false | 0 | 6 | 11 | 17 | 7 | 10 | null | null |
hpacheco/HAAP | examples/plab/oracle/BotNuno.hs | mit | dir :: Ponto -> (Peca,Posicao,Orientacao) -> Double
dir p0 (Peca t _,p,_) = snd $ componentsToArrow (p'.-.p0)
where p' = centroPeca t p | 137 | dir :: Ponto -> (Peca,Posicao,Orientacao) -> Double
dir p0 (Peca t _,p,_) = snd $ componentsToArrow (p'.-.p0)
where p' = centroPeca t p | 137 | dir p0 (Peca t _,p,_) = snd $ componentsToArrow (p'.-.p0)
where p' = centroPeca t p | 85 | false | true | 0 | 8 | 24 | 79 | 40 | 39 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsPar/src/SpacialGameEnv/SGModelEnv.hs | gpl-3.0 | payoff Defector Cooperator = bParam | 35 | payoff Defector Cooperator = bParam | 35 | payoff Defector Cooperator = bParam | 35 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
minad/colorful-monoids | src/Data/Monoid/Colorful/Color.hs | mit | color16ToANSI 5 = DullMagenta | 30 | color16ToANSI 5 = DullMagenta | 30 | color16ToANSI 5 = DullMagenta | 30 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
recursion-ninja/megaparsec | tests/Text/Megaparsec/ByteSpec.hs | bsd-2-clause | prs'
:: Parser a -- ^ Parser to run
-> ByteString -- ^ Input for the parser
-> (State ByteString, Either (ParseError Word8 Void) a) -- ^ Result of parsing
prs' p s = runParser' p (initialState s) | 217 | prs'
:: Parser a -- ^ Parser to run
-> ByteString -- ^ Input for the parser
-> (State ByteString, Either (ParseError Word8 Void) a)
prs' p s = runParser' p (initialState s) | 194 | prs' p s = runParser' p (initialState s) | 40 | true | true | 0 | 12 | 59 | 68 | 33 | 35 | null | null |
koba-e964/hayashii-mcc | Graph.hs | bsd-3-clause | neighbors :: (Eq n, Ord n) => Graph n -> n -> [n]
neighbors i v = Set.toList $ i Map.! v | 88 | neighbors :: (Eq n, Ord n) => Graph n -> n -> [n]
neighbors i v = Set.toList $ i Map.! v | 88 | neighbors i v = Set.toList $ i Map.! v | 38 | false | true | 0 | 8 | 21 | 57 | 29 | 28 | null | null |
uuhan/Idris-dev | src/Idris/IdeMode.hs | bsd-3-clause | decodeTerm :: String -> ([(Name, Bool)], Term)
decodeTerm = Binary.decode . Lazy.fromStrict . Base64.decodeLenient . UTF8.fromString | 132 | decodeTerm :: String -> ([(Name, Bool)], Term)
decodeTerm = Binary.decode . Lazy.fromStrict . Base64.decodeLenient . UTF8.fromString | 132 | decodeTerm = Binary.decode . Lazy.fromStrict . Base64.decodeLenient . UTF8.fromString | 85 | false | true | 0 | 8 | 15 | 50 | 28 | 22 | null | null |
kmate/HaRe | old/testing/unfoldDef/PartialIn1AST.hs | bsd-3-clause | addthree :: Int -> Int -> Int -> Int
addthree a b c = (a + b) + c | 67 | addthree :: Int -> Int -> Int -> Int
addthree a b c = (a + b) + c | 65 | addthree a b c = (a + b) + c | 28 | false | true | 0 | 9 | 20 | 47 | 22 | 25 | null | null |
yi-editor/yi | yi-keymap-emacs/src/Yi/Config/Default/Emacs.hs | gpl-2.0 | configureEmacs :: ConfigM ()
configureEmacs = do
configUIA %= (configScrollStyleA .~ Just SnapToCenter)
defaultKmA .= keymap
startActionsA %= (makeAction openScratchBuffer :)
configInputPreprocessA .= escToMeta
configKillringAccumulateA .= True
-- | Input preprocessor: Transform Esc;Char into Meta-Char
-- Us... | 344 | configureEmacs :: ConfigM ()
configureEmacs = do
configUIA %= (configScrollStyleA .~ Just SnapToCenter)
defaultKmA .= keymap
startActionsA %= (makeAction openScratchBuffer :)
configInputPreprocessA .= escToMeta
configKillringAccumulateA .= True
-- | Input preprocessor: Transform Esc;Char into Meta-Char
-- Us... | 344 | configureEmacs = do
configUIA %= (configScrollStyleA .~ Just SnapToCenter)
defaultKmA .= keymap
startActionsA %= (makeAction openScratchBuffer :)
configInputPreprocessA .= escToMeta
configKillringAccumulateA .= True
-- | Input preprocessor: Transform Esc;Char into Meta-Char
-- Useful for emacs lovers ;) | 315 | false | true | 0 | 10 | 51 | 76 | 35 | 41 | null | null |
text-utf8/text | Data/Text/Show.hs | bsd-2-clause | -- | /O(n)/ Convert a literal string into a 'Text'. Subject to
-- fusion.
--
-- This is exposed solely for people writing GHC rewrite rules.
--
-- @since 1.2.1.1
unpackCString# :: Addr# -> Text
unpackCString# addr# = unstream (S.streamCString# addr#) | 251 | unpackCString# :: Addr# -> Text
unpackCString# addr# = unstream (S.streamCString# addr#) | 88 | unpackCString# addr# = unstream (S.streamCString# addr#) | 56 | true | true | 0 | 8 | 41 | 40 | 21 | 19 | null | null |
Fuuzetsu/h-booru | src/HBooru/Parsers/FieldParsers.hs | gpl-3.0 | -- | Parser arrow for a "is_shown_in_index" XML attribute.
is_shown_in_indexA ∷ ParseArrow cat ⇒ Field cat "is_shown_in_index"
is_shown_in_indexA =
readAttrWith "is_shown_in_index" is_shown_in_index parseBool | 210 | is_shown_in_indexA ∷ ParseArrow cat ⇒ Field cat "is_shown_in_index"
is_shown_in_indexA =
readAttrWith "is_shown_in_index" is_shown_in_index parseBool | 151 | is_shown_in_indexA =
readAttrWith "is_shown_in_index" is_shown_in_index parseBool | 83 | true | true | 0 | 7 | 24 | 37 | 16 | 21 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_177 (95#) = happyGoto action_219 | 39 | action_177 (95#) = happyGoto action_219 | 39 | action_177 (95#) = happyGoto action_219 | 39 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
alexander-at-github/eta | compiler/ETA/DeSugar/DsBinds.hs | bsd-3-clause | dsHsWrapper (WpTyApp ty) e = return $ App e (Type ty) | 58 | dsHsWrapper (WpTyApp ty) e = return $ App e (Type ty) | 58 | dsHsWrapper (WpTyApp ty) e = return $ App e (Type ty) | 58 | false | false | 0 | 8 | 15 | 32 | 15 | 17 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | doSetByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr
-> FCode ()
doSetByteArrayOp ba off len c
= do dflags <- getDynFlags
p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba (arrWordsHdrSize dflags)) off
emitMemsetCall p c len (mkIntExpr dflags 1)
-- -----------... | 906 | doSetByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr
-> FCode ()
doSetByteArrayOp ba off len c
= do dflags <- getDynFlags
p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba (arrWordsHdrSize dflags)) off
emitMemsetCall p c len (mkIntExpr dflags 1)
-- -----------... | 906 | doSetByteArrayOp ba off len c
= do dflags <- getDynFlags
p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba (arrWordsHdrSize dflags)) off
emitMemsetCall p c len (mkIntExpr dflags 1)
-- ----------------------------------------------------------------------------
-- Copying pointer array... | 816 | false | true | 0 | 13 | 174 | 112 | 58 | 54 | null | null |
GU-CLASP/FraCoq | Logic.hs | gpl-3.0 | eqNat' :: Nat -> Nat -> Bool
eqNat' = eqNat 0 [] | 48 | eqNat' :: Nat -> Nat -> Bool
eqNat' = eqNat 0 [] | 48 | eqNat' = eqNat 0 [] | 19 | false | true | 0 | 6 | 11 | 26 | 13 | 13 | null | null |
LeifW/rdf4h | testsuite/tests/W3C/Manifest.hs | bsd-3-clause | rdftTestTurtleEval = unode "http://www.w3.org/ns/rdftest#TestTurtleEval" | 72 | rdftTestTurtleEval = unode "http://www.w3.org/ns/rdftest#TestTurtleEval" | 72 | rdftTestTurtleEval = unode "http://www.w3.org/ns/rdftest#TestTurtleEval" | 72 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
themoritz/cabal | cabal-install/Distribution/Solver/Modular/Flag.hs | bsd-3-clause | showSBool :: Stanza -> Bool -> String
showSBool s True = "*" ++ showStanza s | 77 | showSBool :: Stanza -> Bool -> String
showSBool s True = "*" ++ showStanza s | 77 | showSBool s True = "*" ++ showStanza s | 39 | false | true | 0 | 6 | 15 | 31 | 15 | 16 | null | null |
dfordivam/freehmind | freehmind.hs | gpl-2.0 | renderChildren :: [FhmNode] -> Diagram Cairo R2
renderChildren [] = circle 1 | 76 | renderChildren :: [FhmNode] -> Diagram Cairo R2
renderChildren [] = circle 1 | 76 | renderChildren [] = circle 1 | 28 | false | true | 0 | 8 | 11 | 36 | 16 | 20 | null | null |
databrary/databrary | src/Controller/Form.hs | agpl-3.0 | runFormWith :: FormData f -> Maybe (RequestContext -> FormHtml f) -> DeformHandler f a -> Handler a
runFormWith fd mf fa = do
req <- ask
let fv hv = runFormView (hv req) fd
handleFormErrors (fv <$> mf) =<< runDeform fa fd | 227 | runFormWith :: FormData f -> Maybe (RequestContext -> FormHtml f) -> DeformHandler f a -> Handler a
runFormWith fd mf fa = do
req <- ask
let fv hv = runFormView (hv req) fd
handleFormErrors (fv <$> mf) =<< runDeform fa fd | 227 | runFormWith fd mf fa = do
req <- ask
let fv hv = runFormView (hv req) fd
handleFormErrors (fv <$> mf) =<< runDeform fa fd | 127 | false | true | 0 | 13 | 47 | 111 | 49 | 62 | null | null |
wskplho/stack | src/main/Main.hs | bsd-3-clause | upgradeCmd :: Bool -> GlobalOpts -> IO ()
upgradeCmd fromGit go = withConfig go $
upgrade fromGit (globalResolver go) | 121 | upgradeCmd :: Bool -> GlobalOpts -> IO ()
upgradeCmd fromGit go = withConfig go $
upgrade fromGit (globalResolver go) | 121 | upgradeCmd fromGit go = withConfig go $
upgrade fromGit (globalResolver go) | 79 | false | true | 0 | 8 | 22 | 52 | 23 | 29 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/DeviceProximityEvent.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent.max Mozilla DeviceProximityEvent.max documentation>
getMax :: (MonadDOM m) => DeviceProximityEvent -> m Double
getMax self = liftDOM ((self ^. js "max") >>= valToNumber) | 246 | getMax :: (MonadDOM m) => DeviceProximityEvent -> m Double
getMax self = liftDOM ((self ^. js "max") >>= valToNumber) | 117 | getMax self = liftDOM ((self ^. js "max") >>= valToNumber) | 58 | true | true | 0 | 10 | 25 | 56 | 27 | 29 | null | null |
jparyani/capnproto-boostpython | compiler/src/Parser.hs | bsd-2-clause | atSign = tokenParser (matchSimpleToken AtSign) <?> "\"@\"" | 58 | atSign = tokenParser (matchSimpleToken AtSign) <?> "\"@\"" | 58 | atSign = tokenParser (matchSimpleToken AtSign) <?> "\"@\"" | 58 | false | false | 0 | 8 | 6 | 19 | 9 | 10 | null | null |
alanz/annotations-play | src/ch6boundstoks.hs | unlicense | pp = parseTokens "1 + 2" | 24 | pp = parseTokens "1 + 2" | 24 | pp = parseTokens "1 + 2" | 24 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
lukexi/ghc | compiler/main/DynFlags.hs | bsd-3-clause | wayOptP _ WayNDP = [] | 26 | wayOptP _ WayNDP = [] | 26 | wayOptP _ WayNDP = [] | 26 | false | false | 0 | 5 | 9 | 13 | 6 | 7 | null | null |
castaway/pandoc | src/Text/Pandoc/Writers/ConTeXt.hs | gpl-2.0 | inlineToConTeXt (RawInline _ _) = return empty | 46 | inlineToConTeXt (RawInline _ _) = return empty | 46 | inlineToConTeXt (RawInline _ _) = return empty | 46 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
forsyde/forsyde-shallow | src/ForSyDe/Shallow/MoC/SADF.hs | bsd-3-clause | sufficient_tokens n (_:-xs)
= if n < 0 then
error "sufficient_tokens: n must not be negative"
else
sufficient_tokens (n-1) xs | 139 | sufficient_tokens n (_:-xs)
= if n < 0 then
error "sufficient_tokens: n must not be negative"
else
sufficient_tokens (n-1) xs | 139 | sufficient_tokens n (_:-xs)
= if n < 0 then
error "sufficient_tokens: n must not be negative"
else
sufficient_tokens (n-1) xs | 139 | false | false | 0 | 6 | 33 | 48 | 23 | 25 | null | null |
juretta/course | src/L03/Parser.hs | bsd-3-clause | -- Exercise 10.5
-- Return a parser that produces one or more space characters
-- (consuming until the first non-space) but fails if
-- * The input is empty.
-- * The first produced character is not a space.
-- ~~~ Use the many1 and space functions. ~~~
spaces1 :: Parser String
spaces1 = error "todo" | 305 | spaces1 :: Parser String
spaces1 = error "todo" | 47 | spaces1 = error "todo" | 22 | true | true | 0 | 6 | 59 | 29 | 15 | 14 | null | null |
acowley/ghc | compiler/types/Type.hs | bsd-3-clause | getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
getClassPredTys_maybe ty = case splitTyConApp_maybe ty of
Just (tc, tys) | Just clas <- tyConClass_maybe tc -> Just (clas, tys)
_ -> Nothing | 215 | getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
getClassPredTys_maybe ty = case splitTyConApp_maybe ty of
Just (tc, tys) | Just clas <- tyConClass_maybe tc -> Just (clas, tys)
_ -> Nothing | 215 | getClassPredTys_maybe ty = case splitTyConApp_maybe ty of
Just (tc, tys) | Just clas <- tyConClass_maybe tc -> Just (clas, tys)
_ -> Nothing | 156 | false | true | 0 | 12 | 45 | 83 | 41 | 42 | null | null |
input-output-hk/cardano-sl | infra/src/Pos/Infra/Network/Types.hs | apache-2.0 | -- | Initialize the DNS library whenever it's used
--
-- This isn't great for performance but it means that we do not initialize it
-- when we need it; initializing it once only on demand is possible but requires
-- jumping through too many hoops.
initDnsOnUse :: (Resolver -> IO a) -> IO a
initDnsOnUse k = k $ \dom -> ... | 459 | initDnsOnUse :: (Resolver -> IO a) -> IO a
initDnsOnUse k = k $ \dom -> do
resolvSeed <- DNS.makeResolvSeed DNS.defaultResolvConf
DNS.withResolver resolvSeed $ \resolver ->
DNS.lookupA resolver dom | 211 | initDnsOnUse k = k $ \dom -> do
resolvSeed <- DNS.makeResolvSeed DNS.defaultResolvConf
DNS.withResolver resolvSeed $ \resolver ->
DNS.lookupA resolver dom | 168 | true | true | 0 | 12 | 88 | 83 | 42 | 41 | null | null |
nevrenato/HetsAlloy | OWL2/ManchesterParser.hs | gpl-2.0 | dataPropertyFrame :: CharParser st Frame
dataPropertyFrame = do
pkeyword dataPropertyC
duri <- uriP
as <- many dataFrameBit
return $ makeFrame (SimpleEntity $ Entity DataProperty duri) as | 203 | dataPropertyFrame :: CharParser st Frame
dataPropertyFrame = do
pkeyword dataPropertyC
duri <- uriP
as <- many dataFrameBit
return $ makeFrame (SimpleEntity $ Entity DataProperty duri) as | 203 | dataPropertyFrame = do
pkeyword dataPropertyC
duri <- uriP
as <- many dataFrameBit
return $ makeFrame (SimpleEntity $ Entity DataProperty duri) as | 162 | false | true | 1 | 12 | 41 | 67 | 28 | 39 | null | null |
input-output-hk/cardano-sl | chain/test/Test/Pos/Chain/Txp/Gen.hs | apache-2.0 | genTxInList :: Gen (NonEmpty TxIn)
genTxInList = Gen.nonEmpty (Range.linear 1 20) genTxIn | 89 | genTxInList :: Gen (NonEmpty TxIn)
genTxInList = Gen.nonEmpty (Range.linear 1 20) genTxIn | 89 | genTxInList = Gen.nonEmpty (Range.linear 1 20) genTxIn | 54 | false | true | 0 | 8 | 11 | 37 | 18 | 19 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QDialogButtonBox.hs | bsd-2-clause | eMacLayout :: ButtonLayout
eMacLayout
= ieButtonLayout $ 1 | 60 | eMacLayout :: ButtonLayout
eMacLayout
= ieButtonLayout $ 1 | 60 | eMacLayout
= ieButtonLayout $ 1 | 33 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
OS2World/DEV-UTIL-HUGS | oldlib/JoinList.hs | bsd-3-clause | ltail E = E | 11 | ltail E = E | 11 | ltail E = E | 11 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
GaloisInc/halvm-ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a
extendTypeMap m t v = alterTM t (const (Just v)) m | 103 | extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a
extendTypeMap m t v = alterTM t (const (Just v)) m | 103 | extendTypeMap m t v = alterTM t (const (Just v)) m | 50 | false | true | 0 | 9 | 21 | 55 | 26 | 29 | null | null |
osa1/MANTI | src/Parser.hs | bsd-3-clause | parens :: Parser a -> Parser a
parens p = do
spChar '('
ret <- p
spChar ')'
return ret | 102 | parens :: Parser a -> Parser a
parens p = do
spChar '('
ret <- p
spChar ')'
return ret | 102 | parens p = do
spChar '('
ret <- p
spChar ')'
return ret | 71 | false | true | 0 | 7 | 35 | 49 | 20 | 29 | null | null |
advancedtelematic/quickcheck-state-machine-model | src/Test/StateMachine/Markov.hs | bsd-3-clause | -- | Finish making a transition with an uniform probability distribution.
(/-) :: cmd_ -> state -> Either (cmd_, state) ((cmd_, prob), state)
cmd /- state = Left (cmd, state) | 174 | (/-) :: cmd_ -> state -> Either (cmd_, state) ((cmd_, prob), state)
cmd /- state = Left (cmd, state) | 100 | cmd /- state = Left (cmd, state) | 32 | true | true | 0 | 11 | 29 | 63 | 35 | 28 | null | null |
ksallberg/valuecalc | Text/HTML/ValueCalc/Scraping.hs | unlicense | dropEmpty (x:xs) = x : dropEmpty xs | 46 | dropEmpty (x:xs) = x : dropEmpty xs | 46 | dropEmpty (x:xs) = x : dropEmpty xs | 46 | false | false | 2 | 6 | 17 | 25 | 11 | 14 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Core/Types.hs | bsd-3-clause | defaultSize (RefType ta) = defaultSize ta | 41 | defaultSize (RefType ta) = defaultSize ta | 41 | defaultSize (RefType ta) = defaultSize ta | 41 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
yliu120/K3 | src/Language/K3/Analysis/SEffects/Inference.hs | apache-2.0 | {- FEnv helpers -}
fenv0 :: FEnv
fenv0 = Map.empty | 50 | fenv0 :: FEnv
fenv0 = Map.empty | 31 | fenv0 = Map.empty | 17 | true | true | 0 | 6 | 9 | 21 | 9 | 12 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_PIXEL_MAP_R_TO_R_SIZE :: GLenum
gl_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 | 68 | gl_PIXEL_MAP_R_TO_R_SIZE :: GLenum
gl_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 | 68 | gl_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 | 33 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
pascal-knodel/haskell-craft | _/links/E'8'21.hs | mit | showTournament :: Tournament -> String
showTournament tournament
= "Game:\n\n"
++ showTournament' tournament ++ "\n"
++ "Score, player 1: " ++ score_1 ++ "\n"
++ " \" \" 2: " ++ score_2 ++ "\n"
where
showTournament' :: Tournament -> String
showTournament' ( [] , [] ) = ""
showTourname... | 920 | showTournament :: Tournament -> String
showTournament tournament
= "Game:\n\n"
++ showTournament' tournament ++ "\n"
++ "Score, player 1: " ++ score_1 ++ "\n"
++ " \" \" 2: " ++ score_2 ++ "\n"
where
showTournament' :: Tournament -> String
showTournament' ( [] , [] ) = ""
showTourname... | 920 | showTournament tournament
= "Game:\n\n"
++ showTournament' tournament ++ "\n"
++ "Score, player 1: " ++ score_1 ++ "\n"
++ " \" \" 2: " ++ score_2 ++ "\n"
where
showTournament' :: Tournament -> String
showTournament' ( [] , [] ) = ""
showTournament' ( latestMove_1 : remainingMoves_1 ,... | 881 | false | true | 0 | 13 | 237 | 202 | 114 | 88 | null | null |
lkitching/PScheme | src/PScheme/Eval.hs | bsd-3-clause | applyFnM :: ([Value] -> EvalResult) -> [Value] -> Eval Value
applyFnM f exprs = do
vals <- traverse eval exprs
exceptT $ f vals | 131 | applyFnM :: ([Value] -> EvalResult) -> [Value] -> Eval Value
applyFnM f exprs = do
vals <- traverse eval exprs
exceptT $ f vals | 131 | applyFnM f exprs = do
vals <- traverse eval exprs
exceptT $ f vals | 70 | false | true | 0 | 8 | 27 | 62 | 30 | 32 | null | null |
simonmar/Haxl | tests/MockTAO.hs | bsd-3-clause | initGlobalState :: Bool -> IO (State TAOReq)
initGlobalState future = return TAOState { future=future } | 103 | initGlobalState :: Bool -> IO (State TAOReq)
initGlobalState future = return TAOState { future=future } | 103 | initGlobalState future = return TAOState { future=future } | 58 | false | true | 0 | 8 | 14 | 38 | 19 | 19 | null | null |
keithodulaigh/Hets | Common/XmlPickler.hs | gpl-2.0 | xpCData :: PU String Content
xpCData = PU
{ pickle = mkText
, unpickle = \ c -> case c of
Text d -> return $ cdData d
_ -> fail $ "expected text instead of:\n" ++ ppContent c
} | 194 | xpCData :: PU String Content
xpCData = PU
{ pickle = mkText
, unpickle = \ c -> case c of
Text d -> return $ cdData d
_ -> fail $ "expected text instead of:\n" ++ ppContent c
} | 194 | xpCData = PU
{ pickle = mkText
, unpickle = \ c -> case c of
Text d -> return $ cdData d
_ -> fail $ "expected text instead of:\n" ++ ppContent c
} | 165 | false | true | 0 | 13 | 57 | 81 | 39 | 42 | null | null |
grnet/snf-ganeti | src/Ganeti/HTools/Node.hs | bsd-2-clause | -- * Helper functions
-- | Add a value to a map.
addTag :: (Ord k) => Map.Map k Int -> k -> Map.Map k Int
addTag t s = Map.insertWith (+) s 1 t | 144 | addTag :: (Ord k) => Map.Map k Int -> k -> Map.Map k Int
addTag t s = Map.insertWith (+) s 1 t | 94 | addTag t s = Map.insertWith (+) s 1 t | 37 | true | true | 0 | 10 | 35 | 70 | 33 | 37 | null | null |
rueshyna/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Resource type for entity user link.
euluKind :: Lens' EntityUserLink Text
euluKind = lens _euluKind (\ s a -> s{_euluKind = a}) | 132 | euluKind :: Lens' EntityUserLink Text
euluKind = lens _euluKind (\ s a -> s{_euluKind = a}) | 91 | euluKind = lens _euluKind (\ s a -> s{_euluKind = a}) | 53 | true | true | 0 | 9 | 23 | 40 | 22 | 18 | null | null |
CulpaBS/wbBach | src/Futhark/Analysis/AlgSimplify.hs | bsd-3-clause | simplifyScal (SAbs e) = return $ SAbs e | 39 | simplifyScal (SAbs e) = return $ SAbs e | 39 | simplifyScal (SAbs e) = return $ SAbs e | 39 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
bravit/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | -- | Collect 'PClauses' with the same function name
collect :: [PDecl] -> [PDecl]
collect (c@(PClauses _ o _ _) : ds)
= clauses (cname c) [] (c : ds)
where clauses :: Maybe Name -> [PClause] -> [PDecl] -> [PDecl]
clauses j@(Just n) acc (PClauses fc _ _ [PClause fc' n' l ws r w] : ds)
| n == n' ... | 1,057 | collect :: [PDecl] -> [PDecl]
collect (c@(PClauses _ o _ _) : ds)
= clauses (cname c) [] (c : ds)
where clauses :: Maybe Name -> [PClause] -> [PDecl] -> [PDecl]
clauses j@(Just n) acc (PClauses fc _ _ [PClause fc' n' l ws r w] : ds)
| n == n' = clauses j (PClause fc' n' l ws r (collect w) : acc... | 1,005 | collect (c@(PClauses _ o _ _) : ds)
= clauses (cname c) [] (c : ds)
where clauses :: Maybe Name -> [PClause] -> [PDecl] -> [PDecl]
clauses j@(Just n) acc (PClauses fc _ _ [PClause fc' n' l ws r w] : ds)
| n == n' = clauses j (PClause fc' n' l ws r (collect w) : acc) ds
clauses j@(Just n... | 975 | true | true | 3 | 11 | 343 | 598 | 288 | 310 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/Constraints.hs | bsd-3-clause | plus2 :: Int -> Int
plus2 x = x + 22 | 36 | plus2 :: Int -> Int
plus2 x = x + 22 | 36 | plus2 x = x + 22 | 16 | false | true | 2 | 7 | 10 | 29 | 12 | 17 | null | null |
robashton/ghcmud | src/WorldDefinitionLoading.hs | bsd-3-clause | addRoomId :: FilePath -> Maybe RawRoom -> Either WorldLoadFailure RawRoom
addRoomId filepath = maybe fail addRoom
where addRoom room = Right room { rawRoomId = dropExtension $ takeBaseName filepath }
fail = Left $ RoomParseFailure filepath
--
-- IO
-- | 261 | addRoomId :: FilePath -> Maybe RawRoom -> Either WorldLoadFailure RawRoom
addRoomId filepath = maybe fail addRoom
where addRoom room = Right room { rawRoomId = dropExtension $ takeBaseName filepath }
fail = Left $ RoomParseFailure filepath
--
-- IO
-- | 261 | addRoomId filepath = maybe fail addRoom
where addRoom room = Right room { rawRoomId = dropExtension $ takeBaseName filepath }
fail = Left $ RoomParseFailure filepath
--
-- IO
-- | 187 | false | true | 1 | 10 | 49 | 79 | 39 | 40 | null | null |
spechub/Hets | CASL/Morphism.hs | gpl-2.0 | morphismUnionM :: (Morphism f e m -> Morphism f e m -> Result m)
-- ^ join morphism extensions
-> (e -> e -> Result e) -- ^ join signature extensions
-> Morphism f e m -> Morphism f e m -> Result (Morphism f e m)
-- consider identity mappings but filter them eventually
morphismUnionM uniteM addSigExt mor1 mor2 =
l... | 2,955 | morphismUnionM :: (Morphism f e m -> Morphism f e m -> Result m)
-- ^ join morphism extensions
-> (e -> e -> Result e) -- ^ join signature extensions
-> Morphism f e m -> Morphism f e m -> Result (Morphism f e m)
morphismUnionM uniteM addSigExt mor1 mor2 =
let smap1 = sort_map mor1
smap2 = sort_map mor2
... | 2,898 | morphismUnionM uniteM addSigExt mor1 mor2 =
let smap1 = sort_map mor1
smap2 = sort_map mor2
s1 = msource mor1
s2 = msource mor2
us1 = Set.difference (sortSet s1) $ Map.keysSet smap1
us2 = Set.difference (sortSet s2) $ Map.keysSet smap2
omap1 = op_map mor1
omap2 = op_map mor2
... | 2,682 | true | true | 0 | 25 | 1,044 | 1,230 | 642 | 588 | null | null |
urbanslug/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | swizzleRegisterRep :: Register -> Format -> Register
swizzleRegisterRep (Fixed _ reg code) format = Fixed format reg code | 121 | swizzleRegisterRep :: Register -> Format -> Register
swizzleRegisterRep (Fixed _ reg code) format = Fixed format reg code | 121 | swizzleRegisterRep (Fixed _ reg code) format = Fixed format reg code | 68 | false | true | 0 | 7 | 17 | 41 | 20 | 21 | null | null |
seschwar/mailkwds | Setup.hs | mit | main :: IO ()
main = defaultMainWithHooks simpleUserHooks
{ runTests = runTests'
, hookedPreProcessors = [("md", ppPandoc), ("text", ppPandoc)]
} | 168 | main :: IO ()
main = defaultMainWithHooks simpleUserHooks
{ runTests = runTests'
, hookedPreProcessors = [("md", ppPandoc), ("text", ppPandoc)]
} | 168 | main = defaultMainWithHooks simpleUserHooks
{ runTests = runTests'
, hookedPreProcessors = [("md", ppPandoc), ("text", ppPandoc)]
} | 154 | false | true | 0 | 9 | 42 | 60 | 32 | 28 | null | null |
d3zd3z/HaskellNet-old | Network/HaskellNet/SMTP.hs | bsd-3-clause | codeToResponse 503 = BadSequence | 32 | codeToResponse 503 = BadSequence | 32 | codeToResponse 503 = BadSequence | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
dan-t/hdevtools | src/Main.hs | mit | main :: IO ()
main = do
args <- loadHDevTools
let sock = getSocketFilename (socket args)
case args of
Admin {} -> doAdmin sock args
Check {} -> doCheck sock args
ModuleFile {} -> doModuleFile sock args
Info {} -> doInfo sock args
Type {} -> doType sock args
Fi... | 357 | main :: IO ()
main = do
args <- loadHDevTools
let sock = getSocketFilename (socket args)
case args of
Admin {} -> doAdmin sock args
Check {} -> doCheck sock args
ModuleFile {} -> doModuleFile sock args
Info {} -> doInfo sock args
Type {} -> doType sock args
Fi... | 357 | main = do
args <- loadHDevTools
let sock = getSocketFilename (socket args)
case args of
Admin {} -> doAdmin sock args
Check {} -> doCheck sock args
ModuleFile {} -> doModuleFile sock args
Info {} -> doInfo sock args
Type {} -> doType sock args
FindSymbol {} ->... | 343 | false | true | 0 | 12 | 114 | 138 | 64 | 74 | null | null |
databrary/databrary | src/Model/RecordSlot.hs | agpl-3.0 | moveRecordSlot :: (MonadAudit c m) => RecordSlot -> Segment -> m Bool
moveRecordSlot rs@RecordSlot{ recordSlot = s@Slot{ slotSegment = src } } dst = do
ident <- getAuditIdentity
either (const False) id
<$> case (Range.isEmpty (segmentRange src), Range.isEmpty (segmentRange dst)) of
(True, True) -> return $... | 664 | moveRecordSlot :: (MonadAudit c m) => RecordSlot -> Segment -> m Bool
moveRecordSlot rs@RecordSlot{ recordSlot = s@Slot{ slotSegment = src } } dst = do
ident <- getAuditIdentity
either (const False) id
<$> case (Range.isEmpty (segmentRange src), Range.isEmpty (segmentRange dst)) of
(True, True) -> return $... | 664 | moveRecordSlot rs@RecordSlot{ recordSlot = s@Slot{ slotSegment = src } } dst = do
ident <- getAuditIdentity
either (const False) id
<$> case (Range.isEmpty (segmentRange src), Range.isEmpty (segmentRange dst)) of
(True, True) -> return $ Right False
(False, True) -> Right <$> dbExecute1 $(deleteSlotRec... | 594 | false | true | 2 | 15 | 126 | 276 | 141 | 135 | null | null |
GregorySchwartz/fasta | src/Data/Fasta/Text/Parse.hs | gpl-3.0 | parsecCLIPFasta :: T.Text -> CloneMap
parsecCLIPFasta = Map.fromList
. map (\(!x, (!y, !z)) -> ((x, y), z))
. zip [0..]
. eToV
. parse fastaCLIPFile "error"
where
eToV (Right x) = x
eToV (Left x) = error ("Unable to parse fasta file\n" ++ show x... | 356 | parsecCLIPFasta :: T.Text -> CloneMap
parsecCLIPFasta = Map.fromList
. map (\(!x, (!y, !z)) -> ((x, y), z))
. zip [0..]
. eToV
. parse fastaCLIPFile "error"
where
eToV (Right x) = x
eToV (Left x) = error ("Unable to parse fasta file\n" ++ show x... | 356 | parsecCLIPFasta = Map.fromList
. map (\(!x, (!y, !z)) -> ((x, y), z))
. zip [0..]
. eToV
. parse fastaCLIPFile "error"
where
eToV (Right x) = x
eToV (Left x) = error ("Unable to parse fasta file\n" ++ show x)
-- | attopares any char but space | 318 | false | true | 0 | 14 | 127 | 129 | 67 | 62 | null | null |
beni55/binary | benchmarks/Benchmark.hs | bsd-3-clause | getWord16N2Host = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop s 0 = return s
loop s n = do
s0 <- getWord16host
s1 <- getWord16host
loop (s+s0+s1) (n-2) | 218 | getWord16N2Host = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop s 0 = return s
loop s n = do
s0 <- getWord16host
s1 <- getWord16host
loop (s+s0+s1) (n-2) | 218 | getWord16N2Host = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop s 0 = return s
loop s n = do
s0 <- getWord16host
s1 <- getWord16host
loop (s+s0+s1) (n-2) | 218 | false | false | 2 | 12 | 83 | 102 | 50 | 52 | null | null |
eklavya/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processPostulates :: Archive -> Idris ()
processPostulates ar = do
ns <- getEntry [] "ibc_postulates" ar
updateIState (\i -> i { idris_postulates = idris_postulates i `S.union` S.fromList ns }) | 201 | processPostulates :: Archive -> Idris ()
processPostulates ar = do
ns <- getEntry [] "ibc_postulates" ar
updateIState (\i -> i { idris_postulates = idris_postulates i `S.union` S.fromList ns }) | 201 | processPostulates ar = do
ns <- getEntry [] "ibc_postulates" ar
updateIState (\i -> i { idris_postulates = idris_postulates i `S.union` S.fromList ns }) | 160 | false | true | 0 | 15 | 36 | 82 | 39 | 43 | null | null |
tamarin-prover/tamarin-prover | lib/theory/src/Theory/Model/Rule.hs | gpl-3.0 | -- | Are these two rule instances equal up to renaming of variables?
equalRuleUpToRenaming :: (Show a, Eq a, HasFrees a) => Rule a -> Rule a -> WithMaude Bool
equalRuleUpToRenaming r1@(Rule rn1 pr1 co1 ac1 nvs1) r2@(Rule rn2 pr2 co2 ac2 nvs2) = reader $ \hnd ->
case eqs of
Nothing -> False
Just eqs' -... | 1,035 | equalRuleUpToRenaming :: (Show a, Eq a, HasFrees a) => Rule a -> Rule a -> WithMaude Bool
equalRuleUpToRenaming r1@(Rule rn1 pr1 co1 ac1 nvs1) r2@(Rule rn2 pr2 co2 ac2 nvs2) = reader $ \hnd ->
case eqs of
Nothing -> False
Just eqs' -> (rn1 == rn2) && (any isRenamingPerRule $ unifs eqs' hnd)
where
... | 966 | equalRuleUpToRenaming r1@(Rule rn1 pr1 co1 ac1 nvs1) r2@(Rule rn2 pr2 co2 ac2 nvs2) = reader $ \hnd ->
case eqs of
Nothing -> False
Just eqs' -> (rn1 == rn2) && (any isRenamingPerRule $ unifs eqs' hnd)
where
isRenamingPerRule subst = isRenaming (restrictVFresh (vars r1) subst) && isRenaming... | 876 | true | true | 0 | 13 | 309 | 369 | 183 | 186 | null | null |
hvr/lzma | src-tests/lzma-tests.hs | bsd-3-clause | randBS :: Int -> Gen BS.ByteString
randBS n = BS.pack `fmap` vectorOf n (choose (0, 255)) | 89 | randBS :: Int -> Gen BS.ByteString
randBS n = BS.pack `fmap` vectorOf n (choose (0, 255)) | 89 | randBS n = BS.pack `fmap` vectorOf n (choose (0, 255)) | 54 | false | true | 0 | 9 | 15 | 55 | 27 | 28 | null | null |
knrafto/blc | tests/Tests.hs | bsd-3-clause | guardFinite :: Testable p => p -> Property
guardFinite p = isFinite p ==> p | 75 | guardFinite :: Testable p => p -> Property
guardFinite p = isFinite p ==> p | 75 | guardFinite p = isFinite p ==> p | 32 | false | true | 0 | 8 | 14 | 37 | 16 | 21 | null | null |
mikegehard/haskellBookExercises | chapter5/writeFunction.hs | mit | i :: a -> a
i x = x | 21 | i :: a -> a
i x = x | 19 | i x = x | 7 | false | true | 0 | 5 | 10 | 22 | 10 | 12 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Core/CustomFactory.hs | mit | deleteCustomFactory :: Ptr CustomFactory -> IO ()
deleteCustomFactory ptr = [C.exp| void {delete $(CustomFactory* ptr)} |] | 122 | deleteCustomFactory :: Ptr CustomFactory -> IO ()
deleteCustomFactory ptr = [C.exp| void {delete $(CustomFactory* ptr)} |] | 122 | deleteCustomFactory ptr = [C.exp| void {delete $(CustomFactory* ptr)} |] | 72 | false | true | 0 | 7 | 15 | 32 | 17 | 15 | null | null |
kai-zoa/haskell-practice | dist/build/autogen/Paths_laundry_logic.hs | bsd-3-clause | libexecdir = "/Users/kai/.cabal/libexec" | 40 | libexecdir = "/Users/kai/.cabal/libexec" | 40 | libexecdir = "/Users/kai/.cabal/libexec" | 40 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
TakeLab/gpkex | kex.hs | bsd-3-clause | takeTuple w
| l >= 4 = [take 4 w] ++ [take 3 w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l == 3 = [w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l >= 2 = [w] ++ [[head w]] ++ [tail w]
| otherwise = [w]
where l = length w | 259 | takeTuple w
| l >= 4 = [take 4 w] ++ [take 3 w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l == 3 = [w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l >= 2 = [w] ++ [[head w]] ++ [tail w]
| otherwise = [w]
where l = length w | 259 | takeTuple w
| l >= 4 = [take 4 w] ++ [take 3 w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l == 3 = [w] ++ [take 2 w] ++ [[head w]] ++ (takeTuple $ tail w)
| l >= 2 = [w] ++ [[head w]] ++ [tail w]
| otherwise = [w]
where l = length w | 259 | false | false | 3 | 11 | 79 | 193 | 97 | 96 | null | null |
rainbyte/summarizer | src/NLP/Summarizer/Grader.hs | gpl-3.0 | grade :: Article -> Article
grade = applySentenceFactors
. extractArticleConcepts
. gradeSentences
. createImportantWordsList | 143 | grade :: Article -> Article
grade = applySentenceFactors
. extractArticleConcepts
. gradeSentences
. createImportantWordsList | 143 | grade = applySentenceFactors
. extractArticleConcepts
. gradeSentences
. createImportantWordsList | 115 | false | true | 0 | 7 | 31 | 27 | 14 | 13 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.