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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tcsavage/lazy-compiler | src/STG/FromCore.hs | mit | getFree (Core.Lam binder expr) = restoreBound $ do
markBound $ Core.name binder -- Mark arg as bound.
getFree expr | 123 | getFree (Core.Lam binder expr) = restoreBound $ do
markBound $ Core.name binder -- Mark arg as bound.
getFree expr | 123 | getFree (Core.Lam binder expr) = restoreBound $ do
markBound $ Core.name binder -- Mark arg as bound.
getFree expr | 123 | false | false | 0 | 10 | 27 | 42 | 19 | 23 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | fromJStringName = varQual jAVA_STRING (fsLit "fromJString") fromJStringIdKey | 82 | fromJStringName = varQual jAVA_STRING (fsLit "fromJString") fromJStringIdKey | 82 | fromJStringName = varQual jAVA_STRING (fsLit "fromJString") fromJStringIdKey | 82 | false | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Common/PointArray.hs | bsd-3-clause | forceA Array{..} = Array{avector = U.force avector, ..} | 55 | forceA Array{..} = Array{avector = U.force avector, ..} | 55 | forceA Array{..} = Array{avector = U.force avector, ..} | 55 | false | false | 0 | 8 | 7 | 31 | 16 | 15 | null | null |
ublubu/tile-rider | src/SDL/Loading.hs | mit | convertSurface :: Ptr SDL.T.Surface -> Ptr SDL.T.PixelFormat -> Word32 -> IO (Risky (Ptr SDL.T.Surface))
convertSurface surface format flags = do
optimizedSurface <- SDL.V.convertSurface surface format flags
return $ if optimizedSurface == nullPtr then Left "Unable to optimize image!" else Right optimizedSurfac... | 321 | convertSurface :: Ptr SDL.T.Surface -> Ptr SDL.T.PixelFormat -> Word32 -> IO (Risky (Ptr SDL.T.Surface))
convertSurface surface format flags = do
optimizedSurface <- SDL.V.convertSurface surface format flags
return $ if optimizedSurface == nullPtr then Left "Unable to optimize image!" else Right optimizedSurfac... | 321 | convertSurface surface format flags = do
optimizedSurface <- SDL.V.convertSurface surface format flags
return $ if optimizedSurface == nullPtr then Left "Unable to optimize image!" else Right optimizedSurface | 216 | false | true | 0 | 13 | 48 | 102 | 50 | 52 | null | null |
tolysz/prepare-ghcjs | spec-lts8/aeson/Data/Aeson/Types/FromJSON.hs | bsd-3-clause | coerceFromJSONKeyFunction = coerce | 34 | coerceFromJSONKeyFunction = coerce | 34 | coerceFromJSONKeyFunction = coerce | 34 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
bhamrick/fuzzygrep | Main.hs | mit | openSource :: Source -> IO Handle
openSource Stdin = return stdin | 65 | openSource :: Source -> IO Handle
openSource Stdin = return stdin | 65 | openSource Stdin = return stdin | 31 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
lukexi/ghc-7.8-arm64 | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | isVecExpr (CmmMachOp (MO_VF_Sub {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_VF_Sub {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_VF_Sub {}) _) = True | 49 | false | false | 0 | 9 | 10 | 24 | 12 | 12 | null | null |
ronwalf/ba-winter-challenge | src/Strava.hs | bsd-3-clause | rideSearch :: (Failure HttpException m, MonadBaseControl IO m, MonadResource m) => RSOpts -> Manager -> m [(T.Text, Integer)]
rideSearch opts manager = do
retrieveAll 0
where
retrieveAll offset = do
gl <- liftM fromRideList $ flip getJSON manager $ "http://www.strava.com/api/v1/rides?" ++ inte... | 1,053 | rideSearch :: (Failure HttpException m, MonadBaseControl IO m, MonadResource m) => RSOpts -> Manager -> m [(T.Text, Integer)]
rideSearch opts manager = do
retrieveAll 0
where
retrieveAll offset = do
gl <- liftM fromRideList $ flip getJSON manager $ "http://www.strava.com/api/v1/rides?" ++ inte... | 1,053 | rideSearch opts manager = do
retrieveAll 0
where
retrieveAll offset = do
gl <- liftM fromRideList $ flip getJSON manager $ "http://www.strava.com/api/v1/rides?" ++ intercalate "&" (catMaybes [
fmap (renderNum "clubId") $ clubID opts,
fmap (renderNum "athleteId")... | 927 | false | true | 0 | 18 | 351 | 347 | 168 | 179 | null | null |
GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/SPI/Peripheral.hs | bsd-3-clause | spiSetDR :: SPIPeriph -> Uint8 -> Ivory eff ()
spiSetDR spi b =
setReg (spiRegDR spi) $
setField spi_dr_data (fromRep b) | 126 | spiSetDR :: SPIPeriph -> Uint8 -> Ivory eff ()
spiSetDR spi b =
setReg (spiRegDR spi) $
setField spi_dr_data (fromRep b) | 126 | spiSetDR spi b =
setReg (spiRegDR spi) $
setField spi_dr_data (fromRep b) | 79 | false | true | 0 | 8 | 26 | 55 | 26 | 29 | null | null |
TransformingMusicology/libaudioDB-haskell | src/Sound/Audio/Features/ReadCSV.hs | gpl-3.0 | dropColumns _ [] = [] | 21 | dropColumns _ [] = [] | 21 | dropColumns _ [] = [] | 21 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
brendanhay/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Features/List.hs | mpl-2.0 | -- | V1 error format.
rflXgafv :: Lens' ResourcesFeaturesList (Maybe Xgafv)
rflXgafv = lens _rflXgafv (\ s a -> s{_rflXgafv = a}) | 129 | rflXgafv :: Lens' ResourcesFeaturesList (Maybe Xgafv)
rflXgafv = lens _rflXgafv (\ s a -> s{_rflXgafv = a}) | 107 | rflXgafv = lens _rflXgafv (\ s a -> s{_rflXgafv = a}) | 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
framp/postgrest | src/PostgREST/PgQuery.hs | mit | deleteFrom :: QualifiedTable -> PStmt
deleteFrom t = B.Stmt ("delete from " <> fromQt t) empty True | 99 | deleteFrom :: QualifiedTable -> PStmt
deleteFrom t = B.Stmt ("delete from " <> fromQt t) empty True | 99 | deleteFrom t = B.Stmt ("delete from " <> fromQt t) empty True | 61 | false | true | 0 | 8 | 16 | 37 | 18 | 19 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | fromFlag :: Flag a -> a
fromFlag (Flag x) = x | 45 | fromFlag :: Flag a -> a
fromFlag (Flag x) = x | 45 | fromFlag (Flag x) = x | 21 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Constraints/SymbolicGrades.hs | bsd-3-clause | symGradePlus SPoint SPoint = return $ SPoint | 44 | symGradePlus SPoint SPoint = return $ SPoint | 44 | symGradePlus SPoint SPoint = return $ SPoint | 44 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
ezyang/binary | tests/Action.hs | bsd-3-clause | failReason :: Eval -> String
failReason (EFail fr _ _) = show fr | 64 | failReason :: Eval -> String
failReason (EFail fr _ _) = show fr | 64 | failReason (EFail fr _ _) = show fr | 35 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1CSIPersistentVolumeSourceVolumeHandle' Lens
v1CSIPersistentVolumeSourceVolumeHandleL :: Lens_' V1CSIPersistentVolumeSource (Text)
v1CSIPersistentVolumeSourceVolumeHandleL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceVolumeHandle -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceVol... | 382 | v1CSIPersistentVolumeSourceVolumeHandleL :: Lens_' V1CSIPersistentVolumeSource (Text)
v1CSIPersistentVolumeSourceVolumeHandleL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceVolumeHandle -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceVolumeHandle, ..} ) <$> f v1CSIPersistentVolumeSourceVo... | 330 | v1CSIPersistentVolumeSourceVolumeHandleL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceVolumeHandle -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceVolumeHandle, ..} ) <$> f v1CSIPersistentVolumeSourceVolumeHandle | 244 | true | true | 0 | 8 | 22 | 54 | 29 | 25 | null | null |
hsyl20/ViperVM | haskus-system-build/src/apps/Haskus/Apps/System/Build/Linux.hs | bsd-3-clause | linuxBuild :: LinuxConfig -> FilePath -> IO ()
linuxBuild config path = do
let shell' = shellInErr path
shell' ("make " ++ Text.unpack (linuxMakeArgs config))
$ fail "Unable to build Linux"
-- | Configure Linux tree in the given directory | 252 | linuxBuild :: LinuxConfig -> FilePath -> IO ()
linuxBuild config path = do
let shell' = shellInErr path
shell' ("make " ++ Text.unpack (linuxMakeArgs config))
$ fail "Unable to build Linux"
-- | Configure Linux tree in the given directory | 252 | linuxBuild config path = do
let shell' = shellInErr path
shell' ("make " ++ Text.unpack (linuxMakeArgs config))
$ fail "Unable to build Linux"
-- | Configure Linux tree in the given directory | 205 | false | true | 0 | 13 | 53 | 73 | 34 | 39 | null | null |
wereHamster/haskell-css-syntax | src/Data/CSS/Syntax/Tokens.hs | mit | renderDimensionUnit :: Text -> Text -> Text
renderDimensionUnit num t0@(Text _ _ l)
| not (T.any isExponent num)
, c :. t' <- t0
, isExponent c && validExp t' =
withNewA (l*8) $ \ dst -> do
d' <- escapeAsCodePoint dst 0 c
renderUnrestrictedHash' t' d' dst
| otherwise =
... | 479 | renderDimensionUnit :: Text -> Text -> Text
renderDimensionUnit num t0@(Text _ _ l)
| not (T.any isExponent num)
, c :. t' <- t0
, isExponent c && validExp t' =
withNewA (l*8) $ \ dst -> do
d' <- escapeAsCodePoint dst 0 c
renderUnrestrictedHash' t' d' dst
| otherwise =
... | 479 | renderDimensionUnit num t0@(Text _ _ l)
| not (T.any isExponent num)
, c :. t' <- t0
, isExponent c && validExp t' =
withNewA (l*8) $ \ dst -> do
d' <- escapeAsCodePoint dst 0 c
renderUnrestrictedHash' t' d' dst
| otherwise =
renderIdent t0
where validExp (s :... | 435 | false | true | 0 | 13 | 161 | 208 | 99 | 109 | null | null |
kapilash/dc | src/ccs2c/ccs2cs-lib/src/Language/CCS/Printer.hs | bsd-3-clause | csValToDoc nm (CHashDef s) = extractNMap (MacroDef s) nm | 62 | csValToDoc nm (CHashDef s) = extractNMap (MacroDef s) nm | 62 | csValToDoc nm (CHashDef s) = extractNMap (MacroDef s) nm | 62 | false | false | 0 | 7 | 14 | 30 | 13 | 17 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | The idempotency token you provided when you launched the instance.
insClientToken :: Lens' Instance (Maybe Text)
insClientToken = lens _insClientToken (\ s a -> s{_insClientToken = a}) | 189 | insClientToken :: Lens' Instance (Maybe Text)
insClientToken = lens _insClientToken (\ s a -> s{_insClientToken = a}) | 117 | insClientToken = lens _insClientToken (\ s a -> s{_insClientToken = a}) | 71 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
suhailshergill/hakaru | Examples/RoadmapHMM.hs | bsd-3-clause | -- Resample a row of both the emission and transmission matrices
roadmapProg4 :: (Integrate repr, Lambda repr, Mochastic repr) =>
repr (Vector Int) ->
repr MCState ->
repr (Measure MCState)
roadmapProg4 o x = unpair x (\ trans emit ->
resampleRow tran... | 487 | roadmapProg4 :: (Integrate repr, Lambda repr, Mochastic repr) =>
repr (Vector Int) ->
repr MCState ->
repr (Measure MCState)
roadmapProg4 o x = unpair x (\ trans emit ->
resampleRow trans `bind` \trans' ->
resampleRow emit `bind` \e... | 421 | roadmapProg4 o x = unpair x (\ trans emit ->
resampleRow trans `bind` \trans' ->
resampleRow emit `bind` \emit' ->
mcmc' o (pair trans emit)
(pair trans' emit')) | 247 | true | true | 0 | 14 | 193 | 137 | 69 | 68 | null | null |
bollu/symengine.hs-1 | src/Symengine/NumberTheory.hs | mit | quotient_and_mod :: BasicSym -> BasicSym -> (Quotient, Modulo)
quotient_and_mod a b = unsafePerformIO $ do
quotient <- basicsym_new
modulo <- basicsym_new
with4 quotient modulo a b ntheory_quotient_mod_ffi
return $ (quotient, modulo) | 242 | quotient_and_mod :: BasicSym -> BasicSym -> (Quotient, Modulo)
quotient_and_mod a b = unsafePerformIO $ do
quotient <- basicsym_new
modulo <- basicsym_new
with4 quotient modulo a b ntheory_quotient_mod_ffi
return $ (quotient, modulo) | 242 | quotient_and_mod a b = unsafePerformIO $ do
quotient <- basicsym_new
modulo <- basicsym_new
with4 quotient modulo a b ntheory_quotient_mod_ffi
return $ (quotient, modulo) | 179 | false | true | 0 | 9 | 39 | 75 | 37 | 38 | null | null |
mimi1vx/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkSpacefulness3 = verifyNotTree checkSpacefulness "a='cow*.mp3'; echo \"$a\"" | 85 | prop_checkSpacefulness3 = verifyNotTree checkSpacefulness "a='cow*.mp3'; echo \"$a\"" | 85 | prop_checkSpacefulness3 = verifyNotTree checkSpacefulness "a='cow*.mp3'; echo \"$a\"" | 85 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
ezyang/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | pprInstr (STFAR _ _ _) =
panic "PPC.Ppr.pprInstr STFAR: no match" | 68 | pprInstr (STFAR _ _ _) =
panic "PPC.Ppr.pprInstr STFAR: no match" | 68 | pprInstr (STFAR _ _ _) =
panic "PPC.Ppr.pprInstr STFAR: no match" | 68 | false | false | 0 | 7 | 13 | 22 | 10 | 12 | null | null |
dolio/irc-core | lib/src/Irc/Commands.hs | isc | -- | CHANTRACE command
ircChantrace ::
Text {- ^ channel -} ->
RawIrcMsg
ircChantrace channel = rawIrcMsg "CHANTRACE" [channel] | 131 | ircChantrace ::
Text {- ^ channel -} ->
RawIrcMsg
ircChantrace channel = rawIrcMsg "CHANTRACE" [channel] | 108 | ircChantrace channel = rawIrcMsg "CHANTRACE" [channel] | 54 | true | true | 0 | 6 | 22 | 28 | 15 | 13 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Exclusions/Create.hs | mpl-2.0 | -- | Creates a value of 'OrganizationsExclusionsCreate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oecParent'
--
-- * 'oecXgafv'
--
-- * 'oecUploadProtocol'
--
-- * 'oecAccessToken'
--
-- * 'oecUploadType'
--
-- * 'oecPayload'
--... | 786 | organizationsExclusionsCreate
:: Text -- ^ 'oecParent'
-> LogExclusion -- ^ 'oecPayload'
-> OrganizationsExclusionsCreate
organizationsExclusionsCreate pOecParent_ pOecPayload_ =
OrganizationsExclusionsCreate'
{ _oecParent = pOecParent_
, _oecXgafv = Nothing
, _oecUploadProtocol = Nothing
... | 446 | organizationsExclusionsCreate pOecParent_ pOecPayload_ =
OrganizationsExclusionsCreate'
{ _oecParent = pOecParent_
, _oecXgafv = Nothing
, _oecUploadProtocol = Nothing
, _oecAccessToken = Nothing
, _oecUploadType = Nothing
, _oecPayload = pOecPayload_
, _oecCallback = Nothing
} | 312 | true | true | 0 | 6 | 150 | 87 | 60 | 27 | null | null |
kawu/ltag | src/NLP/LTAG/Early2.hs | bsd-2-clause | isClose :: Elem a b -> Bool
isClose t = case t of
Close _ -> True
_ -> False
-- | Is it an opening or closing tag-non-terminal? | 137 | isClose :: Elem a b -> Bool
isClose t = case t of
Close _ -> True
_ -> False
-- | Is it an opening or closing tag-non-terminal? | 137 | isClose t = case t of
Close _ -> True
_ -> False
-- | Is it an opening or closing tag-non-terminal? | 109 | false | true | 3 | 6 | 38 | 41 | 21 | 20 | null | null |
hanshoglund/comb | src/Sound/Comb/Prim/IO.hs | bsd-3-clause | indexBus :: (Int,Int) -> Int
indexBus (n,c) = c*kMaxDelay + n | 61 | indexBus :: (Int,Int) -> Int
indexBus (n,c) = c*kMaxDelay + n | 61 | indexBus (n,c) = c*kMaxDelay + n | 32 | false | true | 0 | 6 | 10 | 38 | 21 | 17 | null | null |
8l/NetASM-haskell | Core/Language.hs | gpl-3.0 | mtchtr (r, rs, h, (xs:xss), i)
| isMtch = (insert(rs, r, i), True)
| otherwise = mtchtr(r, rs, h, xss, i+1)
where isMtch = all (`elem` [(f', v') | (f', (v', b')) <- h]) xs
-- with a match on table to fixed value PID and set field with matched index. | 256 | mtchtr (r, rs, h, (xs:xss), i)
| isMtch = (insert(rs, r, i), True)
| otherwise = mtchtr(r, rs, h, xss, i+1)
where isMtch = all (`elem` [(f', v') | (f', (v', b')) <- h]) xs
-- with a match on table to fixed value PID and set field with matched index. | 256 | mtchtr (r, rs, h, (xs:xss), i)
| isMtch = (insert(rs, r, i), True)
| otherwise = mtchtr(r, rs, h, xss, i+1)
where isMtch = all (`elem` [(f', v') | (f', (v', b')) <- h]) xs
-- with a match on table to fixed value PID and set field with matched index. | 256 | false | false | 1 | 11 | 57 | 133 | 78 | 55 | null | null |
input-output-hk/cardano-sl | utxo/src/UTxO/Context.hs | apache-2.0 | -- | The maximum size in bytes of the serialized Cardano form of these addresses
--
-- This is needed for fee estimation.
maxAddrSize :: Int
maxAddrSize = error "TODO: maxAddrSize: not defined!" | 194 | maxAddrSize :: Int
maxAddrSize = error "TODO: maxAddrSize: not defined!" | 72 | maxAddrSize = error "TODO: maxAddrSize: not defined!" | 53 | true | true | 0 | 5 | 32 | 17 | 10 | 7 | null | null |
kowey/pandoc-old | src/Text/Pandoc/Writers/Markdown.hs | gpl-2.0 | blockToMarkdown opts (BlockQuote blocks) = do
-- if we're writing literate haskell, put a space before the bird tracks
-- so they won't be interpreted as lhs...
let leader = if writerLiterateHaskell opts
then text . (" > " ++)
else text . ("> " ++)
contents <- blockListToMark... | 418 | blockToMarkdown opts (BlockQuote blocks) = do
-- if we're writing literate haskell, put a space before the bird tracks
-- so they won't be interpreted as lhs...
let leader = if writerLiterateHaskell opts
then text . (" > " ++)
else text . ("> " ++)
contents <- blockListToMark... | 418 | blockToMarkdown opts (BlockQuote blocks) = do
-- if we're writing literate haskell, put a space before the bird tracks
-- so they won't be interpreted as lhs...
let leader = if writerLiterateHaskell opts
then text . (" > " ++)
else text . ("> " ++)
contents <- blockListToMark... | 418 | false | false | 0 | 13 | 122 | 102 | 51 | 51 | null | null |
ancientlanguage/haskell-analysis | greek-script/app/ScriptQueries.hs | mit | queryVocalicSyllable
:: ctx
:* ((([ [VocalicSyllable :* Maybe ContextualAccent :* Maybe Breathing] :+ [ConsonantRho] ]
:* DiaeresisConvention :* Capitalization) :* Elision) :* HasWordPunctuation)
-> [[VocalicSyllable]]
queryVocalicSyllable = over (traverse . traverse) (view _1) . toListOf (_2 . _1 . _1 . _... | 341 | queryVocalicSyllable
:: ctx
:* ((([ [VocalicSyllable :* Maybe ContextualAccent :* Maybe Breathing] :+ [ConsonantRho] ]
:* DiaeresisConvention :* Capitalization) :* Elision) :* HasWordPunctuation)
-> [[VocalicSyllable]]
queryVocalicSyllable = over (traverse . traverse) (view _1) . toListOf (_2 . _1 . _1 . _... | 341 | queryVocalicSyllable = over (traverse . traverse) (view _1) . toListOf (_2 . _1 . _1 . _1 . traverse . _Left) | 109 | false | true | 0 | 19 | 58 | 131 | 67 | 64 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_HILO8_NV :: GLenum
gl_HILO8_NV = 0x885E | 42 | gl_HILO8_NV :: GLenum
gl_HILO8_NV = 0x885E | 42 | gl_HILO8_NV = 0x885E | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Peaker/lamdu | src/Lamdu/GUI/WidgetIds.hs | gpl-3.0 | tagHoleId :: Id -> Id
tagHoleId = (`WidgetId.joinId` ["hole"]) | 62 | tagHoleId :: Id -> Id
tagHoleId = (`WidgetId.joinId` ["hole"]) | 62 | tagHoleId = (`WidgetId.joinId` ["hole"]) | 40 | false | true | 0 | 6 | 8 | 26 | 16 | 10 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGL2RenderingContext.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext.bindBufferBase Mozilla WebGL2RenderingContext.bindBufferBase documentation>
bindBufferBase ::
(MonadDOM m) =>
WebGL2RenderingContext ->
GLenum -> GLuint -> Maybe WebGLBuffer -> m ()
bindBuff... | 476 | bindBufferBase ::
(MonadDOM m) =>
WebGL2RenderingContext ->
GLenum -> GLuint -> Maybe WebGLBuffer -> m ()
bindBufferBase self target index buffer
= liftDOM
(void
(self ^. jsf "bindBufferBase"
[toJSVal target, toJSVal index, toJSVal buffer])... | 321 | bindBufferBase self target index buffer
= liftDOM
(void
(self ^. jsf "bindBufferBase"
[toJSVal target, toJSVal index, toJSVal buffer])) | 164 | true | true | 0 | 11 | 120 | 93 | 46 | 47 | null | null |
AndreasPK/yalvm | src/LuaObjects.hs | bsd-3-clause | -- upvalues closure)
lgetArgCount :: LuaObject -> Int
lgetArgCount (LOFunction func) =
let (LuaFunctionHeader _ _ _ upvalCount parCount varargFlags _ _ _ _ _ _ _) = funcHeader func
in fromIntegral parCount | 210 | lgetArgCount :: LuaObject -> Int
lgetArgCount (LOFunction func) =
let (LuaFunctionHeader _ _ _ upvalCount parCount varargFlags _ _ _ _ _ _ _) = funcHeader func
in fromIntegral parCount | 188 | lgetArgCount (LOFunction func) =
let (LuaFunctionHeader _ _ _ upvalCount parCount varargFlags _ _ _ _ _ _ _) = funcHeader func
in fromIntegral parCount | 155 | true | true | 0 | 10 | 37 | 73 | 35 | 38 | null | null |
erantapaa/haskellnews | src/HN/Types.hs | bsd-3-clause | sourceMapping :: [(Source,Int)]
sourceMapping =
[(Reddit,1)
,(Vimeo,2)
,(Twitter,3)
,(Hackage,4)
,(HaskellWiki,5)
,(Github,6)
,(StackOverflow,7)
,(Jobs,8)
,(PlanetHaskell,9)
,(HaskellCafe,10)
,(GooglePlus,11)
,(IrcQuotes,12)
,(Pastes,13)
,(HaskellLive,14)
,(Events,15)
] | 302 | sourceMapping :: [(Source,Int)]
sourceMapping =
[(Reddit,1)
,(Vimeo,2)
,(Twitter,3)
,(Hackage,4)
,(HaskellWiki,5)
,(Github,6)
,(StackOverflow,7)
,(Jobs,8)
,(PlanetHaskell,9)
,(HaskellCafe,10)
,(GooglePlus,11)
,(IrcQuotes,12)
,(Pastes,13)
,(HaskellLive,14)
,(Events,15)
] | 302 | sourceMapping =
[(Reddit,1)
,(Vimeo,2)
,(Twitter,3)
,(Hackage,4)
,(HaskellWiki,5)
,(Github,6)
,(StackOverflow,7)
,(Jobs,8)
,(PlanetHaskell,9)
,(HaskellCafe,10)
,(GooglePlus,11)
,(IrcQuotes,12)
,(Pastes,13)
,(HaskellLive,14)
,(Events,15)
] | 270 | false | true | 0 | 8 | 52 | 162 | 103 | 59 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | idealistically = id | 19 | idealistically = id | 19 | idealistically = id | 19 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
jcristovao/utility-ht-prelude | src/BasePreludeHT.hs | bsd-3-clause | unsnoc :: [a] -> Maybe ([a], a)
unsnoc = viewR | 46 | unsnoc :: [a] -> Maybe ([a], a)
unsnoc = viewR | 46 | unsnoc = viewR | 14 | false | true | 0 | 9 | 9 | 36 | 18 | 18 | null | null |
danr/hipspec | examples/old-examples/quickspec/ProductiveUseOfFailure.hs | gpl-3.0 | prop_T31 :: [a] -> Prop [a]
prop_T31 x = qrev (qrev x []) [] =:= x | 71 | prop_T31 :: [a] -> Prop [a]
prop_T31 x = qrev (qrev x []) [] =:= x | 71 | prop_T31 x = qrev (qrev x []) [] =:= x | 43 | false | true | 0 | 9 | 20 | 48 | 24 | 24 | null | null |
pmiddend/jumpie | lib/Jumpie/Picturize.hs | gpl-3.0 | {-
platToBoxes :: [PointInt] -> Platform -> [Box]
platToBoxes plats (Platform (V2 l y) (V2 r _) deadline) = map toBox [l..r]
where toBox x = Box (bpos x) deadline (btype x)
bpos x = (fmap . fmap) (fromIntegral . (*gcTileSize)) (Rect (V2 x y) (V2 (x+1) (y+1)))
btype x
| hasLeft && hasRight = ... | 993 | picturizeGameState :: (Monad m,Applicative m,MonadGame m) => GameState -> m (Picture UnitType UnitType)
picturizeGameState gs = do
picturizedObjects <- traverse picturizeObject (gs ^. gsAllObjects)
let
backgroundPicture = pictureSpriteResampled "background" RenderPositionTopLeft (V2 (fromIntegral screenWidth) (... | 454 | picturizeGameState gs = do
picturizedObjects <- traverse picturizeObject (gs ^. gsAllObjects)
let
backgroundPicture = pictureSpriteResampled "background" RenderPositionTopLeft (V2 (fromIntegral screenWidth) (fromIntegral screenHeight))
return (backgroundPicture <> (-(gs ^. gsCameraPosition)) `pictureTranslate... | 350 | true | true | 0 | 14 | 227 | 140 | 70 | 70 | null | null |
HectorAE/simple-ciphers | src/Crypto/XOR.hs | gpl-3.0 | xorDecrypt = repeatingXorString | 31 | xorDecrypt = repeatingXorString | 31 | xorDecrypt = repeatingXorString | 31 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
johnyhlee/media-tracker | src/Main.hs | gpl-2.0 | performAction "movie" = trackMovie | 34 | performAction "movie" = trackMovie | 34 | performAction "movie" = trackMovie | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4647 = 4646 | 11 | 4647 = 4646 | 11 | 4647 = 4646 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
vdweegen/UvA-Software_Testing | Lab4/Willem/Exercises.hs | gpl-3.0 | prop_union_diff :: Set Int -> Set Int -> Bool
prop_union_diff a b = (s `differenceSet` b) `subSet` a && (s `differenceSet` a) `subSet` b where s = a `unionSet` b
-- | Intersect props | 183 | prop_union_diff :: Set Int -> Set Int -> Bool
prop_union_diff a b = (s `differenceSet` b) `subSet` a && (s `differenceSet` a) `subSet` b where s = a `unionSet` b
-- | Intersect props | 183 | prop_union_diff a b = (s `differenceSet` b) `subSet` a && (s `differenceSet` a) `subSet` b where s = a `unionSet` b
-- | Intersect props | 137 | false | true | 0 | 9 | 34 | 78 | 45 | 33 | null | null |
glguy/advent2016 | Day10.hs | isc | combine :: Target -> Holding -> Holding -> Holding
combine _ (One x) (One y) = Two (min x y) (max x y) | 102 | combine :: Target -> Holding -> Holding -> Holding
combine _ (One x) (One y) = Two (min x y) (max x y) | 102 | combine _ (One x) (One y) = Two (min x y) (max x y) | 51 | false | true | 0 | 11 | 22 | 68 | 32 | 36 | null | null |
sdiehl/ghc | testsuite/tests/typecheck/should_fail/T12648.hs | bsd-3-clause | inst :: forall p a. Forall p :- p a
inst = unsafeCoerce (Sub Dict :: Forall p :- p (Skolem p)) | 94 | inst :: forall p a. Forall p :- p a
inst = unsafeCoerce (Sub Dict :: Forall p :- p (Skolem p)) | 94 | inst = unsafeCoerce (Sub Dict :: Forall p :- p (Skolem p)) | 58 | false | true | 0 | 9 | 21 | 60 | 28 | 32 | null | null |
GregorySchwartz/identify-public | src/Main.hs | gpl-2.0 | main :: IO ()
main = execParser opts >>= identifyPublic
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Takes a list of fasta files and returns the sequences\
\ that are shared between files (public) and unique between\
\ files (private)."
<> header... | 361 | main :: IO ()
main = execParser opts >>= identifyPublic
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Takes a list of fasta files and returns the sequences\
\ that are shared between files (public) and unique between\
\ files (private)."
<> header... | 361 | main = execParser opts >>= identifyPublic
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Takes a list of fasta files and returns the sequences\
\ that are shared between files (public) and unique between\
\ files (private)."
<> header "identify-pub... | 347 | false | true | 0 | 9 | 106 | 60 | 29 | 31 | null | null |
hvr/unordered-containers | tests/HashMapProperties.hs | bsd-3-clause | -----------------------------------------------------------------------
-- ** Transformations
pMap :: [(Key, Int)] -> Bool
pMap = M.map (+ 1) `eq_` HM.map (+ 1)
| 162 | pMap :: [(Key, Int)] -> Bool
pMap = M.map (+ 1) `eq_` HM.map (+ 1) | 66 | pMap = M.map (+ 1) `eq_` HM.map (+ 1) | 37 | true | true | 0 | 7 | 20 | 50 | 30 | 20 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/AutoSize.hs | bsd-3-clause | nil = N | 7 | nil = N | 7 | nil = N | 7 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
haskell-compat/base-compat | base-compat/src/Data/List/Compat.hs | mit | -- | Decompose a list into its head and tail. If the list is empty,
-- returns 'Nothing'. If the list is non-empty, returns @'Just' (x, xs)@,
-- where @x@ is the head of the list and @xs@ its tail.
--
-- /Since: 4.8.0.0/
uncons :: [a] -> Maybe (a, [a])
uncons [] = Nothing | 303 | uncons :: [a] -> Maybe (a, [a])
uncons [] = Nothing | 82 | uncons [] = Nothing | 33 | true | true | 0 | 8 | 85 | 40 | 24 | 16 | null | null |
GetShopTV/swagger2 | src/Data/Swagger/Internal/Schema/Validation.hs | bsd-3-clause | -- | Validate @'ToJSON'@ instance matches @'ToSchema'@ for a given value.
-- This can be used with QuickCheck to ensure those instances are coherent:
--
-- prop> validateToJSON (x :: Int) == []
--
-- /NOTE:/ @'validateToJSON'@ does not perform string pattern validation.
-- See @'validateToJSONWithPatternChecker'@.
--
-... | 522 | validatePrettyToJSON :: forall a. (ToJSON a, ToSchema a) => a -> Maybe String
validatePrettyToJSON = renderValidationErrors validateToJSON | 138 | validatePrettyToJSON = renderValidationErrors validateToJSON | 60 | true | true | 0 | 9 | 72 | 55 | 31 | 24 | null | null |
asr/fotc | notes/Berry/Berry.hs | mit | f (S Z) _ Z = S (S Z) | 29 | f (S Z) _ Z = S (S Z) | 29 | f (S Z) _ Z = S (S Z) | 29 | false | false | 1 | 6 | 16 | 30 | 13 | 17 | null | null |
patrickherrmann/advent | src/Day06.hs | bsd-3-clause | performCommand2 :: Grid2 s -> Command -> ST s ()
performCommand2 grid (Command a r) = do
let cs = coordsInRange r
forM_ cs $ \c -> do
b <- readArray grid c
writeArray grid c $ performAction2 a b | 206 | performCommand2 :: Grid2 s -> Command -> ST s ()
performCommand2 grid (Command a r) = do
let cs = coordsInRange r
forM_ cs $ \c -> do
b <- readArray grid c
writeArray grid c $ performAction2 a b | 206 | performCommand2 grid (Command a r) = do
let cs = coordsInRange r
forM_ cs $ \c -> do
b <- readArray grid c
writeArray grid c $ performAction2 a b | 157 | false | true | 0 | 10 | 51 | 98 | 44 | 54 | null | null |
apyrgio/ganeti | src/Ganeti/ConstantUtils.hs | bsd-2-clause | ispecDiskSize :: String
ispecDiskSize = "disk-size" | 51 | ispecDiskSize :: String
ispecDiskSize = "disk-size" | 51 | ispecDiskSize = "disk-size" | 27 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nushio3/UFCORIN | src/SpaceWeather/TimeLine.hs | mit | discreteTime :: Iso' UTCTime TimeBin
discreteTime = iso f g
where
f t = round $ toRational (diffUTCTime t epoch) / 3600
g tb = addUTCTime (fromIntegral (tb * 3600)) epoch
----------------------------------------------------
-- The features
---------------------------------------------------- | 305 | discreteTime :: Iso' UTCTime TimeBin
discreteTime = iso f g
where
f t = round $ toRational (diffUTCTime t epoch) / 3600
g tb = addUTCTime (fromIntegral (tb * 3600)) epoch
----------------------------------------------------
-- The features
---------------------------------------------------- | 305 | discreteTime = iso f g
where
f t = round $ toRational (diffUTCTime t epoch) / 3600
g tb = addUTCTime (fromIntegral (tb * 3600)) epoch
----------------------------------------------------
-- The features
---------------------------------------------------- | 268 | false | true | 0 | 9 | 48 | 80 | 40 | 40 | null | null |
DanielSchuessler/hstri | QuickCheckUtil.hs | gpl-3.0 | forAll2 :: (Testable prop, Show a1, Show a) =>Gen a -> Gen a1 -> (a -> a1 -> prop) -> Property
forAll2 gen1 gen2 p = forAll gen1 (\x1 -> forAll gen2 (p x1)) | 156 | forAll2 :: (Testable prop, Show a1, Show a) =>Gen a -> Gen a1 -> (a -> a1 -> prop) -> Property
forAll2 gen1 gen2 p = forAll gen1 (\x1 -> forAll gen2 (p x1)) | 156 | forAll2 gen1 gen2 p = forAll gen1 (\x1 -> forAll gen2 (p x1)) | 61 | false | true | 0 | 11 | 33 | 92 | 46 | 46 | null | null |
E2LP/e2asm | src/E2ASM/Assembler/AST.hs | gpl-3.0 | oneRegisterOnePredicate :: [Argument]
oneRegisterOnePredicate = [ARegister Reg.r0, APredicate Pred.p0] | 102 | oneRegisterOnePredicate :: [Argument]
oneRegisterOnePredicate = [ARegister Reg.r0, APredicate Pred.p0] | 102 | oneRegisterOnePredicate = [ARegister Reg.r0, APredicate Pred.p0] | 64 | false | true | 0 | 7 | 8 | 30 | 16 | 14 | null | null |
Zigazou/HaMinitel | src/Minitel/Generate/Configuration.hs | gpl-3.0 | -- | Enable or disable a functionality using PRO2 protocol.
mPRO2Toggle :: MNat -> Bool -> MCall
mPRO2Toggle mn True = (PRO2 Start mn, pro2Length) | 147 | mPRO2Toggle :: MNat -> Bool -> MCall
mPRO2Toggle mn True = (PRO2 Start mn, pro2Length) | 87 | mPRO2Toggle mn True = (PRO2 Start mn, pro2Length) | 50 | true | true | 0 | 8 | 25 | 42 | 20 | 22 | null | null |
joelburget/haskell-ipld | tests/HedgehogTest.hs | bsd-3-clause | main :: IO ()
main = do
good <- checkParallel $$(discover)
unless good exitFailure | 86 | main :: IO ()
main = do
good <- checkParallel $$(discover)
unless good exitFailure | 86 | main = do
good <- checkParallel $$(discover)
unless good exitFailure | 72 | false | true | 0 | 11 | 17 | 44 | 18 | 26 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/Id.hs | bsd-3-clause | -- | Make a global 'Id' with no global information but some generic 'IdInfo'
mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
mkVanillaGlobalWithInfo = mkGlobalId VanillaId | 179 | mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id
mkVanillaGlobalWithInfo = mkGlobalId VanillaId | 102 | mkVanillaGlobalWithInfo = mkGlobalId VanillaId | 46 | true | true | 0 | 7 | 26 | 27 | 14 | 13 | null | null |
rimmington/unordered-containers | tests/HashSetProperties.hs | bsd-3-clause | ------------------------------------------------------------------------
-- ** Folds
pFoldr :: [Int] -> Bool
pFoldr = (L.sort . foldrSet (:) []) `eq`
(L.sort . S.foldr (:) []) | 185 | pFoldr :: [Int] -> Bool
pFoldr = (L.sort . foldrSet (:) []) `eq`
(L.sort . S.foldr (:) []) | 99 | pFoldr = (L.sort . foldrSet (:) []) `eq`
(L.sort . S.foldr (:) []) | 75 | true | true | 0 | 9 | 31 | 64 | 37 | 27 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX42.hs | lgpl-2.1 | tComplianceID :: FIXTag
tComplianceID = FIXTag
{ tName = "ComplianceID"
, tnum = 376
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 166 | tComplianceID :: FIXTag
tComplianceID = FIXTag
{ tName = "ComplianceID"
, tnum = 376
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 166 | tComplianceID = FIXTag
{ tName = "ComplianceID"
, tnum = 376
, tparser = toFIXString
, arbitraryValue = FIXString <$> arbitrary } | 142 | false | true | 0 | 8 | 37 | 45 | 26 | 19 | null | null |
hsyl20/HViperVM | lib/ViperVM/STM/TIntSet.hs | lgpl-3.0 | insert :: Int -> TIntSet -> STM ()
insert v = withTVar (IntSet.insert v) | 72 | insert :: Int -> TIntSet -> STM ()
insert v = withTVar (IntSet.insert v) | 72 | insert v = withTVar (IntSet.insert v) | 37 | false | true | 0 | 8 | 13 | 38 | 18 | 20 | null | null |
harendra-kumar/stack | src/Stack/Constants.hs | bsd-3-clause | -- | Deprecated implicit global project directory used when outside of a project.
implicitGlobalProjectDirDeprecated :: Path Abs Dir -- ^ Stack root.
-> Path Abs Dir
implicitGlobalProjectDirDeprecated p =
p </>
$(mkRelDir "global") | 274 | implicitGlobalProjectDirDeprecated :: Path Abs Dir -- ^ Stack root.
-> Path Abs Dir
implicitGlobalProjectDirDeprecated p =
p </>
$(mkRelDir "global") | 192 | implicitGlobalProjectDirDeprecated p =
p </>
$(mkRelDir "global") | 73 | true | true | 3 | 7 | 75 | 43 | 21 | 22 | null | null |
beni55/fay | tests/TupleCalls.hs | bsd-3-clause | f :: (Int,Double) -> Double
f = ffi "%1[0]+%1[1]" | 49 | f :: (Int,Double) -> Double
f = ffi "%1[0]+%1[1]" | 49 | f = ffi "%1[0]+%1[1]" | 21 | false | true | 0 | 7 | 8 | 30 | 14 | 16 | null | null |
hspec/hspec | hspec-core/src/Test/Hspec/Core/Hooks.hs | mit | aroundAllWith :: forall a b. (ActionWith a -> ActionWith b) -> SpecWith a -> SpecWith b
aroundAllWith action spec = do
allSpecItemsDone <- runIO newEmptyMVar
workerRef <- runIO newEmptyMVar
let
acquire :: b -> IO a
acquire b = do
resource <- newEmptyMVar
worker <- async $ do
flip actio... | 659 | aroundAllWith :: forall a b. (ActionWith a -> ActionWith b) -> SpecWith a -> SpecWith b
aroundAllWith action spec = do
allSpecItemsDone <- runIO newEmptyMVar
workerRef <- runIO newEmptyMVar
let
acquire :: b -> IO a
acquire b = do
resource <- newEmptyMVar
worker <- async $ do
flip actio... | 659 | aroundAllWith action spec = do
allSpecItemsDone <- runIO newEmptyMVar
workerRef <- runIO newEmptyMVar
let
acquire :: b -> IO a
acquire b = do
resource <- newEmptyMVar
worker <- async $ do
flip action b $ \ a -> do
putMVar resource a
waitFor allSpecItemsDone
pu... | 571 | false | true | 0 | 21 | 181 | 218 | 95 | 123 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * VCluster related constants
vClusterEtcHosts :: String
vClusterEtcHosts = "/etc/hosts" | 91 | vClusterEtcHosts :: String
vClusterEtcHosts = "/etc/hosts" | 58 | vClusterEtcHosts = "/etc/hosts" | 31 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
qpliu/esolang | featured/glass.hs | gpl-3.0 | compileCmds i (CommandNew:cmds) ops =
compileCmds (i+1) cmds ((i,cmdNew):ops) | 81 | compileCmds i (CommandNew:cmds) ops =
compileCmds (i+1) cmds ((i,cmdNew):ops) | 81 | compileCmds i (CommandNew:cmds) ops =
compileCmds (i+1) cmds ((i,cmdNew):ops) | 81 | false | false | 1 | 8 | 12 | 54 | 25 | 29 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- | Retrieve the # of arguments in the error thing, if known
errorThingNumArgs_maybe :: ErrorThing -> Maybe Arity
errorThingNumArgs_maybe (ErrorThing _ args _) = args | 167 | errorThingNumArgs_maybe :: ErrorThing -> Maybe Arity
errorThingNumArgs_maybe (ErrorThing _ args _) = args | 105 | errorThingNumArgs_maybe (ErrorThing _ args _) = args | 52 | true | true | 0 | 6 | 25 | 36 | 17 | 19 | null | null |
vTurbine/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= sdocWithDynFlags $ \dflags ->
ASSERT(arity > 0 && arity <= mAX_SPEC_AP_SIZE dflags)
hcat [text "stg_ap_", text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info")... | 331 | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= sdocWithDynFlags $ \dflags ->
ASSERT(arity > 0 && arity <= mAX_SPEC_AP_SIZE dflags)
hcat [text "stg_ap_", text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info")... | 331 | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= sdocWithDynFlags $ \dflags ->
ASSERT(arity > 0 && arity <= mAX_SPEC_AP_SIZE dflags)
hcat [text "stg_ap_", text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info")... | 331 | false | false | 2 | 11 | 115 | 109 | 53 | 56 | null | null |
leshchevds/ganeti | src/Ganeti/WConfd/ConfigState.hs | bsd-2-clause | -- | Creates a new configuration state.
-- This method will expand as more fields are added to 'ConfigState'.
mkConfigState :: ConfigData -> ConfigState
mkConfigState = ConfigState | 180 | mkConfigState :: ConfigData -> ConfigState
mkConfigState = ConfigState | 70 | mkConfigState = ConfigState | 27 | true | true | 0 | 5 | 26 | 17 | 10 | 7 | null | null |
ezrakilty/narc | Database/Narc/Rewrite.hs | bsd-2-clause | rw (Comp x m (Nil, _), t) = Just (Nil, t) | 41 | rw (Comp x m (Nil, _), t) = Just (Nil, t) | 41 | rw (Comp x m (Nil, _), t) = Just (Nil, t) | 41 | false | false | 0 | 7 | 10 | 38 | 20 | 18 | null | null |
cirquit/Personal-Repository | Haskell/arduino-webserver/app/Main.hs | mit | genericError :: Int -> String -> Snap ()
genericError c s = do
modifyResponse $ setResponseStatus c $ BS8.fromString s
writeText $ T.pack ((show c) ++ " - " ++ s)
r <- getResponse
finishWith r
-- instagramHandler :: Snap ()
-- instagramHandler = do
-- user <- getParam "user"
-- let url = "http://icon... | 536 | genericError :: Int -> String -> Snap ()
genericError c s = do
modifyResponse $ setResponseStatus c $ BS8.fromString s
writeText $ T.pack ((show c) ++ " - " ++ s)
r <- getResponse
finishWith r
-- instagramHandler :: Snap ()
-- instagramHandler = do
-- user <- getParam "user"
-- let url = "http://icon... | 536 | genericError c s = do
modifyResponse $ setResponseStatus c $ BS8.fromString s
writeText $ T.pack ((show c) ++ " - " ++ s)
r <- getResponse
finishWith r
-- instagramHandler :: Snap ()
-- instagramHandler = do
-- user <- getParam "user"
-- let url = "http://iconosquare.com/feed/" ++ (BS8.toString (from... | 495 | false | true | 0 | 13 | 131 | 99 | 50 | 49 | null | null |
christiaanb/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtOrigin (UnboundOccurrenceOf name)
= ctoHerald <+> ptext (sLit "an undeclared identifier") <+> quotes (ppr name) | 118 | pprCtOrigin (UnboundOccurrenceOf name)
= ctoHerald <+> ptext (sLit "an undeclared identifier") <+> quotes (ppr name) | 118 | pprCtOrigin (UnboundOccurrenceOf name)
= ctoHerald <+> ptext (sLit "an undeclared identifier") <+> quotes (ppr name) | 118 | false | false | 0 | 9 | 16 | 41 | 19 | 22 | null | null |
shlevy/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | -- See Note [Wiring in RuntimeRep]
vecCountDataCons :: [DataCon]
vecCountDataCons = zipWithLazy mk_vec_count_dc
[ 2, 4, 8, 16, 32, 64 ]
vecCountDataConNames
where
mk_vec_count_dc n name
= pcSpecialDataCon name [] vecCountTyCon (VecCount n)
-- See Note [Wiring in Ru... | 329 | vecCountDataCons :: [DataCon]
vecCountDataCons = zipWithLazy mk_vec_count_dc
[ 2, 4, 8, 16, 32, 64 ]
vecCountDataConNames
where
mk_vec_count_dc n name
= pcSpecialDataCon name [] vecCountTyCon (VecCount n)
-- See Note [Wiring in RuntimeRep] | 294 | vecCountDataCons = zipWithLazy mk_vec_count_dc
[ 2, 4, 8, 16, 32, 64 ]
vecCountDataConNames
where
mk_vec_count_dc n name
= pcSpecialDataCon name [] vecCountTyCon (VecCount n)
-- See Note [Wiring in RuntimeRep] | 264 | true | true | 0 | 7 | 93 | 71 | 39 | 32 | null | null |
olsner/ghc | compiler/main/GhcMake.hs | bsd-3-clause | nodeMapElts :: NodeMap a -> [a]
nodeMapElts = Map.elems | 55 | nodeMapElts :: NodeMap a -> [a]
nodeMapElts = Map.elems | 55 | nodeMapElts = Map.elems | 23 | false | true | 0 | 6 | 8 | 23 | 12 | 11 | null | null |
k-bx/stack | src/Stack/Build/Cache.hs | bsd-3-clause | -- | Get all of the installed executables
getInstalledExes :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadThrow m)
=> InstallLocation -> m [PackageIdentifier]
getInstalledExes loc = do
dir <- exeInstalledDir loc
files <- liftIO $ handleIO (const $ return []) $ getDirectoryContents $ t... | 439 | getInstalledExes :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadThrow m)
=> InstallLocation -> m [PackageIdentifier]
getInstalledExes loc = do
dir <- exeInstalledDir loc
files <- liftIO $ handleIO (const $ return []) $ getDirectoryContents $ toFilePath dir
return $ mapMaybe parseP... | 397 | getInstalledExes loc = do
dir <- exeInstalledDir loc
files <- liftIO $ handleIO (const $ return []) $ getDirectoryContents $ toFilePath dir
return $ mapMaybe parsePackageIdentifierFromString files
-- | Mark the given executable as installed | 253 | true | true | 0 | 16 | 88 | 118 | 56 | 62 | null | null |
stla/jsonxlsx | src/ReadXLSX/Internal.hs | bsd-3-clause | commentTextAsValue :: XlsxText -> Value
commentTextAsValue comment =
case comment of
XlsxText text -> String text
XlsxRichText richtextruns -> String (T.concat $ _richTextRunText <$> richtextruns) | 206 | commentTextAsValue :: XlsxText -> Value
commentTextAsValue comment =
case comment of
XlsxText text -> String text
XlsxRichText richtextruns -> String (T.concat $ _richTextRunText <$> richtextruns) | 206 | commentTextAsValue comment =
case comment of
XlsxText text -> String text
XlsxRichText richtextruns -> String (T.concat $ _richTextRunText <$> richtextruns) | 166 | false | true | 0 | 12 | 34 | 59 | 28 | 31 | null | null |
erantapaa/happstack-server | src/Happstack/Server/RqData.hs | bsd-3-clause | readRq :: (FromReqURI a) =>
String -- ^ name of key (only used for error reporting)
-> String -- ^ 'String' to 'read'
-> Either String a -- ^ 'Left' on error, 'Right' on success
readRq key val =
case fromReqURI val of
(Just a) -> Right a
_ -> Left $ "readRq failed while pa... | 889 | readRq :: (FromReqURI a) =>
String -- ^ name of key (only used for error reporting)
-> String -- ^ 'String' to 'read'
-> Either String a
readRq key val =
case fromReqURI val of
(Just a) -> Right a
_ -> Left $ "readRq failed while parsing key: " ++ key ++ " which has the va... | 848 | readRq key val =
case fromReqURI val of
(Just a) -> Right a
_ -> Left $ "readRq failed while parsing key: " ++ key ++ " which has the value: " ++ val
-- | convert or validate a value
--
-- This is similar to 'fmap' except that the function can fail by
-- returning Left and an error message. The... | 687 | true | true | 0 | 11 | 205 | 100 | 58 | 42 | null | null |
d3zd3z/HaskellNet-old | Network/HaskellNet/IMAP.hs | bsd-3-clause | check :: BSStream s => IMAPConnection s -> IO ()
check conn = sendCommand conn "CHECK" pNone | 92 | check :: BSStream s => IMAPConnection s -> IO ()
check conn = sendCommand conn "CHECK" pNone | 92 | check conn = sendCommand conn "CHECK" pNone | 43 | false | true | 0 | 9 | 16 | 46 | 19 | 27 | null | null |
ony/hledger | hledger/Hledger/Cli/Version.hs | gpl-3.0 | version = VERSION | 17 | version = VERSION | 17 | version = VERSION | 17 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
cchalmers/lens | src/Control/Lens/Fold.hs | bsd-3-clause | -- | Retrieve the first index and value targeted by a 'Fold' or 'Traversal' (or 'Just' the result
-- from a 'Getter' or 'Lens'). See also ('^@?').
--
-- @
-- 'ipreview' = 'view' '.' 'ipre'
-- @
--
-- This is usually applied in the 'Control.Monad.Reader.Reader'
-- 'Control.Monad.Monad' @(->) s@.
--
-- @
-- 'ipreview' ::... | 1,211 | ipreview :: MonadReader s m => IndexedGetting i (First (i, a)) s a -> m (Maybe (i, a))
ipreview l = asks (getFirst #. ifoldMapOf l (\i a -> First (Just (i, a)))) | 161 | ipreview l = asks (getFirst #. ifoldMapOf l (\i a -> First (Just (i, a)))) | 74 | true | true | 0 | 14 | 256 | 129 | 79 | 50 | null | null |
shashikiranrp/RealWorldHaskell | Chapter 5/SimpleJSON.hs | apache-2.0 | getObject :: JValue -> Maybe [(String, JValue)]
getObject (JObject o) = Just o | 78 | getObject :: JValue -> Maybe [(String, JValue)]
getObject (JObject o) = Just o | 78 | getObject (JObject o) = Just o | 30 | false | true | 0 | 8 | 12 | 39 | 20 | 19 | null | null |
shockkolate/etch | src/Etch/Analysis/Resolution.hs | apache-2.0 | exprAnalysis (CallExpr (Call (_ `As` BuiltinType PtrBuiltin) (CompoundExpr (PrimaryCompound primary `As` _) `As` _) `As` _) `As` _) = do
p <- primaryAnalysis primary
let builtin = PtrTypeBuiltin (PrimaryType p)
pure $ tymap CompoundExpr $ tymap PrimaryCompound (BuiltinPrimary builtin `As` BuiltinType builti... | 322 | exprAnalysis (CallExpr (Call (_ `As` BuiltinType PtrBuiltin) (CompoundExpr (PrimaryCompound primary `As` _) `As` _) `As` _) `As` _) = do
p <- primaryAnalysis primary
let builtin = PtrTypeBuiltin (PrimaryType p)
pure $ tymap CompoundExpr $ tymap PrimaryCompound (BuiltinPrimary builtin `As` BuiltinType builti... | 322 | exprAnalysis (CallExpr (Call (_ `As` BuiltinType PtrBuiltin) (CompoundExpr (PrimaryCompound primary `As` _) `As` _) `As` _) `As` _) = do
p <- primaryAnalysis primary
let builtin = PtrTypeBuiltin (PrimaryType p)
pure $ tymap CompoundExpr $ tymap PrimaryCompound (BuiltinPrimary builtin `As` BuiltinType builti... | 322 | false | false | 0 | 16 | 53 | 134 | 68 | 66 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/WAFSizeConstraintSetFieldToMatch.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-sizeconstraintset-sizeconstraint-fieldtomatch.html#cfn-waf-sizeconstraintset-sizeconstraint-fieldtomatch-data
wafscsftmData :: Lens' WAFSizeConstraintSetFieldToMatch (Maybe (Val Text))
wafscsftmData = lens _wAFSizeConstraintSetFieldTo... | 387 | wafscsftmData :: Lens' WAFSizeConstraintSetFieldToMatch (Maybe (Val Text))
wafscsftmData = lens _wAFSizeConstraintSetFieldToMatchData (\s a -> s { _wAFSizeConstraintSetFieldToMatchData = a }) | 191 | wafscsftmData = lens _wAFSizeConstraintSetFieldToMatchData (\s a -> s { _wAFSizeConstraintSetFieldToMatchData = a }) | 116 | true | true | 1 | 9 | 22 | 57 | 28 | 29 | null | null |
rainbowbismuth/go-analyze | test/Go/ParserSpec.hs | gpl-3.0 | func3 = "func(a, _ int, z float32) bool" | 40 | func3 = "func(a, _ int, z float32) bool" | 40 | func3 = "func(a, _ int, z float32) bool" | 40 | false | false | 1 | 5 | 7 | 10 | 3 | 7 | null | null |
sol/tinc | src/Tinc/Facts.hs | mit | isExecutable :: Plugin -> IO Bool
isExecutable = fmap executable . getPermissions . snd | 87 | isExecutable :: Plugin -> IO Bool
isExecutable = fmap executable . getPermissions . snd | 87 | isExecutable = fmap executable . getPermissions . snd | 53 | false | true | 0 | 7 | 13 | 29 | 14 | 15 | null | null |
kfish/hogg | Codec/Container/Ogg/Packet.hs | bsd-3-clause | -- | Create a packet which spans a single page, ie. consists of only
-- one segment
uncutPacket :: L.ByteString -> OggTrack -> Granulepos -> OggPacket
uncutPacket d t gp = OggPacket d t gp False False segs
where segs = Just [s]
s = OggSegment (fromIntegral l) 0 True
l = L.length d
-------------------... | 412 | uncutPacket :: L.ByteString -> OggTrack -> Granulepos -> OggPacket
uncutPacket d t gp = OggPacket d t gp False False segs
where segs = Just [s]
s = OggSegment (fromIntegral l) 0 True
l = L.length d
------------------------------------------------------------
-- packetsToPages
--
-- A map from track ... | 328 | uncutPacket d t gp = OggPacket d t gp False False segs
where segs = Just [s]
s = OggSegment (fromIntegral l) 0 True
l = L.length d
------------------------------------------------------------
-- packetsToPages
--
-- A map from track to seqno | 261 | true | true | 3 | 9 | 84 | 109 | 50 | 59 | null | null |
neothemachine/monadiccp | src/Control/CP/SearchSpec/Language.hs | bsd-3-clause | simplValue v = v | 16 | simplValue v = v | 16 | simplValue v = v | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
TomMD/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | sortQuantVars :: [Var] -> [Var]
-- Sort the variables (KindVars, TypeVars, and Ids)
-- into order: Kind, then Type, then Id
sortQuantVars = sortBy (comparing withCategory)
where
withCategory v = (category v, v)
category :: Var -> Int
category v
| isKindVar v = 1
| isTyVar v = 2
| otherwis... | 450 | sortQuantVars :: [Var] -> [Var]
sortQuantVars = sortBy (comparing withCategory)
where
withCategory v = (category v, v)
category :: Var -> Int
category v
| isKindVar v = 1
| isTyVar v = 2
| otherwise = 3
-- | Bind a binding group over an expression, using a @let@ or @case@ as
-- appropr... | 358 | sortQuantVars = sortBy (comparing withCategory)
where
withCategory v = (category v, v)
category :: Var -> Int
category v
| isKindVar v = 1
| isTyVar v = 2
| otherwise = 3
-- | Bind a binding group over an expression, using a @let@ or @case@ as
-- appropriate (see "CoreSyn#let_app_invar... | 326 | true | true | 1 | 8 | 106 | 120 | 55 | 65 | null | null |
snoyberg/data-object-json | Data/Object/Json.hs | bsd-2-clause | joToJSON (Scalar (JsonNumber r)) = J.Number r | 45 | joToJSON (Scalar (JsonNumber r)) = J.Number r | 45 | joToJSON (Scalar (JsonNumber r)) = J.Number r | 45 | false | false | 0 | 9 | 6 | 26 | 12 | 14 | null | null |
maueroats/teaching | docs/ap-cs/haskell/connect-four/testcases/TestConnectFour.hs | gpl-3.0 | board2 = make_move' board1 4 1 | 30 | board2 = make_move' board1 4 1 | 30 | board2 = make_move' board1 4 1 | 30 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Reporting/Methods.hs | mit | reportInfo :: MonadReporting m => Text -> m ()
reportInfo = const $ pure () | 75 | reportInfo :: MonadReporting m => Text -> m ()
reportInfo = const $ pure () | 75 | reportInfo = const $ pure () | 28 | false | true | 0 | 8 | 14 | 36 | 17 | 19 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/Name.hs | bsd-3-clause | nameModule_maybe (Name { n_sort = WiredIn mod _ _}) = Just mod | 62 | nameModule_maybe (Name { n_sort = WiredIn mod _ _}) = Just mod | 62 | nameModule_maybe (Name { n_sort = WiredIn mod _ _}) = Just mod | 62 | false | false | 0 | 10 | 11 | 31 | 15 | 16 | null | null |
jaseemabid/lisper | src/Lisper/Eval.hs | mit | eval val@(Number _) = return val | 32 | eval val@(Number _) = return val | 32 | eval val@(Number _) = return val | 32 | false | false | 0 | 8 | 5 | 21 | 10 | 11 | null | null |
tokyo-jesus/university | src/haskell/baby.hs | unlicense | sayMe x = "Not between 1 and 5" | 31 | sayMe x = "Not between 1 and 5" | 31 | sayMe x = "Not between 1 and 5" | 31 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
sdiehl/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isMetaTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= case tcTyVarDetails tv of
MetaTv {} -> True
_ -> False
| otherwise = False | 190 | isMetaTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= case tcTyVarDetails tv of
MetaTv {} -> True
_ -> False
| otherwise = False | 190 | isMetaTyVar tv
| isTyVar tv -- See Note [Coercion variables in free variable lists]
= case tcTyVarDetails tv of
MetaTv {} -> True
_ -> False
| otherwise = False | 190 | false | false | 1 | 9 | 59 | 50 | 23 | 27 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/old/Params.hs | gpl-3.0 | (lsnare, lsnare_p) = pF "lsnare" (Just 0) | 55 | (lsnare, lsnare_p) = pF "lsnare" (Just 0) | 55 | (lsnare, lsnare_p) = pF "lsnare" (Just 0) | 55 | false | false | 0 | 7 | 20 | 24 | 12 | 12 | null | null |
agocorona/Workflow | Control/Workflow.old.hs | bsd-3-clause | wait :: Integer -> IO()
wait delta= do
let delay | delta < 0= 0
| delta > (fromIntegral maxInt) = maxInt
| otherwise = fromIntegral $ delta
threadDelay $ delay * 1000000
if delta <= 0 then return () else wait $ delta - (fromIntegral delay )
-- | retur... | 704 | wait :: Integer -> IO()
wait delta= do
let delay | delta < 0= 0
| delta > (fromIntegral maxInt) = maxInt
| otherwise = fromIntegral $ delta
threadDelay $ delay * 1000000
if delta <= 0 then return () else wait $ delta - (fromIntegral delay )
-- | retur... | 704 | wait delta= do
let delay | delta < 0= 0
| delta > (fromIntegral maxInt) = maxInt
| otherwise = fromIntegral $ delta
threadDelay $ delay * 1000000
if delta <= 0 then return () else wait $ delta - (fromIntegral delay )
-- | return either the result of t... | 680 | false | true | 0 | 15 | 189 | 128 | 62 | 66 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.