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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AlexanderPankiv/ghc | compiler/types/Type.hs | bsd-3-clause | getTyVar_maybe (TyVarTy tv) = Just tv | 53 | getTyVar_maybe (TyVarTy tv) = Just tv | 53 | getTyVar_maybe (TyVarTy tv) = Just tv | 53 | false | false | 0 | 6 | 21 | 19 | 8 | 11 | null | null |
aszlig/language-javascript | src/Language/JavaScript/Pretty/Printer.hs | bsd-3-clause | -- rn (NN (JSSourceElements xs)) foo = rJS xs foo
rn (NN (JSSourceElementsTop xs)) foo = rJS xs foo | 136 | rn (NN (JSSourceElementsTop xs)) foo = rJS xs foo | 66 | rn (NN (JSSourceElementsTop xs)) foo = rJS xs foo | 66 | true | false | 0 | 9 | 55 | 29 | 14 | 15 | null | null |
gcampax/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gen_Bounded_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Bounded_binds loc tycon
| isEnumerationTyCon tycon
= (listToBag [ min_bound_enum, max_bound_enum ], emptyBag)
| otherwise
= ASSERT(isSingleton data_cons)
(listToBag [ min_bound_1con, max_bound_1con ], emptyBag)
where
data_cons = tyConDataCons tycon
----- enum-flavored: ---------------------------
min_bound_enum = mkHsVarBind loc minBound_RDR (nlHsVar data_con_1_RDR)
max_bound_enum = mkHsVarBind loc maxBound_RDR (nlHsVar data_con_N_RDR)
data_con_1 = head data_cons
data_con_N = last data_cons
data_con_1_RDR = getRdrName data_con_1
data_con_N_RDR = getRdrName data_con_N
----- single-constructor-flavored: -------------
arity = dataConSourceArity data_con_1
min_bound_1con = mkHsVarBind loc minBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR)
max_bound_1con = mkHsVarBind loc maxBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR)
{-
************************************************************************
* *
Ix instances
* *
************************************************************************
Deriving @Ix@ is only possible for enumeration types and
single-constructor types. We deal with them in turn.
For an enumeration type, e.g.,
\begin{verbatim}
data Foo ... = N1 | N2 | ... | Nn
\end{verbatim}
things go not too differently from @Enum@:
\begin{verbatim}
instance ... Ix (Foo ...) where
range (a, b)
= map tag2con_Foo [con2tag_Foo a .. con2tag_Foo b]
-- or, really...
range (a, b)
= case (con2tag_Foo a) of { a# ->
case (con2tag_Foo b) of { b# ->
map tag2con_Foo (enumFromTo (I# a#) (I# b#))
}}
-- Generate code for unsafeIndex, because using index leads
-- to lots of redundant range tests
unsafeIndex c@(a, b) d
= case (con2tag_Foo d -# con2tag_Foo a) of
r# -> I# r#
inRange (a, b) c
= let
p_tag = con2tag_Foo c
in
p_tag >= con2tag_Foo a && p_tag <= con2tag_Foo b
-- or, really...
inRange (a, b) c
= case (con2tag_Foo a) of { a_tag ->
case (con2tag_Foo b) of { b_tag ->
case (con2tag_Foo c) of { c_tag ->
if (c_tag >=# a_tag) then
c_tag <=# b_tag
else
False
}}}
\end{verbatim}
(modulo suitable case-ification to handle the unlifted tags)
For a single-constructor type (NB: this includes all tuples), e.g.,
\begin{verbatim}
data Foo ... = MkFoo a b Int Double c c
\end{verbatim}
we follow the scheme given in Figure~19 of the Haskell~1.2 report
(p.~147).
-} | 2,875 | gen_Bounded_binds :: SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Bounded_binds loc tycon
| isEnumerationTyCon tycon
= (listToBag [ min_bound_enum, max_bound_enum ], emptyBag)
| otherwise
= ASSERT(isSingleton data_cons)
(listToBag [ min_bound_1con, max_bound_1con ], emptyBag)
where
data_cons = tyConDataCons tycon
----- enum-flavored: ---------------------------
min_bound_enum = mkHsVarBind loc minBound_RDR (nlHsVar data_con_1_RDR)
max_bound_enum = mkHsVarBind loc maxBound_RDR (nlHsVar data_con_N_RDR)
data_con_1 = head data_cons
data_con_N = last data_cons
data_con_1_RDR = getRdrName data_con_1
data_con_N_RDR = getRdrName data_con_N
----- single-constructor-flavored: -------------
arity = dataConSourceArity data_con_1
min_bound_1con = mkHsVarBind loc minBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR)
max_bound_1con = mkHsVarBind loc maxBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR)
{-
************************************************************************
* *
Ix instances
* *
************************************************************************
Deriving @Ix@ is only possible for enumeration types and
single-constructor types. We deal with them in turn.
For an enumeration type, e.g.,
\begin{verbatim}
data Foo ... = N1 | N2 | ... | Nn
\end{verbatim}
things go not too differently from @Enum@:
\begin{verbatim}
instance ... Ix (Foo ...) where
range (a, b)
= map tag2con_Foo [con2tag_Foo a .. con2tag_Foo b]
-- or, really...
range (a, b)
= case (con2tag_Foo a) of { a# ->
case (con2tag_Foo b) of { b# ->
map tag2con_Foo (enumFromTo (I# a#) (I# b#))
}}
-- Generate code for unsafeIndex, because using index leads
-- to lots of redundant range tests
unsafeIndex c@(a, b) d
= case (con2tag_Foo d -# con2tag_Foo a) of
r# -> I# r#
inRange (a, b) c
= let
p_tag = con2tag_Foo c
in
p_tag >= con2tag_Foo a && p_tag <= con2tag_Foo b
-- or, really...
inRange (a, b) c
= case (con2tag_Foo a) of { a_tag ->
case (con2tag_Foo b) of { b_tag ->
case (con2tag_Foo c) of { c_tag ->
if (c_tag >=# a_tag) then
c_tag <=# b_tag
else
False
}}}
\end{verbatim}
(modulo suitable case-ification to handle the unlifted tags)
For a single-constructor type (NB: this includes all tuples), e.g.,
\begin{verbatim}
data Foo ... = MkFoo a b Int Double c c
\end{verbatim}
we follow the scheme given in Figure~19 of the Haskell~1.2 report
(p.~147).
-} | 2,875 | gen_Bounded_binds loc tycon
| isEnumerationTyCon tycon
= (listToBag [ min_bound_enum, max_bound_enum ], emptyBag)
| otherwise
= ASSERT(isSingleton data_cons)
(listToBag [ min_bound_1con, max_bound_1con ], emptyBag)
where
data_cons = tyConDataCons tycon
----- enum-flavored: ---------------------------
min_bound_enum = mkHsVarBind loc minBound_RDR (nlHsVar data_con_1_RDR)
max_bound_enum = mkHsVarBind loc maxBound_RDR (nlHsVar data_con_N_RDR)
data_con_1 = head data_cons
data_con_N = last data_cons
data_con_1_RDR = getRdrName data_con_1
data_con_N_RDR = getRdrName data_con_N
----- single-constructor-flavored: -------------
arity = dataConSourceArity data_con_1
min_bound_1con = mkHsVarBind loc minBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR)
max_bound_1con = mkHsVarBind loc maxBound_RDR $
nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR)
{-
************************************************************************
* *
Ix instances
* *
************************************************************************
Deriving @Ix@ is only possible for enumeration types and
single-constructor types. We deal with them in turn.
For an enumeration type, e.g.,
\begin{verbatim}
data Foo ... = N1 | N2 | ... | Nn
\end{verbatim}
things go not too differently from @Enum@:
\begin{verbatim}
instance ... Ix (Foo ...) where
range (a, b)
= map tag2con_Foo [con2tag_Foo a .. con2tag_Foo b]
-- or, really...
range (a, b)
= case (con2tag_Foo a) of { a# ->
case (con2tag_Foo b) of { b# ->
map tag2con_Foo (enumFromTo (I# a#) (I# b#))
}}
-- Generate code for unsafeIndex, because using index leads
-- to lots of redundant range tests
unsafeIndex c@(a, b) d
= case (con2tag_Foo d -# con2tag_Foo a) of
r# -> I# r#
inRange (a, b) c
= let
p_tag = con2tag_Foo c
in
p_tag >= con2tag_Foo a && p_tag <= con2tag_Foo b
-- or, really...
inRange (a, b) c
= case (con2tag_Foo a) of { a_tag ->
case (con2tag_Foo b) of { b_tag ->
case (con2tag_Foo c) of { c_tag ->
if (c_tag >=# a_tag) then
c_tag <=# b_tag
else
False
}}}
\end{verbatim}
(modulo suitable case-ification to handle the unlifted tags)
For a single-constructor type (NB: this includes all tuples), e.g.,
\begin{verbatim}
data Foo ... = MkFoo a b Int Double c c
\end{verbatim}
we follow the scheme given in Figure~19 of the Haskell~1.2 report
(p.~147).
-} | 2,800 | false | true | 1 | 8 | 821 | 242 | 120 | 122 | null | null |
idupree/haskell-time-steward | TestSim.hs | gpl-3.0 | tests :: TestTree
tests =
localOption (mkTimeout (1*1000000)) $
--localOption (SmallCheckDepth 3) $
testGroup "Tests" [scProps, qcProps] | 142 | tests :: TestTree
tests =
localOption (mkTimeout (1*1000000)) $
--localOption (SmallCheckDepth 3) $
testGroup "Tests" [scProps, qcProps] | 142 | tests =
localOption (mkTimeout (1*1000000)) $
--localOption (SmallCheckDepth 3) $
testGroup "Tests" [scProps, qcProps] | 124 | false | true | 0 | 10 | 22 | 43 | 23 | 20 | null | null |
blambo/accelerate-examples | tests/primitives/ScanSeg.hs | bsd-3-clause | run :: String -> Int -> IO (() -> UArray Int Float, () -> Acc (Vector Float))
run alg m = withSystemRandom $ \gen -> do
let n = P.round . sqrt $ (P.fromIntegral m :: Double)
seg <- randomUArrayR (0,n) gen n
seg' <- convertUArray seg
let ne = sum (elems seg)
vec <- randomUArrayR (-1,1) gen ne
vec' <- convertUArray vec
--
let go f g = return (run_ref f vec seg, run_acc g vec' seg')
case alg of
"sum" -> go prefixSumSegRef prefixSumSegAcc
x -> error $ "unknown variant: " ++ x
where
{-# NOINLINE run_ref #-}
run_ref f xs seg () = f xs seg
run_acc f xs seg () = f xs seg | 615 | run :: String -> Int -> IO (() -> UArray Int Float, () -> Acc (Vector Float))
run alg m = withSystemRandom $ \gen -> do
let n = P.round . sqrt $ (P.fromIntegral m :: Double)
seg <- randomUArrayR (0,n) gen n
seg' <- convertUArray seg
let ne = sum (elems seg)
vec <- randomUArrayR (-1,1) gen ne
vec' <- convertUArray vec
--
let go f g = return (run_ref f vec seg, run_acc g vec' seg')
case alg of
"sum" -> go prefixSumSegRef prefixSumSegAcc
x -> error $ "unknown variant: " ++ x
where
{-# NOINLINE run_ref #-}
run_ref f xs seg () = f xs seg
run_acc f xs seg () = f xs seg | 615 | run alg m = withSystemRandom $ \gen -> do
let n = P.round . sqrt $ (P.fromIntegral m :: Double)
seg <- randomUArrayR (0,n) gen n
seg' <- convertUArray seg
let ne = sum (elems seg)
vec <- randomUArrayR (-1,1) gen ne
vec' <- convertUArray vec
--
let go f g = return (run_ref f vec seg, run_acc g vec' seg')
case alg of
"sum" -> go prefixSumSegRef prefixSumSegAcc
x -> error $ "unknown variant: " ++ x
where
{-# NOINLINE run_ref #-}
run_ref f xs seg () = f xs seg
run_acc f xs seg () = f xs seg | 537 | false | true | 0 | 15 | 163 | 304 | 142 | 162 | null | null |
databrary/databrary | src/View/Html.hs | agpl-3.0 | actionLink :: QueryLike q => R.RouteAction r a -> r -> q -> H.Attribute
actionLink r a = HA.href . actionValue r a | 114 | actionLink :: QueryLike q => R.RouteAction r a -> r -> q -> H.Attribute
actionLink r a = HA.href . actionValue r a | 114 | actionLink r a = HA.href . actionValue r a | 42 | false | true | 0 | 9 | 22 | 55 | 26 | 29 | null | null |
urbanslug/ghc | compiler/llvmGen/LlvmCodeGen/Regs.hs | bsd-3-clause | -- | STG Type Based Alias Analysis hierarchy
stgTBAA :: [(Unique, LMString, Maybe Unique)]
stgTBAA
= [ (topN, fsLit "top", Nothing)
, (stackN, fsLit "stack", Just topN)
, (heapN, fsLit "heap", Just topN)
, (rxN, fsLit "rx", Just heapN)
, (baseN, fsLit "base", Just topN)
-- FIX: Not 100% sure about 'others' place. Might need to be under 'heap'.
-- OR I think the big thing is Sp is never aliased, so might want
-- to change the hieracy to have Sp on its own branch that is never
-- aliased (e.g never use top as a TBAA node).
, (otherN, fsLit "other", Just topN)
] | 621 | stgTBAA :: [(Unique, LMString, Maybe Unique)]
stgTBAA
= [ (topN, fsLit "top", Nothing)
, (stackN, fsLit "stack", Just topN)
, (heapN, fsLit "heap", Just topN)
, (rxN, fsLit "rx", Just heapN)
, (baseN, fsLit "base", Just topN)
-- FIX: Not 100% sure about 'others' place. Might need to be under 'heap'.
-- OR I think the big thing is Sp is never aliased, so might want
-- to change the hieracy to have Sp on its own branch that is never
-- aliased (e.g never use top as a TBAA node).
, (otherN, fsLit "other", Just topN)
] | 576 | stgTBAA
= [ (topN, fsLit "top", Nothing)
, (stackN, fsLit "stack", Just topN)
, (heapN, fsLit "heap", Just topN)
, (rxN, fsLit "rx", Just heapN)
, (baseN, fsLit "base", Just topN)
-- FIX: Not 100% sure about 'others' place. Might need to be under 'heap'.
-- OR I think the big thing is Sp is never aliased, so might want
-- to change the hieracy to have Sp on its own branch that is never
-- aliased (e.g never use top as a TBAA node).
, (otherN, fsLit "other", Just topN)
] | 530 | true | true | 2 | 8 | 161 | 143 | 79 | 64 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | ---------------- Template Haskell -------------------
-- THNames.hs: USES ClassUniques 200-299
-----------------------------------------------------
{-
************************************************************************
* *
\subsubsection[Uniques-prelude-TyCons]{@Uniques@ for wired-in @TyCons@}
* *
************************************************************************
-}
addrPrimTyConKey, arrayPrimTyConKey, arrayArrayPrimTyConKey, boolTyConKey,
byteArrayPrimTyConKey, charPrimTyConKey, charTyConKey, doublePrimTyConKey,
doubleTyConKey, floatPrimTyConKey, floatTyConKey, funTyConKey,
intPrimTyConKey, intTyConKey, int8TyConKey, int16TyConKey,
int32PrimTyConKey, int32TyConKey, int64PrimTyConKey, int64TyConKey,
integerTyConKey, naturalTyConKey,
listTyConKey, foreignObjPrimTyConKey, maybeTyConKey,
weakPrimTyConKey, mutableArrayPrimTyConKey, mutableArrayArrayPrimTyConKey,
mutableByteArrayPrimTyConKey, orderingTyConKey, mVarPrimTyConKey,
ratioTyConKey, rationalTyConKey, realWorldTyConKey, stablePtrPrimTyConKey,
stablePtrTyConKey, eqTyConKey, heqTyConKey,
smallArrayPrimTyConKey, smallMutableArrayPrimTyConKey :: Unique
addrPrimTyConKey = mkPreludeTyConUnique 1 | 1,386 | addrPrimTyConKey, arrayPrimTyConKey, arrayArrayPrimTyConKey, boolTyConKey,
byteArrayPrimTyConKey, charPrimTyConKey, charTyConKey, doublePrimTyConKey,
doubleTyConKey, floatPrimTyConKey, floatTyConKey, funTyConKey,
intPrimTyConKey, intTyConKey, int8TyConKey, int16TyConKey,
int32PrimTyConKey, int32TyConKey, int64PrimTyConKey, int64TyConKey,
integerTyConKey, naturalTyConKey,
listTyConKey, foreignObjPrimTyConKey, maybeTyConKey,
weakPrimTyConKey, mutableArrayPrimTyConKey, mutableArrayArrayPrimTyConKey,
mutableByteArrayPrimTyConKey, orderingTyConKey, mVarPrimTyConKey,
ratioTyConKey, rationalTyConKey, realWorldTyConKey, stablePtrPrimTyConKey,
stablePtrTyConKey, eqTyConKey, heqTyConKey,
smallArrayPrimTyConKey, smallMutableArrayPrimTyConKey :: Unique
addrPrimTyConKey = mkPreludeTyConUnique 1 | 860 | addrPrimTyConKey = mkPreludeTyConUnique 1 | 65 | true | true | 2 | 5 | 280 | 100 | 89 | 11 | null | null |
dterei/Scraps | haskell/lenses/Types.hs | bsd-3-clause | -- updating sucks!
editEffect :: (OutlierEffect -> OutlierEffect)
-> Payload -> Payload
editEffect eff payload =
payload {
sampleAnalysis = analysis {
anOutlierVar = variance {
ovEffect = eff effect
}
}
}
where analysis = sampleAnalysis payload
variance = anOutlierVar analysis
effect = ovEffect variance
-- haskell record update syntax a non-composable hack!
-- create new copy of record, change just the one field when copyng. | 506 | editEffect :: (OutlierEffect -> OutlierEffect)
-> Payload -> Payload
editEffect eff payload =
payload {
sampleAnalysis = analysis {
anOutlierVar = variance {
ovEffect = eff effect
}
}
}
where analysis = sampleAnalysis payload
variance = anOutlierVar analysis
effect = ovEffect variance
-- haskell record update syntax a non-composable hack!
-- create new copy of record, change just the one field when copyng. | 487 | editEffect eff payload =
payload {
sampleAnalysis = analysis {
anOutlierVar = variance {
ovEffect = eff effect
}
}
}
where analysis = sampleAnalysis payload
variance = anOutlierVar analysis
effect = ovEffect variance
-- haskell record update syntax a non-composable hack!
-- create new copy of record, change just the one field when copyng. | 407 | true | true | 2 | 11 | 144 | 88 | 48 | 40 | null | null |
thalerjonathan/phd | thesis/code/sugarscape/src/SugarScape/Core/Utils.hs | gpl-3.0 | orM :: Monad m
=> m Bool
-> m Bool
-> m Bool
orM = liftM2 (||) | 74 | orM :: Monad m
=> m Bool
-> m Bool
-> m Bool
orM = liftM2 (||) | 74 | orM = liftM2 (||) | 17 | false | true | 0 | 9 | 28 | 46 | 20 | 26 | null | null |
mightymoose/liquidhaskell | tests/pos/AVLRJ.hs | bsd-3-clause | rebalanceLL v (Tree lv ll lr) r = Tree lv ll (Tree v lr r) | 74 | rebalanceLL v (Tree lv ll lr) r = Tree lv ll (Tree v lr r) | 74 | rebalanceLL v (Tree lv ll lr) r = Tree lv ll (Tree v lr r) | 74 | false | false | 0 | 7 | 30 | 40 | 19 | 21 | null | null |
cirquit/hjc | src/Cmm/X86/Core.hs | mit | label :: (MonadNameGen m, MonadIO m) => Label -> X86 m ()
label l = label_c l emptyComment | 90 | label :: (MonadNameGen m, MonadIO m) => Label -> X86 m ()
label l = label_c l emptyComment | 90 | label l = label_c l emptyComment | 32 | false | true | 0 | 8 | 17 | 45 | 22 | 23 | null | null |
thomasjm/IHaskell | ipython-kernel/src/IHaskell/IPython/Types.hs | mit | showMessageType InputMessage = "pyin" | 37 | showMessageType InputMessage = "pyin" | 37 | showMessageType InputMessage = "pyin" | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
bmmoore/logic | Logic/Resolution.hs | bsd-3-clause | revApp [] bs = bs | 17 | revApp [] bs = bs | 17 | revApp [] bs = bs | 17 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
ababkin/partial_inspector | src/Vim/Netbeans/Protocol.hs | mit | printCommandName NetbeansBuffer {} = "netbeansBuffer" | 53 | printCommandName NetbeansBuffer {} = "netbeansBuffer" | 53 | printCommandName NetbeansBuffer {} = "netbeansBuffer" | 53 | false | false | 0 | 5 | 4 | 14 | 6 | 8 | null | null |
thalerjonathan/phd | coding/libraries/chimera/examples/ABS/SIRExamples/FrSIRSSpatial/Model.hs | gpl-3.0 | -- average number of contacts per time-unit
contactRate :: Double
contactRate = 5 | 81 | contactRate :: Double
contactRate = 5 | 37 | contactRate = 5 | 15 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
linuborj/cubicaltt | Resolver.hs | mit | unVar _ = Nothing | 36 | unVar _ = Nothing | 36 | unVar _ = Nothing | 36 | false | false | 0 | 5 | 22 | 9 | 4 | 5 | null | null |
ddssff/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | doLHSverb :: LP Inlines
doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|') | 107 | doLHSverb :: LP Inlines
doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|') | 107 | doLHSverb = codeWith ("",["haskell"],[]) <$> manyTill (satisfy (/='\n')) (char '|') | 83 | false | true | 0 | 9 | 13 | 56 | 30 | 26 | null | null |
fpco/stackage-server | bench/main.hs | mit | createBenchPool :: IO ConnectionPool
createBenchPool = do
loadYamlSettingsArgs [configSettingsYmlValue] useEnv >>= \case
AppSettings{appDatabase = DSPostgres pgString _} ->
runNoLoggingT $ createPostgresqlPool (encodeUtf8 pgString) 1
_ -> throwString "Benchmarks are crafted for PostgreSQL" | 322 | createBenchPool :: IO ConnectionPool
createBenchPool = do
loadYamlSettingsArgs [configSettingsYmlValue] useEnv >>= \case
AppSettings{appDatabase = DSPostgres pgString _} ->
runNoLoggingT $ createPostgresqlPool (encodeUtf8 pgString) 1
_ -> throwString "Benchmarks are crafted for PostgreSQL" | 322 | createBenchPool = do
loadYamlSettingsArgs [configSettingsYmlValue] useEnv >>= \case
AppSettings{appDatabase = DSPostgres pgString _} ->
runNoLoggingT $ createPostgresqlPool (encodeUtf8 pgString) 1
_ -> throwString "Benchmarks are crafted for PostgreSQL" | 285 | false | true | 0 | 15 | 63 | 81 | 37 | 44 | null | null |
siddhanathan/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Motion.hs | gpl-2.0 | matchGotoMarkMove (m:c:[]) = WholeMatch $ Move style True action
where style = if m == '`' then Inclusive else LineWise
action _mcount = do
mmark <- mayGetMarkB [c]
case mmark of
Nothing -> fail $ "Mark " <> show c <> " not set"
Just mark -> moveTo =<< use (markPointA mark) | 352 | matchGotoMarkMove (m:c:[]) = WholeMatch $ Move style True action
where style = if m == '`' then Inclusive else LineWise
action _mcount = do
mmark <- mayGetMarkB [c]
case mmark of
Nothing -> fail $ "Mark " <> show c <> " not set"
Just mark -> moveTo =<< use (markPointA mark) | 352 | matchGotoMarkMove (m:c:[]) = WholeMatch $ Move style True action
where style = if m == '`' then Inclusive else LineWise
action _mcount = do
mmark <- mayGetMarkB [c]
case mmark of
Nothing -> fail $ "Mark " <> show c <> " not set"
Just mark -> moveTo =<< use (markPointA mark) | 352 | false | false | 1 | 15 | 129 | 125 | 60 | 65 | null | null |
mitchellwrosen/haskell-erlang-bridge | src/Erlang/Distribution/Internal.hs | lgpl-3.0 | -- | Get a list of elements preceded by their length, give a getter for
-- the length and a getter for a single element.
getListWith :: Integral a => Get a -> Get r -> Get [r]
getListWith len x = len >>= \n -> replicateM (fromIntegral n) x | 239 | getListWith :: Integral a => Get a -> Get r -> Get [r]
getListWith len x = len >>= \n -> replicateM (fromIntegral n) x | 118 | getListWith len x = len >>= \n -> replicateM (fromIntegral n) x | 63 | true | true | 0 | 9 | 49 | 65 | 32 | 33 | null | null |
rueshyna/gogol | gogol-partners/gen/Network/Google/Resource/Partners/Companies/List.hs | mpl-2.0 | -- | Company name to search for.
clCompanyName :: Lens' CompaniesList (Maybe Text)
clCompanyName
= lens _clCompanyName
(\ s a -> s{_clCompanyName = a}) | 159 | clCompanyName :: Lens' CompaniesList (Maybe Text)
clCompanyName
= lens _clCompanyName
(\ s a -> s{_clCompanyName = a}) | 126 | clCompanyName
= lens _clCompanyName
(\ s a -> s{_clCompanyName = a}) | 76 | true | true | 1 | 9 | 31 | 52 | 25 | 27 | null | null |
noteed/opengl-api | Text/OpenGL/Spec.hs | bsd-3-clause | isDeprecated :: Prop -> Bool
isDeprecated (Deprecated _ _) = True | 65 | isDeprecated :: Prop -> Bool
isDeprecated (Deprecated _ _) = True | 65 | isDeprecated (Deprecated _ _) = True | 36 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
erochest/todotxt | Gtd/RDF.hs | apache-2.0 | makeStringName :: NamespaceMap -> T.Text -> String -> Maybe ScopedName
makeStringName nss pre = makeTextName nss pre . T.pack | 125 | makeStringName :: NamespaceMap -> T.Text -> String -> Maybe ScopedName
makeStringName nss pre = makeTextName nss pre . T.pack | 125 | makeStringName nss pre = makeTextName nss pre . T.pack | 54 | false | true | 0 | 8 | 18 | 44 | 21 | 23 | null | null |
jcollard/unm-hip | Data/Image/Binary.hs | gpl-3.0 | (/=.) :: (Image img,
BinaryPixel (Pixel img),
Eq (Pixel img),
Pixel img ~ a) => a -> img -> img
(/=.) = flip (./=) | 144 | (/=.) :: (Image img,
BinaryPixel (Pixel img),
Eq (Pixel img),
Pixel img ~ a) => a -> img -> img
(/=.) = flip (./=) | 144 | (/=.) = flip (./=) | 18 | false | true | 0 | 8 | 53 | 72 | 39 | 33 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Relaxngcompact.hs | gpl-2.0 | parseRules ("RelaxNG-Compact","String") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("RelaxNG-Compact","String")) >> pDefault >>= withAttribute StringTok)) | 235 | parseRules ("RelaxNG-Compact","String") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("RelaxNG-Compact","String")) >> pDefault >>= withAttribute StringTok)) | 235 | parseRules ("RelaxNG-Compact","String") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("RelaxNG-Compact","String")) >> pDefault >>= withAttribute StringTok)) | 235 | false | false | 0 | 15 | 32 | 86 | 46 | 40 | null | null |
psibi/yesod | yesod-auth/Yesod/Auth.hs | mit | getLogoutR :: AuthHandler master ()
getLogoutR = do
tp <- getRouteToParent
setUltDestReferer' >> redirectToPost (tp LogoutR) | 128 | getLogoutR :: AuthHandler master ()
getLogoutR = do
tp <- getRouteToParent
setUltDestReferer' >> redirectToPost (tp LogoutR) | 128 | getLogoutR = do
tp <- getRouteToParent
setUltDestReferer' >> redirectToPost (tp LogoutR) | 92 | false | true | 0 | 10 | 19 | 41 | 19 | 22 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Request.hs | gpl-3.0 | elementToXMLPrice :: Price -> [Content ()]
elementToXMLPrice = schemaTypeToXML "price" | 86 | elementToXMLPrice :: Price -> [Content ()]
elementToXMLPrice = schemaTypeToXML "price" | 86 | elementToXMLPrice = schemaTypeToXML "price" | 43 | false | true | 0 | 8 | 9 | 26 | 13 | 13 | null | null |
shlevy/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | sndIdKey = mkPreludeMiscIdUnique 42 | 56 | sndIdKey = mkPreludeMiscIdUnique 42 | 56 | sndIdKey = mkPreludeMiscIdUnique 42 | 56 | false | false | 0 | 5 | 24 | 9 | 4 | 5 | null | null |
gambogi/csh-eval | src/CSH/Eval/LDAP.hs | mit | -- Listen, I'm sorry
extractValue _ = Nothing | 77 | extractValue _ = Nothing | 56 | extractValue _ = Nothing | 56 | true | false | 0 | 4 | 39 | 11 | 5 | 6 | null | null |
barrucadu/nagi | lib/Imageboard/Database.hs | mit | -- | Construct a 'ThreadId' from an 'Int'.
toThreadId :: Int64 -> ThreadId
toThreadId = ThreadKey . SqlBackendKey | 113 | toThreadId :: Int64 -> ThreadId
toThreadId = ThreadKey . SqlBackendKey | 70 | toThreadId = ThreadKey . SqlBackendKey | 38 | true | true | 0 | 5 | 17 | 20 | 11 | 9 | null | null |
candu/haskellbook | ch6/matchTheTypes.hs | mit | f :: RealFrac a => a
-- f :: Num a => a fails
f = 1.0 | 53 | f :: RealFrac a => a
f = 1.0 | 28 | f = 1.0 | 7 | true | true | 0 | 7 | 16 | 26 | 11 | 15 | null | null |
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["DeepPink3"]@
--
-- R205 G16 B118, 0xcd1076
deepPink3 :: Color
deepPink3 = RGB 205 16 118 | 103 | deepPink3 :: Color
deepPink3 = RGB 205 16 118 | 45 | deepPink3 = RGB 205 16 118 | 26 | true | true | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
nevrenato/Hets_Fork | THF/Translate.hs | gpl-2.0 | maybeElem :: Id -> Map.Map Id a -> Maybe a
maybeElem id1 m = helper id1 (Map.toList m)
where
helper :: Id -> [(Id, a)] -> Maybe a
helper _ [] = Nothing
helper id2 ((eid, ea) : r) =
if myEqId id2 eid then Just ea else helper id2 r | 269 | maybeElem :: Id -> Map.Map Id a -> Maybe a
maybeElem id1 m = helper id1 (Map.toList m)
where
helper :: Id -> [(Id, a)] -> Maybe a
helper _ [] = Nothing
helper id2 ((eid, ea) : r) =
if myEqId id2 eid then Just ea else helper id2 r | 269 | maybeElem id1 m = helper id1 (Map.toList m)
where
helper :: Id -> [(Id, a)] -> Maybe a
helper _ [] = Nothing
helper id2 ((eid, ea) : r) =
if myEqId id2 eid then Just ea else helper id2 r | 226 | false | true | 0 | 9 | 90 | 142 | 68 | 74 | null | null |
AndreasPK/stack | src/Stack/Upgrade.hs | bsd-3-clause | binaryUpgrade
:: (StackM env m, HasConfig env)
=> BinaryOpts
-> m ()
binaryUpgrade (BinaryOpts mplatform force' mver morg mrepo) = do
platforms0 <-
case mplatform of
Nothing -> preferredPlatforms
Just p -> return [("windows" `T.isInfixOf` T.pack p, p)]
archiveInfo <- downloadStackReleaseInfo morg mrepo mver
let mdownloadVersion = getDownloadVersion archiveInfo
force =
case mver of
Nothing -> force'
Just _ -> True -- specifying a version implies we're forcing things
isNewer <-
case mdownloadVersion of
Nothing -> do
$logError "Unable to determine upstream version from Github metadata"
unless force $
$logError "Rerun with --force-download to force an upgrade"
return False
Just downloadVersion -> do
$logInfo $ T.concat
[ "Current Stack version: "
, versionText stackVersion
, ", available download version: "
, versionText downloadVersion
]
return $ downloadVersion > stackVersion
toUpgrade <- case (force, isNewer) of
(False, False) -> do
$logInfo "Skipping binary upgrade, your version is already more recent"
return False
(True, False) -> do
$logInfo "Forcing binary upgrade"
return True
(_, True) -> do
$logInfo "Newer version detected, downloading"
return True
when toUpgrade $ do
config <- view configL
downloadStackExe platforms0 archiveInfo (configLocalBin config) $ \tmpFile -> do
-- Sanity check!
ec <- rawSystem (toFilePath tmpFile) ["--version"]
unless (ec == ExitSuccess)
$ error "Non-success exit code from running newly downloaded executable" | 1,960 | binaryUpgrade
:: (StackM env m, HasConfig env)
=> BinaryOpts
-> m ()
binaryUpgrade (BinaryOpts mplatform force' mver morg mrepo) = do
platforms0 <-
case mplatform of
Nothing -> preferredPlatforms
Just p -> return [("windows" `T.isInfixOf` T.pack p, p)]
archiveInfo <- downloadStackReleaseInfo morg mrepo mver
let mdownloadVersion = getDownloadVersion archiveInfo
force =
case mver of
Nothing -> force'
Just _ -> True -- specifying a version implies we're forcing things
isNewer <-
case mdownloadVersion of
Nothing -> do
$logError "Unable to determine upstream version from Github metadata"
unless force $
$logError "Rerun with --force-download to force an upgrade"
return False
Just downloadVersion -> do
$logInfo $ T.concat
[ "Current Stack version: "
, versionText stackVersion
, ", available download version: "
, versionText downloadVersion
]
return $ downloadVersion > stackVersion
toUpgrade <- case (force, isNewer) of
(False, False) -> do
$logInfo "Skipping binary upgrade, your version is already more recent"
return False
(True, False) -> do
$logInfo "Forcing binary upgrade"
return True
(_, True) -> do
$logInfo "Newer version detected, downloading"
return True
when toUpgrade $ do
config <- view configL
downloadStackExe platforms0 archiveInfo (configLocalBin config) $ \tmpFile -> do
-- Sanity check!
ec <- rawSystem (toFilePath tmpFile) ["--version"]
unless (ec == ExitSuccess)
$ error "Non-success exit code from running newly downloaded executable" | 1,960 | binaryUpgrade (BinaryOpts mplatform force' mver morg mrepo) = do
platforms0 <-
case mplatform of
Nothing -> preferredPlatforms
Just p -> return [("windows" `T.isInfixOf` T.pack p, p)]
archiveInfo <- downloadStackReleaseInfo morg mrepo mver
let mdownloadVersion = getDownloadVersion archiveInfo
force =
case mver of
Nothing -> force'
Just _ -> True -- specifying a version implies we're forcing things
isNewer <-
case mdownloadVersion of
Nothing -> do
$logError "Unable to determine upstream version from Github metadata"
unless force $
$logError "Rerun with --force-download to force an upgrade"
return False
Just downloadVersion -> do
$logInfo $ T.concat
[ "Current Stack version: "
, versionText stackVersion
, ", available download version: "
, versionText downloadVersion
]
return $ downloadVersion > stackVersion
toUpgrade <- case (force, isNewer) of
(False, False) -> do
$logInfo "Skipping binary upgrade, your version is already more recent"
return False
(True, False) -> do
$logInfo "Forcing binary upgrade"
return True
(_, True) -> do
$logInfo "Newer version detected, downloading"
return True
when toUpgrade $ do
config <- view configL
downloadStackExe platforms0 archiveInfo (configLocalBin config) $ \tmpFile -> do
-- Sanity check!
ec <- rawSystem (toFilePath tmpFile) ["--version"]
unless (ec == ExitSuccess)
$ error "Non-success exit code from running newly downloaded executable" | 1,885 | false | true | 0 | 18 | 708 | 435 | 201 | 234 | null | null |
uduki/hsQt | Qtc/Gui/QPen.hs | bsd-2-clause | setMiterLimit :: QPen a -> ((Double)) -> IO ()
setMiterLimit x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_setMiterLimit cobj_x0 (toCDouble x1) | 153 | setMiterLimit :: QPen a -> ((Double)) -> IO ()
setMiterLimit x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_setMiterLimit cobj_x0 (toCDouble x1) | 153 | setMiterLimit x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QPen_setMiterLimit cobj_x0 (toCDouble x1) | 106 | false | true | 0 | 9 | 27 | 64 | 32 | 32 | null | null |
lovasko/rset | test/Prop.hs | bsd-2-clause | sizeTest
:: [Word8] -- ^ points
-> Bool -- ^ result
sizeTest xs = rset == set
where
rset = (R.size . R.fromList) xs :: Integer
set = (genericLength . nub) xs :: Integer
-- | Test the conversion from and to ascending lists. | 241 | sizeTest
:: [Word8] -- ^ points
-> Bool
sizeTest xs = rset == set
where
rset = (R.size . R.fromList) xs :: Integer
set = (genericLength . nub) xs :: Integer
-- | Test the conversion from and to ascending lists. | 226 | sizeTest xs = rset == set
where
rset = (R.size . R.fromList) xs :: Integer
set = (genericLength . nub) xs :: Integer
-- | Test the conversion from and to ascending lists. | 182 | true | true | 3 | 8 | 62 | 77 | 40 | 37 | null | null |
keera-studios/hsQt | Qtc/Enums/Network/QUdpSocket.hs | bsd-2-clause | eDefaultForPlatform :: BindFlag
eDefaultForPlatform
= ieBindFlag $ 0 | 70 | eDefaultForPlatform :: BindFlag
eDefaultForPlatform
= ieBindFlag $ 0 | 70 | eDefaultForPlatform
= ieBindFlag $ 0 | 38 | false | true | 2 | 6 | 9 | 23 | 9 | 14 | null | null |
ygale/yesod | yesod-core/Yesod/Core/Class/Yesod.hs | mit | sslOnlyMiddleware :: Yesod site
=> Int -- ^ minutes
-> HandlerT site IO res
-> HandlerT site IO res
sslOnlyMiddleware timeout handler = do
addHeader "Strict-Transport-Security"
$ T.pack $ concat [ "max-age="
, show $ timeout * 60
, "; includeSubDomains"
]
handler
-- | Check if a given request is authorized via 'isAuthorized' and
-- 'isWriteRequest'.
--
-- Since 1.2.0 | 551 | sslOnlyMiddleware :: Yesod site
=> Int -- ^ minutes
-> HandlerT site IO res
-> HandlerT site IO res
sslOnlyMiddleware timeout handler = do
addHeader "Strict-Transport-Security"
$ T.pack $ concat [ "max-age="
, show $ timeout * 60
, "; includeSubDomains"
]
handler
-- | Check if a given request is authorized via 'isAuthorized' and
-- 'isWriteRequest'.
--
-- Since 1.2.0 | 551 | sslOnlyMiddleware timeout handler = do
addHeader "Strict-Transport-Security"
$ T.pack $ concat [ "max-age="
, show $ timeout * 60
, "; includeSubDomains"
]
handler
-- | Check if a given request is authorized via 'isAuthorized' and
-- 'isWriteRequest'.
--
-- Since 1.2.0 | 388 | false | true | 0 | 11 | 242 | 89 | 45 | 44 | null | null |
martin-kolinek/some-board-game-rules | test/Interaction/BuildingProperties.hs | mit | getBuildingExtractor :: BuildingDescription -> Universe -> PlayerId -> [(Position, Direction)]
getBuildingExtractor (DoubleSmallBuildingDesc Grass Field) = availableForestPositions | 180 | getBuildingExtractor :: BuildingDescription -> Universe -> PlayerId -> [(Position, Direction)]
getBuildingExtractor (DoubleSmallBuildingDesc Grass Field) = availableForestPositions | 180 | getBuildingExtractor (DoubleSmallBuildingDesc Grass Field) = availableForestPositions | 85 | false | true | 0 | 9 | 15 | 47 | 24 | 23 | null | null |
geraldus/transient | src/Transient/Internals.hs | mit | forkFinally1 :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
forkFinally1 action and_then =
mask $ \restore -> forkIO $ try (restore action) >>= and_then | 168 | forkFinally1 :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
forkFinally1 action and_then =
mask $ \restore -> forkIO $ try (restore action) >>= and_then | 168 | forkFinally1 action and_then =
mask $ \restore -> forkIO $ try (restore action) >>= and_then | 95 | false | true | 2 | 10 | 31 | 75 | 35 | 40 | null | null |
Chatanga/kage | src/Graphics/Color.hs | mit | cyan = mkColor 0 255 255 | 24 | cyan = mkColor 0 255 255 | 24 | cyan = mkColor 0 255 255 | 24 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
copton/ocram | ocram/src/Ocram/Intermediate/DesugarControlStructures.hs | gpl-2.0 | groupCases :: [CBlockItem] -> [(Maybe CExpr, [CBlockItem])] -- {{{2
groupCases xs = case xs of
[] -> []
(CBlockStmt item):rest -> case item of
CCase expr stmt _ ->
let stmt' = CBlockStmt stmt in
if isCaseDefault stmt'
then (Just expr, [CBlockStmt (CExpr Nothing undefNode)]) : groupCases (stmt':rest)
else
let (block, others) = span (not . isCaseDefault) rest in
(Just expr, CBlockStmt stmt : block) : groupCases others
CDefault stmt _ ->
let (block, others) = span (not . isCaseDefault) rest in
(Nothing, CBlockStmt stmt : block) : groupCases others
x -> $abort $ unexp x
(x:_) -> $abort $ unexp x
where
isCaseDefault (CBlockStmt (CCase _ _ _)) = True
isCaseDefault (CBlockStmt (CDefault _ _)) = True
isCaseDefault _ = False | 847 | groupCases :: [CBlockItem] -> [(Maybe CExpr, [CBlockItem])]
groupCases xs = case xs of
[] -> []
(CBlockStmt item):rest -> case item of
CCase expr stmt _ ->
let stmt' = CBlockStmt stmt in
if isCaseDefault stmt'
then (Just expr, [CBlockStmt (CExpr Nothing undefNode)]) : groupCases (stmt':rest)
else
let (block, others) = span (not . isCaseDefault) rest in
(Just expr, CBlockStmt stmt : block) : groupCases others
CDefault stmt _ ->
let (block, others) = span (not . isCaseDefault) rest in
(Nothing, CBlockStmt stmt : block) : groupCases others
x -> $abort $ unexp x
(x:_) -> $abort $ unexp x
where
isCaseDefault (CBlockStmt (CCase _ _ _)) = True
isCaseDefault (CBlockStmt (CDefault _ _)) = True
isCaseDefault _ = False | 839 | groupCases xs = case xs of
[] -> []
(CBlockStmt item):rest -> case item of
CCase expr stmt _ ->
let stmt' = CBlockStmt stmt in
if isCaseDefault stmt'
then (Just expr, [CBlockStmt (CExpr Nothing undefNode)]) : groupCases (stmt':rest)
else
let (block, others) = span (not . isCaseDefault) rest in
(Just expr, CBlockStmt stmt : block) : groupCases others
CDefault stmt _ ->
let (block, others) = span (not . isCaseDefault) rest in
(Nothing, CBlockStmt stmt : block) : groupCases others
x -> $abort $ unexp x
(x:_) -> $abort $ unexp x
where
isCaseDefault (CBlockStmt (CCase _ _ _)) = True
isCaseDefault (CBlockStmt (CDefault _ _)) = True
isCaseDefault _ = False | 779 | true | true | 0 | 20 | 243 | 352 | 175 | 177 | null | null |
arzig/hednist | src/Data/Hednist/Parser.hs | bsd-3-clause | character :: Parser EDNValue
character =
backslash *>
(try lf
<|> try cr
<|> try space
<|> try tab
<|> try (fmap EDNChar unicode)
<|> EDNChar <$> anyChar)
where lf = string "newline" *> pure (EDNChar '\n')
cr = string "return" *> pure (EDNChar '\r')
space = string "space" *> pure (EDNChar ' ')
tab = string "tab" *> pure (EDNChar '\t')
backslash = char '\\' *> pure ()
-- Components of a symbol | 499 | character :: Parser EDNValue
character =
backslash *>
(try lf
<|> try cr
<|> try space
<|> try tab
<|> try (fmap EDNChar unicode)
<|> EDNChar <$> anyChar)
where lf = string "newline" *> pure (EDNChar '\n')
cr = string "return" *> pure (EDNChar '\r')
space = string "space" *> pure (EDNChar ' ')
tab = string "tab" *> pure (EDNChar '\t')
backslash = char '\\' *> pure ()
-- Components of a symbol | 499 | character =
backslash *>
(try lf
<|> try cr
<|> try space
<|> try tab
<|> try (fmap EDNChar unicode)
<|> EDNChar <$> anyChar)
where lf = string "newline" *> pure (EDNChar '\n')
cr = string "return" *> pure (EDNChar '\r')
space = string "space" *> pure (EDNChar ' ')
tab = string "tab" *> pure (EDNChar '\t')
backslash = char '\\' *> pure ()
-- Components of a symbol | 470 | false | true | 4 | 13 | 177 | 173 | 82 | 91 | null | null |
geraldus/yesod | yesod-core/src/Yesod/Routes/Parse.hs | mit | pieceFromString ('!':'*':x) = Left (False, x) | 45 | pieceFromString ('!':'*':x) = Left (False, x) | 45 | pieceFromString ('!':'*':x) = Left (False, x) | 45 | false | false | 0 | 8 | 5 | 29 | 15 | 14 | null | null |
noteed/mojito | Language/Mojito/Syntax/ExprBuilder.hs | bsd-3-clause | buildPatOrVar :: MonadError String m => SExpr -> ExprT m (Pattern Int)
buildPatOrVar e = case e of
List (Sym c:as) -> do
i <- newId
i' <- newId
as' <- mapM buildPatOrVar as
return $ PatCon i i' c as'
Sym a -> do
i <- newId
return $ PatVar i a
_ -> throwError $ "unexpected s-expression for pattern " ++ show e | 340 | buildPatOrVar :: MonadError String m => SExpr -> ExprT m (Pattern Int)
buildPatOrVar e = case e of
List (Sym c:as) -> do
i <- newId
i' <- newId
as' <- mapM buildPatOrVar as
return $ PatCon i i' c as'
Sym a -> do
i <- newId
return $ PatVar i a
_ -> throwError $ "unexpected s-expression for pattern " ++ show e | 340 | buildPatOrVar e = case e of
List (Sym c:as) -> do
i <- newId
i' <- newId
as' <- mapM buildPatOrVar as
return $ PatCon i i' c as'
Sym a -> do
i <- newId
return $ PatVar i a
_ -> throwError $ "unexpected s-expression for pattern " ++ show e | 269 | false | true | 3 | 9 | 95 | 150 | 67 | 83 | null | null |
gbataille/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | circ 'j' = "ĵ" | 14 | circ 'j' = "ĵ" | 14 | circ 'j' = "ĵ" | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_EIFFEL_CHARACTER :: Int
wxSTC_EIFFEL_CHARACTER = 5 | 56 | wxSTC_EIFFEL_CHARACTER :: Int
wxSTC_EIFFEL_CHARACTER = 5 | 56 | wxSTC_EIFFEL_CHARACTER = 5 | 26 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
moonKimura/vector-0.10.9.1 | Data/Vector/Fusion/Stream.hs | bsd-3-clause | enumFromTo = M.enumFromTo | 25 | enumFromTo = M.enumFromTo | 25 | enumFromTo = M.enumFromTo | 25 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
acowley/roshask | src/Ros/Internal/DepFinder.hs | bsd-3-clause | {-
-- |Returns 'True' if the ROS package at the given 'FilePath' is a
-- roshask package (determined by the presence of a @.cabal@ file in
-- the package's root directory).
isRoshask :: FilePath -> IO Bool
isRoshask pkgPath = not . null . filter ((== ".cabal") . takeExtension) <$>
getDirectoryContents pkgPath
-}
-- |Find the names of the ROS packages the package at the given
-- 'FilePath' depends on as indicated by its @manifest.xml@ file. Only
-- those packages that define messages or services are returned.
findDepsWithMessages :: FilePath -> IO [String]
findDepsWithMessages pkgRoot =
do names <- findPackageDepNames pkgRoot
searchPaths <- getRosPaths
filterM (maybe (return False) hasMsgsOrSrvs . findPackagePath searchPaths) names
-- |Find the paths to the packages this package depends on as
-- indicated by the manifest.xml file in this package's root
-- directory. | 911 | findDepsWithMessages :: FilePath -> IO [String]
findDepsWithMessages pkgRoot =
do names <- findPackageDepNames pkgRoot
searchPaths <- getRosPaths
filterM (maybe (return False) hasMsgsOrSrvs . findPackagePath searchPaths) names
-- |Find the paths to the packages this package depends on as
-- indicated by the manifest.xml file in this package's root
-- directory. | 376 | findDepsWithMessages pkgRoot =
do names <- findPackageDepNames pkgRoot
searchPaths <- getRosPaths
filterM (maybe (return False) hasMsgsOrSrvs . findPackagePath searchPaths) names
-- |Find the paths to the packages this package depends on as
-- indicated by the manifest.xml file in this package's root
-- directory. | 328 | true | true | 0 | 12 | 170 | 77 | 39 | 38 | null | null |
gibiansky/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs | mit | -- | Create a new widget
mkBoundedIntText :: IO BoundedIntText
mkBoundedIntText = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "IntTextView" "BoundedIntTextModel" layout $ StyleWidget dstyle
textAttrs = (Disabled =:: False)
:& (ContinuousUpdate =:: False)
:& (StepInt =:: Just 1)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> textAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 762 | mkBoundedIntText :: IO BoundedIntText
mkBoundedIntText = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "IntTextView" "BoundedIntTextModel" layout $ StyleWidget dstyle
textAttrs = (Disabled =:: False)
:& (ContinuousUpdate =:: False)
:& (StepInt =:: Just 1)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> textAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 737 | mkBoundedIntText = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "IntTextView" "BoundedIntTextModel" layout $ StyleWidget dstyle
textAttrs = (Disabled =:: False)
:& (ContinuousUpdate =:: False)
:& (StepInt =:: Just 1)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> textAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 699 | true | true | 0 | 14 | 189 | 161 | 77 | 84 | null | null |
CloudI/CloudI | src/api/haskell/external/zlib-0.6.2.1/Codec/Compression/Zlib/Internal.hs | mit | mkStateIO :: IO (Stream.State RealWorld)
mkStateST = strictToLazyST Stream.mkState | 82 | mkStateIO :: IO (Stream.State RealWorld)
mkStateST = strictToLazyST Stream.mkState | 82 | mkStateST = strictToLazyST Stream.mkState | 41 | false | true | 0 | 8 | 8 | 27 | 13 | 14 | null | null |
hspec/sensei | src/HTTP.hs | mit | withServer :: IO (Bool, String) -> IO a -> IO a
withServer trigger = withApplication (app trigger) | 98 | withServer :: IO (Bool, String) -> IO a -> IO a
withServer trigger = withApplication (app trigger) | 98 | withServer trigger = withApplication (app trigger) | 50 | false | true | 0 | 8 | 16 | 51 | 23 | 28 | null | null |
databrary/databrary | src/Model/Party/SQL.hs | agpl-3.0 | selectPartyAuthorization :: TH.Name -- ^ 'Identity'
-> Selector -- ^ @('Party', Maybe 'Permission')@
selectPartyAuthorization ident = selectJoin 'makePartyAuthorization
[ selectParty ident
, maybeJoinOn "party.id = authorize_view.child AND authorize_view.parent = 0"
$ accessRow "authorize_view"
] | 309 | selectPartyAuthorization :: TH.Name -- ^ 'Identity'
-> Selector
selectPartyAuthorization ident = selectJoin 'makePartyAuthorization
[ selectParty ident
, maybeJoinOn "party.id = authorize_view.child AND authorize_view.parent = 0"
$ accessRow "authorize_view"
] | 272 | selectPartyAuthorization ident = selectJoin 'makePartyAuthorization
[ selectParty ident
, maybeJoinOn "party.id = authorize_view.child AND authorize_view.parent = 0"
$ accessRow "authorize_view"
] | 206 | true | true | 0 | 7 | 45 | 50 | 24 | 26 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | nicModeOvs :: String
nicModeOvs = Types.nICModeToRaw NMOvs | 58 | nicModeOvs :: String
nicModeOvs = Types.nICModeToRaw NMOvs | 58 | nicModeOvs = Types.nICModeToRaw NMOvs | 37 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
oldmanmike/ghc | utils/genapply/Main.hs | bsd-3-clause | assign sp (arg : args) regs doc
= case findAvailableReg arg regs of
Just (reg, regs') -> assign (sp + argSize arg) args regs'
((reg, sp) : doc)
Nothing -> (doc, (arg:args), sp) | 214 | assign sp (arg : args) regs doc
= case findAvailableReg arg regs of
Just (reg, regs') -> assign (sp + argSize arg) args regs'
((reg, sp) : doc)
Nothing -> (doc, (arg:args), sp) | 214 | assign sp (arg : args) regs doc
= case findAvailableReg arg regs of
Just (reg, regs') -> assign (sp + argSize arg) args regs'
((reg, sp) : doc)
Nothing -> (doc, (arg:args), sp) | 214 | false | false | 0 | 11 | 70 | 100 | 53 | 47 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | lowercaseRomanDigits :: [Char]
lowercaseRomanDigits = ['i','v','x','l','c','d','m'] | 83 | lowercaseRomanDigits :: [Char]
lowercaseRomanDigits = ['i','v','x','l','c','d','m'] | 83 | lowercaseRomanDigits = ['i','v','x','l','c','d','m'] | 52 | false | true | 0 | 5 | 5 | 35 | 22 | 13 | null | null |
nwf/trifecta | src/Text/Trifecta/Util/Combinators.hs | bsd-3-clause | (<$!>) :: Monad m => (a -> b) -> m a -> m b
f <$!> m = do
a <- m
return $! f a | 82 | (<$!>) :: Monad m => (a -> b) -> m a -> m b
f <$!> m = do
a <- m
return $! f a | 82 | f <$!> m = do
a <- m
return $! f a | 38 | false | true | 0 | 10 | 29 | 68 | 31 | 37 | null | null |
fosskers/mapalgebra | lib/Geography/MapAlgebra.hs | bsd-3-clause | spreadRGBA :: (Index ix, Elevator e)
=> A.Array S ix (Pixel RGBA e)
-> IO (A.Array S ix e, A.Array S ix e, A.Array S ix e, A.Array S ix e)
spreadRGBA arr = do
let sz = A.size arr
mr <- A.unsafeNew sz
mb <- A.unsafeNew sz
mg <- A.unsafeNew sz
ma <- A.unsafeNew sz
flip A.imapM_ arr $ \i (PixelRGBA r g b a) -> do
A.unsafeWrite mr i r
A.unsafeWrite mg i g
A.unsafeWrite mb i b
A.unsafeWrite ma i a
ar <- A.unsafeFreeze (getComp arr) mr
ag <- A.unsafeFreeze (getComp arr) mg
ab <- A.unsafeFreeze (getComp arr) mb
aa <- A.unsafeFreeze (getComp arr) ma
return (ar, ag, ab, aa)
| 614 | spreadRGBA :: (Index ix, Elevator e)
=> A.Array S ix (Pixel RGBA e)
-> IO (A.Array S ix e, A.Array S ix e, A.Array S ix e, A.Array S ix e)
spreadRGBA arr = do
let sz = A.size arr
mr <- A.unsafeNew sz
mb <- A.unsafeNew sz
mg <- A.unsafeNew sz
ma <- A.unsafeNew sz
flip A.imapM_ arr $ \i (PixelRGBA r g b a) -> do
A.unsafeWrite mr i r
A.unsafeWrite mg i g
A.unsafeWrite mb i b
A.unsafeWrite ma i a
ar <- A.unsafeFreeze (getComp arr) mr
ag <- A.unsafeFreeze (getComp arr) mg
ab <- A.unsafeFreeze (getComp arr) mb
aa <- A.unsafeFreeze (getComp arr) ma
return (ar, ag, ab, aa)
| 614 | spreadRGBA arr = do
let sz = A.size arr
mr <- A.unsafeNew sz
mb <- A.unsafeNew sz
mg <- A.unsafeNew sz
ma <- A.unsafeNew sz
flip A.imapM_ arr $ \i (PixelRGBA r g b a) -> do
A.unsafeWrite mr i r
A.unsafeWrite mg i g
A.unsafeWrite mb i b
A.unsafeWrite ma i a
ar <- A.unsafeFreeze (getComp arr) mr
ag <- A.unsafeFreeze (getComp arr) mg
ab <- A.unsafeFreeze (getComp arr) mb
aa <- A.unsafeFreeze (getComp arr) ma
return (ar, ag, ab, aa)
| 471 | false | true | 0 | 12 | 155 | 346 | 159 | 187 | null | null |
owst/NFAToDFA | src/Math/Automata/Simple.hs | bsd-3-clause | textToNFA :: Text -> Either String (NFA Text Text)
textToNFA = (nfaDefToNFA <$>) . doParse
where
doParse = showLeft . parse parseNFADef ""
showLeft = either (Left . show) Right
-- |Convert a NFADef into a NFA. At this stage, duplicate states/transitions
-- are removed. | 280 | textToNFA :: Text -> Either String (NFA Text Text)
textToNFA = (nfaDefToNFA <$>) . doParse
where
doParse = showLeft . parse parseNFADef ""
showLeft = either (Left . show) Right
-- |Convert a NFADef into a NFA. At this stage, duplicate states/transitions
-- are removed. | 280 | textToNFA = (nfaDefToNFA <$>) . doParse
where
doParse = showLeft . parse parseNFADef ""
showLeft = either (Left . show) Right
-- |Convert a NFADef into a NFA. At this stage, duplicate states/transitions
-- are removed. | 229 | false | true | 3 | 9 | 55 | 83 | 39 | 44 | null | null |
forste/haReFork | refactorer/PwPf/Pointfree.hs | bsd-3-clause | pf2Exp APP = nameToExp "app" | 28 | pf2Exp APP = nameToExp "app" | 28 | pf2Exp APP = nameToExp "app" | 28 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX43.hs | lgpl-2.1 | tBasisPxType :: FIXTag
tBasisPxType = FIXTag
{ tName = "BasisPxType"
, tnum = 419
, tparser = toFIXChar
, arbitraryValue = FIXChar <$> (return 'A') } | 162 | tBasisPxType :: FIXTag
tBasisPxType = FIXTag
{ tName = "BasisPxType"
, tnum = 419
, tparser = toFIXChar
, arbitraryValue = FIXChar <$> (return 'A') } | 162 | tBasisPxType = FIXTag
{ tName = "BasisPxType"
, tnum = 419
, tparser = toFIXChar
, arbitraryValue = FIXChar <$> (return 'A') } | 139 | false | true | 0 | 10 | 38 | 51 | 29 | 22 | null | null |
keera-studios/hsQt | Qtc/Gui/QStyleOptionViewItem.hs | bsd-2-clause | setDisplayAlignment :: QStyleOptionViewItem a -> ((Alignment)) -> IO ()
setDisplayAlignment x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_setDisplayAlignment cobj_x0 (toCLong $ qFlags_toInt x1) | 219 | setDisplayAlignment :: QStyleOptionViewItem a -> ((Alignment)) -> IO ()
setDisplayAlignment x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_setDisplayAlignment cobj_x0 (toCLong $ qFlags_toInt x1) | 219 | setDisplayAlignment x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_setDisplayAlignment cobj_x0 (toCLong $ qFlags_toInt x1) | 147 | false | true | 2 | 9 | 29 | 74 | 35 | 39 | null | null |
jkpl/tagenerator | src/TaGenerator/GameEngine.hs | mit | roomAtDirection :: TextAdventure -> Room -> String -> Either String Room
roomAtDirection ta room direction =
maybeToEither (cantMove direction) (roomAtDirection' ta room direction) | 184 | roomAtDirection :: TextAdventure -> Room -> String -> Either String Room
roomAtDirection ta room direction =
maybeToEither (cantMove direction) (roomAtDirection' ta room direction) | 184 | roomAtDirection ta room direction =
maybeToEither (cantMove direction) (roomAtDirection' ta room direction) | 111 | false | true | 0 | 8 | 26 | 56 | 27 | 29 | null | null |
bitemyapp/tf-idf-1 | src/Main.hs | mit | filterCorpus :: [String] -> [[String]]
filterCorpus =
let clean = (map toLower . filter isAlpha)
in map clean >>> sort >>> group | 136 | filterCorpus :: [String] -> [[String]]
filterCorpus =
let clean = (map toLower . filter isAlpha)
in map clean >>> sort >>> group | 136 | filterCorpus =
let clean = (map toLower . filter isAlpha)
in map clean >>> sort >>> group | 97 | false | true | 0 | 11 | 29 | 59 | 30 | 29 | null | null |
wavewave/lhc-analysis-collection | exe/2013-08-05-XQLD.hs | gpl-3.0 | leptons = [11,13,-11,-13] | 25 | leptons = [11,13,-11,-13] | 25 | leptons = [11,13,-11,-13] | 25 | false | false | 1 | 6 | 2 | 25 | 13 | 12 | null | null |
olsner/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | rnLocalBindsAndThen (HsIPBinds binds) thing_inside = do
(binds',fv_binds) <- rnIPBinds binds
(thing, fvs_thing) <- thing_inside (HsIPBinds binds') fv_binds
return (thing, fvs_thing `plusFV` fv_binds) | 211 | rnLocalBindsAndThen (HsIPBinds binds) thing_inside = do
(binds',fv_binds) <- rnIPBinds binds
(thing, fvs_thing) <- thing_inside (HsIPBinds binds') fv_binds
return (thing, fvs_thing `plusFV` fv_binds) | 211 | rnLocalBindsAndThen (HsIPBinds binds) thing_inside = do
(binds',fv_binds) <- rnIPBinds binds
(thing, fvs_thing) <- thing_inside (HsIPBinds binds') fv_binds
return (thing, fvs_thing `plusFV` fv_binds) | 211 | false | false | 0 | 10 | 33 | 75 | 38 | 37 | null | null |
sdiehl/ghc | testsuite/tests/programs/galois_raytrace/Eval.hs | bsd-3-clause | -- Rule 7 & 8: If statement
step st@(State{ env = env, stack = (VClosure e2 c2):(VClosure e1 c1):(VBool True):stack, code = TIf:cs }) =
do { stk <- eval (State {env = e1, stack = stack, code = c1})
; return (st { stack = stk, code = cs })
} | 252 | step st@(State{ env = env, stack = (VClosure e2 c2):(VClosure e1 c1):(VBool True):stack, code = TIf:cs }) =
do { stk <- eval (State {env = e1, stack = stack, code = c1})
; return (st { stack = stk, code = cs })
} | 224 | step st@(State{ env = env, stack = (VClosure e2 c2):(VClosure e1 c1):(VBool True):stack, code = TIf:cs }) =
do { stk <- eval (State {env = e1, stack = stack, code = c1})
; return (st { stack = stk, code = cs })
} | 224 | true | false | 17 | 12 | 63 | 142 | 76 | 66 | null | null |
brendanhay/gogol | gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Update.hs | mpl-2.0 | -- | Multipart request metadata.
duPayload :: Lens' DeploymentsUpdate Deployment
duPayload
= lens _duPayload (\ s a -> s{_duPayload = a}) | 139 | duPayload :: Lens' DeploymentsUpdate Deployment
duPayload
= lens _duPayload (\ s a -> s{_duPayload = a}) | 106 | duPayload
= lens _duPayload (\ s a -> s{_duPayload = a}) | 58 | true | true | 1 | 9 | 22 | 46 | 22 | 24 | null | null |
jeremy-w/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | dropGiven du (u@(n, _) : us) hs
| n `elem` du = dropGiven du us hs | 69 | dropGiven du (u@(n, _) : us) hs
| n `elem` du = dropGiven du us hs | 69 | dropGiven du (u@(n, _) : us) hs
| n `elem` du = dropGiven du us hs | 69 | false | false | 0 | 9 | 18 | 48 | 25 | 23 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Writers/FB2.hs | gpl-2.0 | -- FIXME
plain (Code _ s) = s | 29 | plain (Code _ s) = s | 20 | plain (Code _ s) = s | 20 | true | false | 0 | 7 | 7 | 18 | 9 | 9 | null | null |
jkozlowski/kdb-haskell | src/Database/Kdb/Internal/IPC.hs | mit | -- Adapted from attoparsec-binary.
cchar8 :: A.Parser CChar
cchar8 = fromIntegral <$> A.anyWord8 | 97 | cchar8 :: A.Parser CChar
cchar8 = fromIntegral <$> A.anyWord8 | 61 | cchar8 = fromIntegral <$> A.anyWord8 | 36 | true | true | 1 | 7 | 13 | 27 | 12 | 15 | null | null |
gergoerdi/kansas-lava-papilio | src/Hardware/KansasLava/SevenSegment.hs | bsd-3-clause | encodeHexSS :: Unsigned X4 -> Matrix X7 Bool
encodeHexSS n = matrix $ case n of
-- a b c d e f g
0x0 -> [ True, True, True, True, True, True, False ]
0x1 -> [ False, True, True, False, False, False, False ]
0x2 -> [ True, True, False, True, True, False, True ]
0x3 -> [ True, True, True, True, False, False, True ]
0x4 -> [ False, True, True, False, False, True, True ]
0x5 -> [ True, False, True, True, False, True, True ]
0x6 -> [ True, False, True, True, True, True, True ]
0x7 -> [ True, True, True, False, False, False, False ]
0x8 -> [ True, True, True, True, True, True, True ]
0x9 -> [ True, True, True, True, False, True, True ]
0xa -> [ True, True, True, False, True, True, True ]
0xb -> [ False, False, True, True, True, True, True ]
0xc -> [ True, False, False, True, True, True, False ]
0xd -> [ False, True, True, True, True, False, True ]
0xe -> [ True, False, False, True, True, True, True ]
0xf -> [ True, False, False, False, True, True, True ]
-- For testing | 1,161 | encodeHexSS :: Unsigned X4 -> Matrix X7 Bool
encodeHexSS n = matrix $ case n of
-- a b c d e f g
0x0 -> [ True, True, True, True, True, True, False ]
0x1 -> [ False, True, True, False, False, False, False ]
0x2 -> [ True, True, False, True, True, False, True ]
0x3 -> [ True, True, True, True, False, False, True ]
0x4 -> [ False, True, True, False, False, True, True ]
0x5 -> [ True, False, True, True, False, True, True ]
0x6 -> [ True, False, True, True, True, True, True ]
0x7 -> [ True, True, True, False, False, False, False ]
0x8 -> [ True, True, True, True, True, True, True ]
0x9 -> [ True, True, True, True, False, True, True ]
0xa -> [ True, True, True, False, True, True, True ]
0xb -> [ False, False, True, True, True, True, True ]
0xc -> [ True, False, False, True, True, True, False ]
0xd -> [ False, True, True, True, True, False, True ]
0xe -> [ True, False, False, True, True, True, True ]
0xf -> [ True, False, False, False, True, True, True ]
-- For testing | 1,161 | encodeHexSS n = matrix $ case n of
-- a b c d e f g
0x0 -> [ True, True, True, True, True, True, False ]
0x1 -> [ False, True, True, False, False, False, False ]
0x2 -> [ True, True, False, True, True, False, True ]
0x3 -> [ True, True, True, True, False, False, True ]
0x4 -> [ False, True, True, False, False, True, True ]
0x5 -> [ True, False, True, True, False, True, True ]
0x6 -> [ True, False, True, True, True, True, True ]
0x7 -> [ True, True, True, False, False, False, False ]
0x8 -> [ True, True, True, True, True, True, True ]
0x9 -> [ True, True, True, True, False, True, True ]
0xa -> [ True, True, True, False, True, True, True ]
0xb -> [ False, False, True, True, True, True, True ]
0xc -> [ True, False, False, True, True, True, False ]
0xd -> [ False, True, True, True, True, False, True ]
0xe -> [ True, False, False, True, True, True, True ]
0xf -> [ True, False, False, False, True, True, True ]
-- For testing | 1,116 | false | true | 16 | 6 | 386 | 499 | 290 | 209 | null | null |
cl04/advent2016 | src/Day5.hs | bsd-3-clause | next' r i s
| not ("00000" `isPrefixOf` msg) = next' r (1+i) s
| IntMap.size r == 8 = r
| pos `IntMap.member` r || pos >= 8 = next' r (1+i) s
| pos `IntMap.notMember` r = next' (IntMap.insert pos ch r) (1+i) s
where
t = C.concat [s, pad, C.pack (show i)]
pad = C.replicate (5 - numDigits i) '0'
h = (hash t :: Digest MD5)
msg = show h
(pos_:ch:_) = drop 5 msg
pos = fst . head . readHex . pure $ pos_ | 435 | next' r i s
| not ("00000" `isPrefixOf` msg) = next' r (1+i) s
| IntMap.size r == 8 = r
| pos `IntMap.member` r || pos >= 8 = next' r (1+i) s
| pos `IntMap.notMember` r = next' (IntMap.insert pos ch r) (1+i) s
where
t = C.concat [s, pad, C.pack (show i)]
pad = C.replicate (5 - numDigits i) '0'
h = (hash t :: Digest MD5)
msg = show h
(pos_:ch:_) = drop 5 msg
pos = fst . head . readHex . pure $ pos_ | 435 | next' r i s
| not ("00000" `isPrefixOf` msg) = next' r (1+i) s
| IntMap.size r == 8 = r
| pos `IntMap.member` r || pos >= 8 = next' r (1+i) s
| pos `IntMap.notMember` r = next' (IntMap.insert pos ch r) (1+i) s
where
t = C.concat [s, pad, C.pack (show i)]
pad = C.replicate (5 - numDigits i) '0'
h = (hash t :: Digest MD5)
msg = show h
(pos_:ch:_) = drop 5 msg
pos = fst . head . readHex . pure $ pos_ | 435 | false | false | 6 | 10 | 124 | 296 | 139 | 157 | null | null |
mrkkrp/stack | src/Stack/Constants.hs | bsd-3-clause | -- | Name of the 'stack' program.
stackProgName :: String
stackProgName = "stack" | 81 | stackProgName :: String
stackProgName = "stack" | 47 | stackProgName = "stack" | 23 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/Float.hs | bsd-3-clause | getIeeeFloat32 :: Get Float
getIeeeFloat32 = do
raw <- getWord32be
return $ rocFloatToFloat raw | 100 | getIeeeFloat32 :: Get Float
getIeeeFloat32 = do
raw <- getWord32be
return $ rocFloatToFloat raw | 100 | getIeeeFloat32 = do
raw <- getWord32be
return $ rocFloatToFloat raw | 72 | false | true | 0 | 9 | 18 | 37 | 15 | 22 | null | null |
jystic/netcdf-hs | src/Data/NetCDF/Serialize.hs | bsd-3-clause | ------------------------------------------------------------------------
-- | Parse the header of a NetCDF file.
getHeader :: Get Header
getHeader = do
string "CDF"
format <- pure FormatClassic <* word8 1
<|> pure Format64Bit <* word8 2
<?> "file format"
numrecs <- pure Streaming <* word32be 0xFFFFFFFF
<|> NumRecs <$> getWord32be
dims <- getDimensionList
gatts <- getAttributeList
vars <- getVariableList dims (getOffsetFor format)
return (Header format numrecs dims gatts vars)
-- | Create a parser for file offsets depending on the file format. | 617 | getHeader :: Get Header
getHeader = do
string "CDF"
format <- pure FormatClassic <* word8 1
<|> pure Format64Bit <* word8 2
<?> "file format"
numrecs <- pure Streaming <* word32be 0xFFFFFFFF
<|> NumRecs <$> getWord32be
dims <- getDimensionList
gatts <- getAttributeList
vars <- getVariableList dims (getOffsetFor format)
return (Header format numrecs dims gatts vars)
-- | Create a parser for file offsets depending on the file format. | 503 | getHeader = do
string "CDF"
format <- pure FormatClassic <* word8 1
<|> pure Format64Bit <* word8 2
<?> "file format"
numrecs <- pure Streaming <* word32be 0xFFFFFFFF
<|> NumRecs <$> getWord32be
dims <- getDimensionList
gatts <- getAttributeList
vars <- getVariableList dims (getOffsetFor format)
return (Header format numrecs dims gatts vars)
-- | Create a parser for file offsets depending on the file format. | 479 | true | true | 0 | 12 | 146 | 135 | 61 | 74 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml20.hs | bsd-2-clause | parseLyricFont :: P.XParse LyricFont
parseLyricFont =
LyricFont
<$> P.optional (P.xattr (P.name "number") >>= parseNMTOKEN)
<*> P.optional (P.xattr (P.name "name") >>= parseToken)
<*> P.optional (P.xattr (P.name "font-family") >>= parseCommaSeparatedText)
<*> P.optional (P.xattr (P.name "font-style") >>= parseFontStyle)
<*> P.optional (P.xattr (P.name "font-size") >>= parseFontSize)
<*> P.optional (P.xattr (P.name "font-weight") >>= parseFontWeight) | 508 | parseLyricFont :: P.XParse LyricFont
parseLyricFont =
LyricFont
<$> P.optional (P.xattr (P.name "number") >>= parseNMTOKEN)
<*> P.optional (P.xattr (P.name "name") >>= parseToken)
<*> P.optional (P.xattr (P.name "font-family") >>= parseCommaSeparatedText)
<*> P.optional (P.xattr (P.name "font-style") >>= parseFontStyle)
<*> P.optional (P.xattr (P.name "font-size") >>= parseFontSize)
<*> P.optional (P.xattr (P.name "font-weight") >>= parseFontWeight) | 508 | parseLyricFont =
LyricFont
<$> P.optional (P.xattr (P.name "number") >>= parseNMTOKEN)
<*> P.optional (P.xattr (P.name "name") >>= parseToken)
<*> P.optional (P.xattr (P.name "font-family") >>= parseCommaSeparatedText)
<*> P.optional (P.xattr (P.name "font-style") >>= parseFontStyle)
<*> P.optional (P.xattr (P.name "font-size") >>= parseFontSize)
<*> P.optional (P.xattr (P.name "font-weight") >>= parseFontWeight) | 471 | false | true | 17 | 11 | 103 | 212 | 103 | 109 | null | null |
mikeyhc/kainbot | src/Kain/Internal.hs | bsd-3-clause | runKainHandlerT :: (Monad m) => B.ByteString -> B.ByteString -> B.ByteString
-> B.ByteString -> KainHandlerT m a -> KainT m a
runKainHandlerT nick user chan msg (KainHandlerT s) = do
state <- get
(ret, rs) <- runStateT s (KainHandlerState nick user chan msg state)
put $ _kainHandlerKain rs
return ret | 333 | runKainHandlerT :: (Monad m) => B.ByteString -> B.ByteString -> B.ByteString
-> B.ByteString -> KainHandlerT m a -> KainT m a
runKainHandlerT nick user chan msg (KainHandlerT s) = do
state <- get
(ret, rs) <- runStateT s (KainHandlerState nick user chan msg state)
put $ _kainHandlerKain rs
return ret | 333 | runKainHandlerT nick user chan msg (KainHandlerT s) = do
state <- get
(ret, rs) <- runStateT s (KainHandlerState nick user chan msg state)
put $ _kainHandlerKain rs
return ret | 191 | false | true | 0 | 14 | 80 | 135 | 63 | 72 | null | null |
acfoltzer/RazorsLambda | src/RazorsLambda/Eval.hs | bsd-3-clause | evalDecl :: Decl -> Eval Value
evalDecl (Decl x args _ e) = do
let e' = foldr (\(y, t) e'' -> ELam y t e'') e args
rec v <- localEnv (Map.insert x v) (evalExpr e')
return v | 178 | evalDecl :: Decl -> Eval Value
evalDecl (Decl x args _ e) = do
let e' = foldr (\(y, t) e'' -> ELam y t e'') e args
rec v <- localEnv (Map.insert x v) (evalExpr e')
return v | 178 | evalDecl (Decl x args _ e) = do
let e' = foldr (\(y, t) e'' -> ELam y t e'') e args
rec v <- localEnv (Map.insert x v) (evalExpr e')
return v | 147 | false | true | 0 | 13 | 44 | 109 | 52 | 57 | null | null |
johnbcoughlin/mucalc | src/GRSynth/GameStructure.hs | gpl-2.0 | withPropAsSupport :: (State x, State y) => GS x y -> String -> [(x, y)] -> GS x y
withPropAsSupport gs label xys = let pProp = fromExplicit (map encode xys)
in gs { gsprops = M.insert label pProp (gsprops gs) } | 244 | withPropAsSupport :: (State x, State y) => GS x y -> String -> [(x, y)] -> GS x y
withPropAsSupport gs label xys = let pProp = fromExplicit (map encode xys)
in gs { gsprops = M.insert label pProp (gsprops gs) } | 244 | withPropAsSupport gs label xys = let pProp = fromExplicit (map encode xys)
in gs { gsprops = M.insert label pProp (gsprops gs) } | 162 | false | true | 0 | 11 | 75 | 109 | 55 | 54 | null | null |
sdiehl/ghc | compiler/typecheck/TcGenFunctor.hs | bsd-3-clause | bs_Vars = map nlHsVar bs_RDRs | 29 | bs_Vars = map nlHsVar bs_RDRs | 29 | bs_Vars = map nlHsVar bs_RDRs | 29 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
Icelandjack/lens | src/Control/Lens/Iso.hs | bsd-3-clause | -- | An 'Iso' between a list, 'ByteString', 'Text' fragment, etc. and its reversal.
--
-- >>> "live" ^. reversed
-- "evil"
--
-- >>> "live" & reversed %~ ('d':)
-- "lived"
reversed :: Reversing a => Iso' a a
reversed = involuted Iso.reversing | 242 | reversed :: Reversing a => Iso' a a
reversed = involuted Iso.reversing | 70 | reversed = involuted Iso.reversing | 34 | true | true | 0 | 6 | 43 | 35 | 20 | 15 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp IntLeOp = Just $ intCompOp if_icmple | 45 | simpleOp IntLeOp = Just $ intCompOp if_icmple | 45 | simpleOp IntLeOp = Just $ intCompOp if_icmple | 45 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
kevinjardine/gruzeSnaplet | src/Snap/Snaplet/Gruze/Box.hs | gpl-2.0 | setStringList :: GrzAtomBoxClass c => GrzKey -> [GrzString] -> c -> c
setStringList k ss c = setAtomList k (map stringToAtom ss) c | 130 | setStringList :: GrzAtomBoxClass c => GrzKey -> [GrzString] -> c -> c
setStringList k ss c = setAtomList k (map stringToAtom ss) c | 130 | setStringList k ss c = setAtomList k (map stringToAtom ss) c | 60 | false | true | 0 | 8 | 22 | 55 | 27 | 28 | null | null |
markflorisson/hpack | testrepo/bytestring-0.9.1.9/Data/ByteString/Unsafe.hs | bsd-3-clause | -- | /O(n)/ Pack a null-terminated sequence of bytes, pointed to by an
-- Addr\# (an arbitrary machine address assumed to point outside the
-- garbage-collected heap) into a @ByteString@. A much faster way to
-- create an Addr\# is with an unboxed string literal, than to pack a
-- boxed string. A unboxed string literal is compiled to a static @char
-- []@ by GHC. Establishing the length of the string requires a call to
-- @strlen(3)@, so the Addr# must point to a null-terminated buffer (as
-- is the case with "string"# literals in GHC). Use 'unsafePackAddressLen'
-- if you know the length of the string statically.
--
-- An example:
--
-- > literalFS = unsafePackAddress "literal"#
--
-- This function is /unsafe/. If you modify the buffer pointed to by the
-- original Addr# this modification will be reflected in the resulting
-- @ByteString@, breaking referential transparency.
--
-- Note this also won't work if you Add# has embedded '\0' characters in
-- the string (strlen will fail).
--
unsafePackAddress :: Addr# -> IO ByteString
unsafePackAddress addr# = do
p <- newForeignPtr_ (castPtr cstr)
l <- c_strlen cstr
return $ PS p 0 (fromIntegral l)
where
cstr :: CString
cstr = Ptr addr#
| 1,222 | unsafePackAddress :: Addr# -> IO ByteString
unsafePackAddress addr# = do
p <- newForeignPtr_ (castPtr cstr)
l <- c_strlen cstr
return $ PS p 0 (fromIntegral l)
where
cstr :: CString
cstr = Ptr addr#
| 221 | unsafePackAddress addr# = do
p <- newForeignPtr_ (castPtr cstr)
l <- c_strlen cstr
return $ PS p 0 (fromIntegral l)
where
cstr :: CString
cstr = Ptr addr#
| 177 | true | true | 0 | 10 | 229 | 104 | 59 | 45 | null | null |
avh4/elm-compiler | src/Transform/Canonicalize/Variable.hs | bsd-3-clause | preferLocals' :: Environment -> (a -> Var.Canonical) -> String -> [a] -> String
-> Canonicalizer String a
preferLocals' env extract kind possibilities var =
case filter (isLocal . extract) possibilities of
[] -> ambiguous possibilities
[v] -> found extract v
locals -> ambiguous locals
where
isLocal :: Var.Canonical -> Bool
isLocal (Var.Canonical home _) =
case home of
Var.Local -> True
Var.BuiltIn -> False
Var.Module name ->
name == Env._home env
ambiguous possibleVars =
throwError msg
where
vars = map (Var.toString . extract) possibleVars
msg = "Ambiguous usage of " ++ kind ++ " '" ++ var ++ "'.\n" ++
" Disambiguate between: " ++ List.intercalate ", " vars | 850 | preferLocals' :: Environment -> (a -> Var.Canonical) -> String -> [a] -> String
-> Canonicalizer String a
preferLocals' env extract kind possibilities var =
case filter (isLocal . extract) possibilities of
[] -> ambiguous possibilities
[v] -> found extract v
locals -> ambiguous locals
where
isLocal :: Var.Canonical -> Bool
isLocal (Var.Canonical home _) =
case home of
Var.Local -> True
Var.BuiltIn -> False
Var.Module name ->
name == Env._home env
ambiguous possibleVars =
throwError msg
where
vars = map (Var.toString . extract) possibleVars
msg = "Ambiguous usage of " ++ kind ++ " '" ++ var ++ "'.\n" ++
" Disambiguate between: " ++ List.intercalate ", " vars | 850 | preferLocals' env extract kind possibilities var =
case filter (isLocal . extract) possibilities of
[] -> ambiguous possibilities
[v] -> found extract v
locals -> ambiguous locals
where
isLocal :: Var.Canonical -> Bool
isLocal (Var.Canonical home _) =
case home of
Var.Local -> True
Var.BuiltIn -> False
Var.Module name ->
name == Env._home env
ambiguous possibleVars =
throwError msg
where
vars = map (Var.toString . extract) possibleVars
msg = "Ambiguous usage of " ++ kind ++ " '" ++ var ++ "'.\n" ++
" Disambiguate between: " ++ List.intercalate ", " vars | 730 | false | true | 0 | 14 | 293 | 248 | 123 | 125 | null | null |
nushio3/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | -- | Does a type represent a floating-point number?
isFloatingTy :: Type -> Bool
isFloatingTy ty = isFloatTy ty || isDoubleTy ty | 128 | isFloatingTy :: Type -> Bool
isFloatingTy ty = isFloatTy ty || isDoubleTy ty | 76 | isFloatingTy ty = isFloatTy ty || isDoubleTy ty | 47 | true | true | 0 | 7 | 21 | 34 | 15 | 19 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLIST_MASK_FORMAT :: Int
wxLIST_MASK_FORMAT = 32 | 49 | wxLIST_MASK_FORMAT :: Int
wxLIST_MASK_FORMAT = 32 | 49 | wxLIST_MASK_FORMAT = 32 | 23 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dbp/karamaan-opaleye | Karamaan/Opaleye/Operators/Numeric.hs | bsd-3-clause | -- It's also unclear what types these operations should have
-- Should there be a Num typeclass constraint or similar?
plus :: NumBinOpH a a
plus = opArr OpPlus "plus" | 167 | plus :: NumBinOpH a a
plus = opArr OpPlus "plus" | 48 | plus = opArr OpPlus "plus" | 26 | true | true | 0 | 5 | 29 | 23 | 12 | 11 | null | null |
nevrenato/Hets_Fork | HasCASL/ClassAna.hs | gpl-2.0 | minRawKind :: Monad m => String -> RawKind -> RawKind -> m RawKind
minRawKind str k1 k2 = let err = fail $ diffKindString str k1 k2 in case k1 of
ClassKind _ -> case k2 of
ClassKind _ -> return $ ClassKind ()
_ -> err
FunKind v1 a1 r1 ps -> case k2 of
FunKind v2 a2 r2 qs -> do
a3 <- minRawKind str a2 a1
r3 <- minRawKind str r1 r2
return $ FunKind (minVariance v1 v2) a3 r3 $ appRange ps qs
_ -> err | 476 | minRawKind :: Monad m => String -> RawKind -> RawKind -> m RawKind
minRawKind str k1 k2 = let err = fail $ diffKindString str k1 k2 in case k1 of
ClassKind _ -> case k2 of
ClassKind _ -> return $ ClassKind ()
_ -> err
FunKind v1 a1 r1 ps -> case k2 of
FunKind v2 a2 r2 qs -> do
a3 <- minRawKind str a2 a1
r3 <- minRawKind str r1 r2
return $ FunKind (minVariance v1 v2) a3 r3 $ appRange ps qs
_ -> err | 476 | minRawKind str k1 k2 = let err = fail $ diffKindString str k1 k2 in case k1 of
ClassKind _ -> case k2 of
ClassKind _ -> return $ ClassKind ()
_ -> err
FunKind v1 a1 r1 ps -> case k2 of
FunKind v2 a2 r2 qs -> do
a3 <- minRawKind str a2 a1
r3 <- minRawKind str r1 r2
return $ FunKind (minVariance v1 v2) a3 r3 $ appRange ps qs
_ -> err | 409 | false | true | 0 | 22 | 165 | 204 | 93 | 111 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Parser/Parser.hs | bsd-3-clause | product_expr :: Parser (AST' Text)
product_expr =
reserved "product"
*> (Product
<$> identifier
<* symbol "from"
<*> expr
<* symbol "to"
<*> expr
<*> semiblockExpr
) | 231 | product_expr :: Parser (AST' Text)
product_expr =
reserved "product"
*> (Product
<$> identifier
<* symbol "from"
<*> expr
<* symbol "to"
<*> expr
<*> semiblockExpr
) | 231 | product_expr =
reserved "product"
*> (Product
<$> identifier
<* symbol "from"
<*> expr
<* symbol "to"
<*> expr
<*> semiblockExpr
) | 196 | false | true | 2 | 12 | 91 | 63 | 30 | 33 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/Driver.hs | bsd-3-clause | pprSeqCoreToDo (SeqCoreDoContify cs) = text "Contify" <+> parens (ppr cs) | 75 | pprSeqCoreToDo (SeqCoreDoContify cs) = text "Contify" <+> parens (ppr cs) | 75 | pprSeqCoreToDo (SeqCoreDoContify cs) = text "Contify" <+> parens (ppr cs) | 75 | false | false | 0 | 8 | 11 | 31 | 14 | 17 | null | null |
ghc-android/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | isDataSymOcc _ = False | 41 | isDataSymOcc _ = False | 41 | isDataSymOcc _ = False | 41 | false | false | 0 | 5 | 22 | 9 | 4 | 5 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_INT_IMAGE_2D_MULTISAMPLE :: GLenum
gl_INT_IMAGE_2D_MULTISAMPLE = 0x9060 | 74 | gl_INT_IMAGE_2D_MULTISAMPLE :: GLenum
gl_INT_IMAGE_2D_MULTISAMPLE = 0x9060 | 74 | gl_INT_IMAGE_2D_MULTISAMPLE = 0x9060 | 36 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
mhwombat/exp-uivector-cluster-wains | src/ALife/Creatur/Wain/UIVector/Cluster/Universe.hs | bsd-3-clause | cPopControl :: Setting Bool
cPopControl = requiredSetting "popControl" | 70 | cPopControl :: Setting Bool
cPopControl = requiredSetting "popControl" | 70 | cPopControl = requiredSetting "popControl" | 42 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
Blaisorblade/learning-syntactic | src/Sec7UndecidableInstances.hs | mit | optAddDefault ∷ (OptAdd dom dom, sym :<: dom) ⇒
sym a → Args (AST dom) a → AST dom (Full (Result a))
optAddDefault s = appArgs (Sym (inj s)) . mapArgs optAdd | 159 | optAddDefault ∷ (OptAdd dom dom, sym :<: dom) ⇒
sym a → Args (AST dom) a → AST dom (Full (Result a))
optAddDefault s = appArgs (Sym (inj s)) . mapArgs optAdd | 159 | optAddDefault s = appArgs (Sym (inj s)) . mapArgs optAdd | 56 | false | true | 0 | 13 | 33 | 95 | 45 | 50 | null | null |
tolysz/hs-tls | core/Network/TLS/State.hs | bsd-3-clause | certVerifyHandshakeTypeMaterial HandshakeType_CertVerify = False | 69 | certVerifyHandshakeTypeMaterial HandshakeType_CertVerify = False | 69 | certVerifyHandshakeTypeMaterial HandshakeType_CertVerify = False | 69 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
acowley/ghc | compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | bsd-3-clause | trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclusions
| let cALLOCATABLE_REGS_FLOAT
= (case platformArch platform of
ArchX86 -> 0
ArchX86_64 -> 0
ArchPPC -> 0
ArchSPARC -> 22
ArchPPC_64 _ -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
ArchJavaScript-> panic "trivColorable ArchJavaScript"
ArchUnknown -> panic "trivColorable ArchUnknown")
, count2 <- accSqueeze 0 cALLOCATABLE_REGS_FLOAT
(virtualRegSqueeze RcFloat)
conflicts
, count3 <- accSqueeze count2 cALLOCATABLE_REGS_FLOAT
(realRegSqueeze RcFloat)
exclusions
= count3 < cALLOCATABLE_REGS_FLOAT | 1,380 | trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclusions
| let cALLOCATABLE_REGS_FLOAT
= (case platformArch platform of
ArchX86 -> 0
ArchX86_64 -> 0
ArchPPC -> 0
ArchSPARC -> 22
ArchPPC_64 _ -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
ArchJavaScript-> panic "trivColorable ArchJavaScript"
ArchUnknown -> panic "trivColorable ArchUnknown")
, count2 <- accSqueeze 0 cALLOCATABLE_REGS_FLOAT
(virtualRegSqueeze RcFloat)
conflicts
, count3 <- accSqueeze count2 cALLOCATABLE_REGS_FLOAT
(realRegSqueeze RcFloat)
exclusions
= count3 < cALLOCATABLE_REGS_FLOAT | 1,380 | trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclusions
| let cALLOCATABLE_REGS_FLOAT
= (case platformArch platform of
ArchX86 -> 0
ArchX86_64 -> 0
ArchPPC -> 0
ArchSPARC -> 22
ArchPPC_64 _ -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
ArchJavaScript-> panic "trivColorable ArchJavaScript"
ArchUnknown -> panic "trivColorable ArchUnknown")
, count2 <- accSqueeze 0 cALLOCATABLE_REGS_FLOAT
(virtualRegSqueeze RcFloat)
conflicts
, count3 <- accSqueeze count2 cALLOCATABLE_REGS_FLOAT
(realRegSqueeze RcFloat)
exclusions
= count3 < cALLOCATABLE_REGS_FLOAT | 1,380 | false | false | 0 | 15 | 670 | 197 | 91 | 106 | null | null |
byorgey/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | process fn (LogLvl i) = setLogLevel i | 37 | process fn (LogLvl i) = setLogLevel i | 37 | process fn (LogLvl i) = setLogLevel i | 37 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.