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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ucsd-progsys/nanomaly | src/NanoML/Step.hs | bsd-3-clause | stepApp ms f' es = do
a <- freshTVar
b <- freshTVar
force f' (TVar a :-> TVar b) $ \f' -> case f' of
-- With _ e f -> stepApp ms f es
-- Replace _ e f -> stepApp ms f es
-- immediately apply saturated primitve wrappers
Prim1 ms' (P1 x f' t) -> do
-- traceShowM (f, es)
modify' (\s -> s { stStepKind = ... | 4,816 | stepApp ms f' es = do
a <- freshTVar
b <- freshTVar
force f' (TVar a :-> TVar b) $ \f' -> case f' of
-- With _ e f -> stepApp ms f es
-- Replace _ e f -> stepApp ms f es
-- immediately apply saturated primitve wrappers
Prim1 ms' (P1 x f' t) -> do
-- traceShowM (f, es)
modify' (\s -> s { stStepKind = ... | 4,816 | stepApp ms f' es = do
a <- freshTVar
b <- freshTVar
force f' (TVar a :-> TVar b) $ \f' -> case f' of
-- With _ e f -> stepApp ms f es
-- Replace _ e f -> stepApp ms f es
-- immediately apply saturated primitve wrappers
Prim1 ms' (P1 x f' t) -> do
-- traceShowM (f, es)
modify' (\s -> s { stStepKind = ... | 4,816 | false | false | 26 | 22 | 1,717 | 1,965 | 1,001 | 964 | null | null |
Peaker/lamdu | src/Lamdu/Data/Export/JSON/Codec.hs | gpl-3.0 | encodePresentationMode :: Encoder Meta.PresentationMode
encodePresentationMode Meta.Verbose = Aeson.String "Verbose" | 116 | encodePresentationMode :: Encoder Meta.PresentationMode
encodePresentationMode Meta.Verbose = Aeson.String "Verbose" | 116 | encodePresentationMode Meta.Verbose = Aeson.String "Verbose" | 60 | false | true | 0 | 6 | 8 | 26 | 12 | 14 | null | null |
flowbox-public/language-c-quote | Language/C/Quote/Base.hs | bsd-3-clause | qqCEnumP :: C.CEnum -> Maybe (Q Pat)
qqCEnumP (C.AntiEnum v _) = Just $ antiVarP v | 82 | qqCEnumP :: C.CEnum -> Maybe (Q Pat)
qqCEnumP (C.AntiEnum v _) = Just $ antiVarP v | 82 | qqCEnumP (C.AntiEnum v _) = Just $ antiVarP v | 45 | false | true | 0 | 8 | 15 | 46 | 22 | 24 | null | null |
tobiasreinhardt/show | IniConfiguration/src/Encoder.hs | apache-2.0 | encodeProperty :: Property -> String
encodeProperty (key, value) = key ++ "=" ++ value | 86 | encodeProperty :: Property -> String
encodeProperty (key, value) = key ++ "=" ++ value | 86 | encodeProperty (key, value) = key ++ "=" ++ value | 49 | false | true | 0 | 6 | 13 | 36 | 18 | 18 | null | null |
f-me/snap-core | src/Snap/Internal/Routing.hs | bsd-3-clause | route' pre !ctx [] !params (Dir _ fb) =
route' pre ctx [] params fb | 71 | route' pre !ctx [] !params (Dir _ fb) =
route' pre ctx [] params fb | 71 | route' pre !ctx [] !params (Dir _ fb) =
route' pre ctx [] params fb | 71 | false | false | 0 | 7 | 18 | 42 | 19 | 23 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Changes/Watch.hs | mpl-2.0 | -- | Whether to include changes indicating that items have been removed from
-- the list of changes, for example by deletion or loss of access.
cwIncludeRemoved :: Lens' ChangesWatch Bool
cwIncludeRemoved
= lens _cwIncludeRemoved
(\ s a -> s{_cwIncludeRemoved = a}) | 273 | cwIncludeRemoved :: Lens' ChangesWatch Bool
cwIncludeRemoved
= lens _cwIncludeRemoved
(\ s a -> s{_cwIncludeRemoved = a}) | 129 | cwIncludeRemoved
= lens _cwIncludeRemoved
(\ s a -> s{_cwIncludeRemoved = a}) | 85 | true | true | 0 | 9 | 49 | 43 | 23 | 20 | null | null |
shnarazk/mios | src/SAT/Mios/Main.hs | gpl-3.0 | analyzeFinal :: Solver -> Clause -> Bool -> IO ()
analyzeFinal Solver{..} confl skipFirst = do
reset conflicts
rl <- get' rootLevel
unless (rl == 0) $ do
n <- get' confl
let lstack = lits confl
loopOnConfl :: Int -> IO ()
loopOnConfl ((<= n) -> False) = return ()
loopOnConfl i = do... | 1,978 | analyzeFinal :: Solver -> Clause -> Bool -> IO ()
analyzeFinal Solver{..} confl skipFirst = do
reset conflicts
rl <- get' rootLevel
unless (rl == 0) $ do
n <- get' confl
let lstack = lits confl
loopOnConfl :: Int -> IO ()
loopOnConfl ((<= n) -> False) = return ()
loopOnConfl i = do... | 1,978 | analyzeFinal Solver{..} confl skipFirst = do
reset conflicts
rl <- get' rootLevel
unless (rl == 0) $ do
n <- get' confl
let lstack = lits confl
loopOnConfl :: Int -> IO ()
loopOnConfl ((<= n) -> False) = return ()
loopOnConfl i = do
(x :: Var) <- lit2var <$> getNth lstack... | 1,928 | false | true | 0 | 29 | 758 | 647 | 310 | 337 | null | null |
thalerjonathan/phd | thesis/code/sugarscape/src/SugarScape/Agent/Common.hs | gpl-3.0 | mrs :: Double -- ^ sugar-wealth of agent
-> Double -- ^ spice-wealth of agent
-> Double -- ^ sugar-metabolism of agent
-> Double -- ^ spice-metabolism of agent
-> Double -- ^ mrs value: less than 1 the agent values sugar more, and spice otherwise
mrs w1 w2 m1 m2 = (w2 / m2) / (w1 / m1) | 312 | mrs :: Double -- ^ sugar-wealth of agent
-> Double -- ^ spice-wealth of agent
-> Double -- ^ sugar-metabolism of agent
-> Double -- ^ spice-metabolism of agent
-> Double
mrs w1 w2 m1 m2 = (w2 / m2) / (w1 / m1) | 233 | mrs w1 w2 m1 m2 = (w2 / m2) / (w1 / m1) | 39 | true | true | 0 | 10 | 84 | 65 | 34 | 31 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/compare_5.hs | mit | primCmpNat (Succ x) Zero = GT | 29 | primCmpNat (Succ x) Zero = GT | 29 | primCmpNat (Succ x) Zero = GT | 29 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.4.1/Data/ByteString/Builder/Prim/ASCII.hs | bsd-3-clause | floatHexFixed :: FixedPrim Float
floatHexFixed = encodeFloatViaWord32F word32HexFixed | 85 | floatHexFixed :: FixedPrim Float
floatHexFixed = encodeFloatViaWord32F word32HexFixed | 85 | floatHexFixed = encodeFloatViaWord32F word32HexFixed | 52 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
ivanmoore/seedy | lib/Pelias.hs | gpl-3.0 | check JBool = checkBool . strip | 38 | check JBool = checkBool . strip | 38 | check JBool = checkBool . strip | 38 | false | false | 1 | 5 | 12 | 16 | 6 | 10 | null | null |
aufheben/Y86 | Simulator/src/Simulator/Util.hs | mit | formatInstr (Cmovl ra rb) = irr "cmovl" ra rb | 48 | formatInstr (Cmovl ra rb) = irr "cmovl" ra rb | 48 | formatInstr (Cmovl ra rb) = irr "cmovl" ra rb | 48 | false | false | 0 | 7 | 11 | 24 | 11 | 13 | null | null |
Chatanga/kage | src/Graphics/Buffer.hs | mit | ----------------------------------------------------------------------------------------------------
{-
GLSL: layout(location = 0) in vec3 vertexPosition;
or
Haskell: attribLocation program "vertexPosition" $= AttribLocation 0
-}
pointLocation = 0 | 248 | pointLocation = 0 | 17 | pointLocation = 0 | 17 | true | false | 0 | 4 | 21 | 8 | 5 | 3 | null | null |
cornell-pl/HsAdapton | weak-hashtables/src/Data/HashTable/Weak/Internal/Utils.hs | bsd-3-clause | whichBucket :: Int -> Int -> Int
whichBucket !h !sz = o
where
!o = h `mod` sz
------------------------------------------------------------------------------ | 164 | whichBucket :: Int -> Int -> Int
whichBucket !h !sz = o
where
!o = h `mod` sz
------------------------------------------------------------------------------ | 164 | whichBucket !h !sz = o
where
!o = h `mod` sz
------------------------------------------------------------------------------ | 131 | false | true | 0 | 6 | 26 | 52 | 24 | 28 | null | null |
JustusAdam/bitbucket-github-migrate | src/Migrate/Internal/Types.hs | bsd-3-clause | get :: TransferMonad r w w
get = TransferMonad (lift ask >>= readMVar . writableRef) | 84 | get :: TransferMonad r w w
get = TransferMonad (lift ask >>= readMVar . writableRef) | 84 | get = TransferMonad (lift ask >>= readMVar . writableRef) | 57 | false | true | 0 | 9 | 14 | 35 | 17 | 18 | null | null |
z0isch/advent-of-code | src/Day7.hs | bsd-3-clause | parseOr = Or <$> parseAtom <* string " OR " <*> parseAtom | 57 | parseOr = Or <$> parseAtom <* string " OR " <*> parseAtom | 57 | parseOr = Or <$> parseAtom <* string " OR " <*> parseAtom | 57 | false | false | 5 | 5 | 11 | 27 | 11 | 16 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeEventCategories.hs | mpl-2.0 | -- | Creates a value of 'DescribeEventCategories' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'decSourceType'
--
-- * 'decFilters'
describeEventCategories
:: DescribeEventCategories
describeEventCategories =
DescribeEventCa... | 394 | describeEventCategories
:: DescribeEventCategories
describeEventCategories =
DescribeEventCategories'
{ _decSourceType = Nothing
, _decFilters = Nothing
} | 174 | describeEventCategories =
DescribeEventCategories'
{ _decSourceType = Nothing
, _decFilters = Nothing
} | 119 | true | true | 1 | 7 | 72 | 39 | 23 | 16 | null | null |
eklavya/Idris-dev | src/Idris/Docs.hs | bsd-3-clause | pprintFD :: IState -> Bool -> Bool -> FunDoc -> Doc OutputAnnotation
pprintFD ist totalityFlag nsFlag (FD n doc args ty f) =
nest 4 (prettyName True nsFlag [] n
<+> colon
<+> pprintPTerm ppo [] [ n | (n@(UN n'),_,_,_) <- args
, not (T.isPrefixOf (T.pack "__") n') ] inf... | 2,403 | pprintFD :: IState -> Bool -> Bool -> FunDoc -> Doc OutputAnnotation
pprintFD ist totalityFlag nsFlag (FD n doc args ty f) =
nest 4 (prettyName True nsFlag [] n
<+> colon
<+> pprintPTerm ppo [] [ n | (n@(UN n'),_,_,_) <- args
, not (T.isPrefixOf (T.pack "__") n') ] inf... | 2,403 | pprintFD ist totalityFlag nsFlag (FD n doc args ty f) =
nest 4 (prettyName True nsFlag [] n
<+> colon
<+> pprintPTerm ppo [] [ n | (n@(UN n'),_,_,_) <- args
, not (T.isPrefixOf (T.pack "__") n') ] infixes ty
-- show doc
<$> renderDocstring (renderDocTerm (p... | 2,334 | false | true | 45 | 22 | 848 | 898 | 449 | 449 | null | null |
joelburget/haste-compiler | src/Data/JSTarget/Optimize.hs | bsd-3-clause | fromThunk :: Exp -> Maybe Stm
fromThunk (Thunk _ body) = Just body | 66 | fromThunk :: Exp -> Maybe Stm
fromThunk (Thunk _ body) = Just body | 66 | fromThunk (Thunk _ body) = Just body | 36 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
bergmark/hakyll | src/Hakyll/Core/Compiler.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- | Get the extension of the underlying identifier. Returns something like
-- @".html"@
getUnderlyingExtension :: Compiler String
getUnderlyingExtension = takeExtension . toFilePath <$> getUnderlying | 281 | getUnderlyingExtension :: Compiler String
getUnderlyingExtension = takeExtension . toFilePath <$> getUnderlying | 111 | getUnderlyingExtension = takeExtension . toFilePath <$> getUnderlying | 69 | true | true | 1 | 6 | 25 | 29 | 14 | 15 | null | null |
wincent/docvim | lib/Text/Docvim/Util.hs | mit | -- | Parse and compile a list of strings containing a translation units.
compileUnits :: [String] -> Either ParseError Node
compileUnits inputs = do
parsed <- mapM parseUnit inputs
return $ compile parsed
-- | Convenience function: Parse and compile a list of strings containing
-- translation units, but always ret... | 363 | compileUnits :: [String] -> Either ParseError Node
compileUnits inputs = do
parsed <- mapM parseUnit inputs
return $ compile parsed
-- | Convenience function: Parse and compile a list of strings containing
-- translation units, but always returns a string even in the case of an error. | 290 | compileUnits inputs = do
parsed <- mapM parseUnit inputs
return $ compile parsed
-- | Convenience function: Parse and compile a list of strings containing
-- translation units, but always returns a string even in the case of an error. | 239 | true | true | 0 | 8 | 64 | 51 | 25 | 26 | null | null |
mboes/language-arm | Language/ARM/Instr.hs | gpl-3.0 | sign :: Part -> Int -> Int -> Word32 -> CC0
sign which start end bits = K7 f g where
f k k' s | range (start + base) (end + base) s == bits = k k' s
| otherwise = k' s
g k k' s = k k' (setRange (start + base) (end + base) bits s)
base = fromEnum which `shiftL` 4 | 279 | sign :: Part -> Int -> Int -> Word32 -> CC0
sign which start end bits = K7 f g where
f k k' s | range (start + base) (end + base) s == bits = k k' s
| otherwise = k' s
g k k' s = k k' (setRange (start + base) (end + base) bits s)
base = fromEnum which `shiftL` 4 | 279 | sign which start end bits = K7 f g where
f k k' s | range (start + base) (end + base) s == bits = k k' s
| otherwise = k' s
g k k' s = k k' (setRange (start + base) (end + base) bits s)
base = fromEnum which `shiftL` 4 | 235 | false | true | 0 | 13 | 83 | 160 | 79 | 81 | null | null |
fatlazycat/eventjournal | test/EventTests.hs | bsd-3-clause | specTests :: IO TestTree
specTests = testGroup "event tests" <$> sequence [serialization] | 89 | specTests :: IO TestTree
specTests = testGroup "event tests" <$> sequence [serialization] | 89 | specTests = testGroup "event tests" <$> sequence [serialization] | 64 | false | true | 0 | 7 | 11 | 27 | 13 | 14 | null | null |
kowey/pandoc-old | src/Text/Pandoc/Blocks.hs | gpl-2.0 | breakLines :: Int -- ^ Maximum length of lines.
-> [String] -- ^ List of lines.
-> [String]
breakLines _ [] = [] | 139 | breakLines :: Int -- ^ Maximum length of lines.
-> [String] -- ^ List of lines.
-> [String]
breakLines _ [] = [] | 139 | breakLines _ [] = [] | 20 | false | true | 0 | 7 | 49 | 36 | 20 | 16 | null | null |
sgillespie/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -------------------
-- the SrcLoc returned are for the whole declarations, not just the names
hsDataFamInstBinders :: DataFamInstDecl name -> ([Located name], [LFieldOcc name])
hsDataFamInstBinders (DataFamInstDecl { dfid_defn = defn })
= hsDataDefnBinders defn | 263 | hsDataFamInstBinders :: DataFamInstDecl name -> ([Located name], [LFieldOcc name])
hsDataFamInstBinders (DataFamInstDecl { dfid_defn = defn })
= hsDataDefnBinders defn | 169 | hsDataFamInstBinders (DataFamInstDecl { dfid_defn = defn })
= hsDataDefnBinders defn | 86 | true | true | 0 | 9 | 34 | 56 | 30 | 26 | null | null |
badp/ganeti | src/Ganeti/Query/Instance.hs | gpl-2.0 | getSecondaryNodeAttribute :: (J.JSON a)
=> (Node -> a)
-> ConfigData
-> Instance
-> ResultEntry
getSecondaryNodeAttribute getter cfg inst =
rsErrorNoData $ map (J.showJSON . getter) <$> getSecondaryNodes cfg inst | 318 | getSecondaryNodeAttribute :: (J.JSON a)
=> (Node -> a)
-> ConfigData
-> Instance
-> ResultEntry
getSecondaryNodeAttribute getter cfg inst =
rsErrorNoData $ map (J.showJSON . getter) <$> getSecondaryNodes cfg inst | 318 | getSecondaryNodeAttribute getter cfg inst =
rsErrorNoData $ map (J.showJSON . getter) <$> getSecondaryNodes cfg inst | 118 | false | true | 0 | 10 | 134 | 73 | 37 | 36 | null | null |
jezen/jezenthomas.com | src/Main.hs | gpl-3.0 | publishedGroupField ::
String -- name
-> [Item String] -- posts
-> Context String -- Post context
-> Context String -- output context
publishedGroupField name posts postContext = listField name groupCtx $ do
traverse extractTime posts
>>= mapM makeItem . fmap merge . groupByYear
... | 1,122 | publishedGroupField ::
String -- name
-> [Item String] -- posts
-> Context String -- Post context
-> Context String
publishedGroupField name posts postContext = listField name groupCtx $ do
traverse extractTime posts
>>= mapM makeItem . fmap merge . groupByYear
where
groupC... | 1,102 | publishedGroupField name posts postContext = listField name groupCtx $ do
traverse extractTime posts
>>= mapM makeItem . fmap merge . groupByYear
where
groupCtx = field "year" (return . show . getYear . fst . itemBody)
<> listFieldWith "posts" postContext (return . snd . itemBody)
... | 960 | true | true | 9 | 11 | 306 | 458 | 228 | 230 | null | null |
ZjMNZHgG5jMXw/privacy-option | Semantics/POL/Valuation.hs | bsd-3-clause | valuate c@(Data _ _) = selfInformation c | 41 | valuate c@(Data _ _) = selfInformation c | 41 | valuate c@(Data _ _) = selfInformation c | 41 | false | false | 0 | 8 | 7 | 23 | 11 | 12 | null | null |
diffusionkinetics/open | postgresql-simple-expr/lib/Database/PostgreSQL/Simple/FakeRows.hs | mit | selectFKsAsMap :: forall m parent.
(MonadConnection m, HasKey parent, FromRow parent,
KeyField (Key parent), Typeable (Foreign parent))
=> Int -> String -> Bool -> m [Map String Dynamic]
selectFKsAsMap n childFld isPartOfKey = do
keys <- selectFKs @m @parent n isPartOfKey
let toMap k = M.insert childFld (toD... | 387 | selectFKsAsMap :: forall m parent.
(MonadConnection m, HasKey parent, FromRow parent,
KeyField (Key parent), Typeable (Foreign parent))
=> Int -> String -> Bool -> m [Map String Dynamic]
selectFKsAsMap n childFld isPartOfKey = do
keys <- selectFKs @m @parent n isPartOfKey
let toMap k = M.insert childFld (toD... | 387 | selectFKsAsMap n childFld isPartOfKey = do
keys <- selectFKs @m @parent n isPartOfKey
let toMap k = M.insert childFld (toDyn (Foreign k :: Foreign parent)) M.empty
return $ map toMap keys | 193 | false | true | 0 | 14 | 71 | 165 | 80 | 85 | null | null |
ArthurClune/pastewatch | tests/pastetests.hs | gpl-3.0 | runStackOverflowTest (site, url) = TestCase $ assertEqual "Testing stackoverflow" TESTED runCheck
where
runCheck = fst3 $ unsafePerformIO $
handle (\StackOverflow -> return (STACK_OVERFLOW, Nothing, Nothing))
$ doCheck site url (checkContent alertRe)
fst3 (a, _, _) = a | 298 | runStackOverflowTest (site, url) = TestCase $ assertEqual "Testing stackoverflow" TESTED runCheck
where
runCheck = fst3 $ unsafePerformIO $
handle (\StackOverflow -> return (STACK_OVERFLOW, Nothing, Nothing))
$ doCheck site url (checkContent alertRe)
fst3 (a, _, _) = a | 298 | runStackOverflowTest (site, url) = TestCase $ assertEqual "Testing stackoverflow" TESTED runCheck
where
runCheck = fst3 $ unsafePerformIO $
handle (\StackOverflow -> return (STACK_OVERFLOW, Nothing, Nothing))
$ doCheck site url (checkContent alertRe)
fst3 (a, _, _) = a | 298 | false | false | 0 | 11 | 65 | 99 | 52 | 47 | null | null |
deech/fltkhs-demos | src/Examples/make-tree.hs | mit | main :: IO ()
main = do
win' <- windowNew (Size (Width 500) (Height 500)) Nothing (Just "FLTK Tree Window")
begin win'
tree' <- treeNew (toRectangle (50,50,200,200)) (Just "Tree")
rootLabel tree' "Root Label With Items"
prefs' <- treePrefsNew
forM_ [0..(9 :: Int)] $ \_ -> do
item' <- treeItemNew prefs'
... | 429 | main :: IO ()
main = do
win' <- windowNew (Size (Width 500) (Height 500)) Nothing (Just "FLTK Tree Window")
begin win'
tree' <- treeNew (toRectangle (50,50,200,200)) (Just "Tree")
rootLabel tree' "Root Label With Items"
prefs' <- treePrefsNew
forM_ [0..(9 :: Int)] $ \_ -> do
item' <- treeItemNew prefs'
... | 429 | main = do
win' <- windowNew (Size (Width 500) (Height 500)) Nothing (Just "FLTK Tree Window")
begin win'
tree' <- treeNew (toRectangle (50,50,200,200)) (Just "Tree")
rootLabel tree' "Root Label With Items"
prefs' <- treePrefsNew
forM_ [0..(9 :: Int)] $ \_ -> do
item' <- treeItemNew prefs'
setLabel i... | 415 | false | true | 0 | 12 | 97 | 196 | 90 | 106 | null | null |
tibbe/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | genCCall dflags _ (PrimTarget MO_Memset) _
[dst,
CmmLit (CmmInt c _),
CmmLit (CmmInt n _),
CmmLit (CmmInt align _)]
| fromInteger insns <= maxInlineMemsetInsns dflags && align .&. 3 == 0 = do
code_dst <- getAnyReg dst
dst_r <- getNewRegNat size
return $... | 1,667 | genCCall dflags _ (PrimTarget MO_Memset) _
[dst,
CmmLit (CmmInt c _),
CmmLit (CmmInt n _),
CmmLit (CmmInt align _)]
| fromInteger insns <= maxInlineMemsetInsns dflags && align .&. 3 == 0 = do
code_dst <- getAnyReg dst
dst_r <- getNewRegNat size
return $... | 1,667 | genCCall dflags _ (PrimTarget MO_Memset) _
[dst,
CmmLit (CmmInt c _),
CmmLit (CmmInt n _),
CmmLit (CmmInt align _)]
| fromInteger insns <= maxInlineMemsetInsns dflags && align .&. 3 == 0 = do
code_dst <- getAnyReg dst
dst_r <- getNewRegNat size
return $... | 1,667 | false | false | 7 | 12 | 570 | 648 | 314 | 334 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | Progress metadata for all videos specified in \`AnnotateVideoRequest\`.
gcvvavpcAnnotationProgress :: Lens' GoogleCloudVideointelligenceV1_AnnotateVideoProgress [GoogleCloudVideointelligenceV1_VideoAnnotationProgress]
gcvvavpcAnnotationProgress
= lens _gcvvavpcAnnotationProgress
(\ s a -> s{_gcvvavpcAnnota... | 371 | gcvvavpcAnnotationProgress :: Lens' GoogleCloudVideointelligenceV1_AnnotateVideoProgress [GoogleCloudVideointelligenceV1_VideoAnnotationProgress]
gcvvavpcAnnotationProgress
= lens _gcvvavpcAnnotationProgress
(\ s a -> s{_gcvvavpcAnnotationProgress = a})
. _Default
. _Coerce | 294 | gcvvavpcAnnotationProgress
= lens _gcvvavpcAnnotationProgress
(\ s a -> s{_gcvvavpcAnnotationProgress = a})
. _Default
. _Coerce | 148 | true | true | 0 | 11 | 49 | 53 | 28 | 25 | null | null |
wavewave/lhc-analysis-collection | heavyhiggs/firstcut.hs | gpl-3.0 | checkl :: PhyEventNoTauNoBJet -> Bool
checkl ev = let etalst = leptonetas ev
in (not . null . filter (\x -> abs x < 1.5)) etalst | 140 | checkl :: PhyEventNoTauNoBJet -> Bool
checkl ev = let etalst = leptonetas ev
in (not . null . filter (\x -> abs x < 1.5)) etalst | 140 | checkl ev = let etalst = leptonetas ev
in (not . null . filter (\x -> abs x < 1.5)) etalst | 102 | false | true | 0 | 14 | 37 | 64 | 31 | 33 | null | null |
haskell-pkg-janitors/feed | Text/Atom/Feed.hs | bsd-3-clause | nullEntry :: Text -- ^entryId
-> TextContent -- ^entryTitle
-> Date -- ^entryUpdated
-> Entry
nullEntry i t u = Entry
{ entryId = i
, entryTitle = t
, entryUpdated = u
, entryAuthors = []
, entryCategories = []
, entryContent... | 683 | nullEntry :: Text -- ^entryId
-> TextContent -- ^entryTitle
-> Date -- ^entryUpdated
-> Entry
nullEntry i t u = Entry
{ entryId = i
, entryTitle = t
, entryUpdated = u
, entryAuthors = []
, entryCategories = []
, entryContent... | 683 | nullEntry i t u = Entry
{ entryId = i
, entryTitle = t
, entryUpdated = u
, entryAuthors = []
, entryCategories = []
, entryContent = Nothing
, entryContributor = []
, entryLinks = []
, entryPublished = Nothing
, en... | 559 | false | true | 0 | 7 | 296 | 143 | 89 | 54 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGPathSegCurvetoCubicSmoothAbs.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegCurvetoCubicSmoothAbs.x2 Mozilla SVGPathSegCurvetoCubicSmoothAbs.x2 documentation>
setX2 ::
(MonadDOM m) => SVGPathSegCurvetoCubicSmoothAbs -> Float -> m ()
setX2 self val = liftDOM (self ^. jss "x2" (toJSVal val)) | 286 | setX2 ::
(MonadDOM m) => SVGPathSegCurvetoCubicSmoothAbs -> Float -> m ()
setX2 self val = liftDOM (self ^. jss "x2" (toJSVal val)) | 137 | setX2 self val = liftDOM (self ^. jss "x2" (toJSVal val)) | 57 | true | true | 0 | 10 | 34 | 60 | 30 | 30 | null | null |
HackSoc/fresher-signup | Main.hs | mit | draw :: State -> Widget
draw (ed, p, s) = vCenter $ hCenter (hLimit 47 hacksoc) <=> hCenter (pad form) where
hacksoc = vBox
[ str "╦ ╦ ╦ ╔══╣"
, str "║ ║ ║ ║"
, str "╠═══╣ ╔═╗ ╔══╗ ║ ╔ ╚══╗ ╔══╗ ╔══╗"
, str "║ ║ ╔═╣ ║ ╠═╣ ║ ║ ║ ║"
, str "╩ ╩ ╚═╩ ╚══╝ ╩ ╚ ╠══╝ ╚... | 906 | draw :: State -> Widget
draw (ed, p, s) = vCenter $ hCenter (hLimit 47 hacksoc) <=> hCenter (pad form) where
hacksoc = vBox
[ str "╦ ╦ ╦ ╔══╣"
, str "║ ║ ║ ║"
, str "╠═══╣ ╔═╗ ╔══╗ ║ ╔ ╚══╗ ╔══╗ ╔══╗"
, str "║ ║ ╔═╣ ║ ╠═╣ ║ ║ ║ ║"
, str "╩ ╩ ╚═╩ ╚══╝ ╩ ╚ ╠══╝ ╚... | 906 | draw (ed, p, s) = vCenter $ hCenter (hLimit 47 hacksoc) <=> hCenter (pad form) where
hacksoc = vBox
[ str "╦ ╦ ╦ ╔══╣"
, str "║ ║ ║ ║"
, str "╠═══╣ ╔═╗ ╔══╗ ║ ╔ ╚══╗ ╔══╗ ╔══╗"
, str "║ ║ ╔═╣ ║ ╠═╣ ║ ║ ║ ║"
, str "╩ ╩ ╚═╩ ╚══╝ ╩ ╚ ╠══╝ ╚══╝ ╚══╝"
, str " ... | 882 | false | true | 0 | 13 | 295 | 309 | 152 | 157 | null | null |
kishoredbn/barrelfish | hake/Main.hs | mit | reePath o BFSrcTree "root" path hakepath =
relPath (opt_bfsourcedir o) path hakepath
| 89 | treePath o BFSrcTree "root" path hakepath =
relPath (opt_bfsourcedir o) path hakepath | 89 | treePath o BFSrcTree "root" path hakepath =
relPath (opt_bfsourcedir o) path hakepath | 89 | false | false | 0 | 7 | 16 | 30 | 14 | 16 | null | null |
gridaphobe/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gen_Lift_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Lift_binds loc tycon
| null data_cons = (unitBag (L loc $ mkFunBind (L loc lift_RDR)
[mkMatch [nlWildPat] errorMsg_Expr
(noLoc emptyLocalBinds)])
, emptyB... | 2,255 | gen_Lift_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Lift_binds loc tycon
| null data_cons = (unitBag (L loc $ mkFunBind (L loc lift_RDR)
[mkMatch [nlWildPat] errorMsg_Expr
(noLoc emptyLocalBinds)])
, emptyB... | 2,255 | gen_Lift_binds loc tycon
| null data_cons = (unitBag (L loc $ mkFunBind (L loc lift_RDR)
[mkMatch [nlWildPat] errorMsg_Expr
(noLoc emptyLocalBinds)])
, emptyBag)
| otherwise = (unitBag lift_bind, emptyBag)
where
errorMsg_E... | 2,183 | false | true | 2 | 14 | 855 | 541 | 272 | 269 | null | null |
DanielOberg/case-in-point | dist/build/autogen/Paths_case_in_point.hs | bsd-3-clause | getLibDir = catch (getEnv "case_in_point_libdir") (\_ -> return libdir) | 71 | getLibDir = catch (getEnv "case_in_point_libdir") (\_ -> return libdir) | 71 | getLibDir = catch (getEnv "case_in_point_libdir") (\_ -> return libdir) | 71 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
gambogi/tyle | Tyle/Parsers.hs | mit | application :: Parser Expr
application = try $ do
t0 <- term
spaces
t1 <- term
return (App t0 t1) | 105 | application :: Parser Expr
application = try $ do
t0 <- term
spaces
t1 <- term
return (App t0 t1) | 105 | application = try $ do
t0 <- term
spaces
t1 <- term
return (App t0 t1) | 78 | false | true | 0 | 10 | 27 | 49 | 22 | 27 | null | null |
kebertx/GoFu | src/Go/Move.hs | bsd-3-clause | -- Convert a property to a valid move
fromProperty :: Property -> Move
fromProperty (Property label values)
| label == "AB" = Add Black coords
| label == "AE" = Add Empty coords
| label == "AW" = Add White coords
| label == "B" = if null coords then Pass Black else Move Black $ head coords
| label =... | 508 | fromProperty :: Property -> Move
fromProperty (Property label values)
| label == "AB" = Add Black coords
| label == "AE" = Add Empty coords
| label == "AW" = Add White coords
| label == "B" = if null coords then Pass Black else Move Black $ head coords
| label == "W" = if null coords then Pass White... | 470 | fromProperty (Property label values)
| label == "AB" = Add Black coords
| label == "AE" = Add Empty coords
| label == "AW" = Add White coords
| label == "B" = if null coords then Pass Black else Move Black $ head coords
| label == "W" = if null coords then Pass White else Move White $ head coords
... | 437 | true | true | 5 | 8 | 125 | 176 | 82 | 94 | null | null |
sdiehl/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | emptyTcEvBinds :: TcEvBinds
emptyTcEvBinds = EvBinds emptyBag | 61 | emptyTcEvBinds :: TcEvBinds
emptyTcEvBinds = EvBinds emptyBag | 61 | emptyTcEvBinds = EvBinds emptyBag | 33 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
MattWis/smallEmail | smallEmail/Test.hs | mit | subject1 = "Google Account: access for less secure apps has been enabled" | 73 | subject1 = "Google Account: access for less secure apps has been enabled" | 73 | subject1 = "Google Account: access for less secure apps has been enabled" | 73 | false | false | 1 | 5 | 11 | 10 | 3 | 7 | null | null |
laMudri/bridge-go | Main.hs | gpl-2.0 | external ∷ Index → (Point → Bool) → Point → Bool
external size f q = not (f q) ∧ case find (\(Space ps _) → q S.∈ ps)
(S.elems (falseSpaces size f)) of
Just s → externalSpace s
Nothing → error "Eh?" | 316 | external ∷ Index → (Point → Bool) → Point → Bool
external size f q = not (f q) ∧ case find (\(Space ps _) → q S.∈ ps)
(S.elems (falseSpaces size f)) of
Just s → externalSpace s
Nothing → error "Eh?" | 314 | external size f q = not (f q) ∧ case find (\(Space ps _) → q S.∈ ps)
(S.elems (falseSpaces size f)) of
Just s → externalSpace s
Nothing → error "Eh?" | 265 | false | true | 0 | 11 | 160 | 123 | 59 | 64 | null | null |
juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Intermediate/ResolverName.hs | mit | isIEClafer :: IElement -> Bool
isIEClafer (IEClafer _) = True | 61 | isIEClafer :: IElement -> Bool
isIEClafer (IEClafer _) = True | 61 | isIEClafer (IEClafer _) = True | 30 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
haslab/SecreC | src/Language/SecreC/Transformation/Simplify.hs | gpl-3.0 | simplifyProcedureDeclaration :: SimplifyG loc m ProcedureDeclaration
simplifyProcedureDeclaration (OperatorDeclaration l ret op args ctx anns body) = do
(ss0,ret') <- simplifyReturnTypeSpecifier True ret
(ss1,ctx') <- simplifyTemplateContext ctx
anns' <- simplifyProcedureAnns anns
body' <- simplifyState... | 503 | simplifyProcedureDeclaration :: SimplifyG loc m ProcedureDeclaration
simplifyProcedureDeclaration (OperatorDeclaration l ret op args ctx anns body) = do
(ss0,ret') <- simplifyReturnTypeSpecifier True ret
(ss1,ctx') <- simplifyTemplateContext ctx
anns' <- simplifyProcedureAnns anns
body' <- simplifyState... | 503 | simplifyProcedureDeclaration (OperatorDeclaration l ret op args ctx anns body) = do
(ss0,ret') <- simplifyReturnTypeSpecifier True ret
(ss1,ctx') <- simplifyTemplateContext ctx
anns' <- simplifyProcedureAnns anns
body' <- simplifyStatements Nothing body
ctxanns <- stmtsAnns (ss0++ss1)
ctxanns' <... | 434 | false | true | 0 | 11 | 81 | 161 | 76 | 85 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/SrcLoc.hs | bsd-3-clause | realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
realSrcSpanEnd s = mkRealSrcLoc (srcSpanFile s)
(srcSpanEndLine s)
(srcSpanEndCol s) | 192 | realSrcSpanEnd :: RealSrcSpan -> RealSrcLoc
realSrcSpanEnd s = mkRealSrcLoc (srcSpanFile s)
(srcSpanEndLine s)
(srcSpanEndCol s) | 192 | realSrcSpanEnd s = mkRealSrcLoc (srcSpanFile s)
(srcSpanEndLine s)
(srcSpanEndCol s) | 148 | false | true | 0 | 7 | 78 | 43 | 21 | 22 | null | null |
sapek/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | -- | Wrap a list of inline elements in an ICML Paragraph Style
parStyle :: WriterOptions -> Style -> [Inline] -> WS Doc
parStyle opts style lst =
let slipIn x y = if null y
then x
else x ++ " > " ++ y
stlStr = foldr slipIn [] $ reverse style
stl = if null stl... | 1,234 | parStyle :: WriterOptions -> Style -> [Inline] -> WS Doc
parStyle opts style lst =
let slipIn x y = if null y
then x
else x ++ " > " ++ y
stlStr = foldr slipIn [] $ reverse style
stl = if null stlStr
then ""
else "Paragraph... | 1,171 | parStyle opts style lst =
let slipIn x y = if null y
then x
else x ++ " > " ++ y
stlStr = foldr slipIn [] $ reverse style
stl = if null stlStr
then ""
else "ParagraphStyle/" ++ stlStr
attrs = ("AppliedParagraphStyle"... | 1,114 | true | true | 0 | 19 | 502 | 324 | 166 | 158 | null | null |
gizmo-mk0/kartofwar-server | src/Common.hs | unlicense | waypointToCoord (MovingUnit mf _ _ _) = mf | 42 | waypointToCoord (MovingUnit mf _ _ _) = mf | 42 | waypointToCoord (MovingUnit mf _ _ _) = mf | 42 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
rvion/stack | src/Stack/Package.hs | bsd-3-clause | readPackage :: (MonadLogger m, MonadIO m, MonadThrow m, MonadCatch m)
=> PackageConfig
-> Path Abs File
-> m ([PWarning],Package)
readPackage packageConfig cabalfp =
do (warnings,gpkg) <- readPackageUnresolved cabalfp
return (warnings,resolvePackage packageConfig gpkg)
-- | R... | 379 | readPackage :: (MonadLogger m, MonadIO m, MonadThrow m, MonadCatch m)
=> PackageConfig
-> Path Abs File
-> m ([PWarning],Package)
readPackage packageConfig cabalfp =
do (warnings,gpkg) <- readPackageUnresolved cabalfp
return (warnings,resolvePackage packageConfig gpkg)
-- | R... | 379 | readPackage packageConfig cabalfp =
do (warnings,gpkg) <- readPackageUnresolved cabalfp
return (warnings,resolvePackage packageConfig gpkg)
-- | Reads and exposes the package information, from a ByteString | 213 | false | true | 0 | 10 | 86 | 102 | 52 | 50 | null | null |
keera-studios/hsQt | Qtc/Enums/Core/QChar.hs | bsd-2-clause | eDual :: Joining
eDual
= ieJoining $ 1 | 40 | eDual :: Joining
eDual
= ieJoining $ 1 | 40 | eDual
= ieJoining $ 1 | 23 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
maciej-bendkowski/boltzmann-brain | Data/Boltzmann/System/Utils.hs | bsd-3-clause | -- | Detects whether the given system, satisfying H(0,0) = 0
-- and having a nilpotent Jacobian matrix, admits zero coordinates
-- in its solution. See also the 0-coord subroutine of Pivoteau et al.
zeroCoordinates :: System a -> Bool
zeroCoordinates sys = zeroCoordinates' sys m f
where f = M.fromSet (const Zer... | 357 | zeroCoordinates :: System a -> Bool
zeroCoordinates sys = zeroCoordinates' sys m f
where f = M.fromSet (const Zero) $ types sys
m = size sys | 154 | zeroCoordinates sys = zeroCoordinates' sys m f
where f = M.fromSet (const Zero) $ types sys
m = size sys | 118 | true | true | 1 | 8 | 77 | 65 | 32 | 33 | null | null |
kearnh/HToyRayTracer | src/Scene.hs | bsd-3-clause | elemObj :: String -> [RTObject] -> Bool
elemObj k tab = elem k $ (map fst $ readObjs tab) | 89 | elemObj :: String -> [RTObject] -> Bool
elemObj k tab = elem k $ (map fst $ readObjs tab) | 89 | elemObj k tab = elem k $ (map fst $ readObjs tab) | 49 | false | true | 2 | 8 | 18 | 54 | 24 | 30 | null | null |
yu-i9/HaSC | src/HaSC/Prim/Semantic.hs | mit | exprTypeCheck (A_MultiExpr es) = liftM last (mapM exprTypeCheck es) | 70 | exprTypeCheck (A_MultiExpr es) = liftM last (mapM exprTypeCheck es) | 70 | exprTypeCheck (A_MultiExpr es) = liftM last (mapM exprTypeCheck es) | 70 | false | false | 0 | 7 | 11 | 29 | 13 | 16 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/FunDeps.hs | bsd-3-clause | oclose :: [PredType] -> TyCoVarSet -> TyCoVarSet
-- See Note [The liberal coverage condition]
oclose preds fixed_tvs
| null tv_fds = fixed_tvs -- Fast escape hatch for common case.
| otherwise = fixVarSet extend fixed_tvs
where
extend fixed_tvs = foldl add fixed_tvs tv_fds
where
add fixed_t... | 2,849 | oclose :: [PredType] -> TyCoVarSet -> TyCoVarSet
oclose preds fixed_tvs
| null tv_fds = fixed_tvs -- Fast escape hatch for common case.
| otherwise = fixVarSet extend fixed_tvs
where
extend fixed_tvs = foldl add fixed_tvs tv_fds
where
add fixed_tvs (ls,rs)
| ls `subVarSet` fixed... | 2,804 | oclose preds fixed_tvs
| null tv_fds = fixed_tvs -- Fast escape hatch for common case.
| otherwise = fixVarSet extend fixed_tvs
where
extend fixed_tvs = foldl add fixed_tvs tv_fds
where
add fixed_tvs (ls,rs)
| ls `subVarSet` fixed_tvs = fixed_tvs `unionVarSet` closeOverKinds rs
... | 2,755 | true | true | 3 | 13 | 898 | 338 | 177 | 161 | null | null |
thinkpad20/s3-streams | tests/Network/AWS/Tests.hs | mit | runTest :: IO ()
runTest = do
cmd <- testCommand
let creq = canonicalRequest cmd
assertEqual creq correctCanonRequest "canonical request"
s2s <- stringToSign cmd
assertEqual s2s correctStringToSign "string to sign"
sig <- v4Signature cmd
assertEqual sig correctSignature "signature"
req <- awsRequest cmd... | 410 | runTest :: IO ()
runTest = do
cmd <- testCommand
let creq = canonicalRequest cmd
assertEqual creq correctCanonRequest "canonical request"
s2s <- stringToSign cmd
assertEqual s2s correctStringToSign "string to sign"
sig <- v4Signature cmd
assertEqual sig correctSignature "signature"
req <- awsRequest cmd... | 410 | runTest = do
cmd <- testCommand
let creq = canonicalRequest cmd
assertEqual creq correctCanonRequest "canonical request"
s2s <- stringToSign cmd
assertEqual s2s correctStringToSign "string to sign"
sig <- v4Signature cmd
assertEqual sig correctSignature "signature"
req <- awsRequest cmd
corReq <- corr... | 393 | false | true | 0 | 10 | 72 | 127 | 55 | 72 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ParseLazy.hs | gpl-3.0 | entitydef :: XParser EntityDef
entitydef =
oneOf' [ ("entityvalue", entityvalue >>= return . DefEntityValue)
, ("external", do eid <- externalid
ndd <- maybe ndatadecl
return (DefExternalID eid ndd))
] | 294 | entitydef :: XParser EntityDef
entitydef =
oneOf' [ ("entityvalue", entityvalue >>= return . DefEntityValue)
, ("external", do eid <- externalid
ndd <- maybe ndatadecl
return (DefExternalID eid ndd))
] | 294 | entitydef =
oneOf' [ ("entityvalue", entityvalue >>= return . DefEntityValue)
, ("external", do eid <- externalid
ndd <- maybe ndatadecl
return (DefExternalID eid ndd))
] | 263 | false | true | 1 | 12 | 121 | 78 | 37 | 41 | null | null |
kadena-io/pact | src/Pact/Types/Term.hs | bsd-3-clause | termEq1 _ (TLiteral a _) (TLiteral b _) = a == b | 48 | termEq1 _ (TLiteral a _) (TLiteral b _) = a == b | 48 | termEq1 _ (TLiteral a _) (TLiteral b _) = a == b | 48 | false | false | 0 | 7 | 11 | 33 | 16 | 17 | null | null |
j5b/ps-pc | Parser_test.hs | gpl-3.0 | parsimpletests = maplabel "Simple parser tests" [partest1, partest2, partest3,
partest4, partest5, partest6,
partest7, partest8, partest9] | 239 | parsimpletests = maplabel "Simple parser tests" [partest1, partest2, partest3,
partest4, partest5, partest6,
partest7, partest8, partest9] | 239 | parsimpletests = maplabel "Simple parser tests" [partest1, partest2, partest3,
partest4, partest5, partest6,
partest7, partest8, partest9] | 239 | false | false | 0 | 6 | 115 | 38 | 23 | 15 | null | null |
PaulGustafson/stringnet | Test.hs | mit | rightT (TensorM a b) = b | 24 | rightT (TensorM a b) = b | 24 | rightT (TensorM a b) = b | 24 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
bergmark/hlint | data/Default.hs | bsd-3-clause | error = maximumBy compare ==> maximum | 37 | error = maximumBy compare ==> maximum | 37 | error = maximumBy compare ==> maximum | 37 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
rvion/lamdu | Lamdu/GUI/TypeView.hs | gpl-3.0 | makeTFun :: MonadA m => ParentPrecedence -> Type -> Type -> M m View
makeTFun parentPrecedence a b =
case a of
T.TRecord T.CEmpty -> [text "◗ "]
_ ->
[ splitMake (ParentPrecedence 1) a
, text " → "
]
++ [splitMake (ParentPrecedence 0) b]
& sequence
<&> hbox
>>= parens... | 376 | makeTFun :: MonadA m => ParentPrecedence -> Type -> Type -> M m View
makeTFun parentPrecedence a b =
case a of
T.TRecord T.CEmpty -> [text "◗ "]
_ ->
[ splitMake (ParentPrecedence 1) a
, text " → "
]
++ [splitMake (ParentPrecedence 0) b]
& sequence
<&> hbox
>>= parens... | 376 | makeTFun parentPrecedence a b =
case a of
T.TRecord T.CEmpty -> [text "◗ "]
_ ->
[ splitMake (ParentPrecedence 1) a
, text " → "
]
++ [splitMake (ParentPrecedence 0) b]
& sequence
<&> hbox
>>= parens parentPrecedence (MyPrecedence 0)
>>= addValPadding | 307 | false | true | 0 | 16 | 112 | 136 | 66 | 70 | null | null |
dmp1ce/DMSS | src-test/CLITest.hs | unlicense | datadirCreated :: Assertion
datadirCreated = withTemporaryTestDirectory tempDir
( \homedir -> do
let newDatadir = homedir ++ "/test"
-- Simulate a list user command which will tigger data directory creation.
process (Cli (Just newDatadir) cliPort SilentOff (Id IdList))
-- Verify data directory was cr... | 842 | datadirCreated :: Assertion
datadirCreated = withTemporaryTestDirectory tempDir
( \homedir -> do
let newDatadir = homedir ++ "/test"
-- Simulate a list user command which will tigger data directory creation.
process (Cli (Just newDatadir) cliPort SilentOff (Id IdList))
-- Verify data directory was cr... | 842 | datadirCreated = withTemporaryTestDirectory tempDir
( \homedir -> do
let newDatadir = homedir ++ "/test"
-- Simulate a list user command which will tigger data directory creation.
process (Cli (Just newDatadir) cliPort SilentOff (Id IdList))
-- Verify data directory was created
pathExists <- does... | 814 | false | true | 0 | 17 | 160 | 185 | 89 | 96 | null | null |
yav/monadlib | src/MonadLib/Derive.hs | mit | -- | Derive the implementation of '>>=' from 'Monad'.
derive_bind :: (Monad m) => Iso m n -> n a -> (a -> n b) -> n b
derive_bind iso m k = close iso ((open iso m) >>= \x -> open iso (k x)) | 189 | derive_bind :: (Monad m) => Iso m n -> n a -> (a -> n b) -> n b
derive_bind iso m k = close iso ((open iso m) >>= \x -> open iso (k x)) | 135 | derive_bind iso m k = close iso ((open iso m) >>= \x -> open iso (k x)) | 71 | true | true | 0 | 11 | 44 | 97 | 48 | 49 | null | null |
robbertkrebbers/fewdigits | Data/Real/DReal.hs | bsd-2-clause | dplusCts :: Dyadic :=> Dyadic :=> Dyadic
dplusCts = mkUniformCts id dplusBaseCts | 80 | dplusCts :: Dyadic :=> Dyadic :=> Dyadic
dplusCts = mkUniformCts id dplusBaseCts | 80 | dplusCts = mkUniformCts id dplusBaseCts | 39 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
holzensp/ghc | libraries/base/GHC/IO/Handle/Types.hs | bsd-3-clause | checkHandleInvariants h_ = do
bbuf <- readIORef (haByteBuffer h_)
checkBuffer bbuf
cbuf <- readIORef (haCharBuffer h_)
checkBuffer cbuf
when (isWriteBuffer cbuf && not (isEmptyBuffer cbuf)) $
error ("checkHandleInvariants: char write buffer non-empty: " ++
summaryBuffer bbuf ++ ", " ++ summaryBuffer c... | 2,546 | checkHandleInvariants h_ = do
bbuf <- readIORef (haByteBuffer h_)
checkBuffer bbuf
cbuf <- readIORef (haCharBuffer h_)
checkBuffer cbuf
when (isWriteBuffer cbuf && not (isEmptyBuffer cbuf)) $
error ("checkHandleInvariants: char write buffer non-empty: " ++
summaryBuffer bbuf ++ ", " ++ summaryBuffer c... | 2,546 | checkHandleInvariants h_ = do
bbuf <- readIORef (haByteBuffer h_)
checkBuffer bbuf
cbuf <- readIORef (haCharBuffer h_)
checkBuffer cbuf
when (isWriteBuffer cbuf && not (isEmptyBuffer cbuf)) $
error ("checkHandleInvariants: char write buffer non-empty: " ++
summaryBuffer bbuf ++ ", " ++ summaryBuffer c... | 2,546 | false | false | 0 | 13 | 463 | 196 | 110 | 86 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | ceremonially = id | 17 | ceremonially = id | 17 | ceremonially = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
siddhanathan/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | justDataCon :: DataCon
justDataCon = pcDataCon justDataConName alpha_tyvar [alphaTy] maybeTyCon | 95 | justDataCon :: DataCon
justDataCon = pcDataCon justDataConName alpha_tyvar [alphaTy] maybeTyCon | 95 | justDataCon = pcDataCon justDataConName alpha_tyvar [alphaTy] maybeTyCon | 72 | false | true | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/Data/Bits.hs | bsd-3-clause | -- | Default implementation for 'testBit'.
--
-- Note that: @testBitDefault x i = (x .&. bit i) /= 0@
testBitDefault :: (Bits a, Num a) => a -> Int -> Bool
testBitDefault x i = (x .&. bit i) /= 0 | 196 | testBitDefault :: (Bits a, Num a) => a -> Int -> Bool
testBitDefault x i = (x .&. bit i) /= 0 | 94 | testBitDefault x i = (x .&. bit i) /= 0 | 39 | true | true | 0 | 8 | 42 | 56 | 30 | 26 | null | null |
DanielSchuessler/hstri | THUtil.hs | gpl-3.0 | inheritPretty
:: (Convertible accessor ExpQ,
Convertible sub TypeQ,
Convertible super TypeQ) =>
sub -> super -> accessor -> Q [Dec]
inheritPretty = inheritSingleArgClass ''Pretty ['pretty] [] | 210 | inheritPretty
:: (Convertible accessor ExpQ,
Convertible sub TypeQ,
Convertible super TypeQ) =>
sub -> super -> accessor -> Q [Dec]
inheritPretty = inheritSingleArgClass ''Pretty ['pretty] [] | 210 | inheritPretty = inheritSingleArgClass ''Pretty ['pretty] [] | 59 | false | true | 0 | 11 | 44 | 76 | 38 | 38 | null | null |
spechub/Hets | CommonLogic/Tools.hs | gpl-2.0 | nonToplevelNames :: TERM -> Set NAME
nonToplevelNames trm = case trm of
Name_term _ -> Set.empty
Comment_term t _ _ -> nonToplevelNames t
_ -> indvC_term trm
-- | retrieves the individual constants from a term | 234 | nonToplevelNames :: TERM -> Set NAME
nonToplevelNames trm = case trm of
Name_term _ -> Set.empty
Comment_term t _ _ -> nonToplevelNames t
_ -> indvC_term trm
-- | retrieves the individual constants from a term | 234 | nonToplevelNames trm = case trm of
Name_term _ -> Set.empty
Comment_term t _ _ -> nonToplevelNames t
_ -> indvC_term trm
-- | retrieves the individual constants from a term | 197 | false | true | 0 | 8 | 60 | 65 | 30 | 35 | null | null |
imalsogreg/Haskell-Lens-Tutorial-Library | src/Control/Lens/Tutorial.hs | bsd-3-clause | shiftAtomX :: Atom -> Atom
shiftAtomX = over (point . x) (+ 1) | 62 | shiftAtomX :: Atom -> Atom
shiftAtomX = over (point . x) (+ 1) | 62 | shiftAtomX = over (point . x) (+ 1) | 35 | false | true | 0 | 7 | 12 | 31 | 17 | 14 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | Information corresponding to all frames where this object track appears.
-- Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
-- messages in frames. Streaming mode: it can only be one
-- ObjectTrackingFrame message in frames.
gcvvota2Frames :: Lens' GoogleCloudVideointelligenceV1p1beta1_Objec... | 512 | gcvvota2Frames :: Lens' GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation [GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame]
gcvvota2Frames
= lens _gcvvota2Frames
(\ s a -> s{_gcvvota2Frames = a})
. _Default
. _Coerce | 259 | gcvvota2Frames
= lens _gcvvota2Frames
(\ s a -> s{_gcvvota2Frames = a})
. _Default
. _Coerce | 112 | true | true | 0 | 11 | 78 | 56 | 31 | 25 | null | null |
kvelicka/frag | src/Raybox.hs | gpl-2.0 | -- tests if a ray intersects a box
rayBox :: (Double,Double,Double) -> (Double,Double,Double) ->
(Double,Double,Double) -> (Double,Double,Double) -> Bool
rayBox (rayOx,rayOy,rayOz) (rayDx,rayDy,rayDz) (minx,miny,minz)(maxx,maxy,maxz)
| (rayOx,rayOy,rayOz) == (rayDx,rayDy,rayDz) = False
| othe... | 703 | rayBox :: (Double,Double,Double) -> (Double,Double,Double) ->
(Double,Double,Double) -> (Double,Double,Double) -> Bool
rayBox (rayOx,rayOy,rayOz) (rayDx,rayDy,rayDz) (minx,miny,minz)(maxx,maxy,maxz)
| (rayOx,rayOy,rayOz) == (rayDx,rayDy,rayDz) = False
| otherwise =
case ((txmin > tymax)... | 666 | rayBox (rayOx,rayOy,rayOz) (rayDx,rayDy,rayDz) (minx,miny,minz)(maxx,maxy,maxz)
| (rayOx,rayOy,rayOz) == (rayDx,rayDy,rayDz) = False
| otherwise =
case ((txmin > tymax) || (tymin > txmax)) of
True -> False
_ -> intersectz
where (txmin,txmax) = getT rayOx rayDx minx maxx
... | 530 | true | true | 1 | 11 | 197 | 305 | 167 | 138 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | -- | Build error message for equation that has a bare type variable in the RHS
-- but LHS pattern is not a bare type variable.
bareVariableInRHSErr :: [Type] -> InjErrorBuilder -> CoAxBranch
-> (SDoc, SrcSpan)
bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald Tr... | 592 | bareVariableInRHSErr :: [Type] -> InjErrorBuilder -> CoAxBranch
-> (SDoc, SrcSpan)
bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald True $$
text "RHS of injective type family equation is a bare" <+>
text "type variable" $$
... | 465 | bareVariableInRHSErr tys errorBuilder famInst
= errorBuilder (injectivityErrorHerald True $$
text "RHS of injective type family equation is a bare" <+>
text "type variable" $$
text "but these LHS type and kind patterns are not bare" <+>
text "var... | 361 | true | true | 0 | 12 | 172 | 96 | 46 | 50 | null | null |
mydaum/cabal | cabal-install/Distribution/Client/Configure.hs | bsd-3-clause | isRelaxDeps RelaxDepsAll = True | 36 | isRelaxDeps RelaxDepsAll = True | 36 | isRelaxDeps RelaxDepsAll = True | 36 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
gennady-em/haskel | src/E_Yi.hs | gpl-2.0 | releaseSignals :: IO ()
releaseSignals =
sequence_ $ flip map [sigINT, sigPIPE, sigHUP, sigABRT, sigTERM]
(\sig -> installHandler sig Default Nothing) | 170 | releaseSignals :: IO ()
releaseSignals =
sequence_ $ flip map [sigINT, sigPIPE, sigHUP, sigABRT, sigTERM]
(\sig -> installHandler sig Default Nothing) | 170 | releaseSignals =
sequence_ $ flip map [sigINT, sigPIPE, sigHUP, sigABRT, sigTERM]
(\sig -> installHandler sig Default Nothing) | 146 | false | true | 2 | 8 | 40 | 66 | 32 | 34 | null | null |
chowells79/breakout | src/Main.hs | gpl-2.0 | windowAndRenderer :: String -> CInt -> CInt -> Word32 -> Word32
-> IO (Either String (Window, Renderer))
windowAndRenderer title width height wFlags rFlags =
withCString title $ \name -> runEitherT $ do
w <- nullCheck $ createWindow
name
SD... | 561 | windowAndRenderer :: String -> CInt -> CInt -> Word32 -> Word32
-> IO (Either String (Window, Renderer))
windowAndRenderer title width height wFlags rFlags =
withCString title $ \name -> runEitherT $ do
w <- nullCheck $ createWindow
name
SD... | 561 | windowAndRenderer title width height wFlags rFlags =
withCString title $ \name -> runEitherT $ do
w <- nullCheck $ createWindow
name
SDL_WINDOWPOS_CENTERED
SDL_WINDOWPOS_CENTERED
width
... | 438 | false | true | 0 | 14 | 251 | 134 | 66 | 68 | null | null |
solidsnack/cassava | Data/Csv/Conversion.hs | bsd-3-clause | -- | Run a 'Parser', returning either @'Left' errMsg@ or @'Right'
-- result@. Forces the value in the 'Left' or 'Right' constructors to
-- weak head normal form.
--
-- You most likely won't need to use this function directly, but it's
-- included for completeness.
runParser :: Parser a -> Either String a
runParser p = ... | 404 | runParser :: Parser a -> Either String a
runParser p = unParser p left right
where
left !errMsg = Left errMsg
right !x = Right x
| 139 | runParser p = unParser p left right
where
left !errMsg = Left errMsg
right !x = Right x
| 98 | true | true | 1 | 6 | 82 | 66 | 33 | 33 | null | null |
abakst/liquidhaskell | tests/pos/test1.hs | bsd-3-clause | myabs x = if x > 0 then x else 0 - x | 36 | myabs x = if x > 0 then x else 0 - x | 36 | myabs x = if x > 0 then x else 0 - x | 36 | false | false | 0 | 6 | 12 | 25 | 13 | 12 | null | null |
Teaspot-Studio/netwire | Control/Wire/Core.hs | bsd-3-clause | lstrict :: (a, b) -> (a, b)
lstrict (x, y) = x `seq` (x, y) | 59 | lstrict :: (a, b) -> (a, b)
lstrict (x, y) = x `seq` (x, y) | 59 | lstrict (x, y) = x `seq` (x, y) | 31 | false | true | 0 | 6 | 14 | 48 | 29 | 19 | null | null |
chadbrewbaker/shellcheck | shellcheck.hs | gpl-3.0 | getOption (Flag var val:_) name | name == var = return val | 58 | getOption (Flag var val:_) name | name == var = return val | 58 | getOption (Flag var val:_) name | name == var = return val | 58 | false | false | 0 | 8 | 11 | 36 | 16 | 20 | null | null |
hpacheco/jasminv | src/Language/Jasmin/Parser/Parser.hs | gpl-3.0 | quantifiedExpr :: MonadIO m => ParserT m (Pexpr_r Position)
quantifiedExpr = ann $ apA4 quantifier (sepBy1 annargNoExpr (tok COMMA)) (tok SEMICOLON) pexpr (\x1 x2 x3 x4 -> QuantifiedExpr x1 x2 x4) | 196 | quantifiedExpr :: MonadIO m => ParserT m (Pexpr_r Position)
quantifiedExpr = ann $ apA4 quantifier (sepBy1 annargNoExpr (tok COMMA)) (tok SEMICOLON) pexpr (\x1 x2 x3 x4 -> QuantifiedExpr x1 x2 x4) | 196 | quantifiedExpr = ann $ apA4 quantifier (sepBy1 annargNoExpr (tok COMMA)) (tok SEMICOLON) pexpr (\x1 x2 x3 x4 -> QuantifiedExpr x1 x2 x4) | 136 | false | true | 0 | 10 | 30 | 85 | 42 | 43 | null | null |
acowley/ghc | compiler/utils/Bag.hs | bsd-3-clause | mapAndUnzipBagM :: Monad m => (a -> m (b,c)) -> Bag a -> m (Bag b, Bag c)
mapAndUnzipBagM _ EmptyBag = return (EmptyBag, EmptyBag) | 137 | mapAndUnzipBagM :: Monad m => (a -> m (b,c)) -> Bag a -> m (Bag b, Bag c)
mapAndUnzipBagM _ EmptyBag = return (EmptyBag, EmptyBag) | 137 | mapAndUnzipBagM _ EmptyBag = return (EmptyBag, EmptyBag) | 63 | false | true | 0 | 10 | 31 | 74 | 37 | 37 | null | null |
fmapfmapfmap/amazonka | amazonka-s3/gen/Network/AWS/S3/CreateMultipartUpload.hs | mpl-2.0 | -- | Specifies the AWS KMS key ID to use for object encryption. All GET and
-- PUT requests for an object protected by AWS KMS will fail if not made
-- via SSL or using SigV4. Documentation on configuring any of the
-- officially supported AWS SDKs and CLI can be found at
-- http:\/\/docs.aws.amazon.com\/AmazonS3\/late... | 523 | cmuSSEKMSKeyId :: Lens' CreateMultipartUpload (Maybe Text)
cmuSSEKMSKeyId = lens _cmuSSEKMSKeyId (\ s a -> s{_cmuSSEKMSKeyId = a}) . mapping _Sensitive | 151 | cmuSSEKMSKeyId = lens _cmuSSEKMSKeyId (\ s a -> s{_cmuSSEKMSKeyId = a}) . mapping _Sensitive | 92 | true | true | 0 | 10 | 75 | 57 | 32 | 25 | null | null |
wdanilo/data-rtuple | src/Data/RTuple/Class.hs | apache-2.0 | zip5 _ Null _ _ _ = Null | 76 | zip5 _ Null _ _ _ = Null | 76 | zip5 _ Null _ _ _ = Null | 76 | false | false | 1 | 5 | 59 | 17 | 8 | 9 | null | null |
hansroland/reflex-dom-brownies | samples/canvas01.hs | bsd-3-clause | main :: IO ()
main = mainWidget $ do
el "h2" $ text "A first canvas example"
evPostBuild <- getPostBuild
evRed <- button "Red"
evGreen <- button "Green"
el "br" blank
let evImg = leftmost [greenPixels <$ evPostBuild, redPixels <$ evRed, greenPixels <$ evGreen]
let attr = "width" =: "256" <> "height" =: "2... | 803 | main :: IO ()
main = mainWidget $ do
el "h2" $ text "A first canvas example"
evPostBuild <- getPostBuild
evRed <- button "Red"
evGreen <- button "Green"
el "br" blank
let evImg = leftmost [greenPixels <$ evPostBuild, redPixels <$ evRed, greenPixels <$ evGreen]
let attr = "width" =: "256" <> "height" =: "2... | 803 | main = mainWidget $ do
el "h2" $ text "A first canvas example"
evPostBuild <- getPostBuild
evRed <- button "Red"
evGreen <- button "Green"
el "br" blank
let evImg = leftmost [greenPixels <$ evPostBuild, redPixels <$ evRed, greenPixels <$ evGreen]
let attr = "width" =: "256" <> "height" =: "256"
canvas <... | 789 | false | true | 0 | 13 | 168 | 153 | 70 | 83 | null | null |
hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs | bsd-3-clause | convolutionFilterBias :: ConvolutionTarget -> StateVar (Color4 GLfloat)
convolutionFilterBias = convolutionC4f ConvolutionFilterBias | 132 | convolutionFilterBias :: ConvolutionTarget -> StateVar (Color4 GLfloat)
convolutionFilterBias = convolutionC4f ConvolutionFilterBias | 132 | convolutionFilterBias = convolutionC4f ConvolutionFilterBias | 60 | false | true | 0 | 8 | 10 | 27 | 13 | 14 | null | null |
three/codeworld | codeworld-base/src/Internal/Prelude.hs | apache-2.0 | -- | Gives the longest prefix of a list for which a condition is true.
--
-- For example, `while([2,4,5,6], even) = [2,4]`.
while :: ([a], a -> Truth) -> [a]
while (xs, p) = P.takeWhile p xs | 190 | while :: ([a], a -> Truth) -> [a]
while (xs, p) = P.takeWhile p xs | 66 | while (xs, p) = P.takeWhile p xs | 32 | true | true | 0 | 7 | 37 | 50 | 29 | 21 | null | null |
briansteffens/basm | src/Elf.hs | gpl-2.0 | sectionSymbolIndex :: [Symbol] -> String -> Int
sectionSymbolIndex symbols sectionName = do
let test sym = case relation sym of
RelatedSection s -> s == sectionName
_ -> False
case indexOf test symbols of
Nothing -> error("Section symbol " ++ sectionNa... | 403 | sectionSymbolIndex :: [Symbol] -> String -> Int
sectionSymbolIndex symbols sectionName = do
let test sym = case relation sym of
RelatedSection s -> s == sectionName
_ -> False
case indexOf test symbols of
Nothing -> error("Section symbol " ++ sectionNa... | 403 | sectionSymbolIndex symbols sectionName = do
let test sym = case relation sym of
RelatedSection s -> s == sectionName
_ -> False
case indexOf test symbols of
Nothing -> error("Section symbol " ++ sectionName ++ " not found")
Just i -> i
-- Ge... | 355 | false | true | 0 | 13 | 137 | 107 | 51 | 56 | null | null |
j-mueller/hldb | webapp/VirtualHom/Svg.hs | bsd-3-clause | -- | The @onmouseout@ attribute.
onmouseout :: AttrTag
onmouseout = makeAttribute "onmouseout" | 94 | onmouseout :: AttrTag
onmouseout = makeAttribute "onmouseout" | 61 | onmouseout = makeAttribute "onmouseout" | 39 | true | true | 0 | 5 | 11 | 15 | 8 | 7 | null | null |
HJvT/com | System/Win32/Com/Automation.hs | bsd-3-clause | sizeofVARENUM :: Word32
sizeofVARENUM = sizeofInt16 | 51 | sizeofVARENUM :: Word32
sizeofVARENUM = sizeofInt16 | 51 | sizeofVARENUM = sizeofInt16 | 27 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
brendanhay/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Locations/WorkflowTemplates/TestIAMPermissions.hs | mpl-2.0 | -- | Creates a value of 'ProjectsLocationsWorkflowTemplatesTestIAMPermissions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plwttipXgafv'
--
-- * 'plwttipUploadProtocol'
--
-- * 'plwttipAccessToken'
--
-- * 'plwttipUploadType'
--
-... | 1,004 | projectsLocationsWorkflowTemplatesTestIAMPermissions
:: TestIAMPermissionsRequest -- ^ 'plwttipPayload'
-> Text -- ^ 'plwttipResource'
-> ProjectsLocationsWorkflowTemplatesTestIAMPermissions
projectsLocationsWorkflowTemplatesTestIAMPermissions pPlwttipPayload_ pPlwttipResource_ =
ProjectsLocationsWorkflow... | 611 | projectsLocationsWorkflowTemplatesTestIAMPermissions pPlwttipPayload_ pPlwttipResource_ =
ProjectsLocationsWorkflowTemplatesTestIAMPermissions'
{ _plwttipXgafv = Nothing
, _plwttipUploadProtocol = Nothing
, _plwttipAccessToken = Nothing
, _plwttipUploadType = Nothing
, _plwttipPayload = pPlwttipPa... | 408 | true | true | 0 | 8 | 150 | 96 | 62 | 34 | null | null |
junnf/Functional-Programming | codes/control.hs | unlicense | third (_, _, z) = z | 20 | third (_, _, z) = z | 20 | third (_, _, z) = z | 20 | false | false | 0 | 5 | 6 | 19 | 10 | 9 | null | null |
atsukotakahashi/wi | src/library/Yi/Window.hs | gpl-2.0 | dummyWindow :: BufferRef -> Window
dummyWindow b = Window False b [] 0 0 emptyRegion def 0 Nothing | 98 | dummyWindow :: BufferRef -> Window
dummyWindow b = Window False b [] 0 0 emptyRegion def 0 Nothing | 98 | dummyWindow b = Window False b [] 0 0 emptyRegion def 0 Nothing | 63 | false | true | 0 | 7 | 17 | 45 | 20 | 25 | null | null |
omefire/megaparsec | Text/Megaparsec/Lexer.hs | bsd-2-clause | integer :: Stream s m Char => ParsecT s u m Integer
integer = decimal <?> "integer" | 83 | integer :: Stream s m Char => ParsecT s u m Integer
integer = decimal <?> "integer" | 83 | integer = decimal <?> "integer" | 31 | false | true | 0 | 6 | 16 | 35 | 17 | 18 | null | null |
bartavelle/hslogstash | Data/Conduit/Misc.hs | bsd-3-clause | -- | Converts a stream of [a] into a stream of (Flush a). This is done by
-- sending a Flush when the input is the empty list, or that we reached
-- a certain threshold
simpleConcatFlush :: (Monad m) => Int -> Conduit [a] m (Flush a)
simpleConcatFlush mx = concatFlush 0 sendf
where
sendf curx ev = do
... | 553 | simpleConcatFlush :: (Monad m) => Int -> Conduit [a] m (Flush a)
simpleConcatFlush mx = concatFlush 0 sendf
where
sendf curx ev = do
yield (Chunk ev)
if curx >= (mx - 1)
then yield Flush >> return 0
else return (curx+1)
-- | This is a more general ver... | 384 | simpleConcatFlush mx = concatFlush 0 sendf
where
sendf curx ev = do
yield (Chunk ev)
if curx >= (mx - 1)
then yield Flush >> return 0
else return (curx+1)
-- | This is a more general version of 'simpleConcatFlush', where you
-- provide your own fold. | 319 | true | true | 0 | 12 | 163 | 119 | 61 | 58 | null | null |
mmarx/jebediah | src/Jebediah/JACK.hs | gpl-3.0 | process :: JM.Port Input -> JM.Port Output -> TQueue EventList -> TQueue EventList -> NFrames -> ExceptionalT Errno IO ()
process inp out iq oq nf = do
mEvents <- lift $ atomically $ tryReadTQueue oq
writeEventsToPort out nf $ fromMaybe EL.empty mEvents
iEvents <- readEventsFromPort inp nf
lift $ atomically $ w... | 341 | process :: JM.Port Input -> JM.Port Output -> TQueue EventList -> TQueue EventList -> NFrames -> ExceptionalT Errno IO ()
process inp out iq oq nf = do
mEvents <- lift $ atomically $ tryReadTQueue oq
writeEventsToPort out nf $ fromMaybe EL.empty mEvents
iEvents <- readEventsFromPort inp nf
lift $ atomically $ w... | 341 | process inp out iq oq nf = do
mEvents <- lift $ atomically $ tryReadTQueue oq
writeEventsToPort out nf $ fromMaybe EL.empty mEvents
iEvents <- readEventsFromPort inp nf
lift $ atomically $ writeTQueue iq iEvents | 219 | false | true | 0 | 11 | 62 | 132 | 59 | 73 | null | null |
jsavatgy/hatupist | hatupist-104.hs | gpl-2.0 | readInt :: String -> IO Int
readInt s = readIO s | 48 | readInt :: String -> IO Int
readInt s = readIO s | 48 | readInt s = readIO s | 20 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.