Safe Haskell | Unsafe |
---|---|
Language | Haskell2010 |
- newtype STE e s a = STE (STERep s a)
- unSTE :: STE e s a -> STERep s a
- type STERep s a = State# s -> (#State# s, a#)
- data STEret s a = STEret (State# s) a
- runSTE :: (forall s. STE e s a) -> (Either e a -> b) -> b
- throwSTE :: forall e s a. e -> STE e s a
- handleSTE :: (Either e a -> b) -> (forall s. STE e s a) -> b
- unsafeInterleaveSTE :: STE e s a -> STE e s a
- liftSTE :: STE e s a -> State# s -> STEret s a
- fixSTE :: (a -> STE e s a) -> STE e s a
- runBasicSTE :: (forall s. STE e s a) -> a
- data RealWorld :: *
- unsafeIOToSTE :: IO a -> STE e s a
- unsafeSTEToIO :: STE e s a -> IO a
Documentation
unsafeInterleaveSTE :: STE e s a -> STE e s a Source #
fixSTE :: (a -> STE e s a) -> STE e s a Source #
Allow the result of a state transformer computation to be used (lazily)
inside the computation.
Note that if f
is strict,
.fixSTE
f = _|_
runBasicSTE :: (forall s. STE e s a) -> a Source #
RealWorld
is deeply magical. It is primitive, but it is not
unlifted (hence ptrArg
). We never manipulate values of type
RealWorld
; it's only used in the type system, to parameterise State#
.
unsafeIOToSTE :: IO a -> STE e s a Source #
unsafeSTEToIO :: STE e s a -> IO a Source #