[{"name":"Monad.List","comment":"\n\n\n# List Monad\n\nComputations which may return 0, 1, or more possible results.\n\nBinding strategy: The bound function is applied to all possible values in the input list and the resulting lists are concatenated to produce a list of all possible results.\n\nUseful for: Building computations from sequences of non-deterministic operations. Parsing ambiguous grammars is a common example.\n\n@docs return, bind, fail\n\n","unions":[],"aliases":[],"values":[{"name":"bind","comment":" bind function for List\n\nThe behavior is the same as the concatMap\n\n","type":"List.List a -> (a -> List.List b) -> List.List b"},{"name":"fail","comment":" fail function for List\n","type":"a -> List.List a"},{"name":"return","comment":" return function for List\n","type":"a -> List.List a"}],"binops":[]},{"name":"Monad.Maybe","comment":"\n\n\n# Maybe Monad\n\nComputations which may return Nothing\n\nBinding strategy: Nothing values bypass the bound function, other values are used as inputs to the bound function.\n\nUseful for: Building computations from sequences of functions that may return Nothing.\n\n@docs return, bind, fail\n\n","unions":[],"aliases":[],"values":[{"name":"bind","comment":" bind function for Maybe\n","type":"Maybe.Maybe a -> (a -> Maybe.Maybe b) -> Maybe.Maybe b"},{"name":"fail","comment":" fail function for Maybe\n","type":"a -> Maybe.Maybe a"},{"name":"return","comment":" return function for Maybe\n","type":"a -> Maybe.Maybe a"}],"binops":[]},{"name":"Monad.State","comment":"\n\n\n# State Monad\n\nComputations which maintain state.\n\nBinding strategy: Binding threads a state parameter through the sequence of bound functions so that the same state value is never used twice, giving the illusion of in-place update.\n\nUseful for: Building computations from sequences of operations that require a shared state.\n\n@docs State\n@docs return, bind, runState\n@docs get, put\n@docs evalState, execState\n\n","unions":[{"name":"State","comment":" State\n","args":["s","a"],"cases":[["State",["s -> ( a, s )"]]]}],"aliases":[],"values":[{"name":"bind","comment":" bind function for State\n","type":"Monad.State.State s a -> (a -> Monad.State.State s b) -> Monad.State.State s b"},{"name":"evalState","comment":" Get the new value\n","type":"Monad.State.State s a -> s -> a"},{"name":"execState","comment":" Get the new state\n","type":"Monad.State.State s a -> s -> s"},{"name":"get","comment":" Get current state\n","type":"Monad.State.State a a"},{"name":"put","comment":" Put a new state\n","type":"s -> Monad.State.State s ()"},{"name":"return","comment":" return function for State\n","type":"a -> Monad.State.State s a"},{"name":"runState","comment":" Run the state\n","type":"Monad.State.State s a -> s -> ( a, s )"}],"binops":[]},{"name":"Monad.Writer","comment":"\n\n\n# Writer Monad\n\nComputations which produce a stream of data in addition to the computed values.\n\nBinding strategy: A Writer monad value is a (computation value, log value) pair.\nBinding replaces the computation value with the result of applying the bound function to the previous value and appends any log data from the computation to the existing log data.\n\nUseful for: Logging, or other computations that produce output \"on the side\".\n\nThe definition of writer monad in Haskell is\n\n    newtype Writer w a = Writer { runWriter :: (a,w) }\n\nwhere `w` should be monoid (with mappend function).\n\nWe assume you only use List so we replace `w` with `List w`\n\n@docs Writer\n@docs return, runWriter, bind, tell\n\n","unions":[{"name":"Writer","comment":" Writer\n","args":["w","a"],"cases":[["Writer",["( a, List.List w )"]]]}],"aliases":[],"values":[{"name":"bind","comment":" bind function for Writer\n","type":"Monad.Writer.Writer w a -> (a -> Monad.Writer.Writer w b) -> Monad.Writer.Writer w b"},{"name":"return","comment":" return function for Writer\n","type":"a -> Monad.Writer.Writer w a"},{"name":"runWriter","comment":" Run the writer\n","type":"Monad.Writer.Writer w a -> ( a, List.List w )"},{"name":"tell","comment":" tell function for Writer\n","type":"List.List w -> Monad.Writer.Writer w ()"}],"binops":[]}]