Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
clash-prelude Clash.Explicit.Signal Version of delay that only updates when its third argument is a Just value.
>>> let input = fromList [Just 1, Just 2, Nothing, Nothing, Just 5, Just 6, Just (7::Int)] >>> sampleN 7 (delayMaybe systemClockGen enableGen 0 input) [0,1,2,2,2,5,6]
-
clash-prelude Clash.Explicit.Signal Version of register that only updates its content when its fourth argument is a Just value. So given:
sometimes1 clk rst en = s where s = register clk rst en Nothing (switch <$> s) switch Nothing = Just 1 switch _ = Nothing countSometimes clk rst en = s where s = regMaybe clk rst en 0 (plusM (pure <$> s) (sometimes1 clk rst en)) plusM = liftA2 (liftA2 (+))
We get:>>> sampleN 9 (sometimes1 systemClockGen resetGen enableGen) [Nothing,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1] >>> sampleN 9 (count systemClockGen resetGen enableGen) [0,0,0,1,1,2,2,3,3]
-
clash-prelude Clash.Prelude Version of delay that only updates when its second argument is a Just value.
>>> let input = fromList [Just 1, Just 2, Nothing, Nothing, Just 5, Just 6, Just (7::Int)] >>> sampleN @System 7 (delayMaybe 0 input) [0,1,2,2,2,5,6]
-
clash-prelude Clash.Prelude Version of register that only updates its content when its second argument is a Just value. So given:
sometimes1 = s where s = register Nothing (switch <$> s) switch Nothing = Just 1 switch _ = Nothing countSometimes = s where s = regMaybe 0 (plusM (pure <$> s) sometimes1) plusM = liftA2 (liftA2 (+))
We get:>>> sampleN @System 9 sometimes1 [Nothing,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1] >>> sampleN @System 9 countSometimes [0,0,0,1,1,2,2,3,3]
-
clash-prelude Clash.Signal Version of delay that only updates when its second argument is a Just value.
>>> let input = fromList [Just 1, Just 2, Nothing, Nothing, Just 5, Just 6, Just (7::Int)] >>> sampleN @System 7 (delayMaybe 0 input) [0,1,2,2,2,5,6]
-
clash-prelude Clash.Signal Version of register that only updates its content when its second argument is a Just value. So given:
sometimes1 = s where s = register Nothing (switch <$> s) switch Nothing = Just 1 switch _ = Nothing countSometimes = s where s = regMaybe 0 (plusM (pure <$> s) sometimes1) plusM = liftA2 (liftA2 (+))
We get:>>> sampleN @System 9 sometimes1 [Nothing,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1,Nothing,Just 1] >>> sampleN @System 9 countSometimes [0,0,0,1,1,2,2,3,3]
-
clash-prelude Clash.XException.MaybeX Deconstruct MaybeX into an a - the opposite of toMaybeX. Be careful when using this function, because it might return an XException if the argument was IsX.
hasXToMaybeX :: (NFDataX a, NFData a) => a -> MaybeX aclash-prelude Clash.XException.MaybeX Construct a MaybeX value. If hasX evaluates to Left, this function will return IsX. Otherwise, it will return IsDefined.
-
clash-prelude Clash.XException.MaybeX Construct a MaybeX value. If a evaluates to XException, this function will return IsX. Otherwise, it will return IsDefined.
-
classy-prelude-conduit ClassyPrelude.Conduit Like fuseBoth, but does not force consumption of the Producer. In the case that the Producer terminates, the result value is provided as a Just value. If it does not terminate, then a Nothing value is returned. One thing to note here is that "termination" here only occurs if the Producer actually yields a Nothing value. For example, with the Producer mapM_ yield [1..5], if five values are requested, the Producer has not yet terminated. Termination only occurs when the sixth value is awaited for and the Producer signals termination. Since 1.2.4