Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A grab bag of fun stuff.
Synopsis
- type Whole t f = f ~ Base t
- type RecursiveWhole t f = (Recursive t, Whole t f)
- foldWholeM :: (RecursiveWhole t f, Traversable f, Monad m) => (f a -> m a) -> t -> m a
- data Changed
- stateFail :: (s -> Maybe (b, s)) -> State s (Maybe b)
- stateOption :: (s -> (b, Maybe s)) -> State s b
- stateFailChanged :: (s -> Maybe s) -> State s Changed
- stateFold :: Foldable t => b -> t a -> (b -> a -> State s b) -> State s b
Documentation
type RecursiveWhole t f = (Recursive t, Whole t f) Source #
Constraint for recursive structures
foldWholeM :: (RecursiveWhole t f, Traversable f, Monad m) => (f a -> m a) -> t -> m a Source #
Traverses a recursive structure
A nicely-named Bool
for tracking state changes
stateFail :: (s -> Maybe (b, s)) -> State s (Maybe b) Source #
Embeds a function that may fail in a stateful context
stateOption :: (s -> (b, Maybe s)) -> State s b Source #
Embeds a function that may fail in a stateful context