[{"name":"MultiTool","comment":" **Fun fact**: The type annotations for the functions in this package are pretty horrifying.\n\n**Hot tip**: Ignore them! There's no need to put any of these functions, or the tools they produce, in your\napplication's `Msg` or `Model` type. So you don't need to know or care about what their type signatures are. Just read\nthe docs and look at the examples. It'll be fine.\\*\n\n\\* Unless you make any kind of minor typo in your code, in which case the Elm compiler may respond with a Lovecraftian\nerror message 😱.\n\n@docs define, Builder\n\n@docs add\n\n@docs end, ToolSpec\n\n","unions":[{"name":"Builder","comment":" A data structure produced by `define`, used to create MultiTools\n","args":["a"],"cases":[]},{"name":"ToolSpec","comment":" A tool specification - the basic building block for creating tools for the types in your application.\n","args":["toolSpec"],"cases":[]}],"aliases":[],"values":[{"name":"add","comment":"\n\n\n### `add`\n\nAdd a tool to your MultiTool.\n\nThis function takes three arguments. The first is a field accessor, which should match one of the fields of the record\nconstructor you passed to `MultiTool.define`. For example: `.codec`.\n\nThe second is a tool interface - a record whose fields contain all the functions we will need to make the tool work.\nHere's an example of an interface for the awesome `miniBill/elm-codec` package:\n\n    import Codec\n\n    codecInterface =\n        { string = Codec.string\n        , int = Codec.int\n        , bool = Codec.bool\n        , float = Codec.float\n        , char = Codec.char\n        , list = Codec.list\n        , maybe = Codec.maybe\n        , array = Codec.array\n        , dict =\n            \\k v ->\n                Codec.tuple k v\n                    |> Codec.list\n                    |> Codec.map Dict.fromList Dict.toList\n        , set = Codec.set\n        , tuple = Codec.tuple\n        , triple = Codec.triple\n        , result = Codec.result\n        , record = Codec.object\n        , field = Codec.field\n        , endRecord = Codec.buildObject\n        , customType = Codec.custom\n        , variant0 = Codec.variant0\n        , variant1 = Codec.variant1\n        , variant2 = Codec.variant2\n        , variant3 = Codec.variant3\n        , variant4 = Codec.variant4\n        , variant5 = Codec.variant5\n        , endCustomType = Codec.buildCustom\n        }\n\n(You'll notice that this interface type mostly looks straightforward, except for the `dict` field. The problem here\nis that we need a `Dict` implementation that can take any `comparable` as a key, but `elm-codec`'s built-in `dict`\nfunction only accepts `String`s as keys. Fortunately, we can build the function we need using `elm-codec`'s lower-level\nprimitives.)\n\nThe third and final argument is the `MultiTool.Builder` that you've already created using `define`. The API here is\ndesigned for piping with the `|>` operator, so you'll usually want to apply this final argument like this:\n\n    tools =\n        MultiTool.define Tools Tools\n            |> MultiTool.add .codec codecInterface\n\n","type":"(c27 -> b23) -> { array : a33 -> b14, bool : a50, char : a49, customType : b23 -> a47, dict : a23 -> b10 -> c25, endCustomType : a48 -> b22, endRecord : a13 -> b6, field : c24 -> d14 -> a21 -> b9 -> e5, float : a46, int : a45, list : a17 -> b8, maybe : a15 -> b7, record : c18 -> a11, result : a9 -> b4 -> c17, set : a7 -> b3, string : a44, triple : a4 -> b2 -> c14 -> d8, tuple : a2 -> b1 -> c13, variant0 : c11 -> d5 -> a43 -> b21, variant1 : c9 -> d4 -> a42 -> b20 -> e11, variant2 : c7 -> d3 -> a41 -> b19 -> e10 -> f11, variant3 : c5 -> d2 -> a40 -> b18 -> e9 -> f10 -> g7, variant4 : c3 -> d1 -> a39 -> b17 -> e8 -> f9 -> g6 -> h6, variant5 : c1 -> d -> a38 -> b16 -> e7 -> f8 -> g5 -> h5 -> i3 } -> MultiTool.Builder { after : r, afters : s, applyDelta : a36 -> b15 -> a35 -> c37, arrayMaker : a34 -> c36 -> d19, before : ( Maybe.Maybe a51, a32 ) -> c35, befores : ( ( Maybe.Maybe a51, a32 ) -> c35, a31 ) -> c34, bool : ( a50, a30 ) -> c33, char : ( a49, a29 ) -> c32, constructMultiTool : a28 -> a27 -> b13 -> c31, constructTweak : a26 -> a25 -> b12 -> c30, customEnder : (( a48, c29 ) -> ( b22, d16 )) -> c28, customMaker : (c27 -> ( a47, b11 )) -> c26, dictMaker : a24 -> d15 -> e6 -> f7, fieldMaker : a22 -> c24 -> d14 -> f6 -> g4 -> h4, float : ( a46, a20 ) -> c23, int : ( a45, a19 ) -> c22, listMaker : a18 -> c21 -> d13, maybeMaker : a16 -> c20 -> d12, recordEnder : a14 -> c19 -> d11, recordMaker : a12 -> c18 -> b5, resultMaker : a10 -> d10 -> e4 -> f5, setMaker : a8 -> c16 -> d9, string : ( a44, a6 ) -> c15, toolConstructor : t, tripleMaker : a5 -> e3 -> f4 -> g3 -> h3, tupleMaker : a3 -> d7 -> e2 -> f3, tweakConstructor : u, tweakerMaker : a1 -> ((() -> () -> ()) -> a -> toolSpec -> b) -> c12 -> d6 -> e1, variant0Maker : (c11 -> d5 -> ( a43, e ) -> ( b21, f1 )) -> c10, variant1Maker : (c9 -> d4 -> ( a42, f ) -> ( b20, g1 ) -> ( e11, h2 )) -> c8, variant2Maker : (c7 -> d3 -> ( a41, g ) -> ( b19, h1 ) -> ( e10, i2 ) -> ( f11, j3 )) -> c6, variant3Maker : (c5 -> d2 -> ( a40, h ) -> ( b18, i1 ) -> ( e9, j2 ) -> ( f10, k2 ) -> ( g7, l2 )) -> c4, variant4Maker : (c3 -> d1 -> ( a39, i ) -> ( b17, j1 ) -> ( e8, k1 ) -> ( f9, l1 ) -> ( g6, m1 ) -> ( h6, n1 )) -> c2, variant5Maker : (c1 -> d -> ( a38, j ) -> ( b16, k ) -> ( e7, l ) -> ( f8, m ) -> ( g5, n ) -> ( h5, o ) -> ( i3, p )) -> c } -> MultiTool.Builder { after : ( Maybe.Maybe a37, r ), afters : ( r, s ), applyDelta : a36 -> ( Maybe.Maybe (d20 -> d20), b15 ) -> ( d20, a35 ) -> ( d20, c37 ), arrayMaker : a34 -> ( a33, c36 ) -> ( b14, d19 ), before : a32 -> c35, befores : a31 -> c34, bool : a30 -> c33, char : a29 -> c32, constructMultiTool : a28 -> (d18 -> a27) -> ( d18, b13 ) -> c31, constructTweak : a26 -> (d17 -> a25) -> ( d17, b12 ) -> c30, customEnder : (c29 -> d16) -> c28, customMaker : (c27 -> b11) -> c26, dictMaker : a24 -> ( a23, d15 ) -> ( b10, e6 ) -> ( c25, f7 ), fieldMaker : a22 -> c24 -> d14 -> ( a21, f6 ) -> ( b9, g4 ) -> ( e5, h4 ), float : a20 -> c23, int : a19 -> c22, listMaker : a18 -> ( a17, c21 ) -> ( b8, d13 ), maybeMaker : a16 -> ( a15, c20 ) -> ( b7, d12 ), recordEnder : a14 -> ( a13, c19 ) -> ( b6, d11 ), recordMaker : a12 -> c18 -> ( a11, b5 ), resultMaker : a10 -> ( a9, d10 ) -> ( b4, e4 ) -> ( c17, f5 ), setMaker : a8 -> ( a7, c16 ) -> ( b3, d9 ), string : a6 -> c15, toolConstructor : t, tripleMaker : a5 -> ( a4, e3 ) -> ( b2, f4 ) -> ( c14, g3 ) -> ( d8, h3 ), tupleMaker : a3 -> ( a2, d7 ) -> ( b1, e2 ) -> ( c13, f3 ), tweakConstructor : u, tweakerMaker : a1 -> ((() -> () -> ()) -> a -> toolSpec -> b) -> ( ( Maybe.Maybe f2, g2 ) -> a, c12 ) -> ( g2, d6 ) -> ( f2 -> MultiTool.ToolSpec toolSpec -> MultiTool.ToolSpec b, e1 ), variant0Maker : (c11 -> d5 -> e -> f1) -> c10, variant1Maker : (c9 -> d4 -> f -> g1 -> h2) -> c8, variant2Maker : (c7 -> d3 -> g -> h1 -> i2 -> j3) -> c6, variant3Maker : (c5 -> d2 -> h -> i1 -> j2 -> k2 -> l2) -> c4, variant4Maker : (c3 -> d1 -> i -> j1 -> k1 -> l1 -> m1 -> n1) -> c2, variant5Maker : (c1 -> d -> j -> k -> l -> m -> n -> o -> p) -> c }"},{"name":"define","comment":"\n\n\n### `define`\n\nBegin creating a new MultiTool.\n\nThis function takes two identical arguments. Both arguments should be a function that constructs a record with a field\nfor each of the tools you intend to include in your MultiTool.\n\nFor example, if you want to combine a `ToString` tool and a `ToComparable` tool, you could do something like this:\n\n    import ToComparable\n    import ToString\n\n    type alias Tools toString toComparable =\n        { toString : toString\n        , toComparable : toComparable\n        }\n\n    tools =\n        MultiTool.define Tools Tools\n            |> MultiTool.add\n                .toString\n                ToString.interface\n            |> MultiTool.add\n                .toComparable\n                ToComparable.interface\n            |> MultiTool.end\n\n**Note**: The order of the type parameters in the `Tools` type alias is important. It needs to match the order in which\nyou add the tool interfaces with `MultiTool.add`.\n\nIn this example, we see that `toString` comes first and `toComparable` comes second in _both_ the `Tools` type alias and\nthe interfaces added to `tools`.\n\n","type":"b -> c -> MultiTool.Builder { after : (), afters : (), applyDelta : a29 -> a29, arrayMaker : a28 -> a28, before : a27 -> a27, befores : a26 -> a26, bool : a25 -> a25, char : a24 -> a24, constructMultiTool : a23 -> a23, constructTweak : a22 -> a22, customEnder : a21 -> a21, customMaker : a20 -> a20, dictMaker : a19 -> a19, fieldMaker : a18 -> a18, float : a17 -> a17, int : a16 -> a16, listMaker : a15 -> a15, maybeMaker : a14 -> a14, recordEnder : a13 -> a13, recordMaker : a12 -> a12, resultMaker : a11 -> a11, setMaker : a10 -> a10, string : a9 -> a9, toolConstructor : b, tripleMaker : a8 -> a8, tupleMaker : a7 -> a7, tweakConstructor : c, tweakerMaker : a6 -> a6, variant0Maker : a5 -> a5, variant1Maker : a4 -> a4, variant2Maker : a3 -> a3, variant3Maker : a2 -> a2, variant4Maker : a1 -> a1, variant5Maker : a -> a }"},{"name":"end","comment":"\n\n\n### `end`\n\nComplete the definition of a MultiTool.\n\n    tools =\n        MultiTool.define Tools Tools\n            |> MultiTool.add\n                .toString\n                ToString.interface\n            |> MultiTool.add\n                .toComparable\n                ToComparable.interface\n            |> MultiTool.end\n\nThis function converts a `MultiTool.Builder` into a record that contains all the functions you'll need to create tool\nspecifications (`ToolSpec`s) for the types in your application. If you define a MultiTool like `tools` in the example\nabove, it'll give you access to the following `ToolSpecs` and helper functions:\n\n\n## `ToolSpec`s for primitive types\n\nWe've got `tools.bool`, `tools.string`, `tools.int`, `tools.float`, and `tools.char`.\n\nFor example:\n\n    boolTool =\n        tools.build tools.bool\n\n    trueFact =\n        boolTool.toString True == \"True\"\n\n\n## `ToolSpec`s for common combinators\n\nWe've got `tools.maybe`, `tools.result`, `tools.list`, `tools.array`, `tools.dict`, `tools.set`, `tools.tuple`, _and_\n`tools.triple`.\n\nFor example:\n\n    listBoolSpec =\n        tools.list tools.bool\n\n    tupleIntStringSpec =\n        tools.tuple tools.int tools.string\n\n\n## `ToolSpec`s for combinators for custom types\n\nTo define `ToolSpec`s for your own custom types, use `tools.customType`, `tools.variant0`, `tools.variant1`, `tools.variant2`,\n`tools.variant3`, `tools.variant4`, `tools.variant5`, and `tools.endCustomType`.\n\nFor example, if we really hated Elm's `Maybe` type and wanted it to be called `Option` instead:\n\n    type Option value\n        = Some value\n        | None\n\n    optionSpec valueSpec =\n        let\n            match some none variant =\n                case variant of\n                    Some value ->\n                        some value\n\n                    None ->\n                        none\n        in\n        tools.customType\n            { toString = match, toComparable = match }\n            |> tools.variant1 \"Some\" Some valueSpec\n            |> tools.variant0 \"None\" None\n            |> tools.endCustomType\n\n**Note**: You _must_ define the `match` function either in a `let-in` block within your tool specification, or as a\ntop-level function in one of your modules. If you try and parameterise your tool specification to take a `match`\nfunction as one of its arguments, it won't work - you'll get a compiler error.\n\nThe explanation for this is a bit beyond me, but I think it goes: \"something something `forall`, something something\nlet-polymorphism.\"\n\n\n## `ToolSpec`s for combinators for records\n\nFor records (and indeed any kind of \"product\" type), check out `tools.record`, `tools.field`, and `tools.endRecord`.\n\nFor example:\n\n    type alias User =\n        { name : String, age : Int }\n\n    userToolSpec =\n        tools.record User\n            |> tools.field \"name\" .name tools.string\n            |> tools.field \"age\" .age tools.int\n            |> tools.endRecord\n\n\n## Converting a `ToolSpec` into a usable tool\n\n`tools.build` turns a `ToolSpec` into a usable tool.\n\nFor example:\n\n    userTool =\n        tools.build userToolSpec\n\n    user =\n        { name = \"Ed\", age = 41 }\n\n    trueFact =\n        userTool.toString user\n            == \"{ name = \\\"Ed\\\", age = 41 }\"\n\n\n## Customising a `ToolSpec`\n\n`tools.tweak` allows you to alter (or replace) the tools contained within a `ToolSpec`.\n\nFor example, if you're using `edkelly303/elm-any-type-forms`, you could customise the `tools.string` and `tools.int`\n`ToolSpec`s like this:\n\n    import Control\n\n    myIntSpec =\n        tools.int\n            |> tools.tweak.control\n                (Control.failIf\n                    (\\int -> int < 0)\n                    \"Must be greater than or equal to 0\"\n                )\n\n    myStringSpec =\n        tools.string\n            |> tools.tweak.control\n                (\\_ ->\n                    -- throw away whatever control we\n                    -- had in tools.string, and use\n                    -- this instead:\n                    Control.string\n                        |> Control.debounce 1000\n                )\n\n","type":"MultiTool.Builder { after : xx, afters : f8, applyDelta : d13, arrayMaker : (() -> ()) -> b7 -> a9, before : xx1, befores : () -> e10, bool : () -> toolSpec4, char : () -> toolSpec3, constructMultiTool : (a21 -> () -> a21) -> c13 -> d11 -> e9, constructTweak : (a20 -> () -> a20) -> c12 -> d12 -> e6, customEnder : (() -> ()) -> b5 -> a7, customMaker : (a19 -> ()) -> b6 -> c11, dictMaker : (() -> () -> ()) -> c10 -> d10 -> a8, fieldMaker : (a18 -> b14 -> () -> () -> ()) -> c9 -> d9 -> e8 -> f7 -> g5, float : () -> toolSpec2, int : () -> toolSpec1, listMaker : (() -> ()) -> b3 -> a5, maybeMaker : (() -> ()) -> b2 -> a4, recordEnder : (() -> ()) -> b4 -> a6, recordMaker : (a17 -> ()) -> b1 -> c8, resultMaker : (() -> () -> ()) -> c7 -> d8 -> a3, setMaker : (() -> ()) -> b -> a2, string : () -> toolSpec, toolConstructor : c13, tripleMaker : (() -> () -> () -> ()) -> d7 -> e7 -> f6 -> a1, tupleMaker : (() -> () -> ()) -> c6 -> d6 -> a, tweakConstructor : c12, tweakerMaker : (a16 -> () -> () -> ()) -> d13 -> e10 -> f8 -> d12, variant0Maker : (a15 -> b13 -> () -> ()) -> c5 -> d5 -> e5 -> f5, variant1Maker : (a14 -> b12 -> () -> () -> ()) -> c4 -> d4 -> e4 -> f4 -> g4, variant2Maker : (a13 -> b11 -> () -> () -> () -> ()) -> c3 -> d3 -> e3 -> f3 -> g3 -> h3, variant3Maker : (a12 -> b10 -> () -> () -> () -> () -> ()) -> c2 -> d2 -> e2 -> f2 -> g2 -> h2 -> i2, variant4Maker : (a11 -> b9 -> () -> () -> () -> () -> () -> ()) -> c1 -> d1 -> e1 -> f1 -> g1 -> h1 -> i1 -> j1, variant5Maker : (a10 -> b8 -> () -> () -> () -> () -> () -> () -> ()) -> c -> d -> e -> f -> g -> h -> i -> j -> k } -> { array : MultiTool.ToolSpec b7 -> MultiTool.ToolSpec a9, bool : MultiTool.ToolSpec toolSpec4, build : MultiTool.ToolSpec d11 -> e9, char : MultiTool.ToolSpec toolSpec3, customType : b6 -> c11, dict : MultiTool.ToolSpec c10 -> MultiTool.ToolSpec d10 -> MultiTool.ToolSpec a8, endCustomType : b5 -> MultiTool.ToolSpec a7, endRecord : b4 -> MultiTool.ToolSpec a6, field : c9 -> d9 -> MultiTool.ToolSpec e8 -> f7 -> g5, float : MultiTool.ToolSpec toolSpec2, int : MultiTool.ToolSpec toolSpec1, list : MultiTool.ToolSpec b3 -> MultiTool.ToolSpec a5, maybe : MultiTool.ToolSpec b2 -> MultiTool.ToolSpec a4, record : b1 -> c8, result : MultiTool.ToolSpec c7 -> MultiTool.ToolSpec d8 -> MultiTool.ToolSpec a3, set : MultiTool.ToolSpec b -> MultiTool.ToolSpec a2, string : MultiTool.ToolSpec toolSpec, triple : MultiTool.ToolSpec d7 -> MultiTool.ToolSpec e7 -> MultiTool.ToolSpec f6 -> MultiTool.ToolSpec a1, tuple : MultiTool.ToolSpec c6 -> MultiTool.ToolSpec d6 -> MultiTool.ToolSpec a, tweak : e6, variant0 : c5 -> d5 -> e5 -> f5, variant1 : c4 -> d4 -> MultiTool.ToolSpec e4 -> f4 -> g4, variant2 : c3 -> d3 -> MultiTool.ToolSpec e3 -> MultiTool.ToolSpec f3 -> g3 -> h3, variant3 : c2 -> d2 -> MultiTool.ToolSpec e2 -> MultiTool.ToolSpec f2 -> MultiTool.ToolSpec g2 -> h2 -> i2, variant4 : c1 -> d1 -> MultiTool.ToolSpec e1 -> MultiTool.ToolSpec f1 -> MultiTool.ToolSpec g1 -> MultiTool.ToolSpec h1 -> i1 -> j1, variant5 : c -> d -> MultiTool.ToolSpec e -> MultiTool.ToolSpec f -> MultiTool.ToolSpec g -> MultiTool.ToolSpec h -> MultiTool.ToolSpec i -> j -> k }"}],"binops":[]}]