[
    {
        "name": "Uuid",
        "comment": " This modules provides an opaque type for Uuids, helpers to serialize\nfrom and to String and helpers to generate new Uuids using Max Goldsteins\nRandom.PCG pseudo-random generator library.\n\nUuids are Universally Unique IDentifiers. They are 128 bit ids that are\ndesigned to be extremely unlikely to collide with other Uuids.\n\nThis library only supports generating Version 4 Uuid (those generated using \nrandom numbers, as opposed to hashing. See \n[Wikipedia on Uuids](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29) \nfor more details). Version 4 Uuids are constructed using 122 pseudo random bits.\n\nDisclaimer: If you use this Library to generate Uuids, please be advised\nthat it does not use a cryptographically secure pseudo random number generator.\nWhile Random.PCG is a definite improvement over Elms native RNG, depending\non your use case the randomness provided may not be enough.  \n\nThis library is split into two Modules. Uuid (this module) wraps Uuids in\nan opaque type for improved type safety. If you prefer to simply get strings\nyou can use the Uuid.Barebones module which provides methods to generate\nand verify Uuid as plain Strings.\n\nUuids can be generated either by parsing them from the canonical string representation\n(see fromString) or by generating them. If you are unfamiliar with random number generation\nin pure functional languages, this can be a bit confusing. The gist of it is that:\n\n1. you need a good random seed and this has to come from outside our wonderfully\npredictable Elm code (meaning you have to create an incoming port and feed in\nsome initial randomness)\n\n2. every call to generate a new Uuid will give you a tuple of a Uuid and a new \nseed. It is very important that whenever you generate a new Uuid you store this\nseed you get back into your model and use this one for the next Uuid generation. \nIf you reuse a seed, you will create the same Uuid twice! \n\nHere is a complete example that shows how to initialize the random number seed\nand how to carry the returned seed forward to the next Uuid generation.\n\n    import Uuid\n    import Random.PCG exposing (generate, Seed, initialSeed2)\n    import StartApp.Simple exposing (start)\n    import Html exposing (Html, div, button, text)\n    import Html.Events exposing (onClick)\n\n    -- 1.: Plumbing code to get a good initial random seed from Javascript \n    --     via a port (As described in the docs of mgold/elm-random-pcg) \n    port randomSeed : (Int, Int)\n\n    seed0 : Seed\n    seed0 = (uncurry initialSeed2) randomSeed\n\n    -- attention, this has to go in your Javascript code\n    -- Begin JS code\n    Elm.fullscreen(Elm.ModuleName,\n      {randomSeed: [Math.floor(Math.random()*0xFFFFFFFF), \n                    Math.floor(Math.random()*0xFFFFFFFF)] })\n    -- End JS code\n      \n    -- 2.: In your elm code, store the seed and update it every time you \n    --     create a new Uuid\n    type alias Model = \n      { currentSeed : Seed\n      , currentUuid : Maybe Uuid.Uuid\n      }\n\n    type Action = NewUuid\n\n    update : Action -> Model -> Model\n    update action model =\n      case action of \n        NewUuid ->\n          let\n            (newUuid, newSeed) = generate Uuid.uuidGenerator model.currentSeed\n          in\n          { model\n          | currentUuid = Just newUuid\n          , currentSeed = newSeed \n          }\n\n    view : Signal.Address Action -> Model -> Html      \n    view address model =\n      let\n        uuidText = case model.currentUuid of\n                    Nothing -> \n                      \"No Uuid was created so far\"\n                    Just uuid ->\n                        \"Current Uuid: \" ++ Uuid.toString uuid\n      in\n        div []\n          [ button [ onClick address NewUuid ] [ text \"Create a new Uuid!\" ]\n          , text uuidText          \n          ]\n        \n    main =\n      start\n        { model = { currentSeed = seed0, currentUuid = Nothing }\n        , update = update\n        , view = view\n        }\n\n@docs Uuid, uuidGenerator, fromString, toString\n",
        "unions": [
            {
                "name": "Uuid",
                "comment": " Uuid type. Represents a 128 bit Uuid (Version 4) \n",
                "args": [],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "fromString",
                "comment": " Create a Uuid from a String in the canonical form (e.g. \n\"63B9AAA2-6AAF-473E-B37E-22EB66E66B76\"). Note that this module only supports \ncanonical Uuids, Versions 1-5 and will refuse to parse other Uuid variants.\n",
                "type": "String -> Maybe Uuid"
            },
            {
                "name": "toString",
                "comment": " Create a string representation from a Uuid in the canonical 8-4-4-4-12 form, i.e. \n\"63B9AAA2-6AAF-473E-B37E-22EB66E66B76\"\n",
                "type": "Uuid -> String"
            },
            {
                "name": "uuidGenerator",
                "comment": " Random.PCG Generator for Uuids. Using this Generator instead of the generate\nfunction let's you use the full power of the Random.PCG to create lists of Uuids, \nmap them to other types etc. \n",
                "type": "Generator Uuid"
            }
        ],
        "binops": []
    },
    {
        "name": "Uuid.Barebones",
        "comment": " This is the Uuid.Barebones version that generates valid Uuids \nas Strings and provides a method to verify if a given String is a\nvalid Uuid.\n\nSee the main Uuid module docs for more information on how \n\n@docs uuidStringGenerator, isValidUuid\n",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "isValidUuid",
                "comment": " Verification function to check if the given string is a valid Uuid in the canonical\nrepresentation xxxxxxxx-xxxx-Axxx-Yxxx-xxxxxxxxxxxx where A is the version number between\n[1-5] and Y is in the range [8-B]\n",
                "type": "String -> Bool"
            },
            {
                "name": "uuidStringGenerator",
                "comment": " Random.PCG Generator for Uuid Strings. Using this Generator instead of the generate\nfunction lets you use the full power of the Random.PCG library to create lists of Uuids,\nmap them to other types etc. \n",
                "type": "Generator String"
            }
        ],
        "binops": []
    }
]