packages feed

purescript-0.13.0: tests/purs/publish/basic-example/output/Control.Monad.Rec.Class/docs.json

{"reExports":[],"name":"Control.Monad.Rec.Class","comments":null,"declarations":[{"children":[{"comments":null,"title":"Loop","info":{"arguments":[{"annotation":[],"tag":"TypeVar","contents":"a"}],"declType":"dataConstructor"},"sourceSpan":null},{"comments":null,"title":"Done","info":{"arguments":[{"annotation":[],"tag":"TypeVar","contents":"b"}],"declType":"dataConstructor"},"sourceSpan":null},{"comments":null,"title":"functorStep","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Functor"],"Functor"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]}]}},"sourceSpan":{"start":[25,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[25,48]}},{"comments":null,"title":"bifunctorStep","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Bifunctor"],"Bifunctor"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]}]}},"sourceSpan":{"start":[27,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[29,34]}}],"comments":"The result of a computation: either `Loop` containing the updated\naccumulator, or `Done` containing the final result of the computation.\n","title":"Step","info":{"declType":"data","dataDeclType":"data","typeArguments":[["a",null],["b",null]]},"sourceSpan":{"start":[23,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[23,32]}},{"children":[{"comments":null,"title":"tailRecM","info":{"declType":"typeClassMember","type":{"annotation":[],"tag":"ForAll","contents":["b",{"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeVar","contents":"b"}]}}]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"TypeVar","contents":"b"}]}]}]},null]},null]}},"sourceSpan":{"start":[53,3],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[53,58]}},{"comments":null,"title":"monadRecIdentity","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"MonadRec"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Identity"],"Identity"]}]}},"sourceSpan":{"start":[94,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[96,39]}},{"comments":null,"title":"monadRecEffect","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"MonadRec"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Effect"],"Effect"]}]}},"sourceSpan":{"start":[98,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[111,44]}},{"comments":null,"title":"monadRecFunction","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"MonadRec"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"e"}]}]}},"sourceSpan":{"start":[113,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[114,45]}},{"comments":null,"title":"monadRecEither","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"MonadRec"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Either"],"Either"]},{"annotation":[],"tag":"TypeVar","contents":"e"}]}]}},"sourceSpan":{"start":[116,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[122,24]}},{"comments":null,"title":"monadRecMaybe","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"MonadRec"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]}]}},"sourceSpan":{"start":[124,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[130,24]}}],"comments":"This type class captures those monads which support tail recursion in\nconstant stack space.\n\nThe `tailRecM` function takes a step function, and applies that step\nfunction recursively until a pure value of type `b` is found.\n\nInstances are provided for standard monad transformers.\n\nFor example:\n\n```purescript\nloopWriter :: Number -> WriterT Sum (Eff (trace :: Trace)) Unit\nloopWriter n = tailRecM go n\n  where\n  go 0 = do\n    lift $ trace \"Done!\"\n    pure (Done unit)\n  go n = do\n    tell $ Sum n\n    pure (Loop (n - 1))\n```\n","title":"MonadRec","info":{"fundeps":[],"arguments":[["m",null]],"declType":"typeClass","superclasses":[{"constraintAnn":[],"constraintClass":[["Control","Monad"],"Monad"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"m"}],"constraintData":null}]},"sourceSpan":{"start":[52,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[53,58]}},{"children":[],"comments":"Create a pure tail-recursive function of one argument\n\nFor example:\n\n```purescript\npow :: Number -> Number -> Number\npow n p = tailRec go { accum: 1, power: p }\n  where\n  go :: _ -> Step _ Number\n  go { accum: acc, power: 0 } = Done acc\n  go { accum: acc, power: p } = Loop { accum: acc * n, power: p - 1 }\n```\n","title":"tailRec","info":{"declType":"value","type":{"annotation":[],"tag":"ForAll","contents":["b",{"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeVar","contents":"b"}]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeVar","contents":"b"}]}]},null]},null]}},"sourceSpan":{"start":[88,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[88,49]}},{"children":[],"comments":"Create a tail-recursive function of two arguments which uses constant stack space.\n","title":"tailRecM2","info":{"declType":"value","type":{"annotation":[],"tag":"ForAll","contents":["c",{"annotation":[],"tag":"ForAll","contents":["b",{"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"ForAll","contents":["m",{"annotation":[],"tag":"ConstrainedType","contents":[{"constraintAnn":[],"constraintClass":[["Control","Monad","Rec","Class"],"MonadRec"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"m"}],"constraintData":null},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"b"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Record"]},{"annotation":[],"tag":"RCons","contents":["a",{"annotation":[],"tag":"TypeVar","contents":"a"},{"annotation":[],"tag":"RCons","contents":["b",{"annotation":[],"tag":"TypeVar","contents":"b"},{"annotation":[],"tag":"REmpty"}]}]}]}]},{"annotation":[],"tag":"TypeVar","contents":"c"}]}}]}]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"b"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"TypeVar","contents":"c"}]}]}]}]}]},null]},null]},null]},null]}},"sourceSpan":{"start":[56,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[62,9]}},{"children":[],"comments":"Create a tail-recursive function of three arguments which uses constant stack space.\n","title":"tailRecM3","info":{"declType":"value","type":{"annotation":[],"tag":"ForAll","contents":["d",{"annotation":[],"tag":"ForAll","contents":["c",{"annotation":[],"tag":"ForAll","contents":["b",{"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"ForAll","contents":["m",{"annotation":[],"tag":"ConstrainedType","contents":[{"constraintAnn":[],"constraintClass":[["Control","Monad","Rec","Class"],"MonadRec"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"m"}],"constraintData":null},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"b"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"c"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Control","Monad","Rec","Class"],"Step"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Record"]},{"annotation":[],"tag":"RCons","contents":["a",{"annotation":[],"tag":"TypeVar","contents":"a"},{"annotation":[],"tag":"RCons","contents":["b",{"annotation":[],"tag":"TypeVar","contents":"b"},{"annotation":[],"tag":"RCons","contents":["c",{"annotation":[],"tag":"TypeVar","contents":"c"},{"annotation":[],"tag":"REmpty"}]}]}]}]}]},{"annotation":[],"tag":"TypeVar","contents":"d"}]}}]}]}]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"b"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeVar","contents":"c"}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"TypeVar","contents":"d"}]}]}]}]}]}]},null]},null]},null]},null]},null]}},"sourceSpan":{"start":[66,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[73,9]}},{"children":[],"comments":"`forever` runs an action indefinitely, using the `MonadRec` instance to\nensure constant stack usage.\n\nFor example:\n\n```purescript\nmain = forever $ trace \"Hello, World!\"\n```\n","title":"forever","info":{"declType":"value","type":{"annotation":[],"tag":"ForAll","contents":["b",{"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"ForAll","contents":["m",{"annotation":[],"tag":"ConstrainedType","contents":[{"constraintAnn":[],"constraintClass":[["Control","Monad","Rec","Class"],"MonadRec"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"m"}],"constraintData":null},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"TypeVar","contents":"a"}]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeVar","contents":"m"},{"annotation":[],"tag":"TypeVar","contents":"b"}]}]}]},null]},null]},null]}},"sourceSpan":{"start":[140,1],"name":"../../../support/bower_components/purescript-tailrec/src/Control/Monad/Rec/Class.purs","end":[140,50]}}]}