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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jgm/pandoc-citeproc | src/Text/CSL/Proc.hs | bsd-3-clause | procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]
procBiblio bos Style {biblio = mb, csMacros = ms , styleLocale = l,
styleAbbrevs = as, csOptions = opts} rs
= map addSpaceAfterCitNum $ maybe [] process mb
where
-- handle second-field-align (sort of)
addSpaceAfterCit... | 1,204 | procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]
procBiblio bos Style {biblio = mb, csMacros = ms , styleLocale = l,
styleAbbrevs = as, csOptions = opts} rs
= map addSpaceAfterCitNum $ maybe [] process mb
where
-- handle second-field-align (sort of)
addSpaceAfterCit... | 1,204 | procBiblio bos Style {biblio = mb, csMacros = ms , styleLocale = l,
styleAbbrevs = as, csOptions = opts} rs
= map addSpaceAfterCitNum $ maybe [] process mb
where
-- handle second-field-align (sort of)
addSpaceAfterCitNum [Output (OCitNum n f : xs) f']
| secondFieldAlig... | 1,144 | false | true | 15 | 11 | 320 | 483 | 231 | 252 | null | null |
brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Matters/Holds/Get.hs | mpl-2.0 | -- | Creates a value of 'MattersHoldsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mhgXgafv'
--
-- * 'mhgUploadProtocol'
--
-- * 'mhgHoldId'
--
-- * 'mhgAccessToken'
--
-- * 'mhgUploadType'
--
-- * 'mhgMatterId'
--
-- * 'mhgVie... | 756 | mattersHoldsGet
:: Text -- ^ 'mhgHoldId'
-> Text -- ^ 'mhgMatterId'
-> MattersHoldsGet
mattersHoldsGet pMhgHoldId_ pMhgMatterId_ =
MattersHoldsGet'
{ _mhgXgafv = Nothing
, _mhgUploadProtocol = Nothing
, _mhgHoldId = pMhgHoldId_
, _mhgAccessToken = Nothing
, _mhgUploadType = Nothing
... | 411 | mattersHoldsGet pMhgHoldId_ pMhgMatterId_ =
MattersHoldsGet'
{ _mhgXgafv = Nothing
, _mhgUploadProtocol = Nothing
, _mhgHoldId = pMhgHoldId_
, _mhgAccessToken = Nothing
, _mhgUploadType = Nothing
, _mhgMatterId = pMhgMatterId_
, _mhgView = Nothing
, _mhgCallback = Nothing
} | 312 | true | true | 0 | 8 | 162 | 104 | 68 | 36 | null | null |
martin-kolinek/stack | src/Stack/Setup/Installed.hs | bsd-3-clause | installDir :: (MonadReader env m, MonadThrow m)
=> Path Abs Dir
-> Tool
-> m (Path Abs Dir)
installDir programsDir tool = do
relativeDir <- parseRelDir $ toolString tool
return $ programsDir </> relativeDir | 247 | installDir :: (MonadReader env m, MonadThrow m)
=> Path Abs Dir
-> Tool
-> m (Path Abs Dir)
installDir programsDir tool = do
relativeDir <- parseRelDir $ toolString tool
return $ programsDir </> relativeDir | 247 | installDir programsDir tool = do
relativeDir <- parseRelDir $ toolString tool
return $ programsDir </> relativeDir | 122 | false | true | 0 | 10 | 74 | 82 | 39 | 43 | null | null |
keera-studios/hsQt | Qtc/Gui/QGridLayout.hs | bsd-2-clause | rowMinimumHeight :: QGridLayout a -> ((Int)) -> IO (Int)
rowMinimumHeight x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QGridLayout_rowMinimumHeight cobj_x0 (toCInt x1) | 193 | rowMinimumHeight :: QGridLayout a -> ((Int)) -> IO (Int)
rowMinimumHeight x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QGridLayout_rowMinimumHeight cobj_x0 (toCInt x1) | 193 | rowMinimumHeight x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QGridLayout_rowMinimumHeight cobj_x0 (toCInt x1) | 136 | false | true | 4 | 8 | 33 | 76 | 36 | 40 | null | null |
muspellsson/hiccup | Internal/Types.hs | lgpl-2.1 | cmdIsEnsem cmd = case cmdCore cmd of
EnsemCore {} -> True
_ -> False | 111 | cmdIsEnsem cmd = case cmdCore cmd of
EnsemCore {} -> True
_ -> False | 111 | cmdIsEnsem cmd = case cmdCore cmd of
EnsemCore {} -> True
_ -> False | 111 | false | false | 0 | 8 | 56 | 32 | 15 | 17 | null | null |
akhileshs/stack | src/Stack/Setup.hs | bsd-3-clause | -- Remove potentially confusing environment variables
removeHaskellEnvVars :: Map Text Text -> Map Text Text
removeHaskellEnvVars =
Map.delete "GHC_PACKAGE_PATH" .
Map.delete "HASKELL_PACKAGE_SANDBOX" .
Map.delete "HASKELL_PACKAGE_SANDBOXES" .
Map.delete "HASKELL_DIST_DIR" | 289 | removeHaskellEnvVars :: Map Text Text -> Map Text Text
removeHaskellEnvVars =
Map.delete "GHC_PACKAGE_PATH" .
Map.delete "HASKELL_PACKAGE_SANDBOX" .
Map.delete "HASKELL_PACKAGE_SANDBOXES" .
Map.delete "HASKELL_DIST_DIR" | 235 | removeHaskellEnvVars =
Map.delete "GHC_PACKAGE_PATH" .
Map.delete "HASKELL_PACKAGE_SANDBOX" .
Map.delete "HASKELL_PACKAGE_SANDBOXES" .
Map.delete "HASKELL_DIST_DIR" | 180 | true | true | 0 | 9 | 43 | 58 | 27 | 31 | null | null |
michaelochurch/summer-2015-haskell-class | Lisp/Builtins.hs | mit | gensym :: LispFunction
gensym = LFAction "gensym" $ \_ -> fmap LVSymbol genStr | 78 | gensym :: LispFunction
gensym = LFAction "gensym" $ \_ -> fmap LVSymbol genStr | 78 | gensym = LFAction "gensym" $ \_ -> fmap LVSymbol genStr | 55 | false | true | 2 | 6 | 12 | 35 | 15 | 20 | null | null |
athanclark/bnfm | bnfc-constructions/BNF/PrintBNF.hs | mit | render :: Doc -> String
render d = rend 0 (map ($ "") $ d []) "" where
rend i ss = case ss of
"[" :ts -> showChar '[' . rend i ts
"(" :ts -> showChar '(' . rend i ts
"{" :ts -> showChar '{' . new (i+1) . rend (i+1) ts
"}" : ";":ts -> new (i-1) . space "}" . showChar ';' . new (i-1) . re... | 843 | render :: Doc -> String
render d = rend 0 (map ($ "") $ d []) "" where
rend i ss = case ss of
"[" :ts -> showChar '[' . rend i ts
"(" :ts -> showChar '(' . rend i ts
"{" :ts -> showChar '{' . new (i+1) . rend (i+1) ts
"}" : ";":ts -> new (i-1) . space "}" . showChar ';' . new (i-1) . re... | 843 | render d = rend 0 (map ($ "") $ d []) "" where
rend i ss = case ss of
"[" :ts -> showChar '[' . rend i ts
"(" :ts -> showChar '(' . rend i ts
"{" :ts -> showChar '{' . new (i+1) . rend (i+1) ts
"}" : ";":ts -> new (i-1) . space "}" . showChar ';' . new (i-1) . rend (i-1) ts
"}" ... | 819 | false | true | 5 | 14 | 282 | 529 | 245 | 284 | null | null |
daleooo/barrelfish | tools/mackerel/Attr.hs | mit | attr_is_writeonly RWS = False | 29 | attr_is_writeonly RWS = False | 29 | attr_is_writeonly RWS = False | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
a-ford/notghc | Llvm/TypeConversions.hs | bsd-3-clause | mkName :: LMString -> AST.Name
mkName = Name . unpackFS | 55 | mkName :: LMString -> AST.Name
mkName = Name . unpackFS | 55 | mkName = Name . unpackFS | 24 | false | true | 0 | 6 | 9 | 21 | 11 | 10 | null | null |
0gajun/mal | haskell/Types.hs | mpl-2.0 | _equal_Q (MalNumber a) (MalNumber b) = a == b | 45 | _equal_Q (MalNumber a) (MalNumber b) = a == b | 45 | _equal_Q (MalNumber a) (MalNumber b) = a == b | 45 | false | false | 0 | 6 | 8 | 29 | 13 | 16 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Fusion.Stream.Monadic.hs | bsd-3-clause | enumFromTo_double n m = n `seq` m `seq` Stream step n
where
lim = m + 1/2 -- important to float out
{-# INLINE [0] step #-}
step x | x <= lim = return $ Yield x (x+1)
| otherwise = return $ Done
| 223 | enumFromTo_double n m = n `seq` m `seq` Stream step n
where
lim = m + 1/2 -- important to float out
{-# INLINE [0] step #-}
step x | x <= lim = return $ Yield x (x+1)
| otherwise = return $ Done
| 223 | enumFromTo_double n m = n `seq` m `seq` Stream step n
where
lim = m + 1/2 -- important to float out
{-# INLINE [0] step #-}
step x | x <= lim = return $ Yield x (x+1)
| otherwise = return $ Done
| 223 | false | false | 6 | 9 | 73 | 108 | 49 | 59 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/DLP/Types/Product.hs | mpl-2.0 | -- | List of options defining data content to scan. If empty, text, images,
-- and other content will be included.
gpdvicContentOptions :: Lens' GooglePrivacyDlpV2InspectConfig [GooglePrivacyDlpV2InspectConfigContentOptionsItem]
gpdvicContentOptions
= lens _gpdvicContentOptions
(\ s a -> s{_gpdvicContentOptions... | 359 | gpdvicContentOptions :: Lens' GooglePrivacyDlpV2InspectConfig [GooglePrivacyDlpV2InspectConfigContentOptionsItem]
gpdvicContentOptions
= lens _gpdvicContentOptions
(\ s a -> s{_gpdvicContentOptions = a})
. _Default
. _Coerce | 244 | gpdvicContentOptions
= lens _gpdvicContentOptions
(\ s a -> s{_gpdvicContentOptions = a})
. _Default
. _Coerce | 130 | true | true | 0 | 11 | 60 | 54 | 29 | 25 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x1D1BC' = "\x1D1BA\x1D165" | 42 | decomposeChar '\x1D1BC' = "\x1D1BA\x1D165" | 42 | decomposeChar '\x1D1BC' = "\x1D1BA\x1D165" | 42 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
jbracker/supermonad-plugin | src/Control/Super/Plugin/Environment.hs | bsd-3-clause | - | Retrieves the associated instance of the given type constructor and class.
getInstanceFor :: TyCon -> Class -> SupermonadPluginM InstanceDict (Maybe ClsInst)
getInstanceFor tc cls = fmap (lookupInstDict tc cls) getCustomState
| 230 | getInstanceFor :: TyCon -> Class -> SupermonadPluginM InstanceDict (Maybe ClsInst)
getInstanceFor tc cls = fmap (lookupInstDict tc cls) getCustomState | 150 | getInstanceFor tc cls = fmap (lookupInstDict tc cls) getCustomState | 67 | true | true | 1 | 10 | 32 | 83 | 38 | 45 | null | null |
Saulzar/reflex | src/Reflex/Patch/DMapWithMove.hs | bsd-3-clause | {-
k1, k2 :: Const2 Int () ()
k1 = Const2 1
k2 = Const2 2
p1, p2 :: PatchDMapWithMove (Const2 Int ()) Identity
p1 = moveDMapKey k1 k2
p2 = moveDMapKey k2 k1
p12 = p1 <> p2
p21 = p2 <> p1
p12Slow = p1 `mappendPatchDMapWithMoveSlow` p2
p21Slow = p2 `mappendPatchDMapWithMoveSlow` p1
testPatchDMapWithMove = do
print p1
... | 743 | unPatchDMapWithMove :: PatchDMapWithMove k v -> DMap k (NodeInfo k v)
unPatchDMapWithMove (PatchDMapWithMove p) = p | 115 | unPatchDMapWithMove (PatchDMapWithMove p) = p | 45 | true | true | 0 | 8 | 139 | 44 | 22 | 22 | null | null |
mlite/hLLVM | src/Llvm/Asm/Data/AtomicEntity.hs | bsd-3-clause | isNotInBounds :: IsOrIsNot InBounds
isNotInBounds = IsNot InBounds | 66 | isNotInBounds :: IsOrIsNot InBounds
isNotInBounds = IsNot InBounds | 66 | isNotInBounds = IsNot InBounds | 30 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
fodder008/VisualizingHaskellAST | src/Main.hs | mit | runBoth :: Args -> IO ()
runBoth args = do
dflags <- runGhc (Just libdir) $ getSessionDynFlags
res <- mapM Exactprint.parseModule (files args)
mapM_ handleRes res
where --handleRes :: Either (SrcSpan, String) (Exactprint.Anns, ParsedSource) -> IO ()
handleRes pRes =
case pRes of
... | 701 | runBoth :: Args -> IO ()
runBoth args = do
dflags <- runGhc (Just libdir) $ getSessionDynFlags
res <- mapM Exactprint.parseModule (files args)
mapM_ handleRes res
where --handleRes :: Either (SrcSpan, String) (Exactprint.Anns, ParsedSource) -> IO ()
handleRes pRes =
case pRes of
... | 701 | runBoth args = do
dflags <- runGhc (Just libdir) $ getSessionDynFlags
res <- mapM Exactprint.parseModule (files args)
mapM_ handleRes res
where --handleRes :: Either (SrcSpan, String) (Exactprint.Anns, ParsedSource) -> IO ()
handleRes pRes =
case pRes of
(Right (anns, src))... | 676 | false | true | 0 | 16 | 252 | 170 | 78 | 92 | null | null |
meiersi/scyther-proof | src/Scyther/Theory/FOL.hs | gpl-3.0 | inKnows :: F.Term -> F.Formula
inKnows = F.inRel knowsR . return | 64 | inKnows :: F.Term -> F.Formula
inKnows = F.inRel knowsR . return | 64 | inKnows = F.inRel knowsR . return | 33 | false | true | 0 | 8 | 10 | 34 | 15 | 19 | null | null |
cchalmers/potrace | src/Graphics/Potrace.hs | gpl-3.0 | -- | The 'TurnPolicy' parameter determines how to resolve ambiguities
-- during decomposition of bitmaps into paths.
--
-- Default is 'MinorityTP'.
turnPolicy :: Lens' Parameters TurnPolicy
turnPolicy f ps = f (_turnPolicy ps) <&> \p' -> ps { _turnPolicy = p' } | 265 | turnPolicy :: Lens' Parameters TurnPolicy
turnPolicy f ps = f (_turnPolicy ps) <&> \p' -> ps { _turnPolicy = p' } | 113 | turnPolicy f ps = f (_turnPolicy ps) <&> \p' -> ps { _turnPolicy = p' } | 71 | true | true | 0 | 8 | 46 | 51 | 28 | 23 | null | null |
sgillespie/ca-disease-simulator | src/Disease/Disease.hs | mit | diseaseRule2 :: Universe2 DiseaseCell -> DiseaseCell
diseaseRule2 u | extract u == Alive && any (==Infected) (neighbors2 u) = Infected
| otherwise = extract u | 173 | diseaseRule2 :: Universe2 DiseaseCell -> DiseaseCell
diseaseRule2 u | extract u == Alive && any (==Infected) (neighbors2 u) = Infected
| otherwise = extract u | 173 | diseaseRule2 u | extract u == Alive && any (==Infected) (neighbors2 u) = Infected
| otherwise = extract u | 120 | false | true | 0 | 11 | 39 | 72 | 32 | 40 | null | null |
mcschroeder/social-example | social1/SocialDB.hs | mit | createPost :: User -> Text -> TX SocialDB Post
createPost author body = do
db <- getData
postId <- liftSTM $ newUniquePostId db
time <- unsafeIOToTX getCurrentTime
record $ NewPost postId (name author) time body
liftSTM $ newPost postId author time body db | 276 | createPost :: User -> Text -> TX SocialDB Post
createPost author body = do
db <- getData
postId <- liftSTM $ newUniquePostId db
time <- unsafeIOToTX getCurrentTime
record $ NewPost postId (name author) time body
liftSTM $ newPost postId author time body db | 276 | createPost author body = do
db <- getData
postId <- liftSTM $ newUniquePostId db
time <- unsafeIOToTX getCurrentTime
record $ NewPost postId (name author) time body
liftSTM $ newPost postId author time body db | 229 | false | true | 0 | 10 | 62 | 100 | 45 | 55 | null | null |
kimolas/causal-haskell | app/Adjacency.hs | bsd-3-clause | lambdaSelect :: (Ord a, Eq a) => Graph a -> Int
lambdaSelect gr@(Graph ns es) = k
where
n = length ns
-- e = eigSH . sym $ laplacian gr
e = eigSH $ laplacian gr
k = (+1) . fst . L.minimumBy (comparing snd) . zip [0..] . reverse
. diff . toList $ fst e
u = map toList . drop (n-k) . toColumn... | 360 | lambdaSelect :: (Ord a, Eq a) => Graph a -> Int
lambdaSelect gr@(Graph ns es) = k
where
n = length ns
-- e = eigSH . sym $ laplacian gr
e = eigSH $ laplacian gr
k = (+1) . fst . L.minimumBy (comparing snd) . zip [0..] . reverse
. diff . toList $ fst e
u = map toList . drop (n-k) . toColumn... | 360 | lambdaSelect gr@(Graph ns es) = k
where
n = length ns
-- e = eigSH . sym $ laplacian gr
e = eigSH $ laplacian gr
k = (+1) . fst . L.minimumBy (comparing snd) . zip [0..] . reverse
. diff . toList $ fst e
u = map toList . drop (n-k) . toColumns $ snd e
-- Consecutive differences. | 312 | false | true | 0 | 13 | 105 | 162 | 82 | 80 | null | null |
ott8bre/first-haskell | library/Math.hs | bsd-3-clause | {- | Shows Examples
-}
exampleF :: (Fractional a, Show a) => a -> [String]
exampleF x = map (display x) nums | 109 | exampleF :: (Fractional a, Show a) => a -> [String]
exampleF x = map (display x) nums | 85 | exampleF x = map (display x) nums | 33 | true | true | 0 | 7 | 22 | 48 | 25 | 23 | null | null |
hnakamur/haskell-sandbox | sandbox-css/SandBox/Text/CSS/Char.hs | bsd-3-clause | isSpaceChar '\f' = True | 23 | isSpaceChar '\f' = True | 23 | isSpaceChar '\f' = True | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
martinra/hlinear | src/HLinear/FramedModule/Basic.hs | gpl-3.0 | asFramedModuleBasis
:: ( HasRREF a, Ring a, DecidableZero a )
=> FramedModule a -> EchelonForm a
asFramedModuleBasis = fst . asFramedModuleBasisWithPivotStructure | 166 | asFramedModuleBasis
:: ( HasRREF a, Ring a, DecidableZero a )
=> FramedModule a -> EchelonForm a
asFramedModuleBasis = fst . asFramedModuleBasisWithPivotStructure | 166 | asFramedModuleBasis = fst . asFramedModuleBasisWithPivotStructure | 65 | false | true | 0 | 8 | 24 | 52 | 24 | 28 | null | null |
imh/plover | src/Language/Plover/Reduce.hs | mit | compoundVal (_ :> b) = compoundVal b | 37 | compoundVal (_ :> b) = compoundVal b | 37 | compoundVal (_ :> b) = compoundVal b | 37 | false | false | 0 | 6 | 7 | 20 | 9 | 11 | null | null |
svenssonjoel/EmbArBB | Intel/ArBB/Language.hs | bsd-3-clause | indexSeg :: Exp (NVector a) -> Exp USize -> Exp USize -> Exp a
indexSeg (E n) (E s) (E i) = E $ Op Extract [n,s,i] | 115 | indexSeg :: Exp (NVector a) -> Exp USize -> Exp USize -> Exp a
indexSeg (E n) (E s) (E i) = E $ Op Extract [n,s,i] | 114 | indexSeg (E n) (E s) (E i) = E $ Op Extract [n,s,i] | 51 | false | true | 0 | 8 | 27 | 84 | 41 | 43 | null | null |
ecaustin/haskhol-math | src/HaskHOL/Lib/Arith.hs | bsd-2-clause | thmLT_ADD2 :: ArithCtxt thry => HOL cls thry HOLThm
thmLT_ADD2 = cacheProof "thmLT_ADD2" ctxtArith .
prove [txt| !m n p q. m < p /\ n < q ==> m + n < p + q |] $
_REPEAT tacSTRIP `_THEN` tacMATCH_MP thmLTE_ADD2 `_THEN`
tacASM_REWRITE_NIL `_THEN` tacMATCH_MP thmLT_IMP_LE `_THEN`
tacASM_REWRITE_NIL | 318 | thmLT_ADD2 :: ArithCtxt thry => HOL cls thry HOLThm
thmLT_ADD2 = cacheProof "thmLT_ADD2" ctxtArith .
prove [txt| !m n p q. m < p /\ n < q ==> m + n < p + q |] $
_REPEAT tacSTRIP `_THEN` tacMATCH_MP thmLTE_ADD2 `_THEN`
tacASM_REWRITE_NIL `_THEN` tacMATCH_MP thmLT_IMP_LE `_THEN`
tacASM_REWRITE_NIL | 318 | thmLT_ADD2 = cacheProof "thmLT_ADD2" ctxtArith .
prove [txt| !m n p q. m < p /\ n < q ==> m + n < p + q |] $
_REPEAT tacSTRIP `_THEN` tacMATCH_MP thmLTE_ADD2 `_THEN`
tacASM_REWRITE_NIL `_THEN` tacMATCH_MP thmLT_IMP_LE `_THEN`
tacASM_REWRITE_NIL | 266 | false | true | 0 | 7 | 71 | 91 | 45 | 46 | null | null |
Tener/disruptor-hs | Test/MVarBatchQueue.hs | bsd-3-clause | withQueue :: Queue a -> (Queue' a -> IO (Queue' a, b)) -> IO (Queue a, b)
withQueue q fun = do
r <- takeMVar (readPos q)
w <- takeMVar (writePos q)
let q' = Queue' { readPos' = r
, writePos' = w
, buffer' = buffer q
, capacity' = capacity q }
(q'', b) <- f... | 808 | withQueue :: Queue a -> (Queue' a -> IO (Queue' a, b)) -> IO (Queue a, b)
withQueue q fun = do
r <- takeMVar (readPos q)
w <- takeMVar (writePos q)
let q' = Queue' { readPos' = r
, writePos' = w
, buffer' = buffer q
, capacity' = capacity q }
(q'', b) <- f... | 808 | withQueue q fun = do
r <- takeMVar (readPos q)
w <- takeMVar (writePos q)
let q' = Queue' { readPos' = r
, writePos' = w
, buffer' = buffer q
, capacity' = capacity q }
(q'', b) <- fun q'
putMVar (readPos q) (readPos' q'')
putMVar (w... | 734 | false | true | 0 | 12 | 246 | 221 | 110 | 111 | null | null |
jeremyjh/distributed-process-lifted | src/Control/Distributed/Process/Lifted.hs | bsd-3-clause | -- | Generalized version of 'Base.forward'
forward :: MonadProcess m => Message -> ProcessId -> m ()
forward = liftP .: Base.forward | 132 | forward :: MonadProcess m => Message -> ProcessId -> m ()
forward = liftP .: Base.forward | 89 | forward = liftP .: Base.forward | 31 | true | true | 2 | 10 | 21 | 46 | 21 | 25 | null | null |
MichaelBurge/stockfighter-jailbreak | src/Api/Stockfighter/Jailbreak/Decompiler/Passes.hs | bsd-3-clause | eDivide = EBinop Divide | 23 | eDivide = EBinop Divide | 23 | eDivide = EBinop Divide | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
polarina/sdl2 | Graphics/UI/SDL/Video.hs | bsd-3-clause | hideWindow :: MonadIO m => Window -> m ()
hideWindow v1 = liftIO $ hideWindow' v1 | 81 | hideWindow :: MonadIO m => Window -> m ()
hideWindow v1 = liftIO $ hideWindow' v1 | 81 | hideWindow v1 = liftIO $ hideWindow' v1 | 39 | false | true | 0 | 8 | 15 | 37 | 17 | 20 | null | null |
sdiehl/ghc | compiler/utils/Dominators.hs | bsd-3-clause | -- collect :: (Ord b) => (c -> c -> c)
-- -> (a -> b) -> (a -> c) -> [a] -> Map b c
-- collect (<>) f g
-- = foldl' (\m a -> SM.insertWith (<>)
-- (f a)
-- (g a) m) mempty
-- (renamed, old -> new)
renum :: Int -> Graph -> (Graph, Nod... | 1,222 | renum :: Int -> Graph -> (Graph, NodeMap Node)
renum from = (\(_,m,g)->(g,m))
. IM.foldlWithKey'
f (from,mempty,mempty)
where
f :: (Int, NodeMap Node, IntMap IntSet) -> Node -> IntSet
-> (Int, NodeMap Node, IntMap IntSet)
f (!n,!env,!new) i ss =
let (j,n2,env2) = go n env i
... | 937 | renum from = (\(_,m,g)->(g,m))
. IM.foldlWithKey'
f (from,mempty,mempty)
where
f :: (Int, NodeMap Node, IntMap IntSet) -> Node -> IntSet
-> (Int, NodeMap Node, IntMap IntSet)
f (!n,!env,!new) i ss =
let (j,n2,env2) = go n env i
(n3,env3,ss2) = IS.fold
... | 890 | true | true | 4 | 16 | 487 | 425 | 229 | 196 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_383 (142#) = happyShift action_197 | 41 | action_383 (142#) = happyShift action_197 | 41 | action_383 (142#) = happyShift action_197 | 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
sdiehl/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | nonemptyName :: Name
nonemptyName = mkNameG DataName "base" "GHC.Base" ":|" | 75 | nonemptyName :: Name
nonemptyName = mkNameG DataName "base" "GHC.Base" ":|" | 75 | nonemptyName = mkNameG DataName "base" "GHC.Base" ":|" | 54 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
lpsmith/blaze-builder-compat | src/Blaze/ByteString/Builder/Char8.hs | bsd-3-clause | writeChar :: Char -> Write
writeChar = writePrimFixed P.char8 | 61 | writeChar :: Char -> Write
writeChar = writePrimFixed P.char8 | 61 | writeChar = writePrimFixed P.char8 | 34 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
amccausl/Swish | Swish/HaskellRDF/N3ParserTest.hs | lgpl-2.1 | t807 = arc o1 p1 s1 | 19 | t807 = arc o1 p1 s1 | 19 | t807 = arc o1 p1 s1 | 19 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
kwibus/myLang | tests/ArbitraryLambda.hs | bsd-3-clause | arbitraryLet :: ArbiRef n => Conf -> Int -> Maybe Type -> [Type] -> GenState n -> Generater (LamTerm () () n)
arbitraryLet conf size t maxlist state =
let maxNumExpresion = min (size - 1) (maxNumDefs conf + 1)
in do
numExpresion <- chooseLogic (1, maxNumExpresion)
if numExpresion <= 1
then mzero
... | 2,628 | arbitraryLet :: ArbiRef n => Conf -> Int -> Maybe Type -> [Type] -> GenState n -> Generater (LamTerm () () n)
arbitraryLet conf size t maxlist state =
let maxNumExpresion = min (size - 1) (maxNumDefs conf + 1)
in do
numExpresion <- chooseLogic (1, maxNumExpresion)
if numExpresion <= 1
then mzero
... | 2,628 | arbitraryLet conf size t maxlist state =
let maxNumExpresion = min (size - 1) (maxNumDefs conf + 1)
in do
numExpresion <- chooseLogic (1, maxNumExpresion)
if numExpresion <= 1
then mzero
else do
-- pick sizes
let totallExtra = (size - 1) - numExpresion
rando... | 2,518 | false | true | 15 | 14 | 847 | 621 | 319 | 302 | null | null |
abakst/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Unboxed.hs | bsd-3-clause | and = G.and | 11 | and = G.and | 11 | and = G.and | 11 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
bjpop/berp | libs/src/Berp/Compile/Compile.hs | bsd-3-clause | trimStringEnd :: String -> String
trimStringEnd [] = [] | 55 | trimStringEnd :: String -> String
trimStringEnd [] = [] | 55 | trimStringEnd [] = [] | 21 | false | true | 0 | 8 | 8 | 28 | 12 | 16 | null | null |
tphyahoo/haskoin-wallet | Network/Haskoin/Wallet/KeyRing.hs | unlicense | isReadAccount :: KeyRingAccount -> Bool
isReadAccount acc = case keyRingAccountType acc of
AccountRegular r -> r
AccountMultisig r _ _ -> r | 152 | isReadAccount :: KeyRingAccount -> Bool
isReadAccount acc = case keyRingAccountType acc of
AccountRegular r -> r
AccountMultisig r _ _ -> r | 152 | isReadAccount acc = case keyRingAccountType acc of
AccountRegular r -> r
AccountMultisig r _ _ -> r | 112 | false | true | 3 | 6 | 34 | 46 | 22 | 24 | null | null |
mzini/TcT | source/Tct/Method/Bounds/Violations/Find.hs | gpl-3.0 | findViolations :: Automaton -> Enrichment -> Strictness -> WeakBoundedness -> Label -> R.Rule -> Set.Set (LTerm, State)
findViolations a e str wb ml rule = Set.fromList $ runMemoAction $ filterM (\ (lt, q) -> not `liftM` candidateRejected lt q) candidates
where candidates = snub [ (labeledRhs labeledLhs, q) | (labe... | 1,524 | findViolations :: Automaton -> Enrichment -> Strictness -> WeakBoundedness -> Label -> R.Rule -> Set.Set (LTerm, State)
findViolations a e str wb ml rule = Set.fromList $ runMemoAction $ filterM (\ (lt, q) -> not `liftM` candidateRejected lt q) candidates
where candidates = snub [ (labeledRhs labeledLhs, q) | (labe... | 1,524 | findViolations a e str wb ml rule = Set.fromList $ runMemoAction $ filterM (\ (lt, q) -> not `liftM` candidateRejected lt q) candidates
where candidates = snub [ (labeledRhs labeledLhs, q) | (labeledLhs, q) <- Set.toList $ reachableFromLifted a l qs]
candidateRejected lt q = ifM (reaches a lt q) (return T... | 1,404 | false | true | 0 | 13 | 460 | 574 | 289 | 285 | null | null |
talanis85/haScales | src/Data/Music/Chords.hs | bsd-3-clause | diminishedChord = triad locrianScale | 36 | diminishedChord = triad locrianScale | 36 | diminishedChord = triad locrianScale | 36 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
snowleopard/process-mining | pgminer/Tuura/PGminer/Options.hs | mit | defaultOptions :: Options
defaultOptions = Options
{ optHelp = False
, optInput = getContents
, optOutput = putStr
, optReport = False
, optSplit = False
, optBool = "" } | 201 | defaultOptions :: Options
defaultOptions = Options
{ optHelp = False
, optInput = getContents
, optOutput = putStr
, optReport = False
, optSplit = False
, optBool = "" } | 201 | defaultOptions = Options
{ optHelp = False
, optInput = getContents
, optOutput = putStr
, optReport = False
, optSplit = False
, optBool = "" } | 175 | false | true | 0 | 7 | 61 | 59 | 33 | 26 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags AddrLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags AddrLeOp = Just (mo_wordULe dflags) | 60 | translateOp dflags AddrLeOp = Just (mo_wordULe dflags) | 60 | false | false | 0 | 7 | 12 | 20 | 9 | 11 | null | null |
phadej/stack | src/Stack/SDist.hs | bsd-3-clause | gtraverseT :: (Data a,Typeable b) => (Typeable b => b -> b) -> a -> a
gtraverseT f =
gmapT (\x -> case cast x of
Nothing -> gtraverseT f x
Just b -> fromMaybe x (cast (f b))) | 211 | gtraverseT :: (Data a,Typeable b) => (Typeable b => b -> b) -> a -> a
gtraverseT f =
gmapT (\x -> case cast x of
Nothing -> gtraverseT f x
Just b -> fromMaybe x (cast (f b))) | 211 | gtraverseT f =
gmapT (\x -> case cast x of
Nothing -> gtraverseT f x
Just b -> fromMaybe x (cast (f b))) | 141 | false | true | 0 | 15 | 75 | 106 | 52 | 54 | null | null |
danidiaz/lens | src/Control/Lens/TH.hs | bsd-3-clause | apps :: Type -> [Type] -> Type
apps = Prelude.foldl AppT | 56 | apps :: Type -> [Type] -> Type
apps = Prelude.foldl AppT | 56 | apps = Prelude.foldl AppT | 25 | false | true | 0 | 8 | 10 | 33 | 15 | 18 | null | null |
takayuki/natume | Re.hs | gpl-2.0 | hanzen :: [(String,String)]
hanzen = [("!","¡ª"),("\"","¡É"),("#","¡ô"),("$","¡ð"),("%","¡ó"),("&","¡õ"),
("'","¡Ç"),("(","¡Ê"),(")","¡Ë"),("*","¡ö"),("+","¡Ü"),(",","¡¤"),
("-","¡Ý"),(".","¡¥"),("/","¡¿"),
("0","£°"),("1","£±"),("2","£²"),("3","£³"),("4","£´"),("5","£µ"),
("6","... | 1,261 | hanzen :: [(String,String)]
hanzen = [("!","¡ª"),("\"","¡É"),("#","¡ô"),("$","¡ð"),("%","¡ó"),("&","¡õ"),
("'","¡Ç"),("(","¡Ê"),(")","¡Ë"),("*","¡ö"),("+","¡Ü"),(",","¡¤"),
("-","¡Ý"),(".","¡¥"),("/","¡¿"),
("0","£°"),("1","£±"),("2","£²"),("3","£³"),("4","£´"),("5","£µ"),
("6","... | 1,261 | hanzen = [("!","¡ª"),("\"","¡É"),("#","¡ô"),("$","¡ð"),("%","¡ó"),("&","¡õ"),
("'","¡Ç"),("(","¡Ê"),(")","¡Ë"),("*","¡ö"),("+","¡Ü"),(",","¡¤"),
("-","¡Ý"),(".","¡¥"),("/","¡¿"),
("0","£°"),("1","£±"),("2","£²"),("3","£³"),("4","£´"),("5","£µ"),
("6","£¶"),("7","£·"),("8","£¸"),(... | 1,233 | false | true | 0 | 8 | 192 | 873 | 577 | 296 | null | null |
thomie/vector | Data/Vector/Primitive.hs | bsd-3-clause | scanr1' = G.scanr1' | 19 | scanr1' = G.scanr1' | 19 | scanr1' = G.scanr1' | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
ekmett/ghc | compiler/nativeGen/PIC.hs | bsd-3-clause | -- pprGotDeclaration
-- Output whatever needs to be output once per .s file.
-- The .LCTOC1 label is defined to point 32768 bytes into the table,
-- to make the most of the PPC's 16-bit displacements.
-- Only needed for PIC.
pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64
... | 546 | pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64
, not (gopt Opt_PIC dflags)
= empty
| osElfTarget os
, arch /= ArchPPC_64
= vcat [
ptext (sLit ".section \".got2\",\"aw\""),
ptext (sLit ".LCTOC1 = .+32768") ... | 321 | pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64
, not (gopt Opt_PIC dflags)
= empty
| osElfTarget os
, arch /= ArchPPC_64
= vcat [
ptext (sLit ".section \".got2\",\"aw\""),
ptext (sLit ".LCTOC1 = .+32768") ... | 321 | true | false | 0 | 10 | 169 | 99 | 48 | 51 | null | null |
k32/visualsgsn | src/Text/LogMerger/Logs/CLI.hs | unlicense | logFormat ∷ LogFormat
logFormat = LogFormat {
_dissector = cliDissector
, _nameRegex = mkRegex "cli_log\\.[0-9]+$"
, _formatName = "sgsn-mme-cli"
, _formatDescription = "CLI logs of an SGSN-MME node"
, _timeAs = AsLocalTime
} | 240 | logFormat ∷ LogFormat
logFormat = LogFormat {
_dissector = cliDissector
, _nameRegex = mkRegex "cli_log\\.[0-9]+$"
, _formatName = "sgsn-mme-cli"
, _formatDescription = "CLI logs of an SGSN-MME node"
, _timeAs = AsLocalTime
} | 240 | logFormat = LogFormat {
_dissector = cliDissector
, _nameRegex = mkRegex "cli_log\\.[0-9]+$"
, _formatName = "sgsn-mme-cli"
, _formatDescription = "CLI logs of an SGSN-MME node"
, _timeAs = AsLocalTime
} | 218 | false | true | 0 | 7 | 47 | 46 | 28 | 18 | null | null |
mgsloan/newtype-th | Tests.hs | bsd-3-clause | pun :: (Newtype a b, Show b) => a -> IO ()
pun = print . unpack | 63 | pun :: (Newtype a b, Show b) => a -> IO ()
pun = print . unpack | 63 | pun = print . unpack | 20 | false | true | 0 | 8 | 16 | 41 | 21 | 20 | null | null |
mortberg/cubicaltt | Resolver.hs | mit | resolveTele :: [(Ident,Exp)] -> Resolver CTT.Tele
resolveTele [] = return [] | 83 | resolveTele :: [(Ident,Exp)] -> Resolver CTT.Tele
resolveTele [] = return [] | 83 | resolveTele [] = return [] | 33 | false | true | 0 | 8 | 17 | 44 | 21 | 23 | null | null |
brendanhay/gogol | gogol-streetviewpublish/gen/Network/Google/StreetViewPublish/Types/Product.hs | mpl-2.0 | -- | Level (the floor in a building) used to configure vertical navigation.
pLevel :: Lens' Pose (Maybe Level)
pLevel = lens _pLevel (\ s a -> s{_pLevel = a}) | 158 | pLevel :: Lens' Pose (Maybe Level)
pLevel = lens _pLevel (\ s a -> s{_pLevel = a}) | 82 | pLevel = lens _pLevel (\ s a -> s{_pLevel = a}) | 47 | true | true | 0 | 9 | 29 | 46 | 25 | 21 | null | null |
joshcough/Scrabble | src/Scrabble/Search.hs | mit | matchNone :: [Search] -> Search
matchNone = Scrabble.Search.none | 64 | matchNone :: [Search] -> Search
matchNone = Scrabble.Search.none | 64 | matchNone = Scrabble.Search.none | 32 | false | true | 0 | 7 | 7 | 28 | 13 | 15 | null | null |
dsorokin/aivika-experiment-chart | examples/InspectionAdjustmentStations/Experiment.hs | bsd-3-clause | adjustmentStations = T.Server $ resultByName "adjustmentStations" | 65 | adjustmentStations = T.Server $ resultByName "adjustmentStations" | 65 | adjustmentStations = T.Server $ resultByName "adjustmentStations" | 65 | false | false | 3 | 5 | 5 | 19 | 7 | 12 | null | null |
bvdelft/paragon | src/Language/Java/Paragon/Parser/Helpers.hs | bsd-3-clause | -- | Matches a given operator and returns a source span for this operator.
operatorWithSpan :: Token -> P Annotation
operatorWithSpan = tokWithSpanDesc "operator" | 162 | operatorWithSpan :: Token -> P Annotation
operatorWithSpan = tokWithSpanDesc "operator" | 87 | operatorWithSpan = tokWithSpanDesc "operator" | 45 | true | true | 0 | 6 | 23 | 22 | 11 | 11 | null | null |
sjakobi/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | @"'bcRoot'/.stack-work"@
bcWorkDir :: (MonadReader env m, HasConfig env) => BuildConfig -> m (Path Abs Dir)
bcWorkDir bconfig = do
workDir <- getWorkDir
return (bcRoot bconfig </> workDir) | 197 | bcWorkDir :: (MonadReader env m, HasConfig env) => BuildConfig -> m (Path Abs Dir)
bcWorkDir bconfig = do
workDir <- getWorkDir
return (bcRoot bconfig </> workDir) | 167 | bcWorkDir bconfig = do
workDir <- getWorkDir
return (bcRoot bconfig </> workDir) | 84 | true | true | 0 | 11 | 32 | 74 | 35 | 39 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | airRange CritterBengalaas = 0 | 29 | airRange CritterBengalaas = 0 | 29 | airRange CritterBengalaas = 0 | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/Coverage.hs | bsd-3-clause | addTickStmt :: (Maybe (Bool -> BoxLabel)) -> Stmt Id (LHsExpr Id) -> TM (Stmt Id (LHsExpr Id))
addTickStmt _isGuard (LastStmt e ret) = do
liftM2 LastStmt
(addTickLHsExpr e)
(addTickSyntaxExpr hpcSrcSpan ret) | 247 | addTickStmt :: (Maybe (Bool -> BoxLabel)) -> Stmt Id (LHsExpr Id) -> TM (Stmt Id (LHsExpr Id))
addTickStmt _isGuard (LastStmt e ret) = do
liftM2 LastStmt
(addTickLHsExpr e)
(addTickSyntaxExpr hpcSrcSpan ret) | 247 | addTickStmt _isGuard (LastStmt e ret) = do
liftM2 LastStmt
(addTickLHsExpr e)
(addTickSyntaxExpr hpcSrcSpan ret) | 152 | false | true | 0 | 11 | 70 | 97 | 47 | 50 | null | null |
pbevin/toycss | src/GenHtmlDoc.hs | gpl-2.0 | addIdsToHtml :: [HtmlNode] -> [HtmlNode]
addIdsToHtml nodes = fst $ runState (addIds nodes) 0 | 93 | addIdsToHtml :: [HtmlNode] -> [HtmlNode]
addIdsToHtml nodes = fst $ runState (addIds nodes) 0 | 93 | addIdsToHtml nodes = fst $ runState (addIds nodes) 0 | 52 | false | true | 2 | 8 | 13 | 45 | 21 | 24 | null | null |
yobiya/jcc | json.hs | mit | divideTopLevel :: String -> Char -> Fragile [String]
divideTopLevel xs c = divideTopLevelWork xs c [] | 101 | divideTopLevel :: String -> Char -> Fragile [String]
divideTopLevel xs c = divideTopLevelWork xs c [] | 101 | divideTopLevel xs c = divideTopLevelWork xs c [] | 48 | false | true | 0 | 8 | 15 | 39 | 19 | 20 | null | null |
nkartashov/brainfuck-hs | source.hs | gpl-2.0 | charToBF '[' = LoopL | 20 | charToBF '[' = LoopL | 20 | charToBF '[' = LoopL | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
QuickChick/Luck | luck/src/Common/Types.hs | mit | after :: Ord v => TSubstitution c v -> TSubstitution c v -> TSubstitution c v
s2 `after` s1 = Subs $ fmap (subst s2) (unSubs s1) `Map.union` unSubs s2 | 150 | after :: Ord v => TSubstitution c v -> TSubstitution c v -> TSubstitution c v
s2 `after` s1 = Subs $ fmap (subst s2) (unSubs s1) `Map.union` unSubs s2 | 150 | s2 `after` s1 = Subs $ fmap (subst s2) (unSubs s1) `Map.union` unSubs s2 | 72 | false | true | 3 | 9 | 29 | 83 | 38 | 45 | null | null |
jcpetruzza/haskell-ast | src/Language/Haskell/AST/HSE.hs | bsd-3-clause | fromHseRhs :: (HseGuard guard, HseExp exp)
=> Parsed_ E.Rhs -> ParseResult (Parsed (Core.Rhs guard exp))
fromHseRhs (E.UnGuardedRhs l e) = Core.UnGuardedRhs l <$> fromHseExp e | 191 | fromHseRhs :: (HseGuard guard, HseExp exp)
=> Parsed_ E.Rhs -> ParseResult (Parsed (Core.Rhs guard exp))
fromHseRhs (E.UnGuardedRhs l e) = Core.UnGuardedRhs l <$> fromHseExp e | 191 | fromHseRhs (E.UnGuardedRhs l e) = Core.UnGuardedRhs l <$> fromHseExp e | 74 | false | true | 0 | 13 | 40 | 83 | 39 | 44 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | htKvmSpiceVideoStreamDetectionOff :: String
htKvmSpiceVideoStreamDetectionOff = "off" | 85 | htKvmSpiceVideoStreamDetectionOff :: String
htKvmSpiceVideoStreamDetectionOff = "off" | 85 | htKvmSpiceVideoStreamDetectionOff = "off" | 41 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
olsner/ghc | libraries/ghc-prim/GHC/CString.hs | bsd-3-clause | unpackNBytes# _addr 0# = [] | 29 | unpackNBytes# _addr 0# = [] | 29 | unpackNBytes# _addr 0# = [] | 29 | false | false | 0 | 5 | 6 | 15 | 6 | 9 | null | null |
opentower/carnap | Carnap-Server/Handler/User.hs | gpl-3.0 | --properly localized assignments for a given class
--XXX---should this just be in the hamlet?
assignmentsOf course textbookproblems asmd asDocs = do
time <- liftIO getCurrentTime
return $
[whamlet|
<div.table-responsive>
<table.table.table-s... | 2,337 | assignmentsOf course textbookproblems asmd asDocs = do
time <- liftIO getCurrentTime
return $
[whamlet|
<div.table-responsive>
<table.table.table-striped>
<thead>
<th> Assignment
... | 2,242 | assignmentsOf course textbookproblems asmd asDocs = do
time <- liftIO getCurrentTime
return $
[whamlet|
<div.table-responsive>
<table.table.table-striped>
<thead>
<th> Assignment
... | 2,242 | true | false | 3 | 10 | 1,409 | 111 | 50 | 61 | null | null |
mightybyte/reflex | src/Reflex/Class.hs | bsd-3-clause | sequenceThese :: Monad m => These (m a) (m b) -> m (These a b)
sequenceThese t = case t of
This ma -> liftM This ma
These ma mb -> liftM2 These ma mb
That mb -> liftM That mb | 180 | sequenceThese :: Monad m => These (m a) (m b) -> m (These a b)
sequenceThese t = case t of
This ma -> liftM This ma
These ma mb -> liftM2 These ma mb
That mb -> liftM That mb | 180 | sequenceThese t = case t of
This ma -> liftM This ma
These ma mb -> liftM2 These ma mb
That mb -> liftM That mb | 117 | false | true | 4 | 9 | 46 | 98 | 47 | 51 | null | null |
GaloisInc/halvm-ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | xtT (D _ (TyConApp tc [])) f m = m { tm_tycon = tm_tycon m |> xtDNamed tc f } | 81 | xtT (D _ (TyConApp tc [])) f m = m { tm_tycon = tm_tycon m |> xtDNamed tc f } | 81 | xtT (D _ (TyConApp tc [])) f m = m { tm_tycon = tm_tycon m |> xtDNamed tc f } | 81 | false | false | 0 | 10 | 23 | 51 | 25 | 26 | null | null |
bitemyapp/roshask | src/Ros/Node/RosTcp.hs | bsd-3-clause | ioErrorToExceptT :: (String -> e) -> String -> IO a -> ExceptT e IO a
ioErrorToExceptT except msg acc =
ExceptT . catchConvertIO (\m -> except $ msg ++ m) $ acc | 162 | ioErrorToExceptT :: (String -> e) -> String -> IO a -> ExceptT e IO a
ioErrorToExceptT except msg acc =
ExceptT . catchConvertIO (\m -> except $ msg ++ m) $ acc | 162 | ioErrorToExceptT except msg acc =
ExceptT . catchConvertIO (\m -> except $ msg ++ m) $ acc | 92 | false | true | 0 | 11 | 33 | 74 | 37 | 37 | null | null |
mettekou/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mkWpLet :: TcEvBinds -> HsWrapper
-- This no-op is a quite a common case
mkWpLet (EvBinds b) | isEmptyBag b = WpHole | 116 | mkWpLet :: TcEvBinds -> HsWrapper
mkWpLet (EvBinds b) | isEmptyBag b = WpHole | 77 | mkWpLet (EvBinds b) | isEmptyBag b = WpHole | 43 | true | true | 0 | 8 | 21 | 34 | 16 | 18 | null | null |
uduki/hsQt | Qtc/Gui/QDateTimeEdit.hs | bsd-2-clause | setCurrentSectionIndex :: QDateTimeEdit a -> ((Int)) -> IO ()
setCurrentSectionIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTimeEdit_setCurrentSectionIndex cobj_x0 (toCInt x1) | 192 | setCurrentSectionIndex :: QDateTimeEdit a -> ((Int)) -> IO ()
setCurrentSectionIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTimeEdit_setCurrentSectionIndex cobj_x0 (toCInt x1) | 192 | setCurrentSectionIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTimeEdit_setCurrentSectionIndex cobj_x0 (toCInt x1) | 130 | false | true | 0 | 9 | 27 | 64 | 32 | 32 | null | null |
geraldus/yesod | yesod-form/Yesod/Form/Functions.hs | mit | -- | A generalized version of 'parseHelper', allowing any type for the message
-- indicating a bad parse.
--
-- Since 1.3.6
parseHelperGen :: (Monad m, RenderMessage site msg)
=> (Text -> Either msg a)
-> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))
parseHelperGen _ [] _... | 345 | parseHelperGen :: (Monad m, RenderMessage site msg)
=> (Text -> Either msg a)
-> [Text] -> [FileInfo] -> m (Either (SomeMessage site) (Maybe a))
parseHelperGen _ [] _ = return $ Right Nothing | 221 | parseHelperGen _ [] _ = return $ Right Nothing | 46 | true | true | 0 | 13 | 84 | 101 | 53 | 48 | null | null |
DavidAlphaFox/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | --------------------------------------------------
-- 2. Eliminate Identity Case
--------------------------------------------------
mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case
| all identity_alt alts
= do { tick (CaseIdentity case_bndr)
; return (mkTicks ticks $ re_cas... | 1,946 | mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case
| all identity_alt alts
= do { tick (CaseIdentity case_bndr)
; return (mkTicks ticks $ re_cast scrut rhs1) }
where
ticks = concatMap (stripTicksT tickishFloatable . thirdOf3) (tail alts)
identity_alt (con, args, rhs) = ch... | 1,808 | mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case
| all identity_alt alts
= do { tick (CaseIdentity case_bndr)
; return (mkTicks ticks $ re_cast scrut rhs1) }
where
ticks = concatMap (stripTicksT tickishFloatable . thirdOf3) (tail alts)
identity_alt (con, args, rhs) = ch... | 1,808 | true | false | 0 | 11 | 706 | 444 | 227 | 217 | null | null |
kliuchnikau/project-euler | 038/Main.hs | apache-2.0 | potentialPandigitalDigits :: Int -> [Int]
potentialPandigitalDigits num = potentialPandigital' 1 []
where
potentialPandigital' multiplier combinedDigits
| (length combinedDigits) >= 9 = combinedDigits
| otherwise = potentialPandigital' (multiplier+1) (combinedDigits ++ currentMultiplication)
w... | 382 | potentialPandigitalDigits :: Int -> [Int]
potentialPandigitalDigits num = potentialPandigital' 1 []
where
potentialPandigital' multiplier combinedDigits
| (length combinedDigits) >= 9 = combinedDigits
| otherwise = potentialPandigital' (multiplier+1) (combinedDigits ++ currentMultiplication)
w... | 382 | potentialPandigitalDigits num = potentialPandigital' 1 []
where
potentialPandigital' multiplier combinedDigits
| (length combinedDigits) >= 9 = combinedDigits
| otherwise = potentialPandigital' (multiplier+1) (combinedDigits ++ currentMultiplication)
where
currentMultiplication = dig... | 340 | false | true | 0 | 10 | 71 | 100 | 49 | 51 | null | null |
stevely/hspirv | src/SpirV/Builder.hs | bsd-3-clause | specConstantFalse :: Builder Id
specConstantFalse = do
bool <- R.typeBool
R.specConstantFalse bool | 106 | specConstantFalse :: Builder Id
specConstantFalse = do
bool <- R.typeBool
R.specConstantFalse bool | 106 | specConstantFalse = do
bool <- R.typeBool
R.specConstantFalse bool | 74 | false | true | 0 | 9 | 19 | 37 | 15 | 22 | null | null |
jappeace/jappeaceApplication | content/Jappie.hs | gpl-3.0 | -- set = use lens as setter, same as (^.)
setName'' :: Text -> Person -> Person
setName'' = set nameLens | 104 | setName'' :: Text -> Person -> Person
setName'' = set nameLens | 62 | setName'' = set nameLens | 24 | true | true | 0 | 8 | 20 | 30 | 13 | 17 | null | null |
vTurbine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | opt_lc :: DynFlags -> [String]
opt_lc dflags = sOpt_lc (settings dflags) | 87 | opt_lc :: DynFlags -> [String]
opt_lc dflags = sOpt_lc (settings dflags) | 87 | opt_lc dflags = sOpt_lc (settings dflags) | 41 | false | true | 0 | 7 | 25 | 30 | 15 | 15 | null | null |
konn/offscripter | src/Language/ONScripter/Off/Macros.hs | bsd-3-clause | escapeKeywords "rec" = "rec_" | 29 | escapeKeywords "rec" = "rec_" | 29 | escapeKeywords "rec" = "rec_" | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ekr/tamarin-prover | lib/term/src/Term/Term/FunctionSymbols.hs | gpl-3.0 | unionSymString :: ByteString
unionSymString = "union" | 53 | unionSymString :: ByteString
unionSymString = "union" | 53 | unionSymString = "union" | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
kejace/alto | src/Alto/Contracts.hs | mit | konst :: a -> Obs a
konst k = Obs (\t -> bigK k) | 48 | konst :: a -> Obs a
konst k = Obs (\t -> bigK k) | 48 | konst k = Obs (\t -> bigK k) | 28 | false | true | 0 | 8 | 13 | 35 | 17 | 18 | null | null |
Mokosha/Lambency | examples/CubeDemo.hs | mit | game :: L.Game ()
game =
L.Game demoCam [lightWire]
$ (id W.&&& quitWire) W.>>> L.joinResources [cubeWire, bunny, plane, uiWire] | 132 | game :: L.Game ()
game =
L.Game demoCam [lightWire]
$ (id W.&&& quitWire) W.>>> L.joinResources [cubeWire, bunny, plane, uiWire] | 132 | game =
L.Game demoCam [lightWire]
$ (id W.&&& quitWire) W.>>> L.joinResources [cubeWire, bunny, plane, uiWire] | 114 | false | true | 2 | 7 | 22 | 65 | 34 | 31 | null | null |
itchyny/vim-haskell-indent | test/list/arg_list.in.hs | mit | g [x, y] = x `div`
y | 20 | g [x, y] = x `div`
y | 20 | g [x, y] = x `div`
y | 20 | false | false | 0 | 5 | 6 | 22 | 12 | 10 | null | null |
nurpax/snaplet-sqlite-simple | src/Snap/Snaplet/Auth/Backends/SqliteSimple.hs | bsd-3-clause | -- | List of deconstructors so it's easier to extract column names from an
-- 'AuthTable'.
colDef :: [(AuthTable -> (Text, Text), AuthUser -> SQLData)]
colDef =
[ (colId , S.toField . fmap unUid . userId)
, (colLogin , S.toField . userLogin)
, (colEmail , S.toField . userEmail)
... | 1,503 | colDef :: [(AuthTable -> (Text, Text), AuthUser -> SQLData)]
colDef =
[ (colId , S.toField . fmap unUid . userId)
, (colLogin , S.toField . userLogin)
, (colEmail , S.toField . userEmail)
, (colPassword , S.toField . userPassword)
, (colActivatedAt , S.toField . use... | 1,412 | colDef =
[ (colId , S.toField . fmap unUid . userId)
, (colLogin , S.toField . userLogin)
, (colEmail , S.toField . userEmail)
, (colPassword , S.toField . userPassword)
, (colActivatedAt , S.toField . userActivatedAt)
, (colSuspendedAt , S.toField . userSuspe... | 1,351 | true | true | 5 | 11 | 369 | 429 | 247 | 182 | null | null |
randen/haddock | haddock-api/src/Haddock/GhcUtils.hs | bsd-2-clause | isTyClD :: HsDecl a -> Bool
isTyClD (TyClD _) = True | 52 | isTyClD :: HsDecl a -> Bool
isTyClD (TyClD _) = True | 52 | isTyClD (TyClD _) = True | 24 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
joelburget/sdl2-ttf | Graphics/UI/SDL/TTF/Attributes.hs | bsd-3-clause | fontLineSkip :: Font -> IO Int
fontLineSkip font = fmap fromIntegral $ withForeignPtr font ttfFontLineSkip | 106 | fontLineSkip :: Font -> IO Int
fontLineSkip font = fmap fromIntegral $ withForeignPtr font ttfFontLineSkip | 106 | fontLineSkip font = fmap fromIntegral $ withForeignPtr font ttfFontLineSkip | 75 | false | true | 0 | 6 | 14 | 36 | 16 | 20 | null | null |
holzensp/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | mkSMAP_FROZEN_infoLabel = CmmLabel rtsPackageKey (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN") CmmInfo | 104 | mkSMAP_FROZEN_infoLabel = CmmLabel rtsPackageKey (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN") CmmInfo | 104 | mkSMAP_FROZEN_infoLabel = CmmLabel rtsPackageKey (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN") CmmInfo | 104 | false | false | 0 | 7 | 14 | 19 | 9 | 10 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Textile.hs | gpl-2.0 | singleton :: a -> [a]
singleton x = [x] | 39 | singleton :: a -> [a]
singleton x = [x] | 39 | singleton x = [x] | 17 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | renumIdMap n (e:es)
| Just oldId <- findAttr (QName "Id" Nothing Nothing) e =
M.insert oldId ("rId" ++ (show n)) (renumIdMap (n+1) es)
| otherwise = renumIdMap n es | 174 | renumIdMap n (e:es)
| Just oldId <- findAttr (QName "Id" Nothing Nothing) e =
M.insert oldId ("rId" ++ (show n)) (renumIdMap (n+1) es)
| otherwise = renumIdMap n es | 174 | renumIdMap n (e:es)
| Just oldId <- findAttr (QName "Id" Nothing Nothing) e =
M.insert oldId ("rId" ++ (show n)) (renumIdMap (n+1) es)
| otherwise = renumIdMap n es | 174 | false | false | 1 | 11 | 38 | 95 | 46 | 49 | null | null |
meiersi/blaze-builder | benchmarks/Throughput/BlazePut.hs | bsd-3-clause | writeWord16N1Little = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n =
do Put.putWord16le (s+0)
loop (s+1) (n-1) | 195 | writeWord16N1Little = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n =
do Put.putWord16le (s+0)
loop (s+1) (n-1) | 195 | writeWord16N1Little = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n =
do Put.putWord16le (s+0)
loop (s+1) (n-1) | 195 | false | false | 2 | 11 | 73 | 101 | 50 | 51 | null | null |
jff/TeLLer | src/CelfToGraphParser.hs | gpl-3.0 | wordsWhen :: (Char -> Bool) -> String -> [String]
wordsWhen p s = case dropWhile p s of
"" -> []
s' -> w : wordsWhen p s''
where (w, s'') = break p s' | 227 | wordsWhen :: (Char -> Bool) -> String -> [String]
wordsWhen p s = case dropWhile p s of
"" -> []
s' -> w : wordsWhen p s''
where (w, s'') = break p s' | 227 | wordsWhen p s = case dropWhile p s of
"" -> []
s' -> w : wordsWhen p s''
where (w, s'') = break p s' | 173 | false | true | 0 | 10 | 111 | 90 | 44 | 46 | null | null |
wilbowma/accelerate | Data/Array/Accelerate/Interpreter.hs | bsd-3-clause | reshapeOp :: Sugar.Shape dim
=> dim -> Delayed (Array dim' e) -> Delayed (Array dim e)
reshapeOp newShape darr@(DelayedArray {shapeDA = oldShape})
= let Array _ adata = force darr
in
BOUNDS_CHECK(check) "reshape" "shape mismatch" (Sugar.size newShape == size oldShape)
$ delay $ Array (Sugar.fr... | 341 | reshapeOp :: Sugar.Shape dim
=> dim -> Delayed (Array dim' e) -> Delayed (Array dim e)
reshapeOp newShape darr@(DelayedArray {shapeDA = oldShape})
= let Array _ adata = force darr
in
BOUNDS_CHECK(check) "reshape" "shape mismatch" (Sugar.size newShape == size oldShape)
$ delay $ Array (Sugar.fr... | 341 | reshapeOp newShape darr@(DelayedArray {shapeDA = oldShape})
= let Array _ adata = force darr
in
BOUNDS_CHECK(check) "reshape" "shape mismatch" (Sugar.size newShape == size oldShape)
$ delay $ Array (Sugar.fromElt newShape) adata | 243 | false | true | 2 | 11 | 72 | 139 | 66 | 73 | null | null |
vikraman/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | starKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "*") starKindTyConKey starKindTyCon | 102 | starKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "*") starKindTyConKey starKindTyCon | 102 | starKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "*") starKindTyConKey starKindTyCon | 102 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
kevinjardine/gruzeSnaplet | src/Snap/Snaplet/Gruze/Query.hs | gpl-2.0 | whereToString :: Int -> Maybe Int -> GrzQueryDefItem -> [GrzString]
whereToString m (Just _) (GrzQDWhere n s) =
if n >= m-1
then [" ((obj" `T.append` (T.pack $ show n) `T.append` ".guid IS NULL) OR (" `T.append` s `T.append` ")) "]
else [s] | 261 | whereToString :: Int -> Maybe Int -> GrzQueryDefItem -> [GrzString]
whereToString m (Just _) (GrzQDWhere n s) =
if n >= m-1
then [" ((obj" `T.append` (T.pack $ show n) `T.append` ".guid IS NULL) OR (" `T.append` s `T.append` ")) "]
else [s] | 261 | whereToString m (Just _) (GrzQDWhere n s) =
if n >= m-1
then [" ((obj" `T.append` (T.pack $ show n) `T.append` ".guid IS NULL) OR (" `T.append` s `T.append` ")) "]
else [s] | 193 | false | true | 0 | 13 | 63 | 116 | 64 | 52 | null | null |
iatorm/grime | Parser.hs | mit | gridSpec :: Parsec String () (Expr -> Expr)
gridSpec = do
char ':'
(xRange, yRange) <- numRange2D 1
optionMaybe $ char '}'
return $ Grid xRange yRange
-- Parse a counting specification | 193 | gridSpec :: Parsec String () (Expr -> Expr)
gridSpec = do
char ':'
(xRange, yRange) <- numRange2D 1
optionMaybe $ char '}'
return $ Grid xRange yRange
-- Parse a counting specification | 193 | gridSpec = do
char ':'
(xRange, yRange) <- numRange2D 1
optionMaybe $ char '}'
return $ Grid xRange yRange
-- Parse a counting specification | 149 | false | true | 0 | 8 | 40 | 72 | 34 | 38 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Resource type for Analytics filter.
filKind :: Lens' Filter Text
filKind = lens _filKind (\ s a -> s{_filKind = a}) | 120 | filKind :: Lens' Filter Text
filKind = lens _filKind (\ s a -> s{_filKind = a}) | 79 | filKind = lens _filKind (\ s a -> s{_filKind = a}) | 50 | true | true | 0 | 9 | 22 | 40 | 22 | 18 | null | null |
juhp/stack | src/Stack/Script.hs | bsd-3-clause | hashSnapshot :: RIO EnvConfig SnapshotCacheHash
hashSnapshot = do
sourceMap <- view $ envConfigL . to envConfigSourceMap
compilerInfo <- getCompilerInfo
let eitherPliHash (pn, dep) | PLImmutable pli <- dpLocation dep =
Right $ immutableLocSha pli
... | 757 | hashSnapshot :: RIO EnvConfig SnapshotCacheHash
hashSnapshot = do
sourceMap <- view $ envConfigL . to envConfigSourceMap
compilerInfo <- getCompilerInfo
let eitherPliHash (pn, dep) | PLImmutable pli <- dpLocation dep =
Right $ immutableLocSha pli
... | 757 | hashSnapshot = do
sourceMap <- view $ envConfigL . to envConfigSourceMap
compilerInfo <- getCompilerInfo
let eitherPliHash (pn, dep) | PLImmutable pli <- dpLocation dep =
Right $ immutableLocSha pli
| otherwise =
... | 709 | false | true | 0 | 16 | 255 | 200 | 94 | 106 | null | null |
peterokagey/haskellOEIS | test/Nonpalindromes/A252699Spec.hs | apache-2.0 | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.