You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Bluefin.Compound Haddocks we have large walls of codetext. They would be more useful if various identifiers were linked, particularly the ones that occur in that module itself.
data Counter7 e = MkCounter7
{ incCounter7Impl :: forall e'. Exception () e' -> Eff (e' :& e) (),
counter7State :: State Int e,
counter7Stream :: Stream String e
}
instance Handle Counter7 where
mapHandle c =
MkCounter7
{ incCounter7Impl = \ex -> useImplUnder (incCounter7Impl c ex),
counter7State = mapHandle (counter7State c),
counter7Stream = mapHandle (counter7Stream c)
}
incCounter7 ::
(e :> es, e1 :> es) => Counter7 e -> Exception () e1 -> Eff es ()
incCounter7 e ex = makeOp (incCounter7Impl (mapHandle e) (mapHandle ex))
getCounter7 :: (e :> es) => Counter7 e -> String -> Eff es Int
getCounter7 (MkCounter7 _ st y) msg = do
yield y msg
get st
runCounter7 ::
(e1 :> es) =>
Stream String e1 ->
(forall e. Counter7 e -> Eff (e :& es) r) ->
Eff es Int
runCounter7 y k =
evalState 0 $ \st -> do
_ <-
useImplIn
k
( MkCounter7
{ incCounter7Impl = \ex -> do
count <- get st
when (even count) $
yield y "Count was even"
when (count >= 10) $
throw ex ()
put st (count + 1),
counter7State = mapHandle st,
counter7Stream = mapHandle y
}
)
get st
The text was updated successfully, but these errors were encountered:
In the
Bluefin.Compound
Haddocks we have large walls of codetext. They would be more useful if various identifiers were linked, particularly the ones that occur in that module itself.The text was updated successfully, but these errors were encountered: