[
    {
        "name": "List.Selection",
        "comment": " This module exposes a list that has at most one selected item.\n\nThe invariants here:\n\n  - You can select _at most_ one item.\n  - You can't select an item that isn't part of the list.\n\n@docs Selection, fromList, toList, select, deselect, selected, map\n\n",
        "unions": [
            {
                "name": "Selection",
                "comment": " A list of items, one of which _might_ be selected.\n",
                "args": [
                    "a"
                ],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "deselect",
                "comment": " Deselect any selected item. This is a no-op if nothing is selected in the\nfirst place.\n",
                "type": "Selection a -> Selection a"
            },
            {
                "name": "fromList",
                "comment": " Create a `Selection a` with nothing selected.\n",
                "type": "List a -> Selection a"
            },
            {
                "name": "map",
                "comment": " Apply a function to all the items, including the currently selected item.\n\n    fromList [1, 2, 3]\n        |> map ((*) 2)\n        |> toList --> [2, 4, 6]\n\n",
                "type": "(a -> b) -> Selection a -> Selection b"
            },
            {
                "name": "select",
                "comment": " Mark an item as selected. This will select at most one item. Any previously\nselected item will be unselected.\n\n    fromList [\"Burrito\", \"Chicken Wrap\", \"Taco Salad\"]\n        |> select \"Burrito\"\n        |> selected --> Just \"Burrito\"\n\nAttempting to select an item that doesn't exist is a no-op.\n\n    fromList [\"Burrito\", \"Chicken Wrap\", \"Taco Salad\"]\n        |> select \"Doner Kebab\"\n        |> selected --> Nothing\n\n",
                "type": "a -> Selection a -> Selection a"
            },
            {
                "name": "selected",
                "comment": " Get the selected item, which might not exist.\n\n    fromList [\"Burrito\", \"Chicken Wrap\", \"Taco Salad\"]\n        |> select \"Burrito\"\n        |> selected --> Just \"Burrito\"\n\n",
                "type": "Selection a -> Maybe a"
            },
            {
                "name": "toList",
                "comment": " Convert a Selection list back to a regular list. This is useful for creating\nview functions, for example.\n",
                "type": "Selection a -> List a"
            }
        ],
        "binops": []
    }
]