git.iko.soy/rowtype-yoga/yoga-r3f
on main help sign in
1 line 10 kB history raw
1{"comments":"This module defines an effect, actions and handlers for working\nwith JavaScript exceptions.\n","declarations":[{"children":[{"comments":null,"info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"contents":[{"annotation":[],"contents":[["Data","Show"],"Show"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"sourceSpan":{"end":[30,23],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[29,1]},"title":"showError"}],"comments":"The type of JavaScript errors\n","info":{"dataDeclType":"data","declType":"data","roles":[],"typeArguments":[]},"kind":null,"sourceSpan":{"end":[27,34],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[27,1]},"title":"Error"},{"children":[],"comments":"Catch an exception by providing an exception handler.\n\nFor example:\n\n```purescript\nmain = catchException Console.logShow do\n Console.log \"Exceptions thrown in this block will be logged to the console\"\n```\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"},"tag":"ParensInType"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"}],"tag":"TypeApp"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[86,14],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[82,1]},"title":"catchException"},{"children":[],"comments":"Create a JavaScript error, specifying a message\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[35,40],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[35,1]},"title":"error"},{"children":[],"comments":"Create a JavaScript error, specifying a message and a cause\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[38,58],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[38,1]},"title":"errorWithCause"},{"children":[],"comments":"Create a JavaScript error, specifying a message and a name\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[41,58],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[41,1]},"title":"errorWithName"},{"children":[],"comments":"Get the error message from a JavaScript error\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[44,42],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[44,1]},"title":"message"},{"children":[],"comments":"Get the error name when defined, or fallback to 'Error'\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[47,39],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[47,1]},"title":"name"},{"children":[],"comments":"Get the stack trace from a JavaScript error\n","info":{"declType":"value","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Data","Maybe"],"Maybe"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"}],"tag":"TypeApp"}},"kind":null,"sourceSpan":{"end":[50,31],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[50,1]},"title":"stack"},{"children":[],"comments":"A shortcut allowing you to throw an error in one step. Defined as\n`throwException <<< error`.\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"String"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[90,38],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[90,1]},"title":"throw"},{"children":[],"comments":"Throw an exception\n\nFor example:\n\n```purescript\nmain = do\n x <- readNumber\n when (x < 0) $ throwException $\n error \"Expected a non-negative number\"\n```\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[72,14],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[69,1]},"title":"throwException"},{"children":[],"comments":"Runs an Eff and returns eventual Exceptions as a `Left` value. If the\ncomputation succeeds the result gets wrapped in a `Right`.\n\nFor example:\n\n```purescript\nmain :: Effect Unit\nmain = do\n result <- try (readTextFile UTF8 \"README.md\")\n case result of\n Right lines ->\n Console.log (\"README: \\n\" <> lines )\n Left error ->\n Console.error (\"Couldn't open README.md. Error was: \" <> show error)\n```\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[["Effect"],"Effect"],"tag":"TypeConstructor"},{"annotation":[],"contents":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Data","Either"],"Either"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Effect","Exception"],"Error"],"tag":"TypeConstructor"}],"tag":"TypeApp"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},"tag":"ParensInType"}],"tag":"TypeApp"}],"tag":"TypeApp"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[109,53],"name":".spago/p/exceptions-6.1.0/src/Effect/Exception.purs","start":[109,1]},"title":"try"}],"name":"Effect.Exception","reExports":[]}