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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
phischu/fragnix | builtins/base/GHC.Conc.Windows.hs | bsd-3-clause | ensureIOManagerIsRunning :: IO ()
ensureIOManagerIsRunning
| threaded = startIOManagerThread
| otherwise = return () | 121 | ensureIOManagerIsRunning :: IO ()
ensureIOManagerIsRunning
| threaded = startIOManagerThread
| otherwise = return () | 121 | ensureIOManagerIsRunning
| threaded = startIOManagerThread
| otherwise = return () | 87 | false | true | 1 | 7 | 18 | 36 | 16 | 20 | null | null |
rimmington/cabal | Cabal/Distribution/Simple/Build.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- |Build the libraries and executables in this package.
build :: PackageDescription -- ^ Mostly information from the .cabal file
-> LocalBuildInfo -- ^ Configuration information
-> BuildFlags -- ^ Flag... | 1,663 | build :: PackageDescription -- ^ Mostly information from the .cabal file
-> LocalBuildInfo -- ^ Configuration information
-> BuildFlags -- ^ Flags that the user passed to build
-> [ PPSuffixHandler ] -- ^ preprocessors to run before compiling
-> IO ()
build pkg_desc... | 1,524 | build pkg_descr lbi flags suffixes = do
let distPref = fromFlag (buildDistPref flags)
verbosity = fromFlag (buildVerbosity flags)
targets <- readBuildTargets pkg_descr (buildArgs flags)
targets' <- checkBuildTargets verbosity pkg_descr targets
let componentsToBuild = map fst (componentsInBuildOrder lbi... | 1,218 | true | true | 0 | 16 | 401 | 335 | 162 | 173 | null | null |
grzegorzbalcerek/orgmode | Main.hs | bsd-2-clause | mainWithArgs ["parse",path] = parseCommand 0 path | 59 | mainWithArgs ["parse",path] = parseCommand 0 path | 59 | mainWithArgs ["parse",path] = parseCommand 0 path | 59 | false | false | 0 | 6 | 15 | 20 | 10 | 10 | null | null |
achernyak/stack | src/Stack/Ide.hs | bsd-3-clause | ideGhciOpts :: BuildOpts -> GhciOpts
ideGhciOpts bopts = GhciOpts
{ ghciNoBuild = False
, ghciArgs = []
, ghciGhcCommand = Nothing
, ghciNoLoadModules = False
, ghciAdditionalPackages = []
, ghciMainIs = Nothing
, ghciLoadLocalDeps = False
, ghciSkipIntermediate = False
, ghciHidePac... | 366 | ideGhciOpts :: BuildOpts -> GhciOpts
ideGhciOpts bopts = GhciOpts
{ ghciNoBuild = False
, ghciArgs = []
, ghciGhcCommand = Nothing
, ghciNoLoadModules = False
, ghciAdditionalPackages = []
, ghciMainIs = Nothing
, ghciLoadLocalDeps = False
, ghciSkipIntermediate = False
, ghciHidePac... | 366 | ideGhciOpts bopts = GhciOpts
{ ghciNoBuild = False
, ghciArgs = []
, ghciGhcCommand = Nothing
, ghciNoLoadModules = False
, ghciAdditionalPackages = []
, ghciMainIs = Nothing
, ghciLoadLocalDeps = False
, ghciSkipIntermediate = False
, ghciHidePackages = True
, ghciBuildOpts = bo... | 329 | false | true | 0 | 8 | 93 | 93 | 54 | 39 | null | null |
tjakway/ghcjvm | compiler/types/Type.hs | bsd-3-clause | stripCoercionTy :: Type -> Coercion
stripCoercionTy (CoercionTy co) = co | 72 | stripCoercionTy :: Type -> Coercion
stripCoercionTy (CoercionTy co) = co | 72 | stripCoercionTy (CoercionTy co) = co | 36 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
folivetti/BIGDATA | 02 - Básico/Composition.hs | mit | -- |'main' executa programa principal
main :: IO ()
main = do
print (geraConceito 10 3)
print (calcConceito 3) | 118 | main :: IO ()
main = do
print (geraConceito 10 3)
print (calcConceito 3) | 80 | main = do
print (geraConceito 10 3)
print (calcConceito 3) | 66 | true | true | 0 | 10 | 26 | 49 | 21 | 28 | null | null |
RaminHAL9001/rose-trie | src/Data/Tree/RoseTrie.hs | gpl-3.0 | alter :: Ord p => (Maybe o -> Maybe o) -> [p] -> RoseTrie p o -> RoseTrie p o
alter f p = runIdentity . alterM (return . f) p | 125 | alter :: Ord p => (Maybe o -> Maybe o) -> [p] -> RoseTrie p o -> RoseTrie p o
alter f p = runIdentity . alterM (return . f) p | 125 | alter f p = runIdentity . alterM (return . f) p | 47 | false | true | 0 | 9 | 30 | 77 | 37 | 40 | null | null |
MatthiasHu/4d-labyrinth | src/Worlds/OrthogonalPlanes.hs | gpl-3.0 | orthogonalPlanes :: (MonadRandom m, Floating a) =>
Int -> m (SceneTO V4 a, Transformation V4 a)
orthogonalPlanes n = (, mempty) <$> randomColorBox n
(\v -> (v^._x == (n `div` 2) && v^._y == (n `div` 2))
|| (v^._z == (n `div` 2) && v^._w == (n `div` 2)) ) | 270 | orthogonalPlanes :: (MonadRandom m, Floating a) =>
Int -> m (SceneTO V4 a, Transformation V4 a)
orthogonalPlanes n = (, mempty) <$> randomColorBox n
(\v -> (v^._x == (n `div` 2) && v^._y == (n `div` 2))
|| (v^._z == (n `div` 2) && v^._w == (n `div` 2)) ) | 270 | orthogonalPlanes n = (, mempty) <$> randomColorBox n
(\v -> (v^._x == (n `div` 2) && v^._y == (n `div` 2))
|| (v^._z == (n `div` 2) && v^._w == (n `div` 2)) ) | 172 | false | true | 2 | 15 | 65 | 166 | 89 | 77 | null | null |
gromakovsky/Orchid | src/Orchid/Codegen/Body.hs | mit | sub op1@(_,a) op2@(_,b) =
checkTypes "sub" [TInt64, TInt64] [op1, op2] >>
instr TInt64 (AST.Sub False False a b []) | 123 | sub op1@(_,a) op2@(_,b) =
checkTypes "sub" [TInt64, TInt64] [op1, op2] >>
instr TInt64 (AST.Sub False False a b []) | 123 | sub op1@(_,a) op2@(_,b) =
checkTypes "sub" [TInt64, TInt64] [op1, op2] >>
instr TInt64 (AST.Sub False False a b []) | 123 | false | false | 0 | 9 | 26 | 75 | 41 | 34 | null | null |
awakenetworks/gRPC-haskell | core/src/Network/GRPC/LowLevel/Op.hs | apache-2.0 | sendSingle :: SendSingle Op
sendSingle c cq op = void (runOps' c cq [op]) | 73 | sendSingle :: SendSingle Op
sendSingle c cq op = void (runOps' c cq [op]) | 73 | sendSingle c cq op = void (runOps' c cq [op]) | 45 | false | true | 0 | 8 | 13 | 37 | 18 | 19 | null | null |
abakst/liquidhaskell | tests/pos/Keys.hs | bsd-3-clause | {-@ measure myfst @-}
myfst :: (a, b) -> a
myfst (x, _) = x | 59 | myfst :: (a, b) -> a
myfst (x, _) = x | 37 | myfst (x, _) = x | 16 | true | true | 0 | 8 | 14 | 37 | 19 | 18 | null | null |
rsasse/tamarin-prover | lib/utils/src/Data/Color.hs | gpl-3.0 | red, green, blue :: Fractional t => RGB t
red = RGB 1.0 0.0 0.0 | 65 | red, green, blue :: Fractional t => RGB t
red = RGB 1.0 0.0 0.0 | 65 | red = RGB 1.0 0.0 0.0 | 23 | false | true | 4 | 7 | 16 | 47 | 18 | 29 | null | null |
pparkkin/eta | compiler/ETA/Main/HscTypes.hs | bsd-3-clause | -- | Perform the given action and call the exception handler if the action
-- throws a 'SourceError'. See 'SourceError' for more information.
handleSourceError :: (ExceptionMonad m) =>
(SourceError -> m a) -- ^ exception handler
-> m a -- ^ action to perform
-> ... | 403 | handleSourceError :: (ExceptionMonad m) =>
(SourceError -> m a) -- ^ exception handler
-> m a -- ^ action to perform
-> m a
handleSourceError handler act =
gcatch act (\(e :: SourceError) -> handler e) | 260 | handleSourceError handler act =
gcatch act (\(e :: SourceError) -> handler e) | 79 | true | true | 0 | 10 | 118 | 82 | 41 | 41 | null | null |
dicomgrid/dicom-haskell-library | src/Data/DICOM/Dictionary.hs | gpl-3.0 | samplerate :: B.ByteString -> Element
samplerate = ul $ tag (TagGroup 0x5000) (TagElement 0x2008) | 97 | samplerate :: B.ByteString -> Element
samplerate = ul $ tag (TagGroup 0x5000) (TagElement 0x2008) | 97 | samplerate = ul $ tag (TagGroup 0x5000) (TagElement 0x2008) | 59 | false | true | 2 | 7 | 13 | 46 | 20 | 26 | null | null |
adinapoli/api-tools | src/Data/API/Tools/Datatypes.hs | bsd-3-clause | -- | Tool to generate datatypes and type synonyms corresponding to an API
datatypesTool :: APITool
datatypesTool = apiNodeTool $ apiSpecTool (simpleTool $ uncurry gen_sn_dt)
(simpleTool $ uncurry gen_sr_dt)
(simpleTool $ uncurry gen_su_... | 470 | datatypesTool :: APITool
datatypesTool = apiNodeTool $ apiSpecTool (simpleTool $ uncurry gen_sn_dt)
(simpleTool $ uncurry gen_sr_dt)
(simpleTool $ uncurry gen_su_dt)
(simpleTool $ uncurry gen_se... | 396 | datatypesTool = apiNodeTool $ apiSpecTool (simpleTool $ uncurry gen_sn_dt)
(simpleTool $ uncurry gen_sr_dt)
(simpleTool $ uncurry gen_su_dt)
(simpleTool $ uncurry gen_se_dt)
... | 371 | true | true | 0 | 9 | 208 | 77 | 39 | 38 | null | null |
sdiehl/ghc | testsuite/tests/llvm/should_compile/T5486.hs | bsd-3-clause | integerToMPI :: Integer -> IO BS.ByteString
integerToMPI v = bracket (integerToBN v) (_free . unwrapBN) bnToMPI | 111 | integerToMPI :: Integer -> IO BS.ByteString
integerToMPI v = bracket (integerToBN v) (_free . unwrapBN) bnToMPI | 111 | integerToMPI v = bracket (integerToBN v) (_free . unwrapBN) bnToMPI | 67 | false | true | 0 | 7 | 15 | 43 | 21 | 22 | null | null |
alexander-at-github/eta | compiler/ETA/Utils/Bag.hs | bsd-3-clause | concatBag (ListBag bs) = unionManyBags bs | 44 | concatBag (ListBag bs) = unionManyBags bs | 44 | concatBag (ListBag bs) = unionManyBags bs | 44 | false | false | 0 | 7 | 8 | 18 | 8 | 10 | null | null |
sru-systems/protobuf-simple | src/Data/ProtoBuf/WireFormat.hs | mit | putBool :: WireTag -> Bool -> Put
putBool tag val = do
putWireTag tag
putVarInt $ boolToWord8 val
-- | Encode a repeated bool field. | 142 | putBool :: WireTag -> Bool -> Put
putBool tag val = do
putWireTag tag
putVarInt $ boolToWord8 val
-- | Encode a repeated bool field. | 142 | putBool tag val = do
putWireTag tag
putVarInt $ boolToWord8 val
-- | Encode a repeated bool field. | 108 | false | true | 0 | 8 | 34 | 41 | 19 | 22 | null | null |
snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprParendType (LitT l) = pprTyLit l | 46 | pprParendType (LitT l) = pprTyLit l | 46 | pprParendType (LitT l) = pprTyLit l | 46 | false | false | 0 | 7 | 16 | 18 | 8 | 10 | null | null |
copumpkin/vector-static | Data/Vector/Storable/Static.hs | bsd-3-clause | new n f = G.new n (f . Vec) | 27 | new n f = G.new n (f . Vec) | 27 | new n f = G.new n (f . Vec) | 27 | false | false | 1 | 7 | 8 | 29 | 12 | 17 | null | null |
rahulmutt/ghcvm | libraries/base/Control/Monad/ST/Lazy/Imp.hs | bsd-3-clause | {- Note [Lazy ST and multithreading]
We used to imagine that passing a polymorphic state token was all that we
needed to keep state threads separate (see Launchbury and Peyton Jones, 1994:
https://www.microsoft.com/en-us/research/publication/lazy-functional-state-threads/).
But this breaks down in the face of concurre... | 2,074 | noDup :: a -> a
noDup a = runRW# (\s ->
case noDuplicate# s of
_ -> a) | 76 | noDup a = runRW# (\s ->
case noDuplicate# s of
_ -> a) | 60 | true | true | 0 | 10 | 360 | 46 | 25 | 21 | null | null |
davidarnarsson/tictactoe | Players/AIPlayer.hs | mit | move :: AIPlayer -> TicTacToe -> IO (Int, Int)
move _ gameState = do
let availMoves = blanks gameState
let len = length availMoves
randNum <- randomRIO(0,len-1)
let move' = availMoves!!randNum
return move' | 227 | move :: AIPlayer -> TicTacToe -> IO (Int, Int)
move _ gameState = do
let availMoves = blanks gameState
let len = length availMoves
randNum <- randomRIO(0,len-1)
let move' = availMoves!!randNum
return move' | 225 | move _ gameState = do
let availMoves = blanks gameState
let len = length availMoves
randNum <- randomRIO(0,len-1)
let move' = availMoves!!randNum
return move' | 178 | false | true | 0 | 11 | 54 | 101 | 46 | 55 | null | null |
tpsinnem/Idris-dev | src/Idris/WhoCalls.hs | bsd-3-clause | occursSC n _ = False | 20 | occursSC n _ = False | 20 | occursSC n _ = False | 20 | false | false | 0 | 4 | 4 | 13 | 5 | 8 | null | null |
jyp/lp-diagrams | Graphics/Diagrams/Object.hs | agpl-3.0 | arrow :: Monad m => Object -> Object -> Diagram lab m OVector
arrow src trg = using (outline "black" . set endTip LatexTip) $ do
edge src trg
-- | Bounding box of a number of anchored values | 193 | arrow :: Monad m => Object -> Object -> Diagram lab m OVector
arrow src trg = using (outline "black" . set endTip LatexTip) $ do
edge src trg
-- | Bounding box of a number of anchored values | 193 | arrow src trg = using (outline "black" . set endTip LatexTip) $ do
edge src trg
-- | Bounding box of a number of anchored values | 131 | false | true | 0 | 9 | 41 | 69 | 32 | 37 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_FS_HEXNUMBER :: Int
wxSTC_FS_HEXNUMBER = 22 | 49 | wxSTC_FS_HEXNUMBER :: Int
wxSTC_FS_HEXNUMBER = 22 | 49 | wxSTC_FS_HEXNUMBER = 22 | 23 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
ezyang/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | -- | Output a String message to the screen
putMsgS :: String -> CoreM ()
putMsgS = putMsg . text | 96 | putMsgS :: String -> CoreM ()
putMsgS = putMsg . text | 53 | putMsgS = putMsg . text | 23 | true | true | 0 | 7 | 19 | 25 | 13 | 12 | null | null |
snapframework/snap-core | test/Snap/Internal/Routing/Tests.hs | bsd-3-clause | testRouting12 :: Test
testRouting12 = testCase "route/12" $ do
r1 <- go routes2 "foo"
assertEqual "/foo" "topFoo" r1
------------------------------------------------------------------------------ | 205 | testRouting12 :: Test
testRouting12 = testCase "route/12" $ do
r1 <- go routes2 "foo"
assertEqual "/foo" "topFoo" r1
------------------------------------------------------------------------------ | 205 | testRouting12 = testCase "route/12" $ do
r1 <- go routes2 "foo"
assertEqual "/foo" "topFoo" r1
------------------------------------------------------------------------------ | 183 | false | true | 0 | 9 | 28 | 41 | 19 | 22 | null | null |
wyager/Dist | src/Numeric/Probability/Distribution.hs | mit | sample :: (Ord p, Num p, Random p, MonadRandom m) => Distribution p o -> m (Maybe o)
sample (Distribution tree _ _) = sampleTree tree | 133 | sample :: (Ord p, Num p, Random p, MonadRandom m) => Distribution p o -> m (Maybe o)
sample (Distribution tree _ _) = sampleTree tree | 133 | sample (Distribution tree _ _) = sampleTree tree | 48 | false | true | 0 | 9 | 25 | 76 | 36 | 40 | null | null |
plow-technologies/acid-cell | src/Data/Acid/Cell/TH/StateMakers.hs | bsd-3-clause | makeInsertXAcidCell :: CellKeyName -> InitializerName -> StateName -> Q Dec
makeInsertXAcidCell ckN initN stN = do
f <- (funD (buildInsertName stN)) [(clause [] (normalB insertAcidCellTH) [] ) ]
return f
where
insertAcidCellTH = appE (appE (varE 'insertState ) (varE ckN)) (varE initN) | 300 | makeInsertXAcidCell :: CellKeyName -> InitializerName -> StateName -> Q Dec
makeInsertXAcidCell ckN initN stN = do
f <- (funD (buildInsertName stN)) [(clause [] (normalB insertAcidCellTH) [] ) ]
return f
where
insertAcidCellTH = appE (appE (varE 'insertState ) (varE ckN)) (varE initN) | 300 | makeInsertXAcidCell ckN initN stN = do
f <- (funD (buildInsertName stN)) [(clause [] (normalB insertAcidCellTH) [] ) ]
return f
where
insertAcidCellTH = appE (appE (varE 'insertState ) (varE ckN)) (varE initN) | 223 | false | true | 1 | 13 | 56 | 132 | 61 | 71 | null | null |
andorp/grin | grin/src/Reducer/LLVM/JIT.hs | bsd-3-clause | grinHeapSize :: Int
grinHeapSize = 100 * 1024 * 1024 | 52 | grinHeapSize :: Int
grinHeapSize = 100 * 1024 * 1024 | 52 | grinHeapSize = 100 * 1024 * 1024 | 32 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
Lysxia/twentyseven | test/IDATest.hs | mit | fromPoint :: Dim -> Point -> (Int, Int)
fromPoint (m, n) p = (p `div` n, p `mod` n) | 83 | fromPoint :: Dim -> Point -> (Int, Int)
fromPoint (m, n) p = (p `div` n, p `mod` n) | 83 | fromPoint (m, n) p = (p `div` n, p `mod` n) | 43 | false | true | 0 | 9 | 18 | 60 | 33 | 27 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | emitProcWithStackFrame
:: Convention -- entry convention
-> Maybe CmmInfoTable -- info table?
-> CLabel -- label for the proc
-> [CmmFormal] -- stack frame
-> [CmmFormal] -- arguments
-> CmmAGr... | 622 | emitProcWithStackFrame
:: Convention -- entry convention
-> Maybe CmmInfoTable -- info table?
-> CLabel -- label for the proc
-> [CmmFormal] -- stack frame
-> [CmmFormal] -- arguments
-> CmmAGr... | 621 | emitProcWithStackFrame _conv mb_info lbl _stk_args [] blocks False
= do { dflags <- getDynFlags
; emitProc_ mb_info lbl [] blocks (widthInBytes (wordWidth dflags)) False
} | 190 | false | true | 0 | 14 | 265 | 122 | 63 | 59 | null | null |
forsyde/forsyde-shallow | src/ForSyDe/Shallow/MoC/SADF.hs | bsd-3-clause | nextStateFSM3 (c1, c2, c3) f ss as bs cs
| c1 <= 0 || c2 <= 0 || c3 <= 0
= error "nextStateFSM3: Number of consumed tokens must be positive integer"
| (not $ sufficient_tokens c1 as)
|| (not $ sufficient_tokens c2 bs)
|| (not $ sufficient_tokens c3 cs) = NullS
| otherwise = signal [next_state] +-+ nex... | 750 | nextStateFSM3 (c1, c2, c3) f ss as bs cs
| c1 <= 0 || c2 <= 0 || c3 <= 0
= error "nextStateFSM3: Number of consumed tokens must be positive integer"
| (not $ sufficient_tokens c1 as)
|| (not $ sufficient_tokens c2 bs)
|| (not $ sufficient_tokens c3 cs) = NullS
| otherwise = signal [next_state] +-+ nex... | 750 | nextStateFSM3 (c1, c2, c3) f ss as bs cs
| c1 <= 0 || c2 <= 0 || c3 <= 0
= error "nextStateFSM3: Number of consumed tokens must be positive integer"
| (not $ sufficient_tokens c1 as)
|| (not $ sufficient_tokens c2 bs)
|| (not $ sufficient_tokens c3 cs) = NullS
| otherwise = signal [next_state] +-+ nex... | 750 | false | false | 5 | 12 | 221 | 274 | 125 | 149 | null | null |
jml/difftodo | src/Fixme/Comment.hs | apache-2.0 | readComments :: FilePath -> Maybe (IO [Comment])
readComments filename =
case languageForFile (toS filename) of
Nothing -> Nothing
Just language -> Just $ do
contents <- ByteString.readFile filename
pure (parseComments (Just (toS filename)) language contents)
-- | A thing that is located somewhe... | 338 | readComments :: FilePath -> Maybe (IO [Comment])
readComments filename =
case languageForFile (toS filename) of
Nothing -> Nothing
Just language -> Just $ do
contents <- ByteString.readFile filename
pure (parseComments (Just (toS filename)) language contents)
-- | A thing that is located somewhe... | 338 | readComments filename =
case languageForFile (toS filename) of
Nothing -> Nothing
Just language -> Just $ do
contents <- ByteString.readFile filename
pure (parseComments (Just (toS filename)) language contents)
-- | A thing that is located somewhere in a text file. | 289 | false | true | 6 | 9 | 70 | 93 | 45 | 48 | null | null |
gallais/potpourri | haskell/nurules/FancyDomain.hs | gpl-3.0 | normInfer :: TM.Infer a -> NF.Nf a
normInfer t = reify $ lemmaInfer normalisation t $ reflect | 93 | normInfer :: TM.Infer a -> NF.Nf a
normInfer t = reify $ lemmaInfer normalisation t $ reflect | 93 | normInfer t = reify $ lemmaInfer normalisation t $ reflect | 58 | false | true | 0 | 8 | 16 | 46 | 20 | 26 | null | null |
Garygunn94/DFS | FileServer/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen/Paths_FileServer.hs | bsd-3-clause | sysconfdir = "/home/ggunn/DFS/FileServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/etc" | 93 | sysconfdir = "/home/ggunn/DFS/FileServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/etc" | 93 | sysconfdir = "/home/ggunn/DFS/FileServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/etc" | 93 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
gridaphobe/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | isKindLevel :: TypeOrKind -> Bool
isKindLevel TypeLevel = False | 63 | isKindLevel :: TypeOrKind -> Bool
isKindLevel TypeLevel = False | 63 | isKindLevel TypeLevel = False | 29 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
urbanslug/ghc | testsuite/tests/perf/compiler/T9872b.hs | bsd-3-clause | main = print (Proxy :: Proxy (Solutions Cubes)) | 47 | main = print (Proxy :: Proxy (Solutions Cubes)) | 47 | main = print (Proxy :: Proxy (Solutions Cubes)) | 47 | false | false | 1 | 8 | 7 | 27 | 12 | 15 | null | null |
agsh/hs2-lab | TheologyStudent_newSubjectList.hs | mit | toNewSubject (x:xs) =( (name x, surname x) : toNewSubject xs ) | 62 | toNewSubject (x:xs) =( (name x, surname x) : toNewSubject xs ) | 62 | toNewSubject (x:xs) =( (name x, surname x) : toNewSubject xs ) | 62 | false | false | 0 | 8 | 10 | 39 | 19 | 20 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvDeviceModel :: String
hvDeviceModel = "device_model" | 54 | hvDeviceModel :: String
hvDeviceModel = "device_model" | 54 | hvDeviceModel = "device_model" | 30 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | acute 'N' = "Ń" | 15 | acute 'N' = "Ń" | 15 | acute 'N' = "Ń" | 15 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
zaxtax/hakaru | haskell/Tests/Unroll/Unroll.hs | bsd-3-clause | model :: Doc -> Doc -> Doc
model a b = text "Model" <+> a $$ b | 62 | model :: Doc -> Doc -> Doc
model a b = text "Model" <+> a $$ b | 62 | model a b = text "Model" <+> a $$ b | 35 | false | true | 0 | 7 | 16 | 35 | 17 | 18 | null | null |
dmcclean/dimensional-parsing | src/Numeric/Units/Dimensional/Parsing/Units2.hs | bsd-3-clause | superscriptInteger :: (Integral a) => Parser a
superscriptInteger = optionalSuperscriptSign <*> superscriptDecimal
<?> "superscript integer" | 157 | superscriptInteger :: (Integral a) => Parser a
superscriptInteger = optionalSuperscriptSign <*> superscriptDecimal
<?> "superscript integer" | 157 | superscriptInteger = optionalSuperscriptSign <*> superscriptDecimal
<?> "superscript integer" | 110 | false | true | 0 | 6 | 31 | 31 | 16 | 15 | null | null |
FranklinChen/brick | src/Brick/Widgets/Center.hs | bsd-3-clause | -- | Center the widget horizontally and vertically about the specified
-- origin.
centerAbout :: Location -> Widget -> Widget
centerAbout l p =
Widget Greedy Greedy $ do
-- Compute translation offset so that loc is in the middle of the
-- rendering area
c <- getContext
let centerW = c^.avail... | 531 | centerAbout :: Location -> Widget -> Widget
centerAbout l p =
Widget Greedy Greedy $ do
-- Compute translation offset so that loc is in the middle of the
-- rendering area
c <- getContext
let centerW = c^.availWidthL `div` 2
centerH = c^.availHeightL `div` 2
off = Locatio... | 449 | centerAbout l p =
Widget Greedy Greedy $ do
-- Compute translation offset so that loc is in the middle of the
-- rendering area
c <- getContext
let centerW = c^.availWidthL `div` 2
centerH = c^.availHeightL `div` 2
off = Location ( centerW - l^.columnL
... | 405 | true | true | 2 | 14 | 179 | 128 | 64 | 64 | null | null |
fmapfmapfmap/amazonka | amazonka-ecs/gen/Network/AWS/ECS/Types/Product.hs | mpl-2.0 | -- | The port number on the host that is used with the network binding.
nbHostPort :: Lens' NetworkBinding (Maybe Int)
nbHostPort = lens _nbHostPort (\ s a -> s{_nbHostPort = a}) | 178 | nbHostPort :: Lens' NetworkBinding (Maybe Int)
nbHostPort = lens _nbHostPort (\ s a -> s{_nbHostPort = a}) | 106 | nbHostPort = lens _nbHostPort (\ s a -> s{_nbHostPort = a}) | 59 | true | true | 0 | 9 | 31 | 46 | 25 | 21 | null | null |
nomeata/codeworld | funblocks-client/src/Blocks/Types.hs | apache-2.0 | cwDull = standardFunction "cwDull" "dull" Nothing [typeColor, typeColor]
["COL"] colorColor "A more dull color" | 123 | cwDull = standardFunction "cwDull" "dull" Nothing [typeColor, typeColor]
["COL"] colorColor "A more dull color" | 123 | cwDull = standardFunction "cwDull" "dull" Nothing [typeColor, typeColor]
["COL"] colorColor "A more dull color" | 123 | false | false | 0 | 6 | 25 | 30 | 16 | 14 | null | null |
vTurbine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Compiler Info
compilerInfo :: DynFlags -> [(String, String)]
compilerInfo dflags
= -- We always make "Project name" be first to keep parsing in
-- other languages simple, i.e. when looking for other fields,
-- you don't... | 3,355 | compilerInfo :: DynFlags -> [(String, String)]
compilerInfo dflags
= -- We always make "Project name" be first to keep parsing in
-- other languages simple, i.e. when looking for other fields,
-- you don't have to worry whether there is a leading '[' or not
("Project name", cProjec... | 3,256 | compilerInfo dflags
= -- We always make "Project name" be first to keep parsing in
-- other languages simple, i.e. when looking for other fields,
-- you don't have to worry whether there is a leading '[' or not
("Project name", cProjectName)
-- Next come the settings, so anyt... | 3,209 | true | true | 2 | 9 | 1,028 | 392 | 247 | 145 | null | null |
AlainODea-haskell/tenable-securitycenter | app/Main.hs | apache-2.0 | main :: IO ()
main = do
hSetBuffering stdout NoBuffering
(configFilename, assetIdArg) <- parseArgs
apiClient <- createApiClient configFilename
run_example (updateAsset assetIdArg) apiClient | 197 | main :: IO ()
main = do
hSetBuffering stdout NoBuffering
(configFilename, assetIdArg) <- parseArgs
apiClient <- createApiClient configFilename
run_example (updateAsset assetIdArg) apiClient | 197 | main = do
hSetBuffering stdout NoBuffering
(configFilename, assetIdArg) <- parseArgs
apiClient <- createApiClient configFilename
run_example (updateAsset assetIdArg) apiClient | 183 | false | true | 0 | 9 | 29 | 61 | 28 | 33 | null | null |
tolysz/dsp | demo/FFTBench.hs | gpl-2.0 | f1, f2, f3, f4, f5, f6, f7, f8 ::
Array Int (Complex Double) -> Array Int (Complex Double)
f1 xs | n == 2 = fft'2 xs
| n == 4 = fft'4 xs
| otherwise = fft_r2dit xs n f1
where n = (snd $ bounds xs) + 1 | 225 | f1, f2, f3, f4, f5, f6, f7, f8 ::
Array Int (Complex Double) -> Array Int (Complex Double)
f1 xs | n == 2 = fft'2 xs
| n == 4 = fft'4 xs
| otherwise = fft_r2dit xs n f1
where n = (snd $ bounds xs) + 1 | 225 | f1 xs | n == 2 = fft'2 xs
| n == 4 = fft'4 xs
| otherwise = fft_r2dit xs n f1
where n = (snd $ bounds xs) + 1 | 131 | false | true | 11 | 8 | 74 | 128 | 60 | 68 | null | null |
HJvT/com | System/Win32/Com/Exception.hs | bsd-3-clause | -- | @act `catchComException` (ex -> hdlr ex)@ performs the
-- IO action @act@, but catches any IO or COM exceptions @ex@,
-- passing them to the handler @hdlr@.
catchComException :: IO a -> (Com_Exception -> IO a) -> IO a
catchComException act hdlr =
Control.Exception.catch act
(\ ex ->
case ex of... | 532 | catchComException :: IO a -> (Com_Exception -> IO a) -> IO a
catchComException act hdlr =
Control.Exception.catch act
(\ ex ->
case ex of
DynException d ->
case fromDynamic d of
Just ce -> hdlr (Right ce)
_ -> throwIO ex
IOException i... | 368 | catchComException act hdlr =
Control.Exception.catch act
(\ ex ->
case ex of
DynException d ->
case fromDynamic d of
Just ce -> hdlr (Right ce)
_ -> throwIO ex
IOException ioe -> hdlr (Left ioe)
_ -> throwIO ex) | 307 | true | true | 0 | 16 | 177 | 139 | 65 | 74 | null | null |
btmura/b1 | src/B1/Program/Chart/Main.hs | bsd-3-clause | refreshMousePosition :: IORef Resources -> IO (IORef Resources)
refreshMousePosition resourcesRef = do
position <- get mousePos
modifyIORef resourcesRef
(invertMousePositionY . updateMousePosition position)
return resourcesRef | 238 | refreshMousePosition :: IORef Resources -> IO (IORef Resources)
refreshMousePosition resourcesRef = do
position <- get mousePos
modifyIORef resourcesRef
(invertMousePositionY . updateMousePosition position)
return resourcesRef | 238 | refreshMousePosition resourcesRef = do
position <- get mousePos
modifyIORef resourcesRef
(invertMousePositionY . updateMousePosition position)
return resourcesRef | 174 | false | true | 0 | 10 | 35 | 64 | 28 | 36 | null | null |
robinbb/hs-text-xhtml | Text/XHtml/Extras.hs | apache-2.0 | gui :: String -> Html -> Html
gui act = form ! [action act,method "post"] | 73 | gui :: String -> Html -> Html
gui act = form ! [action act,method "post"] | 73 | gui act = form ! [action act,method "post"] | 43 | false | true | 2 | 8 | 14 | 45 | 20 | 25 | null | null |
tpsinnem/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | process :: Bool -- ^ Reexporting
-> IBCPhase
-> Archive -> FilePath -> Idris ()
process reexp phase archive fn = do
ver <- getEntry 0 "ver" archive
when (ver /= ibcVersion) $ do
logIBC 1 "ibc out of date"
... | 2,744 | process :: Bool -- ^ Reexporting
-> IBCPhase
-> Archive -> FilePath -> Idris ()
process reexp phase archive fn = do
ver <- getEntry 0 "ver" archive
when (ver /= ibcVersion) $ do
logIBC 1 "ibc out of date"
... | 2,744 | process reexp phase archive fn = do
ver <- getEntry 0 "ver" archive
when (ver /= ibcVersion) $ do
logIBC 1 "ibc out of date"
let e = if ver < ibcVersion
then " an earlier "... | 2,642 | false | true | 0 | 15 | 1,244 | 459 | 175 | 284 | null | null |
ion1/sqarkov | src/Sqarkov/Database.hs | isc | ioEitherT :: EitherT String IO a -> IO a
ioEitherT = either (ioError . userError) return <=< runEitherT | 103 | ioEitherT :: EitherT String IO a -> IO a
ioEitherT = either (ioError . userError) return <=< runEitherT | 103 | ioEitherT = either (ioError . userError) return <=< runEitherT | 62 | false | true | 0 | 8 | 17 | 48 | 21 | 27 | null | null |
kmate/HaRe | old/testing/unfoldAsPatterns/P4_TokOut.hs | bsd-3-clause | f :: String -> String
f newPat_2@((x : xs)) = newPat_2 | 54 | f :: String -> String
f newPat_2@((x : xs)) = newPat_2 | 54 | f newPat_2@((x : xs)) = newPat_2 | 32 | false | true | 2 | 8 | 10 | 37 | 18 | 19 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | checkShebangParameters _ (T_Script id sb _) =
[Note id ErrorC 2096 "On most OS, shebangs can only specify a single parameter." | length (words sb) > 2] | 155 | checkShebangParameters _ (T_Script id sb _) =
[Note id ErrorC 2096 "On most OS, shebangs can only specify a single parameter." | length (words sb) > 2] | 155 | checkShebangParameters _ (T_Script id sb _) =
[Note id ErrorC 2096 "On most OS, shebangs can only specify a single parameter." | length (words sb) > 2] | 155 | false | false | 1 | 11 | 30 | 53 | 24 | 29 | null | null |
tpsinnem/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | -- | Applies parser to get a block (which has possibly indented statements)
indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
r... | 434 | indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (w... | 358 | indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (which has possibly indented statements) | 308 | true | true | 0 | 10 | 158 | 63 | 28 | 35 | null | null |
gnn/Hets | atermlib/src/ATerm/SimpPretty.hs | gpl-2.0 | empty :: SDoc -- ^ An empty document
empty = text "" | 52 | empty :: SDoc
empty = text "" | 29 | empty = text "" | 15 | true | true | 0 | 5 | 11 | 15 | 8 | 7 | null | null |
da-x/lamdu | bottlelib/Graphics/UI/Bottle/Widgets.hs | gpl-3.0 | makeChoiceWidget ::
(Eq a, Monad m, Applicative f) =>
(a -> f ()) -> [(a, Widget (f Widget.EventResult))] -> a ->
Choice.Config -> Widget.Id -> WidgetEnvT m (Widget (f Widget.EventResult))
makeChoiceWidget choose children curChild choiceConfig myId =
do
widgetEnv <- readEnv
Choice.make c... | 575 | makeChoiceWidget ::
(Eq a, Monad m, Applicative f) =>
(a -> f ()) -> [(a, Widget (f Widget.EventResult))] -> a ->
Choice.Config -> Widget.Id -> WidgetEnvT m (Widget (f Widget.EventResult))
makeChoiceWidget choose children curChild choiceConfig myId =
do
widgetEnv <- readEnv
Choice.make c... | 575 | makeChoiceWidget choose children curChild choiceConfig myId =
do
widgetEnv <- readEnv
Choice.make choiceConfig (children <&> annotate) myId widgetEnv
& return
where
annotate (item, widget) =
( if item == curChild then Choice.Selected else Choice.NotSelected
... | 374 | false | true | 0 | 16 | 173 | 194 | 100 | 94 | null | null |
peteg/ADHOC | Apps/Cache/Tests/005_register.hs | gpl-2.0 | Just (m3, _) = isConstructive (runE e3) | 39 | Just (m3, _) = isConstructive (runE e3) | 39 | Just (m3, _) = isConstructive (runE e3) | 39 | false | false | 0 | 7 | 6 | 25 | 12 | 13 | null | null |
thalerjonathan/phd | public/towards/SugarScape/experimental/chapter2_environment/src/SugarScape/Model.hs | gpl-3.0 | ------------------------------------------------------------------------------------------------------------------------
-- CHAPTER II: Life And Death On The Sugarscape
------------------------------------------------------------------------------------------------------------------------
-- Social Evolution with immed... | 1,069 | mkParamsAnimationII_1 :: SugarScapeParams
mkParamsAnimationII_1 = SugarScapeParams {
sgAgentCount = 400 -- page 28
, sgAgentDistribution = Scatter
, spSugarRegrow = Immediate -- regrow to max immediately
, spSugarEndowmentRange = (5, 25) -- NOTE: this is specified in book page 33 wh... | 727 | mkParamsAnimationII_1 = SugarScapeParams {
sgAgentCount = 400 -- page 28
, sgAgentDistribution = Scatter
, spSugarRegrow = Immediate -- regrow to max immediately
, spSugarEndowmentRange = (5, 25) -- NOTE: this is specified in book page 33 where the initial endowments are set to 5-25... | 685 | true | true | 0 | 7 | 217 | 102 | 70 | 32 | null | null |
amccausl/RDF4H | src/Data/RDF/TriplesGraph.hs | bsd-3-clause | select' :: TriplesGraph -> NodeSelector -> NodeSelector -> NodeSelector -> Triples
select' (TriplesGraph (ts, _, _)) s p o = removeDupes $ filter (matchSelect s p o) ts | 168 | select' :: TriplesGraph -> NodeSelector -> NodeSelector -> NodeSelector -> Triples
select' (TriplesGraph (ts, _, _)) s p o = removeDupes $ filter (matchSelect s p o) ts | 168 | select' (TriplesGraph (ts, _, _)) s p o = removeDupes $ filter (matchSelect s p o) ts | 85 | false | true | 0 | 13 | 27 | 75 | 37 | 38 | null | null |
ezyang/ghc | compiler/prelude/THNames.hs | bsd-3-clause | pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 | 61 | pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 | 61 | pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 | 61 | false | false | 0 | 5 | 18 | 9 | 4 | 5 | null | null |
stefan-hoeck/labeled-graph | Data/Graph/Simple/Graph.hs | bsd-3-clause | -- | Builds a graph of the given order from a list of edges.
fromEdges ∷ Int → Edges → Graph
fromEdges o es = Graph (edgesToConList o es') es
where es' = unEdges es
-- | Builds a graph from a list of edges.
--
-- The order is take from the largest vertex connected by an edge. | 285 | fromEdges ∷ Int → Edges → Graph
fromEdges o es = Graph (edgesToConList o es') es
where es' = unEdges es
-- | Builds a graph from a list of edges.
--
-- The order is take from the largest vertex connected by an edge. | 224 | fromEdges o es = Graph (edgesToConList o es') es
where es' = unEdges es
-- | Builds a graph from a list of edges.
--
-- The order is take from the largest vertex connected by an edge. | 192 | true | true | 0 | 7 | 67 | 52 | 27 | 25 | null | null |
joshuaclayton/unused | src/Unused/CLI/Views/SearchResult.hs | mit | searchResults :: ResultsFormat -> [GroupedTerms] -> IO ()
searchResults format terms = do
resetScreen
runReaderT (printFormattedTerms terms) resultsOptions
where
columnFormatter = buildColumnFormatter $ termsToResults terms
resultsOptions = ResultsOptions columnFormatter format
termsToResults = co... | 345 | searchResults :: ResultsFormat -> [GroupedTerms] -> IO ()
searchResults format terms = do
resetScreen
runReaderT (printFormattedTerms terms) resultsOptions
where
columnFormatter = buildColumnFormatter $ termsToResults terms
resultsOptions = ResultsOptions columnFormatter format
termsToResults = co... | 345 | searchResults format terms = do
resetScreen
runReaderT (printFormattedTerms terms) resultsOptions
where
columnFormatter = buildColumnFormatter $ termsToResults terms
resultsOptions = ResultsOptions columnFormatter format
termsToResults = concatMap (Map.elems . snd) | 287 | false | true | 2 | 9 | 57 | 101 | 45 | 56 | null | null |
Slowki/TinySrv | src/Web/TinySrv/Mime.hs | mit | getMime ".svg" = "image/svg+xml" | 32 | getMime ".svg" = "image/svg+xml" | 32 | getMime ".svg" = "image/svg+xml" | 32 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
keera-studios/hsQt | Qtc/Core/QTimeLine.hs | bsd-2-clause | frameForTime :: QTimeLine a -> ((Int)) -> IO (Int)
frameForTime x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTimeLine_frameForTime cobj_x0 (toCInt x1) | 177 | frameForTime :: QTimeLine a -> ((Int)) -> IO (Int)
frameForTime x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTimeLine_frameForTime cobj_x0 (toCInt x1) | 177 | frameForTime x0 (x1)
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTimeLine_frameForTime cobj_x0 (toCInt x1) | 126 | false | true | 0 | 9 | 33 | 69 | 35 | 34 | null | null |
tedkornish/stack | src/Stack/Types/Version.hs | bsd-3-clause | -- | Get a string representation of a package version.
versionString :: Version -> String
versionString (Version v) =
intercalate "."
(map show (V.toList v)) | 173 | versionString :: Version -> String
versionString (Version v) =
intercalate "."
(map show (V.toList v)) | 118 | versionString (Version v) =
intercalate "."
(map show (V.toList v)) | 83 | true | true | 0 | 10 | 40 | 46 | 23 | 23 | null | null |
ford-prefect/haskell-gi | lib/Data/GI/CodeGen/Callable.hs | lgpl-2.1 | arrayLengths :: Callable -> [Arg]
arrayLengths callable = map snd (arrayLengthsMap callable) <>
-- Often one of the arguments is just the length of
-- the result.
case returnType callable of
Just (TCArray False (-1) length _) ->
if lengt... | 623 | arrayLengths :: Callable -> [Arg]
arrayLengths callable = map snd (arrayLengthsMap callable) <>
-- Often one of the arguments is just the length of
-- the result.
case returnType callable of
Just (TCArray False (-1) length _) ->
if lengt... | 623 | arrayLengths callable = map snd (arrayLengthsMap callable) <>
-- Often one of the arguments is just the length of
-- the result.
case returnType callable of
Just (TCArray False (-1) length _) ->
if length > -1
then [... | 589 | false | true | 0 | 13 | 228 | 111 | 59 | 52 | null | null |
nishiuramakoto/logiku | test/TestImport.hs | gpl-3.0 | shouldBeM :: (?loc :: CallStack, Monad m, Eq a, Show a) => m a -> a -> PropertyM m ()
shouldBeM m a = do
x <- run m
assert' (x == a) | 137 | shouldBeM :: (?loc :: CallStack, Monad m, Eq a, Show a) => m a -> a -> PropertyM m ()
shouldBeM m a = do
x <- run m
assert' (x == a) | 137 | shouldBeM m a = do
x <- run m
assert' (x == a) | 50 | false | true | 0 | 9 | 37 | 84 | 41 | 43 | null | null |
brendanhay/gogol | gogol-serviceusage/gen/Network/Google/ServiceUsage/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'CreateAdminQuotaPolicyMetadata' with the minimum fields required to make a request.
--
createAdminQuotaPolicyMetadata
:: CreateAdminQuotaPolicyMetadata
createAdminQuotaPolicyMetadata = CreateAdminQuotaPolicyMetadata' | 245 | createAdminQuotaPolicyMetadata
:: CreateAdminQuotaPolicyMetadata
createAdminQuotaPolicyMetadata = CreateAdminQuotaPolicyMetadata' | 133 | createAdminQuotaPolicyMetadata = CreateAdminQuotaPolicyMetadata' | 64 | true | true | 0 | 4 | 26 | 13 | 8 | 5 | null | null |
duplode/stack | src/Stack/Setup.hs | bsd-3-clause | getSetupInfo :: (MonadIO m, MonadThrow m) => Manager -> m SetupInfo
getSetupInfo manager = do
bss <- liftIO $ flip runReaderT manager
$ withResponse req $ \res -> responseBody res $$ CL.consume
let bs = S8.concat bss
either throwM return $ Yaml.decodeEither' bs
where
req = "https://raw.github... | 388 | getSetupInfo :: (MonadIO m, MonadThrow m) => Manager -> m SetupInfo
getSetupInfo manager = do
bss <- liftIO $ flip runReaderT manager
$ withResponse req $ \res -> responseBody res $$ CL.consume
let bs = S8.concat bss
either throwM return $ Yaml.decodeEither' bs
where
req = "https://raw.github... | 388 | getSetupInfo manager = do
bss <- liftIO $ flip runReaderT manager
$ withResponse req $ \res -> responseBody res $$ CL.consume
let bs = S8.concat bss
either throwM return $ Yaml.decodeEither' bs
where
req = "https://raw.githubusercontent.com/fpco/stackage-content/master/stack/stack-setup.yaml" | 320 | false | true | 1 | 11 | 73 | 120 | 54 | 66 | null | null |
z0isch/advent-of-code | src/Day7.hs | bsd-3-clause | getAtom' :: (HashMap String WireInput -> WireInput -> CUShort) -> HashMap String WireInput -> Atom -> CUShort
getAtom' _ _ (Value i) = i | 136 | getAtom' :: (HashMap String WireInput -> WireInput -> CUShort) -> HashMap String WireInput -> Atom -> CUShort
getAtom' _ _ (Value i) = i | 136 | getAtom' _ _ (Value i) = i | 26 | false | true | 0 | 11 | 23 | 63 | 29 | 34 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1028 = 1027 | 11 | 1028 = 1027 | 11 | 1028 = 1027 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
RichardBarrell/snippets | Ittle1.hs | isc | winGame :: GS -> IO ()
winGame = mapM_ (putStrLn . show . getSolution) . take 1 . playGame | 90 | winGame :: GS -> IO ()
winGame = mapM_ (putStrLn . show . getSolution) . take 1 . playGame | 90 | winGame = mapM_ (putStrLn . show . getSolution) . take 1 . playGame | 67 | false | true | 0 | 10 | 18 | 45 | 22 | 23 | null | null |
forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/th/TH_spliceViewPat/A.hs | bsd-3-clause | bar :: QuasiQuoter
bar = QuasiQuoter{quotePat = \_ -> [p|((*3) -> fixed_var)|] } | 80 | bar :: QuasiQuoter
bar = QuasiQuoter{quotePat = \_ -> [p|((*3) -> fixed_var)|] } | 80 | bar = QuasiQuoter{quotePat = \_ -> [p|((*3) -> fixed_var)|] } | 61 | false | true | 0 | 8 | 12 | 35 | 19 | 16 | null | null |
teleshoes/taffybar | src/System/Taffybar/Util.hs | bsd-3-clause | foreverWithVariableDelay :: (MonadIO m, RealFrac d) => IO d -> m ThreadId
foreverWithVariableDelay action = liftIO $ forkIO $ action >>= delayThenAction
where delayThenAction delay =
threadDelay (floor $ delay * 1000000) >> action >>= delayThenAction | 262 | foreverWithVariableDelay :: (MonadIO m, RealFrac d) => IO d -> m ThreadId
foreverWithVariableDelay action = liftIO $ forkIO $ action >>= delayThenAction
where delayThenAction delay =
threadDelay (floor $ delay * 1000000) >> action >>= delayThenAction | 262 | foreverWithVariableDelay action = liftIO $ forkIO $ action >>= delayThenAction
where delayThenAction delay =
threadDelay (floor $ delay * 1000000) >> action >>= delayThenAction | 188 | false | true | 0 | 10 | 47 | 83 | 41 | 42 | null | null |
YoEight/eventstore | Database/EventStore/Internal/Subscription/Types.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- EventStore result mappers:
-- =========================
-- EventStore protocol has several values that means the exact same thing. Those
-- functions convert a specific EventStore to uniform result type common to all
-- persistent actio... | 553 | createRException :: CreatePersistentSubscriptionResult
-> Maybe PersistActionException
createRException CPS_Success = Nothing | 148 | createRException CPS_Success = Nothing | 44 | true | true | 0 | 6 | 69 | 28 | 17 | 11 | null | null |
keithodulaigh/Hets | CASL/Freeness.hs | gpl-2.0 | free_formula (Negation f r) = Negation f' r
where f' = free_formula f | 74 | free_formula (Negation f r) = Negation f' r
where f' = free_formula f | 74 | free_formula (Negation f r) = Negation f' r
where f' = free_formula f | 74 | false | false | 0 | 7 | 17 | 33 | 15 | 18 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_HA_IMPORT :: Int
wxSTC_HA_IMPORT = 10 | 43 | wxSTC_HA_IMPORT :: Int
wxSTC_HA_IMPORT = 10 | 43 | wxSTC_HA_IMPORT = 10 | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
dfordivam/lava | Lava/ConstructiveAnalysis.hs | bsd-3-clause | ----------------------------------------------------------------
-- constructive analysis
constructive :: (Generic a, Generic b) => (a -> b) -> (a -> Signal Bool)
constructive circ inp =
runST
( do defined <- newSTRef []
table <- tableST
let gather (Symbol sym) =
do ms <- findST table... | 2,811 | constructive :: (Generic a, Generic b) => (a -> b) -> (a -> Signal Bool)
constructive circ inp =
runST
( do defined <- newSTRef []
table <- tableST
let gather (Symbol sym) =
do ms <- findST table sym
case ms of
Just s -> do return s
... | 2,720 | constructive circ inp =
runST
( do defined <- newSTRef []
table <- tableST
let gather (Symbol sym) =
do ms <- findST table sym
case ms of
Just s -> do return s
Nothing -> fixST (\s ->
do extendST table... | 2,647 | true | true | 18 | 27 | 1,385 | 902 | 462 | 440 | null | null |
michaelt/series | Series/Types.hs | bsd-3-clause | foldFree_ :: (Functor f, Monad m) => FreeT f m t -> Folding_ f m t
foldFree_ f construct wrap done = outer f where
outer = wrap
. liftM (\case Free.Pure r -> done r
Free fr -> construct (fmap outer fr))
. runFreeT
| 263 | foldFree_ :: (Functor f, Monad m) => FreeT f m t -> Folding_ f m t
foldFree_ f construct wrap done = outer f where
outer = wrap
. liftM (\case Free.Pure r -> done r
Free fr -> construct (fmap outer fr))
. runFreeT
| 263 | foldFree_ f construct wrap done = outer f where
outer = wrap
. liftM (\case Free.Pure r -> done r
Free fr -> construct (fmap outer fr))
. runFreeT
| 196 | false | true | 0 | 16 | 94 | 117 | 55 | 62 | null | null |
pgj/bead | src/Bead/View/UserActions.hs | bsd-3-clause | userStoryFor (DeleteUsersFromCourse ck us) = Story.deleteUsersFromCourse ck us | 78 | userStoryFor (DeleteUsersFromCourse ck us) = Story.deleteUsersFromCourse ck us | 78 | userStoryFor (DeleteUsersFromCourse ck us) = Story.deleteUsersFromCourse ck us | 78 | false | false | 0 | 6 | 7 | 25 | 11 | 14 | null | null |
supermitch/learn-haskell | edx-fp101x/4_hw.hs | mit | divisors :: Int -> [Int]
divisors x = [d | d <- [1..x], x `divides` d] | 70 | divisors :: Int -> [Int]
divisors x = [d | d <- [1..x], x `divides` d] | 70 | divisors x = [d | d <- [1..x], x `divides` d] | 45 | false | true | 0 | 8 | 15 | 47 | 26 | 21 | null | null |
psibi/yesod | yesod-websockets/Yesod/WebSockets.hs | mit | -- | Send a textual message to the client.
-- Capture SomeException as the result or operation
-- and can be used like
-- `either handle_exception return =<< sendTextDataE ("Welcome" :: Text)`
-- Since 0.2.2
sendTextDataE
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
=> a
-> m (Either SomeExcep... | 368 | sendTextDataE
:: (MonadIO m, WS.WebSocketsData a, MonadReader WS.Connection m)
=> a
-> m (Either SomeException ())
sendTextDataE = wrapWSE WS.sendTextData | 160 | sendTextDataE = wrapWSE WS.sendTextData | 39 | true | true | 0 | 11 | 60 | 70 | 36 | 34 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCanFail NewJDoubleArrayOp = True | 41 | primOpCanFail NewJDoubleArrayOp = True | 41 | primOpCanFail NewJDoubleArrayOp = True | 41 | false | false | 0 | 4 | 6 | 10 | 4 | 6 | null | null |
tpsinnem/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPTermFC f g (PProof tacs) = PProof (map (fmap (mapPTermFC f g)) tacs) | 89 | mapPTermFC f g (PProof tacs) = PProof (map (fmap (mapPTermFC f g)) tacs) | 89 | mapPTermFC f g (PProof tacs) = PProof (map (fmap (mapPTermFC f g)) tacs) | 89 | false | false | 0 | 11 | 29 | 44 | 21 | 23 | null | null |
jystic/river | src/River/Core/Evaluate.hs | bsd-3-clause | takeIntCmp :: Prim -> Maybe (Int64 -> Int64 -> Bool)
takeIntCmp = \case
Eq ->
Just (==)
Ne ->
Just (/=)
Lt ->
Just (<)
Le ->
Just (<=)
Gt ->
Just (>)
Ge ->
Just (>=)
_ ->
Nothing | 220 | takeIntCmp :: Prim -> Maybe (Int64 -> Int64 -> Bool)
takeIntCmp = \case
Eq ->
Just (==)
Ne ->
Just (/=)
Lt ->
Just (<)
Le ->
Just (<=)
Gt ->
Just (>)
Ge ->
Just (>=)
_ ->
Nothing | 220 | takeIntCmp = \case
Eq ->
Just (==)
Ne ->
Just (/=)
Lt ->
Just (<)
Le ->
Just (<=)
Gt ->
Just (>)
Ge ->
Just (>=)
_ ->
Nothing | 167 | false | true | 8 | 9 | 81 | 108 | 55 | 53 | null | null |
vikraman/gentoo-haskell-status | src/Cron.hs | mit | multiplier :: Int
multiplier = 10 ^ (6 :: Int) | 46 | multiplier :: Int
multiplier = 10 ^ (6 :: Int) | 46 | multiplier = 10 ^ (6 :: Int) | 28 | false | true | 0 | 6 | 9 | 21 | 12 | 9 | null | null |
pniedzielski/fowlie-mga | src/Main.hs | gpl-3.0 | inferOne ∷ Grammar → Expression → Chart → [Expression]
inferOne g item c = conclusions
where
-- Try inference rules:
-- Move operates only on one expression
moveConclusions = [move item]
-- Merges operate on two expressions
merge1Conclusions = merge1 item <$> c
merge2Conclusions = merge2 ... | 1,023 | inferOne ∷ Grammar → Expression → Chart → [Expression]
inferOne g item c = conclusions
where
-- Try inference rules:
-- Move operates only on one expression
moveConclusions = [move item]
-- Merges operate on two expressions
merge1Conclusions = merge1 item <$> c
merge2Conclusions = merge2 ... | 1,023 | inferOne g item c = conclusions
where
-- Try inference rules:
-- Move operates only on one expression
moveConclusions = [move item]
-- Merges operate on two expressions
merge1Conclusions = merge1 item <$> c
merge2Conclusions = merge2 item <$> c
merge3Conclusions = merge3 item <$> c
... | 968 | false | true | 6 | 12 | 364 | 155 | 79 | 76 | null | null |
indika/hd | HD.hs | mit | execute :: State -> (State, Update (), IO ())
execute s = do
let buffer_contents = contents . buffer $ s
(b', u') = clearBuffer (buffer s)
s' = State b'
io = do
(diff, result) <- performTask motor releaseCommand
case result of Nothing -> debugM "HD" "Failed"
... | 398 | execute :: State -> (State, Update (), IO ())
execute s = do
let buffer_contents = contents . buffer $ s
(b', u') = clearBuffer (buffer s)
s' = State b'
io = do
(diff, result) <- performTask motor releaseCommand
case result of Nothing -> debugM "HD" "Failed"
... | 398 | execute s = do
let buffer_contents = contents . buffer $ s
(b', u') = clearBuffer (buffer s)
s' = State b'
io = do
(diff, result) <- performTask motor releaseCommand
case result of Nothing -> debugM "HD" "Failed"
Just (code, str1, str2) -> d... | 352 | false | true | 0 | 16 | 141 | 159 | 81 | 78 | null | null |
urbanslug/ghc | testsuite/tests/indexed-types/should_compile/red-black-delete.hs | bsd-3-clause | bubbleL NB l@(DT BB a y b) x r = dbalanceR R (T B a y b) x (redden r) | 69 | bubbleL NB l@(DT BB a y b) x r = dbalanceR R (T B a y b) x (redden r) | 69 | bubbleL NB l@(DT BB a y b) x r = dbalanceR R (T B a y b) x (redden r) | 69 | false | false | 1 | 8 | 19 | 62 | 28 | 34 | null | null |
bernstein/pixelparty | src/PixelParty/Main.hs | bsd-3-clause | createShaders :: CmdLine -> P ()
createShaders opts = do
errorCheckValue <- io GL.glGetError
let path = ".":include opts
(v,f,g,p) <- io $ loadProgramFrom path (vshader opts) (fshader opts) (gshader opts)
io $ GL.glUseProgram (unGLProgram p)
modify (\s -> s { programId = p, vertexShaderId = v, fragmentShader... | 846 | createShaders :: CmdLine -> P ()
createShaders opts = do
errorCheckValue <- io GL.glGetError
let path = ".":include opts
(v,f,g,p) <- io $ loadProgramFrom path (vshader opts) (fshader opts) (gshader opts)
io $ GL.glUseProgram (unGLProgram p)
modify (\s -> s { programId = p, vertexShaderId = v, fragmentShader... | 846 | createShaders opts = do
errorCheckValue <- io GL.glGetError
let path = ".":include opts
(v,f,g,p) <- io $ loadProgramFrom path (vshader opts) (fshader opts) (gshader opts)
io $ GL.glUseProgram (unGLProgram p)
modify (\s -> s { programId = p, vertexShaderId = v, fragmentShaderId = f
, geomet... | 813 | false | true | 0 | 14 | 196 | 399 | 200 | 199 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Var.hs | bsd-3-clause | setIdExported :: Id -> Id
-- ^ Exports the given local 'Id'. Can also be called on global 'Id's, such as data constructors
-- and class operations, which are born as global 'Id's and automatically exported
setIdExported id@(Id { idScope = LocalId {} }) = id { idScope = LocalId Exported } | 288 | setIdExported :: Id -> Id
setIdExported id@(Id { idScope = LocalId {} }) = id { idScope = LocalId Exported } | 108 | setIdExported id@(Id { idScope = LocalId {} }) = id { idScope = LocalId Exported } | 82 | true | true | 3 | 8 | 51 | 54 | 29 | 25 | null | null |
DanielSchuessler/hstri | ToPython.hs | gpl-3.0 | setProp :: (ToPython obj, ToPython val) => obj -> String -> val -> Python ()
setProp obj p v = obj <.> p .= v | 109 | setProp :: (ToPython obj, ToPython val) => obj -> String -> val -> Python ()
setProp obj p v = obj <.> p .= v | 109 | setProp obj p v = obj <.> p .= v | 32 | false | true | 3 | 11 | 24 | 64 | 31 | 33 | null | null |
ezyang/ghc | compiler/codeGen/CgUtils.hs | bsd-3-clause | baseRegOffset dflags (VanillaReg 3 _) = oFFSET_StgRegTable_rR3 dflags | 72 | baseRegOffset dflags (VanillaReg 3 _) = oFFSET_StgRegTable_rR3 dflags | 72 | baseRegOffset dflags (VanillaReg 3 _) = oFFSET_StgRegTable_rR3 dflags | 72 | false | false | 0 | 7 | 10 | 22 | 10 | 12 | null | null |
deontologician/orbRPG | Game/OrbRPG/Types.hs | gpl-3.0 | -- | Run an action in the 'Adv' monad given an initial 'GameState',
-- resulting in an 'IO' action.
runAdv :: Adv () -> GameState -> IO ()
runAdv (Adv adv) gameState = runInputT defaultSettings $
fromAdvCtrl () <$> evalStateT (runAdvCtrlT adv) gameState | 284 | runAdv :: Adv () -> GameState -> IO ()
runAdv (Adv adv) gameState = runInputT defaultSettings $
fromAdvCtrl () <$> evalStateT (runAdvCtrlT adv) gameState | 182 | runAdv (Adv adv) gameState = runInputT defaultSettings $
fromAdvCtrl () <$> evalStateT (runAdvCtrlT adv) gameState | 143 | true | true | 0 | 8 | 73 | 69 | 33 | 36 | null | null |
ambiata/tatooine-cli | src/Ambiata/Cli/Downloads.hs | apache-2.0 | {-
The layout of the DOWNLOAD_DIR looks like the following:
DOWNLOAD_DIR/
.marker/
file1
file2
file2
Marker files are created when files are downloaded, to ensure they don't
need to be downloaded again.
This allows for users to manage the list of downloaded files separately without
impacting th... | 953 | downloadReady :: DownloadDir -> Region -> DownloadAccess -> EitherT AmbiataError IO DownloadResult
downloadReady dir r (DownloadAccess (TemporaryCreds k s sess) a) = do
env' <- setDebugging <$> getDebugging <*> newEnvFromCreds r k s (Just sess)
let
env = configure (over serviceRetry (set retryAttempts 10 . set ... | 545 | downloadReady dir r (DownloadAccess (TemporaryCreds k s sess) a) = do
env' <- setDebugging <$> getDebugging <*> newEnvFromCreds r k s (Just sess)
let
env = configure (over serviceRetry (set retryAttempts 10 . set exponentBase 0.6) s3) env'
runAWST env AmbiataAWSDownloadError
. bimapEitherT AmbiataDownload... | 446 | true | true | 0 | 15 | 187 | 163 | 80 | 83 | null | null |
fmapfmapfmap/amazonka | amazonka-iam/gen/Network/AWS/IAM/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ServerCertificateMetadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scmUploadDate'
--
-- * 'scmExpiration'
--
-- * 'scmPath'
--
-- * 'scmServerCertificateName'
--
-- * 'scmServerCertificateId'
--
-- * '... | 869 | serverCertificateMetadata
:: Text -- ^ 'scmPath'
-> Text -- ^ 'scmServerCertificateName'
-> Text -- ^ 'scmServerCertificateId'
-> Text -- ^ 'scmARN'
-> ServerCertificateMetadata
serverCertificateMetadata pPath_ pServerCertificateName_ pServerCertificateId_ pARN_ =
ServerCertificateMetadata'
... | 541 | serverCertificateMetadata pPath_ pServerCertificateName_ pServerCertificateId_ pARN_ =
ServerCertificateMetadata'
{ _scmUploadDate = Nothing
, _scmExpiration = Nothing
, _scmPath = pPath_
, _scmServerCertificateName = pServerCertificateName_
, _scmServerCertificateId = pServerCertificateId_
... | 343 | true | true | 0 | 10 | 160 | 102 | 64 | 38 | null | null |
raventid/coursera_learning | haskell/stepik/4.5tree.hs | mit | size :: Tree a -> Int
size (Leaf _) = 1 | 39 | size :: Tree a -> Int
size (Leaf _) = 1 | 39 | size (Leaf _) = 1 | 17 | false | true | 0 | 9 | 10 | 33 | 14 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.