[
    {
        "name": "Testable.TestContext",
        "comment": " A `TestContext` allows you to manage the lifecycle of an Elm component that\nuses `Testable.Effects`.  Using `TestContext`, you can write tests that exercise\nthe entire lifecycle of your component.\n\n@docs Component, TestContext, startForTest, update\n\n# Inspecting\n@docs currentModel, assertCurrentModel, assertHttpRequest\n\n# Simulating Effects\n@docs resolveHttpRequest, advanceTime\n",
        "unions": [],
        "aliases": [
            {
                "name": "Component",
                "comment": " A component that can be used to create a `TestContext`\n",
                "args": [
                    "action",
                    "model"
                ],
                "type": "{ init : ( model, Effects action ), update : action -> model -> ( model, Effects action ) }"
            },
            {
                "name": "TestContext",
                "comment": " The representation of the current state of a testable component, including\na representaiton of any pending Effects.\n",
                "args": [
                    "action",
                    "model"
                ],
                "type": "{ state : model, component : Component action model, effects : EffectsLog action, errors : List String }"
            }
        ],
        "values": [
            {
                "name": "advanceTime",
                "comment": " Simulate the passing of time\n",
                "type": "Time -> TestContext action model -> TestContext action model"
            },
            {
                "name": "assertCurrentModel",
                "comment": " A convenient way to assert about the current state of the component under test\n",
                "type": "model -> TestContext action model -> Assertion"
            },
            {
                "name": "assertHttpRequest",
                "comment": " Assert that a given Http.Request has been made by the componet under test\n",
                "type": "Request -> TestContext action model -> Assertion"
            },
            {
                "name": "currentModel",
                "comment": " Get the current state of the component under test\n",
                "type": "TestContext action model -> Result (List String) model"
            },
            {
                "name": "resolveHttpRequest",
                "comment": " Simulate an HTTP response\n",
                "type": "Request -> Result RawError Response -> TestContext action model -> TestContext action model"
            },
            {
                "name": "startForTest",
                "comment": " Create a `TestContext` for the given Component\n",
                "type": "Component action model -> TestContext action model"
            },
            {
                "name": "update",
                "comment": " Apply an action to the component in a given TestContext\n",
                "type": "action -> TestContext action model -> TestContext action model"
            }
        ],
        "binops": []
    },
    {
        "name": "Testable",
        "comment": "\n\nThis module converts Testable things into real things.\n\n# Basics\n@docs effects, task\n\n# StartApp helpers\n@docs init, update\n\n",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "effects",
                "comment": " Converts a `Testable.Effects` into an `Effects`\n\n    Testable.Effects.none |> Testable.effects\n        == Effects.none\n",
                "type": "Effects action -> Effects action"
            },
            {
                "name": "init",
                "comment": " Converts a testable StartApp-style init value into a standard StartApp init value\n",
                "type": "( model, Effects action ) -> ( model, Effects action )"
            },
            {
                "name": "task",
                "comment": " Converts a `Testable.Task` into an `Task`\n\n    Testable.Task.succeed \"A\" |> Testable.task\n        == Task.succeed \"A\"\n",
                "type": "Task error success -> Task error success"
            },
            {
                "name": "update",
                "comment": " Converts a testable StartApp-style update function into a standard StartApp update function\n",
                "type": "(action -> model -> ( model, Effects action )) -> action -> model -> ( model, Effects action )"
            }
        ],
        "binops": []
    },
    {
        "name": "Testable.Http",
        "comment": "\n`Testable.Http` is a replacement for the standard `Http` module.  You can use it\nto create components that can be tested with `Testable.TestContext`.\n\n# Helpers\n@docs getRequest, ok, serverError\n\n# Encoding and Decoding\n@docs url\n\n# Fetch Strings and JSON\n@docs getString, get, post, Error\n\n# Body Values\n@docs empty, string\n\n# Arbitrary Requests\n@docs Request\n\n# Responses\n@docs Response, RawError\n",
        "unions": [],
        "aliases": [
            {
                "name": "Error",
                "comment": " The kinds of errors you typically want in practice. When you get a\nresponse but its status is not in the 200 range, it will trigger a\n`BadResponse`. When you try to decode JSON but something goes wrong,\nyou will get an `UnexpectedPayload`.\n",
                "args": [],
                "type": "Error"
            },
            {
                "name": "RawError",
                "comment": " The things that count as errors at the lowest level. Technically, getting\na response back with status 404 is a &ldquo;successful&rdquo; response in that\nyou actually got all the information you asked for.\n\nThe `fromJson` function and `Error` type provide higher-level errors, but the\npoint of `RawError` is to allow you to define higher-level errors however you\nwant.\n",
                "args": [],
                "type": "RawError"
            },
            {
                "name": "Request",
                "comment": " Fully specify the request you want to send. For example, if you want to\nsend a request between domains (CORS request) you will need to specify some\nheaders manually.\n\n    corsPost : Request\n    corsPost =\n        { verb = \"POST\"\n        , headers =\n            [ (\"Origin\", \"http://elm-lang.org\")\n            , (\"Access-Control-Request-Method\", \"POST\")\n            , (\"Access-Control-Request-Headers\", \"X-Custom-Header\")\n            ]\n        , url = \"http://example.com/hats\"\n        , body = empty\n        }\n",
                "args": [],
                "type": "Request"
            },
            {
                "name": "Response",
                "comment": " All the details of the response. There are many weird facts about\nresponses which include:\n\n  * The `status` may be 0 in the case that you load something from `file://`\n  * You cannot handle redirects yourself, they will all be followed\n    automatically. If you want to know if you have gone through one or more\n    redirect, the `url` field will let you know who sent you the response, so\n    you will know if it does not match the URL you requested.\n  * You are allowed to have duplicate headers, and their values will be\n    combined into a single comma-separated string.\n\nWe have left these underlying facts about `XMLHttpRequest` as is because one\ngoal of this library is to give a low-level enough API that others can build\nwhatever helpful behavior they want on top of it.\n",
                "args": [],
                "type": "Response"
            }
        ],
        "values": [
            {
                "name": "empty",
                "comment": " An empty request body, no value will be sent along.\n",
                "type": "Body"
            },
            {
                "name": "get",
                "comment": " Send a GET request to the given URL. You also specify how to decode the\nresponse.\n\n    import Json.Decode (list, string)\n\n    hats : Task Error (List String)\n    hats =\n        get (list string) \"http://example.com/hat-categories.json\"\n",
                "type": "Decoder value -> String -> Task Error value"
            },
            {
                "name": "getRequest",
                "comment": " A convenient way to make a `Request` corresponding to the request made by `get`\n",
                "type": "String -> Request"
            },
            {
                "name": "getString",
                "comment": " Send a GET request to the given URL. You will get the entire response as a\nstring.\n\n    hats : Task Error String\n    hats =\n        getString \"http://example.com/hat-categories.markdown\"\n",
                "type": "String -> Task Error String"
            },
            {
                "name": "ok",
                "comment": " A convenient way to create a 200 OK repsonse\n",
                "type": "String -> Result RawError Response"
            },
            {
                "name": "post",
                "comment": " Send a POST request to the given URL, carrying the given body. You also\nspecify how to decode the response with [a JSON decoder][json].\n\n[json]: http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode#Decoder\n\n    import Json.Decode (list, string)\n\n    hats : Task Error (List String)\n    hats =\n        post (list string) \"http://example.com/hat-categories.json\" empty\n",
                "type": "Decoder value -> String -> Body -> Task Error value"
            },
            {
                "name": "serverError",
                "comment": " A convenient way to create a response representing a 500 error\n",
                "type": "Result RawError Response"
            },
            {
                "name": "string",
                "comment": " Provide a string as the body of the request. Useful if you need to send\nJSON data to a server that does not belong in the URL.\n\n    import Json.Decode as JS\n\n    coolestHats : Task Error (List String)\n    coolestHats =\n        post\n          (JS.list JS.string)\n          \"http://example.com/hats\"\n          (string \"\"\"{ \"sortBy\": \"coolness\", \"take\": 10 }\"\"\")\n",
                "type": "String -> Body"
            },
            {
                "name": "url",
                "comment": " Create a properly encoded URL with a [query string][qs]. The first argument is\nthe portion of the URL before the query string, which is assumed to be\nproperly encoded already. The second argument is a list of all the\nkey/value pairs needed for the query string. Both the keys and values\nwill be appropriately encoded, so they can contain spaces, ampersands, etc.\n\n[qs]: http://en.wikipedia.org/wiki/Query_string\n\n    url \"http://example.com/users\" [ (\"name\", \"john doe\"), (\"age\", \"30\") ]\n    -- http://example.com/users?name=john+doe&age=30\n",
                "type": "String -> List ( String, String ) -> String"
            }
        ],
        "binops": []
    },
    {
        "name": "Testable.Effects",
        "comment": "\n`Testable.Effects` is a replacement for the core `Effects` module.  You can use it\nto create components that can be tested with `Testable.TestContext`.  You can\nconvert `Testable.Effects` into a core `Effects` with the `Testable` module.\n\n# Basic Effects\n@docs Effects, none, task\n\n# Combining Effects\n@docs map, batch\n\n# Running Effects\n@docs Never\n",
        "unions": [],
        "aliases": [
            {
                "name": "Effects",
                "comment": " Represents some kind of effect. Right now this library supports tasks for\narbitrary effects and clock ticks for animations.\n",
                "args": [
                    "action"
                ],
                "type": "Effects action"
            },
            {
                "name": "Never",
                "comment": " A type that is \"uninhabited\". There are no values of type `Never`, so if\nsomething has this type, it is a guarantee that it can never happen. It is\nuseful for demanding that a `Task` can never fail.\n",
                "args": [],
                "type": "Never"
            }
        ],
        "values": [
            {
                "name": "batch",
                "comment": " Create a batch of effects. The following example requests two tasks: one\nfor the user’s picture and one for their age. You could put a bunch more stuff\nin that batch if you wanted!\n\n    init : String -> (Model, Effects Action)\n    init userID =\n        ( { id = userID\n          , picture = Nothing\n          , age = Nothing\n          }\n        , batch [ getPicture userID, getAge userID ]\n        )\n\n    -- getPicture : String -> Effects Action\n    -- getAge : String -> Effects Action\n\nExample 6 in [elm-architecture-tutorial](https://github.com/evancz/elm-architecture-tutorial/)\nhas a nice example of this with further explanation in the tutorial itself.\n",
                "type": "List (Effects action) -> Effects action"
            },
            {
                "name": "map",
                "comment": " Transform the return type of a bunch of `Effects`. This is primarily useful\nfor adding tags to route `Actions` to the right place in The Elm Architecture.\n\nExample 6 in [elm-architecture-tutorial](https://github.com/evancz/elm-architecture-tutorial/)\nhas a nice example of this with further explanation in the tutorial itself.\n",
                "type": "(a -> b) -> Effects a -> Effects b"
            },
            {
                "name": "none",
                "comment": " The simplest effect of them all: don’t do anything! This is useful when\nsome branches of your update function request effects and others do not.\n\nExample 5 in [elm-architecture-tutorial](https://github.com/evancz/elm-architecture-tutorial/)\nhas a nice example of this with further explanation in the tutorial itself.\n",
                "type": "Effects never"
            },
            {
                "name": "task",
                "comment": " Turn a `Task` into an `Effects` that results in an `a` value.\n\nNormally a `Task` has a error type and a success type. In this case the error\ntype is `Never` meaning that you must provide a task that never fails. Lots of\ntasks can fail (like HTTP requests), so you will want to use `Task.toMaybe`\nand `Task.toResult` to move potential errors into the success type so they can\nbe handled explicitly.\n\nExample 5 in [elm-architecture-tutorial](https://github.com/evancz/elm-architecture-tutorial/)\nhas a nice example of this with further explanation in the tutorial itself.\n",
                "type": "Task Never a -> Effects a"
            }
        ],
        "binops": []
    },
    {
        "name": "Testable.Task",
        "comment": "\n`Testable.Task` is a replacement for the core `Task` module.  You can use it\nto create components that can be tested with `Testable.TestContext`.  You can\nconvert `Testable.Task` into a core `Task` with the `Testable` module.\n\n# Basics\n@docs Task, succeed, fail\n\n# Mapping\n@docs map\n\n# Chaining\n@docs andThen\n\n# Errors\n@docs toMaybe, toResult\n\n# Threads\n@docs sleep\n",
        "unions": [],
        "aliases": [
            {
                "name": "Task",
                "comment": " Represents asynchronous effects that may fail. It is useful for stuff like\nHTTP.\nFor example, maybe we have a task with the type (`Task String User`). This means\nthat when we perform the task, it will either fail with a `String` message or\nsucceed with a `User`. So this could represent a task that is asking a server\nfor a certain user.\n",
                "args": [
                    "error",
                    "success"
                ],
                "type": "Task error success"
            }
        ],
        "values": [
            {
                "name": "andThen",
                "comment": " Chain together a task and a callback. The first task will run, and if it is\nsuccessful, you give the result to the callback resulting in another task. This\ntask then gets run.\n\n    succeed 2 |> andThen (\\n -> succeed (n + 2)) == succeed 4\n\nThis is useful for chaining tasks together. Maybe you need to get a user from\nyour servers *and then* lookup their picture once you know their name.\n",
                "type": "(a -> Task x b) -> Task x a -> Task x b"
            },
            {
                "name": "fail",
                "comment": " A task that fails immediately when run.\n\n    fail \"file not found\" : Task String a\n",
                "type": "x -> Task x a"
            },
            {
                "name": "map",
                "comment": " Transform a task.\n\n    map sqrt (succeed 9) == succeed 3\n",
                "type": "(a -> b) -> Task x a -> Task x b"
            },
            {
                "name": "sleep",
                "comment": " Make a thread sleep for a certain amount of time. The following example\nsleeps for 1 second and then succeeds with 42.\n\n    sleep 1000 |> andThen \\_ -> succeed 42\n",
                "type": "Time -> Task never ()"
            },
            {
                "name": "succeed",
                "comment": " A task that succeeds immediately when run.\n\n    succeed 42    -- results in 42\n",
                "type": "a -> Task x a"
            },
            {
                "name": "toMaybe",
                "comment": " Helps with handling failure. Instead of having a task fail with some value\nof type `x` it promotes the failure to a `Nothing` and turns all successes into\n`Just` something.\n\n    toMaybe (fail \"file not found\") == succeed Nothing\n    toMaybe (succeed 42)            == succeed (Just 42)\n\nThis means you can handle the error with the `Maybe` module instead.\n",
                "type": "Task x a -> Task never (Maybe a)"
            },
            {
                "name": "toResult",
                "comment": " Helps with handling failure. Instead of having a task fail with some value\nof type `x` it promotes the failure to an `Err` and turns all successes into\n`Ok` something.\n\n    toResult (fail \"file not found\") == succeed (Err \"file not found\")\n    toResult (succeed 42)            == succeed (Ok 42)\n\nThis means you can handle the error with the `Result` module instead.\n",
                "type": "Task x a -> Task never (Result x a)"
            }
        ],
        "binops": []
    }
]