Cindiary/elm-id/3.1.1

NOTE: the latest version is 7.1.0

ID

Module in which the base ID type is defined

Types

type alias ID a =
ID a

The basis for making a ID type, has one generic type argument which should be an internal type to the module the ID type is defined in.

module UserID exposing(ID)


import ID


type alias ID = ID.ID IDInternal


type IDInternal = IDInternal
type alias Counter id =
Counter id
type alias Dict id value =
Dict id value

Alias for ID.Dict.Dict

type alias Set id =
Set id

Alias for ID.Set.Set

type alias CounterDict id value =
CounterDict id value

Functions

toString : ID a -> String

Converts an ID into a string representing the number inside the ID

debugID : (String -> Never) -> Int -> ID a

Create an ID with an arbitrary value for debugging purposes. Requires 'Debug.todo' as a first argument

Json

encode : ID a -> Value

Encode ID to a JSON value

decoder : Decoder (ID a)

JSON Decoder for ID