Elm-0.10.0.2: data/docs.json
[
{
"name": "Automaton",
"document": "This library is a way to package up dynamic behavior. It makes it easier to\ndynamically create dynamic components. See the [original release\nnotes](http://elm-lang.org/blog/announce/0.5.0.elm) on this library to get a feel for how\nit can be used.\n\n# Create\n@docs pure, state, hiddenState\n\n# Evaluate\n@docs run, step\n\n# Combine\n@docs (\u003e\u003e\u003e), (\u003c\u003c\u003c), combine\n\n# Common Automatons\n@docs count, average",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "\u003c\u003c\u003c",
"comment": "Compose two automatons, chaining them together.",
"raw": "(\u003c\u003c\u003c) : Automaton b c -\u003e Automaton a b -\u003e Automaton a c",
"type": [
"-\u003e",
[
"Automaton",
"b",
"c"
],
[
"-\u003e",
[
"Automaton",
"a",
"b"
],
[
"Automaton",
"a",
"c"
]
]
],
"associativity": "left",
"precedence": 9
},
{
"name": "\u003e\u003e\u003e",
"comment": "Compose two automatons, chaining them together.",
"raw": "(\u003e\u003e\u003e) : Automaton a b -\u003e Automaton b c -\u003e Automaton a c",
"type": [
"-\u003e",
[
"Automaton",
"a",
"b"
],
[
"-\u003e",
[
"Automaton",
"b",
"c"
],
[
"Automaton",
"a",
"c"
]
]
],
"associativity": "left",
"precedence": 9
},
{
"name": "average",
"comment": "Computes the running average of the last `n` inputs.",
"raw": "average : Int -\u003e Automaton Float Float",
"type": [
"-\u003e",
[
"Int"
],
[
"Automaton",
[
"Float"
],
[
"Float"
]
]
]
},
{
"name": "combine",
"comment": "Combine a list of automatons into a single automaton that produces a\nlist.",
"raw": "combine : [Automaton a b] -\u003e Automaton a [b]",
"type": [
"-\u003e",
[
"_List",
[
"Automaton",
"a",
"b"
]
],
[
"Automaton",
"a",
[
"_List",
"b"
]
]
]
},
{
"name": "count",
"comment": "Count the number of steps taken.",
"raw": "count : Automaton a Int",
"type": [
"Automaton",
"a",
[
"Int"
]
]
},
{
"name": "hiddenState",
"comment": "Create an automaton with hidden state. Requires an initial state and a\nstep function to step the state forward and produce an output.",
"raw": "hiddenState : s -\u003e (a -\u003e s -\u003e (s,b)) -\u003e Automaton a b",
"type": [
"-\u003e",
"s",
[
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"s",
[
"_Tuple2",
"s",
"b"
]
]
],
[
"Automaton",
"a",
"b"
]
]
]
},
{
"name": "pure",
"comment": "Create an automaton with no memory. It just applies the given function to\nevery input.",
"raw": "pure : (a -\u003e b) -\u003e Automaton a b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"Automaton",
"a",
"b"
]
]
},
{
"name": "run",
"comment": "Run an automaton on a given signal. The automaton steps forward whenever the\ninput signal updates.",
"raw": "run : Automaton a b -\u003e b -\u003e Signal a -\u003e Signal b",
"type": [
"-\u003e",
[
"Automaton",
"a",
"b"
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"b"
]
]
]
]
},
{
"name": "state",
"comment": "Create an automaton with state. Requires an initial state and a step\nfunction to step the state forward. For example, an automaton that counted\nhow many steps it has taken would look like this:\n\n count = Automaton a Int\n count = state 0 (\\\\_ c -\u003e c+1)\n\nIt is a stateful automaton. The initial state is zero, and the step function\nincrements the state on every step.",
"raw": "state : b -\u003e (a -\u003e b -\u003e b) -\u003e Automaton a b",
"type": [
"-\u003e",
"b",
[
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"b"
]
],
[
"Automaton",
"a",
"b"
]
]
]
},
{
"name": "step",
"comment": "Step an automaton forward once with a given input.",
"raw": "step : a -\u003e Automaton a b -\u003e (Automaton a b, b)",
"type": [
"-\u003e",
"a",
[
"-\u003e",
[
"Automaton",
"a",
"b"
],
[
"_Tuple2",
[
"Automaton",
"a",
"b"
],
"b"
]
]
]
}
]
},
{
"name": "Basics",
"document": "Tons of useful functions that get imported by default.\n\nThe following libraries also get imported by default: List, Signal,\nText, Maybe, Time, Graphics.Element, Color, Graphics.Collage.\n\n# Equality\n@docs (==), (/=)\n\n# Comparison\n\nThese functions only work on `comparable` types. This includes numbers,\ncharacters, strings, lists of comparable things, and tuples of comparable\nthings. Note that tuples with 7 or more elements are not comparable; why\nare your tuples so big?\n\n@docs (\u003c), (\u003e), (\u003c=), (\u003e=), max, min, Order, compare\n\n# Booleans\n@docs not, (&&), (||), xor, otherwise\n\n# Mathematics\n@docs (+), (-), (*), (/), (^), div, rem, mod, abs, sqrt, clamp, logBase, e\n\n# Trigonometry\n@docs pi, cos, sin, tan, acos, asin, atan, atan2\n\n# Number Conversions\n@docs round, floor, ceiling, truncate, toFloat\n\n# Angle Conversions\nAll angle conversions result in “standard Elm angles”\nwhich happen to be radians.\n\n@docs degrees, radians, turns\n\n# Polar Coordinates\n@docs toPolar, fromPolar\n\n# Tuples\n@docs fst, snd\n\n# Higher-Order Helpers\n@docs id, (\u003c|), (|\u003e), (.), flip, curry, uncurry",
"aliases": [],
"datatypes": [
{
"name": "Order",
"comment": "Represents the relative ordering of two things.\nThe relations are less than, equal to, and greater than.",
"raw": "data Order = LT | EQ | GT",
"typeVariables": [],
"constructors": [
{
"name": "LT",
"type": [
"Order"
]
},
{
"name": "EQ",
"type": [
"Order"
]
},
{
"name": "GT",
"type": [
"Order"
]
}
]
}
],
"values": [
{
"name": "&&",
"comment": "The and operator. True if both inputs are True.",
"raw": "(&&) : Bool -\u003e Bool -\u003e Bool",
"type": [
"-\u003e",
[
"Bool"
],
[
"-\u003e",
[
"Bool"
],
[
"Bool"
]
]
],
"associativity": "right",
"precedence": 3
},
{
"name": "*",
"comment": "",
"raw": "(*) : number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
],
"associativity": "left",
"precedence": 7
},
{
"name": "+",
"comment": "",
"raw": "(+) : number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
],
"associativity": "left",
"precedence": 6
},
{
"name": "-",
"comment": "",
"raw": "(-) : number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
],
"associativity": "left",
"precedence": 6
},
{
"name": ".",
"comment": "Function composition: `(f . g == (\\\\x -\u003e f (g x)))`",
"raw": "(.) : (b -\u003e c) -\u003e (a -\u003e b) -\u003e (a -\u003e c)",
"type": [
"-\u003e",
[
"-\u003e",
"b",
"c"
],
[
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
"a",
"c"
]
]
],
"associativity": "right",
"precedence": 9
},
{
"name": "/",
"comment": "Floating point division.",
"raw": "(/) : Float -\u003e Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Float"
]
]
],
"associativity": "left",
"precedence": 7
},
{
"name": "/=",
"comment": "",
"raw": "(/=) : a -\u003e a -\u003e Bool",
"type": [
"-\u003e",
"a",
[
"-\u003e",
"a",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "\u003c",
"comment": "",
"raw": "(\u003c) : comparable -\u003e comparable -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "\u003c=",
"comment": "",
"raw": "(\u003c=) : comparable -\u003e comparable -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "\u003c|",
"comment": "Function application `f \u003c| x == f x`. This function is useful for avoiding\nparenthesis. Consider the following code to create a text element:\n\n text (monospace (toText \"code\"))\n\nThis can also be written as:\n\n text . monospace \u003c| toText \"code\"",
"raw": "(\u003c|) : (a -\u003e b) -\u003e a -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
"a",
"b"
]
],
"associativity": "right",
"precedence": 0
},
{
"name": "==",
"comment": "",
"raw": "(==) : a -\u003e a -\u003e Bool",
"type": [
"-\u003e",
"a",
[
"-\u003e",
"a",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "\u003e",
"comment": "",
"raw": "(\u003e) : comparable -\u003e comparable -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "\u003e=",
"comment": "",
"raw": "(\u003e=) : comparable -\u003e comparable -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
[
"Bool"
]
]
],
"associativity": "non",
"precedence": 4
},
{
"name": "^",
"comment": "Exponentiation: `3^2 == 9`",
"raw": "(^) : number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
],
"associativity": "left",
"precedence": 8
},
{
"name": "abs",
"comment": "Take the absolute value of a number.",
"raw": "abs : number -\u003e number",
"type": [
"-\u003e",
"number",
"number"
]
},
{
"name": "acos",
"comment": "",
"raw": "acos : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "asin",
"comment": "",
"raw": "asin : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "atan",
"comment": "You probably do not want to use this. It takes `(y/x)` as the\nargument, so there is no way to know whether the negative signs comes from\nthe `y` or `x`. Thus, the resulting angle is always between π/2 and -π/2\n(in quadrants I and IV). You probably want to use `atan2` instead.",
"raw": "atan : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "atan2",
"comment": "This helps you find the angle of a cartesian coordinate.\nYou will almost certainly want to use this instead of `atan`.\nSo `atan2 y x` computes *atan(y/x)* but also keeps track of which\nquadrant the angle should really be in. The result will be between\nπ and -π, giving you the full range of angles.",
"raw": "atan2 : Float -\u003e Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Float"
]
]
]
},
{
"name": "ceiling",
"comment": "Ceiling function, rounding up.",
"raw": "ceiling : Float -\u003e Int",
"type": [
"-\u003e",
[
"Float"
],
[
"Int"
]
]
},
{
"name": "clamp",
"comment": "Clamps a number within a given range. With the expression\n`clamp 100 200 x` the results are as follows:\n\n 100 if x \u003c 100\n x if 100 \u003c= x \u003c 200\n 200 if 200 \u003c= x",
"raw": "clamp : number -\u003e number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
]
]
},
{
"name": "compare",
"comment": "Compare any two comparable values. Comparable values include `String`, `Char`,\n`Int`, `Float`, `Time`, or a list or tuple containing comparable values.\nThese are also the only values that work as `Dict` keys or `Set` members.",
"raw": "compare : comparable -\u003e comparable -\u003e Order",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
[
"Order"
]
]
]
},
{
"name": "cos",
"comment": "",
"raw": "cos : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "curry",
"comment": "Change how arguments are passed to a function.\nThis splits paired arguments into two separate arguments.",
"raw": "curry : ((a,b) -\u003e c) -\u003e a -\u003e b -\u003e c",
"type": [
"-\u003e",
[
"-\u003e",
[
"_Tuple2",
"a",
"b"
],
"c"
],
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"c"
]
]
]
},
{
"name": "degrees",
"comment": "Convert degrees to standard Elm angles (radians).",
"raw": "degrees : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "div",
"comment": "Integer division, remainder is discarded.",
"raw": "div : Int -\u003e Int -\u003e Int",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"Int"
]
]
],
"associativity": "left",
"precedence": 7
},
{
"name": "e",
"comment": "An approximation of e.",
"raw": "e : Float",
"type": [
"Float"
]
},
{
"name": "flip",
"comment": "Flips the order of the first two arguments to a function.",
"raw": "flip : (a -\u003e b -\u003e c) -\u003e (b -\u003e a -\u003e c)",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"c"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
"a",
"c"
]
]
]
},
{
"name": "floor",
"comment": "Floor function, rounding down.",
"raw": "floor : Float -\u003e Int",
"type": [
"-\u003e",
[
"Float"
],
[
"Int"
]
]
},
{
"name": "fromPolar",
"comment": "Start with polar coordinates (r,θ)\nand get out cartesian coordinates (x,y).",
"raw": "fromPolar : (Float,Float) -\u003e (Float,Float)",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
]
},
{
"name": "fst",
"comment": "Given a 2-tuple, returns the first value.",
"raw": "fst : (a,b) -\u003e a",
"type": [
"-\u003e",
[
"_Tuple2",
"a",
"b"
],
"a"
]
},
{
"name": "id",
"comment": "Given a value, returns exactly the same value.",
"raw": "id : a -\u003e a",
"type": [
"-\u003e",
"a",
"a"
]
},
{
"name": "logBase",
"comment": "Calculate the logarithm of a number with a given base: `logBase 10 100 == 2`",
"raw": "logBase : number -\u003e number -\u003e number",
"type": [
"-\u003e",
"number",
[
"-\u003e",
"number",
"number"
]
]
},
{
"name": "max",
"comment": "Given two comparables, returns the larger one.",
"raw": "max : comparable -\u003e comparable -\u003e comparable",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
"comparable"
]
]
},
{
"name": "min",
"comment": "Given two comparables, returns the smaller one.",
"raw": "min : comparable -\u003e comparable -\u003e comparable",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"comparable",
"comparable"
]
]
},
{
"name": "mod",
"comment": "Perform modular arithmetic: ``7 `mod` 2 == 1``",
"raw": "mod : Int -\u003e Int -\u003e Int",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"Int"
]
]
],
"associativity": "left",
"precedence": 7
},
{
"name": "not",
"comment": "Negate a boolean value: `(not True == False)` and `(not False == True)`",
"raw": "not : Bool -\u003e Bool",
"type": [
"-\u003e",
[
"Bool"
],
[
"Bool"
]
]
},
{
"name": "otherwise",
"comment": "Equal to true. Useful as the last case of a multi-way-if.",
"raw": "otherwise : Bool",
"type": [
"Bool"
]
},
{
"name": "pi",
"comment": "An approximation of pi.",
"raw": "pi : Float",
"type": [
"Float"
]
},
{
"name": "radians",
"comment": "Convert radians to standard Elm angles (radians).",
"raw": "radians : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "rem",
"comment": "Finds the remainder after dividing one number by another: ``4 `rem` 3 == 1``",
"raw": "rem : Int -\u003e Int -\u003e Int",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"Int"
]
]
],
"associativity": "left",
"precedence": 7
},
{
"name": "round",
"comment": "Round a number to the nearest integer.",
"raw": "round : Float -\u003e Int",
"type": [
"-\u003e",
[
"Float"
],
[
"Int"
]
]
},
{
"name": "sin",
"comment": "",
"raw": "sin : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "snd",
"comment": "Given a 2-tuple, returns the second value.",
"raw": "snd : (a,b) -\u003e b",
"type": [
"-\u003e",
[
"_Tuple2",
"a",
"b"
],
"b"
]
},
{
"name": "sqrt",
"comment": "Take the square root of a number.",
"raw": "sqrt : number -\u003e number",
"type": [
"-\u003e",
"number",
"number"
]
},
{
"name": "tan",
"comment": "",
"raw": "tan : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "toFloat",
"comment": "Convert an integer into a float.",
"raw": "toFloat : Int -\u003e Float",
"type": [
"-\u003e",
[
"Int"
],
[
"Float"
]
]
},
{
"name": "toPolar",
"comment": "Start with cartesian coordinates (x,y)\nand get out polar coordinates (r,θ).",
"raw": "toPolar : (Float,Float) -\u003e (Float,Float)",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
]
},
{
"name": "truncate",
"comment": "Truncate a decimal number, rounding towards zero.",
"raw": "truncate : Float -\u003e Int",
"type": [
"-\u003e",
[
"Float"
],
[
"Int"
]
]
},
{
"name": "turns",
"comment": "Convert turns to standard Elm angles (radians).\nOne turn is equal to 360°.",
"raw": "turns : Float -\u003e Float",
"type": [
"-\u003e",
[
"Float"
],
[
"Float"
]
]
},
{
"name": "uncurry",
"comment": "Change how arguments are passed to a function.\nThis combines two arguments into a sigle pair.",
"raw": "uncurry : (a -\u003e b -\u003e c) -\u003e (a,b) -\u003e c",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"c"
]
],
[
"-\u003e",
[
"_Tuple2",
"a",
"b"
],
"c"
]
]
},
{
"name": "xor",
"comment": "The exclusive-or operator. True if exactly one input is True.",
"raw": "xor : Bool -\u003e Bool -\u003e Bool",
"type": [
"-\u003e",
[
"Bool"
],
[
"-\u003e",
[
"Bool"
],
[
"Bool"
]
]
]
},
{
"name": "|\u003e",
"comment": "Forward function application `x |\u003e f == f x`. This function is useful\nfor avoiding parenthesis and writing code in a more natural way.\nConsider the following code to create a pentagon:\n\n scale 2 (move (10,10) (filled blue (ngon 5 30)))\n\nThis can also be written as:\n\n ngon 5 30 |\u003e filled blue\n |\u003e move (10,10)\n |\u003e scale 2",
"raw": "(|\u003e) : a -\u003e (a -\u003e b) -\u003e b",
"type": [
"-\u003e",
"a",
[
"-\u003e",
[
"-\u003e",
"a",
"b"
],
"b"
]
],
"associativity": "left",
"precedence": 0
},
{
"name": "||",
"comment": "The or operator. True if one or both inputs are True.",
"raw": "(||) : Bool -\u003e Bool -\u003e Bool",
"type": [
"-\u003e",
[
"Bool"
],
[
"-\u003e",
[
"Bool"
],
[
"Bool"
]
]
],
"associativity": "right",
"precedence": 2
}
]
},
{
"name": "Char",
"document": "Functions for working with characters. Character literals are enclosed in\n`'a'` pair of single quotes.\n\n# Classification\n@docs isUpper, isLower, isDigit, isOctDigit, isHexDigit\n\n# Conversion\n@docs toUpper, toLower, toLocaleUpper, toLocaleLower, toCode, fromCode",
"aliases": [
{
"name": "KeyCode",
"comment": "",
"raw": "type KeyCode = Int",
"typeVariables": [],
"type": [
"Int"
]
}
],
"datatypes": [],
"values": [
{
"name": "fromCode",
"comment": "Convert from unicode.",
"raw": "fromCode : KeyCode -\u003e Char",
"type": [
"-\u003e",
[
"KeyCode"
],
[
"Char"
]
]
},
{
"name": "isDigit",
"comment": "True for ASCII digits `[0-9]`.",
"raw": "isDigit : Char -\u003e Bool",
"type": [
"-\u003e",
[
"Char"
],
[
"Bool"
]
]
},
{
"name": "isHexDigit",
"comment": "True for ASCII hexadecimal digits `[0-9a-fA-F]`.",
"raw": "isHexDigit : Char -\u003e Bool",
"type": [
"-\u003e",
[
"Char"
],
[
"Bool"
]
]
},
{
"name": "isLower",
"comment": "True for lower case letters.",
"raw": "isLower : Char -\u003e Bool",
"type": [
"-\u003e",
[
"Char"
],
[
"Bool"
]
]
},
{
"name": "isOctDigit",
"comment": "True for ASCII octal digits `[0-7]`.",
"raw": "isOctDigit : Char -\u003e Bool",
"type": [
"-\u003e",
[
"Char"
],
[
"Bool"
]
]
},
{
"name": "isUpper",
"comment": "True for upper case letters.",
"raw": "isUpper : Char -\u003e Bool",
"type": [
"-\u003e",
[
"Char"
],
[
"Bool"
]
]
},
{
"name": "toCode",
"comment": "Convert to unicode. Used with the [`Keyboard`](/docs/Keyboard.elm)\nlibrary, which expects the input to be uppercase.",
"raw": "toCode : Char -\u003e KeyCode",
"type": [
"-\u003e",
[
"Char"
],
[
"KeyCode"
]
]
},
{
"name": "toLocaleLower",
"comment": "Convert to lower case, according to any locale-specific case mappings.",
"raw": "toLocaleLower : Char -\u003e Char",
"type": [
"-\u003e",
[
"Char"
],
[
"Char"
]
]
},
{
"name": "toLocaleUpper",
"comment": "Convert to upper case, according to any locale-specific case mappings.",
"raw": "toLocaleUpper : Char -\u003e Char",
"type": [
"-\u003e",
[
"Char"
],
[
"Char"
]
]
},
{
"name": "toLower",
"comment": "Convert to lower case.",
"raw": "toLower : Char -\u003e Char",
"type": [
"-\u003e",
[
"Char"
],
[
"Char"
]
]
},
{
"name": "toUpper",
"comment": "Convert to upper case.",
"raw": "toUpper : Char -\u003e Char",
"type": [
"-\u003e",
[
"Char"
],
[
"Char"
]
]
}
]
},
{
"name": "Color",
"document": "Library for working with colors. Includes\n[RGB](https://en.wikipedia.org/wiki/RGB_color_model) and\n[HSV](http://en.wikipedia.org/wiki/HSL_and_HSV) creation, gradients, and\nbuilt-in names.\n\n# Creation\n@docs rgb, rgba, hsv, hsva, greyscale, grayscale\n\n# From Other Colors\n@docs complement\n\n# Gradients\n@docs linear, radial\n\n# Built-in Colors\nThese colors come from the [Tango\npalette](http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines)\nwhich provides aesthetically reasonable defaults for colors. Each color also\ncomes with a light and dark version.\n\n### Standard\n@docs red, orange, yellow, green, blue, purple, brown\n\n### Light\n@docs lightRed, lightOrange, lightYellow, lightGreen, lightBlue, lightPurple,\n lightBrown\n\n### Dark\n@docs darkRed, darkOrange, darkYellow, darkGreen, darkBlue, darkPurple,\n darkBrown\n\n### Eight Shades of Grey\nThese colors are a compatible series of shades of grey, fitting nicely\nwith the Tango palette.\n@docs white, lightGrey, grey, darkGrey, lightCharcoal, charcoal, darkCharcoal, black\n\nThese are identical to the *grey* versions. It seems the spelling is regional, but\nthat has never helped me remember which one I should be writing.\n@docs lightGray, gray, darkGray",
"aliases": [],
"datatypes": [
{
"name": "Color",
"comment": "",
"raw": "data Color = Color Int Int Int Float",
"typeVariables": [],
"constructors": [
{
"name": "Color",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Float"
],
[
"Color"
]
]
]
]
]
}
]
},
{
"name": "Gradient",
"comment": "",
"raw": "data Gradient\n = Linear (Float,Float) (Float,Float) [(Float,Color)]\n | Radial (Float,Float) Float (Float,Float) Float [(Float,Color)]",
"typeVariables": [],
"constructors": [
{
"name": "Linear",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Color"
]
]
],
[
"Gradient"
]
]
]
]
},
{
"name": "Radial",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Color"
]
]
],
[
"Gradient"
]
]
]
]
]
]
}
]
}
],
"values": [
{
"name": "black",
"comment": "",
"raw": "black : Color",
"type": [
"Color"
]
},
{
"name": "blue",
"comment": "",
"raw": "blue : Color",
"type": [
"Color"
]
},
{
"name": "brown",
"comment": "",
"raw": "brown : Color",
"type": [
"Color"
]
},
{
"name": "charcoal",
"comment": "",
"raw": "charcoal : Color",
"type": [
"Color"
]
},
{
"name": "complement",
"comment": "Produce a “complementary color”.\nThe two colors will accent each other.",
"raw": "complement : Color -\u003e Color",
"type": [
"-\u003e",
[
"Color"
],
[
"Color"
]
]
},
{
"name": "darkBlue",
"comment": "",
"raw": "darkBlue : Color",
"type": [
"Color"
]
},
{
"name": "darkBrown",
"comment": "",
"raw": "darkBrown : Color",
"type": [
"Color"
]
},
{
"name": "darkCharcoal",
"comment": "",
"raw": "darkCharcoal : Color",
"type": [
"Color"
]
},
{
"name": "darkGray",
"comment": "",
"raw": "darkGray : Color",
"type": [
"Color"
]
},
{
"name": "darkGreen",
"comment": "",
"raw": "darkGreen : Color",
"type": [
"Color"
]
},
{
"name": "darkGrey",
"comment": "",
"raw": "darkGrey : Color",
"type": [
"Color"
]
},
{
"name": "darkOrange",
"comment": "",
"raw": "darkOrange : Color",
"type": [
"Color"
]
},
{
"name": "darkPurple",
"comment": "",
"raw": "darkPurple : Color",
"type": [
"Color"
]
},
{
"name": "darkRed",
"comment": "",
"raw": "darkRed : Color",
"type": [
"Color"
]
},
{
"name": "darkYellow",
"comment": "",
"raw": "darkYellow : Color",
"type": [
"Color"
]
},
{
"name": "gray",
"comment": "",
"raw": "gray : Color",
"type": [
"Color"
]
},
{
"name": "grayscale",
"comment": "Produce a gray based on the input. 0 is white, 1 is black.",
"raw": "grayscale : Float -\u003e Color",
"type": [
"-\u003e",
[
"Float"
],
[
"Color"
]
]
},
{
"name": "green",
"comment": "",
"raw": "green : Color",
"type": [
"Color"
]
},
{
"name": "grey",
"comment": "",
"raw": "grey : Color",
"type": [
"Color"
]
},
{
"name": "greyscale",
"comment": "",
"raw": "greyscale : Float -\u003e Color",
"type": [
"-\u003e",
[
"Float"
],
[
"Color"
]
]
},
{
"name": "hsv",
"comment": "Create [HSV colors](http://en.wikipedia.org/wiki/HSL_and_HSV). This is very\nconvenient for creating colors that cycle and shift. Hue is an angle and should\nbe given in standard Elm angles (radians).",
"raw": "hsv : Float -\u003e Float -\u003e Float -\u003e Color",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Color"
]
]
]
]
},
{
"name": "hsva",
"comment": "Create [HSV colors](http://en.wikipedia.org/wiki/HSL_and_HSV)\nwith an alpha component for transparency.",
"raw": "hsva : Float -\u003e Float -\u003e Float -\u003e Float -\u003e Color",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Color"
]
]
]
]
]
},
{
"name": "lightBlue",
"comment": "",
"raw": "lightBlue : Color",
"type": [
"Color"
]
},
{
"name": "lightBrown",
"comment": "",
"raw": "lightBrown : Color",
"type": [
"Color"
]
},
{
"name": "lightCharcoal",
"comment": "",
"raw": "lightCharcoal : Color",
"type": [
"Color"
]
},
{
"name": "lightGray",
"comment": "",
"raw": "lightGray : Color",
"type": [
"Color"
]
},
{
"name": "lightGreen",
"comment": "",
"raw": "lightGreen : Color",
"type": [
"Color"
]
},
{
"name": "lightGrey",
"comment": "",
"raw": "lightGrey : Color",
"type": [
"Color"
]
},
{
"name": "lightOrange",
"comment": "",
"raw": "lightOrange : Color",
"type": [
"Color"
]
},
{
"name": "lightPurple",
"comment": "",
"raw": "lightPurple : Color",
"type": [
"Color"
]
},
{
"name": "lightRed",
"comment": "",
"raw": "lightRed : Color",
"type": [
"Color"
]
},
{
"name": "lightYellow",
"comment": "",
"raw": "lightYellow : Color",
"type": [
"Color"
]
},
{
"name": "linear",
"comment": "Create a linear gradient. Takes a start and end point and then a series of\n“color stops” that indicate how to interpolate between the start and\nend points. See [this example](/edit/examples/Elements/LinearGradient.elm) for a\nmore visual explanation.",
"raw": "linear : (number, number) -\u003e (number, number) -\u003e [(Float,Color)] -\u003e Gradient",
"type": [
"-\u003e",
[
"_Tuple2",
"number",
"number"
],
[
"-\u003e",
[
"_Tuple2",
"number",
"number"
],
[
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Color"
]
]
],
[
"Gradient"
]
]
]
]
},
{
"name": "orange",
"comment": "",
"raw": "orange : Color",
"type": [
"Color"
]
},
{
"name": "purple",
"comment": "",
"raw": "purple : Color",
"type": [
"Color"
]
},
{
"name": "radial",
"comment": "Create a radial gradient. First takes a start point and inner radius. Then\ntakes an end point and outer radius. It then takes a series of “color\nstops” that indicate how to interpolate between the inner and outer\ncircles. See [this example](/edit/examples/Elements/RadialGradient.elm) for a\nmore visual explanation.",
"raw": "radial : (number,number) -\u003e number -\u003e (number,number) -\u003e number -\u003e [(Float,Color)] -\u003e Gradient",
"type": [
"-\u003e",
[
"_Tuple2",
"number",
"number"
],
[
"-\u003e",
"number",
[
"-\u003e",
[
"_Tuple2",
"number",
"number"
],
[
"-\u003e",
"number",
[
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Color"
]
]
],
[
"Gradient"
]
]
]
]
]
]
},
{
"name": "red",
"comment": "",
"raw": "red : Color",
"type": [
"Color"
]
},
{
"name": "rgb",
"comment": "Create RGB colors from numbers between 0 and 255 inclusive.",
"raw": "rgb : Int -\u003e Int -\u003e Int -\u003e Color",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"Color"
]
]
]
]
},
{
"name": "rgba",
"comment": "Create RGB colors with an alpha component for transparency.\nThe alpha component is specified with numbers between 0 and 1.",
"raw": "rgba : Int -\u003e Int -\u003e Int -\u003e Float -\u003e Color",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Float"
],
[
"Color"
]
]
]
]
]
},
{
"name": "white",
"comment": "",
"raw": "white : Color",
"type": [
"Color"
]
},
{
"name": "yellow",
"comment": "",
"raw": "yellow : Color",
"type": [
"Color"
]
}
]
},
{
"name": "Date",
"document": "Library for working with dates. Email the mailing list if you encounter\nissues with internationalization or locale formatting.\n\n# Conversions\n@docs read, toTime\n\n# Extractions\n@docs year, month, Month, day, dayOfWeek, Day, hour, minute, second",
"aliases": [],
"datatypes": [
{
"name": "Date",
"comment": "",
"raw": "data Date = Date",
"typeVariables": [],
"constructors": [
{
"name": "Date",
"type": [
"Date"
]
}
]
},
{
"name": "Day",
"comment": "Represents the days of the week.",
"raw": "data Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun",
"typeVariables": [],
"constructors": [
{
"name": "Mon",
"type": [
"Day"
]
},
{
"name": "Tue",
"type": [
"Day"
]
},
{
"name": "Wed",
"type": [
"Day"
]
},
{
"name": "Thu",
"type": [
"Day"
]
},
{
"name": "Fri",
"type": [
"Day"
]
},
{
"name": "Sat",
"type": [
"Day"
]
},
{
"name": "Sun",
"type": [
"Day"
]
}
]
},
{
"name": "Month",
"comment": "Represents the month of the year.",
"raw": "data Month = Jan | Feb | Mar | Apr\n | May | Jun | Jul | Aug\n | Sep | Oct | Nov | Dec",
"typeVariables": [],
"constructors": [
{
"name": "Jan",
"type": [
"Month"
]
},
{
"name": "Feb",
"type": [
"Month"
]
},
{
"name": "Mar",
"type": [
"Month"
]
},
{
"name": "Apr",
"type": [
"Month"
]
},
{
"name": "May",
"type": [
"Month"
]
},
{
"name": "Jun",
"type": [
"Month"
]
},
{
"name": "Jul",
"type": [
"Month"
]
},
{
"name": "Aug",
"type": [
"Month"
]
},
{
"name": "Sep",
"type": [
"Month"
]
},
{
"name": "Oct",
"type": [
"Month"
]
},
{
"name": "Nov",
"type": [
"Month"
]
},
{
"name": "Dec",
"type": [
"Month"
]
}
]
}
],
"values": [
{
"name": "day",
"comment": "Extract the day of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the integer `23`.",
"raw": "day : Date -\u003e Int",
"type": [
"-\u003e",
[
"Date"
],
[
"Int"
]
]
},
{
"name": "dayOfWeek",
"comment": "Extract the day of the week for a given date. Given the date 23 June\n1990 at 11:45AM this returns the Day `Thu` as defined below.",
"raw": "dayOfWeek : Date -\u003e Day",
"type": [
"-\u003e",
[
"Date"
],
[
"Day"
]
]
},
{
"name": "hour",
"comment": "Extract the hour of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the integer `11`.",
"raw": "hour : Date -\u003e Int",
"type": [
"-\u003e",
[
"Date"
],
[
"Int"
]
]
},
{
"name": "minute",
"comment": "Extract the minute of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the integer `45`.",
"raw": "minute : Date -\u003e Int",
"type": [
"-\u003e",
[
"Date"
],
[
"Int"
]
]
},
{
"name": "month",
"comment": "Extract the month of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the Month `Jun` as defined below.",
"raw": "month : Date -\u003e Month",
"type": [
"-\u003e",
[
"Date"
],
[
"Month"
]
]
},
{
"name": "read",
"comment": "Attempt to read a date from a string.",
"raw": "read : String -\u003e Maybe Date",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"Date"
]
]
]
},
{
"name": "second",
"comment": "Extract the second of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the integer `0`.",
"raw": "second : Date -\u003e Int",
"type": [
"-\u003e",
[
"Date"
],
[
"Int"
]
]
},
{
"name": "toTime",
"comment": "Convert a date into a time since midnight (UTC) of 1 January 1990 (i.e.\n[UNIX time](http://en.wikipedia.org/wiki/Unix_time)). Given the date 23 June\n1990 at 11:45AM this returns the corresponding time.",
"raw": "toTime : Date -\u003e Time",
"type": [
"-\u003e",
[
"Date"
],
[
"Time"
]
]
},
{
"name": "year",
"comment": "Extract the year of a given date. Given the date 23 June 1990 at 11:45AM\nthis returns the integer `1990`.",
"raw": "year : Date -\u003e Int",
"type": [
"-\u003e",
[
"Date"
],
[
"Int"
]
]
}
]
},
{
"name": "Dict",
"document": "A dictionary mapping unique keys to values. The keys can be any comparable\ntype. This includes `Int`, `Float`, `Time`, `Char`, `String`, and tuples or\nlists of comparable types.\n\nInsert, remove, and query operations all take *O(log n)* time.\n\n# Build\n@docs empty, singleton, insert, remove\n\n# Query\n@docs member, lookup, findWithDefault\n\n# Combine\n@docs union, intersect, diff\n\n# Lists\n@docs keys, values, toList, fromList\n\n# Transform\n@docs map, foldl, foldr",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "diff",
"comment": "Keep a key-value pair when its key does not appear in the second dictionary.\nPreference is given to the first dictionary.",
"raw": "diff : Dict comparable v -\u003e Dict comparable v -\u003e Dict comparable v",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Dict",
"comparable",
"v"
]
]
]
},
{
"name": "empty",
"comment": "Create an empty dictionary.",
"raw": "empty : Dict comparable v",
"type": [
"Dict",
"comparable",
"v"
]
},
{
"name": "findWithDefault",
"comment": "Find the value associated with a key. If the key is not found,\nreturn the default value.",
"raw": "findWithDefault : v -\u003e comparable -\u003e Dict comparable v -\u003e v",
"type": [
"-\u003e",
"v",
[
"-\u003e",
"comparable",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
"v"
]
]
]
},
{
"name": "foldl",
"comment": "Fold over the key-value pairs in a dictionary, in order from lowest\nkey to highest key.",
"raw": "foldl : (comparable -\u003e v -\u003e b -\u003e b) -\u003e b -\u003e Dict comparable v -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"comparable",
[
"-\u003e",
"v",
[
"-\u003e",
"b",
"b"
]
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
"b"
]
]
]
},
{
"name": "foldr",
"comment": "Fold over the key-value pairs in a dictionary, in order from highest\nkey to lowest key.",
"raw": "foldr : (comparable -\u003e v -\u003e b -\u003e b) -\u003e b -\u003e Dict comparable v -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"comparable",
[
"-\u003e",
"v",
[
"-\u003e",
"b",
"b"
]
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
"b"
]
]
]
},
{
"name": "fromList",
"comment": "Convert an association list into a dictionary.",
"raw": "fromList : [(comparable,v)] -\u003e Dict comparable v",
"type": [
"-\u003e",
[
"_List",
[
"_Tuple2",
"comparable",
"v"
]
],
[
"Dict",
"comparable",
"v"
]
]
},
{
"name": "insert",
"comment": "Insert a key-value pair into a dictionary. Replaces value when there is\na collision.",
"raw": "insert : comparable -\u003e v -\u003e Dict comparable v -\u003e Dict comparable v",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"v",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Dict",
"comparable",
"v"
]
]
]
]
},
{
"name": "intersect",
"comment": "Keep a key-value pair when its key appears in the second dictionary.\nPreference is given to values in the first dictionary.",
"raw": "intersect : Dict comparable v -\u003e Dict comparable v -\u003e Dict comparable v",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Dict",
"comparable",
"v"
]
]
]
},
{
"name": "keys",
"comment": "Get all of the keys in a dictionary.",
"raw": "keys : Dict comparable v -\u003e [comparable]",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"_List",
"comparable"
]
]
},
{
"name": "lookup",
"comment": "Lookup the value associated with a key.",
"raw": "lookup : comparable -\u003e Dict comparable v -\u003e Maybe v",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Maybe",
"v"
]
]
]
},
{
"name": "map",
"comment": "Apply a function to all values in a dictionary.",
"raw": "map : (a -\u003e b) -\u003e Dict comparable a -\u003e Dict comparable b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
[
"Dict",
"comparable",
"a"
],
[
"Dict",
"comparable",
"b"
]
]
]
},
{
"name": "member",
"comment": "Determine if a key is in a dictionary.",
"raw": "member : comparable -\u003e Dict comparable v -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Bool"
]
]
]
},
{
"name": "remove",
"comment": "Remove a key-value pair from a dictionary. If the key is not found,\nno changes are made.",
"raw": "remove : comparable -\u003e Dict comparable v -\u003e Dict comparable v",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Dict",
"comparable",
"v"
]
]
]
},
{
"name": "singleton",
"comment": "Create a dictionary with one key-value pair.",
"raw": "singleton : comparable -\u003e v -\u003e Dict comparable v",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
"v",
[
"Dict",
"comparable",
"v"
]
]
]
},
{
"name": "toList",
"comment": "Convert a dictionary into an association list of key-value pairs.",
"raw": "toList : Dict comparable v -\u003e [(comparable,v)]",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"_List",
[
"_Tuple2",
"comparable",
"v"
]
]
]
},
{
"name": "union",
"comment": "Combine two dictionaries. If there is a collision, preference is given\nto the first dictionary.",
"raw": "union : Dict comparable v -\u003e Dict comparable v -\u003e Dict comparable v",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"Dict",
"comparable",
"v"
]
]
]
},
{
"name": "values",
"comment": "Get all of the values in a dictionary.",
"raw": "values : Dict comparable v -\u003e [v]",
"type": [
"-\u003e",
[
"Dict",
"comparable",
"v"
],
[
"_List",
"v"
]
]
}
]
},
{
"name": "Either",
"document": "Represents any data that can take two different types.\n\n# Type and Constructors\n@docs Either\n\n# Taking Eithers apart\n@docs either, isLeft, isRight\n\n# Eithers and Lists\n@docs lefts, rights, partition",
"aliases": [],
"datatypes": [
{
"name": "Either",
"comment": "Represents any data may take two forms. For example, a user ID may be\neither an `Int` or a `String`.\n\nThis can also be used for error handling `(Either String a)` where\nerror messages are stored on the left, and the correct values\n(“right” values) are stored on the right.",
"raw": "data Either a b = Left a | Right b",
"typeVariables": [
"a",
"b"
],
"constructors": [
{
"name": "Left",
"type": [
"-\u003e",
"a",
[
"Either",
"a",
"b"
]
]
},
{
"name": "Right",
"type": [
"-\u003e",
"b",
[
"Either",
"a",
"b"
]
]
}
]
}
],
"values": [
{
"name": "either",
"comment": "Apply the first function to a `Left` and the second function to a `Right`.\nThis allows the extraction of a value from an `Either`.",
"raw": "either : (a -\u003e c) -\u003e (b -\u003e c) -\u003e Either a b -\u003e c",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"c"
],
[
"-\u003e",
[
"-\u003e",
"b",
"c"
],
[
"-\u003e",
[
"Either",
"a",
"b"
],
"c"
]
]
]
},
{
"name": "isLeft",
"comment": "True if the value is a `Left`.",
"raw": "isLeft : Either a b -\u003e Bool",
"type": [
"-\u003e",
[
"Either",
"a",
"b"
],
[
"Bool"
]
]
},
{
"name": "isRight",
"comment": "True if the value is a `Right`.",
"raw": "isRight : Either a b -\u003e Bool",
"type": [
"-\u003e",
[
"Either",
"a",
"b"
],
[
"Bool"
]
]
},
{
"name": "lefts",
"comment": "Keep only the values held in `Left` values.",
"raw": "lefts : [Either a b] -\u003e [a]",
"type": [
"-\u003e",
[
"_List",
[
"Either",
"a",
"b"
]
],
[
"_List",
"a"
]
]
},
{
"name": "partition",
"comment": "Split into two lists, lefts on the left and rights on the right. So we\nhave the equivalence: `(partition es == (lefts es, rights es))`",
"raw": "partition : [Either a b] -\u003e ([a],[b])",
"type": [
"-\u003e",
[
"_List",
[
"Either",
"a",
"b"
]
],
[
"_Tuple2",
[
"_List",
"a"
],
[
"_List",
"b"
]
]
]
},
{
"name": "rights",
"comment": "Keep only the values held in `Right` values.",
"raw": "rights : [Either a b] -\u003e [b]",
"type": [
"-\u003e",
[
"_List",
[
"Either",
"a",
"b"
]
],
[
"_List",
"b"
]
]
}
]
},
{
"name": "Http",
"document": "A library for asynchronous HTTP requests. See the\n[WebSocket](http://elm-lang.org/docs/WebSocket.elm) library if\nyou have very strict latency requirements.\n\n# Sending Requests\n@docs send, sendGet\n\n# Creating Requests\n@docs get, post, request\n\n# Responses\n@docs Response",
"aliases": [
{
"name": "Request",
"comment": "",
"raw": "type Request a = {\n verb : String,\n url : String,\n body : a,\n headers : [(String,String)]\n }",
"typeVariables": [
"a"
],
"type": {
"headers": [
"_List",
[
"_Tuple2",
[
"String"
],
[
"String"
]
]
],
"body": "a",
"url": [
"String"
],
"verb": [
"String"
]
}
}
],
"datatypes": [
{
"name": "Response",
"comment": "The datatype for responses. Success contains only the returned message.\nFailures contain both an error code and an error message.",
"raw": "data Response a = Success a | Waiting | Failure Int String",
"typeVariables": [
"a"
],
"constructors": [
{
"name": "Success",
"type": [
"-\u003e",
"a",
[
"Response",
"a"
]
]
},
{
"name": "Waiting",
"type": [
"Response",
"a"
]
},
{
"name": "Failure",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"Response",
"a"
]
]
]
}
]
}
],
"values": [
{
"name": "get",
"comment": "Create a GET request to the given url.",
"raw": "get : String -\u003e Request String",
"type": [
"-\u003e",
[
"String"
],
[
"Request",
[
"String"
]
]
]
},
{
"name": "post",
"comment": "Create a POST request to the given url, carrying the given data.",
"raw": "post : String -\u003e String -\u003e Request String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"Request",
[
"String"
]
]
]
]
},
{
"name": "request",
"comment": "Create a customized request. Arguments are request type (get, post, put,\ndelete, etc.), target url, data, and a list of additional headers.",
"raw": "request : String -\u003e String -\u003e String -\u003e [(String,String)] -\u003e Request String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"String"
],
[
"String"
]
]
],
[
"Request",
[
"String"
]
]
]
]
]
]
},
{
"name": "send",
"comment": "Performs an HTTP request with the given requests. Produces a signal\nthat carries the responses.",
"raw": "send : Signal (Request a) -\u003e Signal (Response String)",
"type": [
"-\u003e",
[
"Signal",
[
"Request",
"a"
]
],
[
"Signal",
[
"Response",
[
"String"
]
]
]
]
},
{
"name": "sendGet",
"comment": "Performs an HTTP GET request with the given urls. Produces a signal\nthat carries the responses.",
"raw": "sendGet : Signal String -\u003e Signal (Response String)",
"type": [
"-\u003e",
[
"Signal",
[
"String"
]
],
[
"Signal",
[
"Response",
[
"String"
]
]
]
]
}
]
},
{
"name": "JavaScript",
"document": "This library does basic conversions between Elm and JS values. This allows\nthe internal data structures of Elm to change and improve with no impact on JS\nintegration.\n\n# Javascript to Elm\n@docs toString, toInt, toFloat, toBool, toList\n\n# JavaScript from Elm\n@docs fromString, fromInt, fromFloat, fromBool, fromList",
"aliases": [],
"datatypes": [
{
"name": "JSArray",
"comment": "",
"raw": "data JSArray a = JSArray a",
"typeVariables": [
"a"
],
"constructors": [
{
"name": "JSArray",
"type": [
"-\u003e",
"a",
[
"JSArray",
"a"
]
]
}
]
},
{
"name": "JSBool",
"comment": "",
"raw": "data JSBool = JSBool",
"typeVariables": [],
"constructors": [
{
"name": "JSBool",
"type": [
"JSBool"
]
}
]
},
{
"name": "JSDomNode",
"comment": "",
"raw": "data JSDomNode = JSDomNode",
"typeVariables": [],
"constructors": [
{
"name": "JSDomNode",
"type": [
"JSDomNode"
]
}
]
},
{
"name": "JSNumber",
"comment": "",
"raw": "data JSNumber = JSNumber",
"typeVariables": [],
"constructors": [
{
"name": "JSNumber",
"type": [
"JSNumber"
]
}
]
},
{
"name": "JSObject",
"comment": "",
"raw": "data JSObject = JSObject",
"typeVariables": [],
"constructors": [
{
"name": "JSObject",
"type": [
"JSObject"
]
}
]
},
{
"name": "JSString",
"comment": "",
"raw": "data JSString = JSString",
"typeVariables": [],
"constructors": [
{
"name": "JSString",
"type": [
"JSString"
]
}
]
}
],
"values": [
{
"name": "fromBool",
"comment": "",
"raw": "fromBool : Bool -\u003e JSBool",
"type": [
"-\u003e",
[
"Bool"
],
[
"JSBool"
]
]
},
{
"name": "fromFloat",
"comment": "",
"raw": "fromFloat : Float -\u003e JSNumber",
"type": [
"-\u003e",
[
"Float"
],
[
"JSNumber"
]
]
},
{
"name": "fromInt",
"comment": "",
"raw": "fromInt : Int -\u003e JSNumber",
"type": [
"-\u003e",
[
"Int"
],
[
"JSNumber"
]
]
},
{
"name": "fromList",
"comment": "Produces a uniform JavaScript array with all members of the same type.",
"raw": "fromList : [a] -\u003e JSArray a",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"JSArray",
"a"
]
]
},
{
"name": "fromString",
"comment": "",
"raw": "fromString : String -\u003e JSString",
"type": [
"-\u003e",
[
"String"
],
[
"JSString"
]
]
},
{
"name": "toBool",
"comment": "",
"raw": "toBool : JSBool -\u003e Bool",
"type": [
"-\u003e",
[
"JSBool"
],
[
"Bool"
]
]
},
{
"name": "toFloat",
"comment": "",
"raw": "toFloat : JSNumber -\u003e Float",
"type": [
"-\u003e",
[
"JSNumber"
],
[
"Float"
]
]
},
{
"name": "toInt",
"comment": "",
"raw": "toInt : JSNumber -\u003e Int",
"type": [
"-\u003e",
[
"JSNumber"
],
[
"Int"
]
]
},
{
"name": "toList",
"comment": "Requires that the input array be uniform (all members have the same type)",
"raw": "toList : JSArray a -\u003e [a]",
"type": [
"-\u003e",
[
"JSArray",
"a"
],
[
"_List",
"a"
]
]
},
{
"name": "toString",
"comment": "",
"raw": "toString : JSString -\u003e String",
"type": [
"-\u003e",
[
"JSString"
],
[
"String"
]
]
}
]
},
{
"name": "Json",
"document": "Library for working with [JSON](https://en.wikipedia.org/wiki/JSON) values.\n\n# Strings\n@docs fromString, toString\n\n# JS Strings\n@docs fromJSString, toJSString\n\n# JS Objects\n@docs fromJSObject, toJSObject",
"aliases": [],
"datatypes": [
{
"name": "JsonValue",
"comment": "This datatype can represent all valid values that can be held in a JSON\nobject. In Elm, a proper JSON object is represented as a (Dict String JsonValue)\nwhich is a mapping from strings to Json Values.",
"raw": "data JsonValue\n = String String\n | Number Float\n | Boolean Bool\n | Null\n | Array [JsonValue]\n | Object (Dict.Dict String JsonValue)",
"typeVariables": [],
"constructors": [
{
"name": "String",
"type": [
"-\u003e",
[
"String"
],
[
"JsonValue"
]
]
},
{
"name": "Number",
"type": [
"-\u003e",
[
"Float"
],
[
"JsonValue"
]
]
},
{
"name": "Boolean",
"type": [
"-\u003e",
[
"Bool"
],
[
"JsonValue"
]
]
},
{
"name": "Null",
"type": [
"JsonValue"
]
},
{
"name": "Array",
"type": [
"-\u003e",
[
"_List",
[
"JsonValue"
]
],
[
"JsonValue"
]
]
},
{
"name": "Object",
"type": [
"-\u003e",
[
"Dict.Dict",
[
"String"
],
[
"JsonValue"
]
],
[
"JsonValue"
]
]
}
]
}
],
"values": [
{
"name": "fromJSObject",
"comment": "Convert a JS object into a `JsonValue`.",
"raw": "fromJSObject : JSObject -\u003e JsonValue",
"type": [
"-\u003e",
[
"JSObject"
],
[
"JsonValue"
]
]
},
{
"name": "fromJSString",
"comment": "Parse a JavaScript string representation of a proper JSON object into\nits Elm representation.",
"raw": "fromJSString : JSString -\u003e Maybe JsonValue",
"type": [
"-\u003e",
[
"JSString"
],
[
"Maybe",
[
"JsonValue"
]
]
]
},
{
"name": "fromString",
"comment": "Parse a string representation of a proper JSON object into\nits Elm representation.",
"raw": "fromString : String -\u003e Maybe JsonValue",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"JsonValue"
]
]
]
},
{
"name": "toJSObject",
"comment": "Convert a `JsonValue` into a `JSObject`. Paired with the\n[`JavaScript.Experimental` library](/docs/JavaScript/Experimental.elm),\nThis lets you convert strings into Elm records:\n\n import JavaScript.Experimental as JS\n\n stringToRecord str =\n case fromString str of\n Just jsonValue -\u003e Just (JS.toRecord (toJSObject jsonValue))\n Nothing -\u003e Nothing",
"raw": "toJSObject : JsonValue -\u003e JSObject",
"type": [
"-\u003e",
[
"JsonValue"
],
[
"JSObject"
]
]
},
{
"name": "toJSString",
"comment": "Convert a proper JSON object into a JavaScript string.\nNote that the type JSString seen here is not the same as the type constructor\nJsonString used elsewhere in this module.",
"raw": "toJSString : String -\u003e JsonValue -\u003e JSString",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"JsonValue"
],
[
"JSString"
]
]
]
},
{
"name": "toString",
"comment": "Convert a `JsonValue` into a prettified string.\nThe first argument is a separator token (e.g. \\\" \\\", \\\"\\\\n\\\", etc.) that will\nbe used for indentation in the prettified string version of the JSON.",
"raw": "toString : String -\u003e JsonValue -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"JsonValue"
],
[
"String"
]
]
]
}
]
},
{
"name": "Keyboard",
"document": "Library for working with keyboard input.\n\n# Representing Keys\n@docs KeyCode\n\n# Directions\n@docs arrows, wasd, directions\n\n# Specific Keys\n@docs shift, enter, space, ctrl\n\n# General Keypresses\n@docs isDown, keysDown, lastPressed",
"aliases": [
{
"name": "KeyCode",
"comment": "Type alias to make it clearer what integers are supposed to represent\nin this library. Use [`Char.toCode`](docs/Char.elm#toCode) and\n[`Char.fromCode`](/docs/Char.elm#fromCode) to convert key codes to characters.\nUse the uppercase character with `toCode`.",
"raw": "type KeyCode = Int",
"typeVariables": [],
"type": [
"Int"
]
}
],
"datatypes": [],
"values": [
{
"name": "arrows",
"comment": "A signal of records indicating which arrow keys are pressed.\n\n`{ x = 0, y = 0 }` when pressing no arrows.\u003cbr\u003e\n`{ x =-1, y = 0 }` when pressing the left arrow.\u003cbr\u003e\n`{ x = 1, y = 1 }` when pressing the up and right arrows.\u003cbr\u003e\n`{ x = 0, y =-1 }` when pressing the down, left, and right arrows.",
"raw": "arrows : Signal { x:Int, y:Int }",
"type": [
"Signal",
{
"y": [
"Int"
],
"x": [
"Int"
]
}
]
},
{
"name": "ctrl",
"comment": "Whether the control key is pressed.",
"raw": "ctrl : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "directions",
"comment": "Custom key directions to support different locales. The order is up, down,\nleft, right.",
"raw": "directions : KeyCode -\u003e KeyCode -\u003e KeyCode -\u003e KeyCode -\u003e Signal { x:Int, y:Int }",
"type": [
"-\u003e",
[
"KeyCode"
],
[
"-\u003e",
[
"KeyCode"
],
[
"-\u003e",
[
"KeyCode"
],
[
"-\u003e",
[
"KeyCode"
],
[
"Signal",
{
"y": [
"Int"
],
"x": [
"Int"
]
}
]
]
]
]
]
},
{
"name": "enter",
"comment": "Whether the enter key is pressed.",
"raw": "enter : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "isDown",
"comment": "Whether an arbitrary key is pressed.",
"raw": "isDown : KeyCode -\u003e Signal Bool",
"type": [
"-\u003e",
[
"KeyCode"
],
[
"Signal",
[
"Bool"
]
]
]
},
{
"name": "keysDown",
"comment": "List of keys that are currently down.",
"raw": "keysDown : Signal [KeyCode]",
"type": [
"Signal",
[
"_List",
[
"KeyCode"
]
]
]
},
{
"name": "lastPressed",
"comment": "The latest key that has been pressed.",
"raw": "lastPressed : Signal KeyCode",
"type": [
"Signal",
[
"KeyCode"
]
]
},
{
"name": "shift",
"comment": "Whether the shift key is pressed.",
"raw": "shift : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "space",
"comment": "Whether the space key is pressed.",
"raw": "space : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "wasd",
"comment": "Just like the arrows signal, but this uses keys w, a, s, and d,\nwhich are common controls for many computer games.",
"raw": "wasd : Signal { x:Int, y:Int }",
"type": [
"Signal",
{
"y": [
"Int"
],
"x": [
"Int"
]
}
]
}
]
},
{
"name": "List",
"document": "A library for manipulating lists of values. Every value in a\nlist must have the same type.\n\n# Basics\n@docs (::), (++), isEmpty, length, reverse, map\n\n# Sub-lists\n@docs head, tail, last, filter, take, drop\n\n# Putting Lists Together\n@docs concat, concatMap, join, intersperse, zip, zipWith\n\n# Taking Lists Apart\n@docs partition, unzip\n\n# Folds\n@docs foldr, foldl, foldr1, foldl1, scanl, scanl1\n\n# Special Folds\n@docs sum, product, maximum, minimum, all, any, and, or",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "++",
"comment": "Puts two appendable things together:\n\n [1,1] ++ [2,3] == [1,1,2,3]\n \"abc\" ++ \"123\" == \"abc123\"",
"raw": "(++) : appendable -\u003e appendable -\u003e appendable",
"type": [
"-\u003e",
"appendable",
[
"-\u003e",
"appendable",
"appendable"
]
],
"associativity": "right",
"precedence": 5
},
{
"name": "::",
"comment": "Add an element to the front of a list `(1 :: [2,3] == [1,2,3])`",
"raw": "(::) : a -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
"a",
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
],
"associativity": "right",
"precedence": 5
},
{
"name": "all",
"comment": "Check to see if all elements satisfy the predicate.",
"raw": "all : (a -\u003e Bool) -\u003e [a] -\u003e Bool",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"Bool"
]
]
]
},
{
"name": "and",
"comment": "Check to see if all elements are True.",
"raw": "and : [Bool] -\u003e Bool",
"type": [
"-\u003e",
[
"_List",
[
"Bool"
]
],
[
"Bool"
]
]
},
{
"name": "any",
"comment": "Check to see if any elements satisfy the predicate.",
"raw": "any : (a -\u003e Bool) -\u003e [a] -\u003e Bool",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"Bool"
]
]
]
},
{
"name": "concat",
"comment": "Concatenate a list of appendable things:\n\n concat [[1,2],[3],[4,5]] == [1,2,3,4,5]\n concat [\"tree\",\"house\"] == \"treehouse\"",
"raw": "concat : [appendable] -\u003e appendable",
"type": [
"-\u003e",
[
"_List",
"appendable"
],
"appendable"
]
},
{
"name": "concatMap",
"comment": "Map a given function onto a list and flatten the resulting lists.\n\n concatMap f xs == concat (map f xs)",
"raw": "concatMap : (a -\u003e appendable) -\u003e [a] -\u003e appendable",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"appendable"
],
[
"-\u003e",
[
"_List",
"a"
],
"appendable"
]
]
},
{
"name": "drop",
"comment": "Drop the first n members of a list: `(drop 2 [1,2,3,4] == [3,4])`",
"raw": "drop : Int -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
},
{
"name": "filter",
"comment": "Keep only elements that satisfy the predicate:\n`(filter isEven [1..6] == [2,4,6])`",
"raw": "filter : (a -\u003e Bool) -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
},
{
"name": "foldl",
"comment": "Reduce a list from the left: `(foldl (::) [] [1,2,3] == [3,2,1])`",
"raw": "foldl : (a -\u003e b -\u003e b) -\u003e b -\u003e [a] -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"_List",
"a"
],
"b"
]
]
]
},
{
"name": "foldl1",
"comment": "Reduce a list from the left without a base case. List must be non-empty.",
"raw": "foldl1 : (a -\u003e a -\u003e a) -\u003e [a] -\u003e a",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"a",
"a"
]
],
[
"-\u003e",
[
"_List",
"a"
],
"a"
]
]
},
{
"name": "foldr",
"comment": "Reduce a list from the right: `(foldr (+) 0 [1,2,3] == 6)`",
"raw": "foldr : (a -\u003e b -\u003e b) -\u003e b -\u003e [a] -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"_List",
"a"
],
"b"
]
]
]
},
{
"name": "foldr1",
"comment": "Reduce a list from the right without a base case. List must be non-empty.",
"raw": "foldr1 : (a -\u003e a -\u003e a) -\u003e [a] -\u003e a",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"a",
"a"
]
],
[
"-\u003e",
[
"_List",
"a"
],
"a"
]
]
},
{
"name": "head",
"comment": "Extract the first element of a list. List must be non-empty.\n`(head [1,2,3] == 1)`",
"raw": "head : [a] -\u003e a",
"type": [
"-\u003e",
[
"_List",
"a"
],
"a"
]
},
{
"name": "intersperse",
"comment": "Places the given value between all members of the given list.\n\n intersperse \"on\" [\"turtles\",\"turtles\",\"turtles\"] == [\"turtles\",\"on\",\"turtles\",\"on\",\"turtles\"]",
"raw": "intersperse : a -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
"a",
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
},
{
"name": "isEmpty",
"comment": "Check if a list is empty `(isEmpty [] == True)`",
"raw": "isEmpty : [a] -\u003e Bool",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"Bool"
]
]
},
{
"name": "join",
"comment": "Places the given value between all of the lists in the second\nargument and concatenates the result.\n\n join \"a\" [\"H\",\"w\",\"ii\",\"n\"] == \"Hawaiian\"",
"raw": "join : appendable -\u003e [appendable] -\u003e appendable",
"type": [
"-\u003e",
"appendable",
[
"-\u003e",
[
"_List",
"appendable"
],
"appendable"
]
]
},
{
"name": "last",
"comment": "Extract the last element of a list. List must be non-empty.\n`(last [1,2,3] == 3)`",
"raw": "last : [a] -\u003e a",
"type": [
"-\u003e",
[
"_List",
"a"
],
"a"
]
},
{
"name": "length",
"comment": "Determine the length of a list: `(length [1,2,3] == 3)`",
"raw": "length : [a] -\u003e Int",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"Int"
]
]
},
{
"name": "map",
"comment": "Apply a function to every element of a list: `(map sqrt [1,4,9] == [1,2,3])`",
"raw": "map : (a -\u003e b) -\u003e [a] -\u003e [b]",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"b"
]
]
]
},
{
"name": "maximum",
"comment": "Find the maximum element in a non-empty list: `maximum [1,4,2] == 4`",
"raw": "maximum : [comparable] -\u003e comparable",
"type": [
"-\u003e",
[
"_List",
"comparable"
],
"comparable"
]
},
{
"name": "minimum",
"comment": "Find the minimum element in a non-empty list: `minimum [3,2,1] == 1`",
"raw": "minimum : [comparable] -\u003e comparable",
"type": [
"-\u003e",
[
"_List",
"comparable"
],
"comparable"
]
},
{
"name": "or",
"comment": "Check to see if any elements are True.",
"raw": "or : [Bool] -\u003e Bool",
"type": [
"-\u003e",
[
"_List",
[
"Bool"
]
],
[
"Bool"
]
]
},
{
"name": "partition",
"comment": "Split a list based on the predicate.",
"raw": "partition : (a -\u003e Bool) -\u003e [a] -\u003e ([a],[a])",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_Tuple2",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
]
},
{
"name": "product",
"comment": "Get the product of the list elements. `(product [1..4] == 24)`",
"raw": "product : [number] -\u003e number",
"type": [
"-\u003e",
[
"_List",
"number"
],
"number"
]
},
{
"name": "repeat",
"comment": "Creates a list with *n* copies of a value:\n`(repeat 3 (0,0) == [(0,0),(0,0),(0,0)]`",
"raw": "repeat : Int -\u003e a -\u003e [a]",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
"a",
[
"_List",
"a"
]
]
]
},
{
"name": "reverse",
"comment": "Reverse a list. `(reverse [1..4] == [4,3,2,1])`",
"raw": "reverse : [a] -\u003e [a]",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
},
{
"name": "scanl",
"comment": "Reduce a list from the left, building up all of the intermediate results into a list.\n\n scanl (+) 0 [1,2,3,4] == [0,1,3,6,10]",
"raw": "scanl : (a -\u003e b -\u003e b) -\u003e b -\u003e [a] -\u003e [b]",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"b"
]
]
]
]
},
{
"name": "scanl1",
"comment": "Same as scanl but it doesn't require a base case. List must be non-empty.\n\n scanl1 (+) [1,2,3,4] == [1,3,6,10]",
"raw": "scanl1 : (a -\u003e a -\u003e a) -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"a",
"a"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
},
{
"name": "sum",
"comment": "Get the sum of the list elements. `(sum [1..4] == 10)`",
"raw": "sum : [number] -\u003e number",
"type": [
"-\u003e",
[
"_List",
"number"
],
"number"
]
},
{
"name": "tail",
"comment": "Extract the elements after the head of the list. List must be non-empty.\n`(tail [1,2,3] == [2,3])`",
"raw": "tail : [a] -\u003e [a]",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
},
{
"name": "take",
"comment": "Take the first n members of a list: `(take 2 [1,2,3,4] == [1,2])`",
"raw": "take : Int -\u003e [a] -\u003e [a]",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"_List",
"a"
],
[
"_List",
"a"
]
]
]
},
{
"name": "unzip",
"comment": "Decompose a list of tuples.",
"raw": "unzip : [(a,b)] -\u003e ([a],[b])",
"type": [
"-\u003e",
[
"_List",
[
"_Tuple2",
"a",
"b"
]
],
[
"_Tuple2",
[
"_List",
"a"
],
[
"_List",
"b"
]
]
]
},
{
"name": "zip",
"comment": "Combine two lists, combining them into tuples pairwise.\nIf one list is longer, the extra elements are dropped.\n\n zip [1,2,3] [6,7] == [(1,6),(2,7)]\n zip == zipWith (,)",
"raw": "zip : [a] -\u003e [b] -\u003e [(a,b)]",
"type": [
"-\u003e",
[
"_List",
"a"
],
[
"-\u003e",
[
"_List",
"b"
],
[
"_List",
[
"_Tuple2",
"a",
"b"
]
]
]
]
},
{
"name": "zipWith",
"comment": "Combine two lists, combining them with the given function.\nIf one list is longer, the extra elements are dropped.\n\n zipWith (+) [1,2,3] [1,2,3,4] == [2,4,6]",
"raw": "zipWith : (a -\u003e b -\u003e c) -\u003e [a] -\u003e [b] -\u003e [c]",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"c"
]
],
[
"-\u003e",
[
"_List",
"a"
],
[
"-\u003e",
[
"_List",
"b"
],
[
"_List",
"c"
]
]
]
]
}
]
},
{
"name": "Maybe",
"document": "Represents an optional value. Maybe it is there, maybe it is not.\n\n# Type and Constructors\n@docs Maybe\n\n# Taking Maybes apart\n@docs maybe, isJust, isNothing\n\n# Maybes and Lists\n@docs justs",
"aliases": [],
"datatypes": [
{
"name": "Maybe",
"comment": "The Maybe datatype. Useful when a computation may or may not\nresult in a value (e.g. logarithm is defined only for positive\nnumbers).",
"raw": "data Maybe a = Just a | Nothing",
"typeVariables": [
"a"
],
"constructors": [
{
"name": "Just",
"type": [
"-\u003e",
"a",
[
"Maybe",
"a"
]
]
},
{
"name": "Nothing",
"type": [
"Maybe",
"a"
]
}
]
}
],
"values": [
{
"name": "isJust",
"comment": "Check if constructed with `Just`.",
"raw": "isJust : Maybe a -\u003e Bool",
"type": [
"-\u003e",
[
"Maybe",
"a"
],
[
"Bool"
]
]
},
{
"name": "isNothing",
"comment": "Check if constructed with `Nothing`.",
"raw": "isNothing : Maybe a -\u003e Bool",
"type": [
"-\u003e",
[
"Maybe",
"a"
],
[
"Bool"
]
]
},
{
"name": "justs",
"comment": "Filters out Nothings and extracts the remaining values.",
"raw": "justs : [Maybe a] -\u003e [a]",
"type": [
"-\u003e",
[
"_List",
[
"Maybe",
"a"
]
],
[
"_List",
"a"
]
]
},
{
"name": "maybe",
"comment": "Apply a function to the contents of a `Maybe`.\nReturn default when given `Nothing`.",
"raw": "maybe : b -\u003e (a -\u003e b) -\u003e Maybe a -\u003e b",
"type": [
"-\u003e",
"b",
[
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
[
"Maybe",
"a"
],
"b"
]
]
]
}
]
},
{
"name": "Mouse",
"document": "Library for working with mouse input.\n\n# Position\n@docs position, x, y\n\n# Button Status\n@docs isDown, clicks, isClicked",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "clicks",
"comment": "Always equal to unit. Event triggers on every mouse click.",
"raw": "clicks : Signal ()",
"type": [
"Signal",
[
"_Tuple0"
]
]
},
{
"name": "isClicked",
"comment": "True immediately after the left mouse-button has been clicked,\nand false otherwise.",
"raw": "isClicked : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "isDown",
"comment": "The current state of the left mouse-button.\nTrue when the button is down, and false otherwise.",
"raw": "isDown : Signal Bool",
"type": [
"Signal",
[
"Bool"
]
]
},
{
"name": "position",
"comment": "The current mouse position.",
"raw": "position : Signal (Int,Int)",
"type": [
"Signal",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
]
]
},
{
"name": "x",
"comment": "The current x-coordinate of the mouse.",
"raw": "x : Signal Int",
"type": [
"Signal",
[
"Int"
]
]
},
{
"name": "y",
"comment": "The current y-coordinate of the mouse.",
"raw": "y : Signal Int",
"type": [
"Signal",
[
"Int"
]
]
}
]
},
{
"name": "Prelude",
"document": "Everything that is automatically imported",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "readFloat",
"comment": "",
"raw": "readFloat : String -\u003e Maybe Float",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"Float"
]
]
]
},
{
"name": "readInt",
"comment": "",
"raw": "readInt : String -\u003e Maybe Int",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"Int"
]
]
]
},
{
"name": "show",
"comment": "",
"raw": "show : a -\u003e String",
"type": [
"-\u003e",
"a",
[
"String"
]
]
}
]
},
{
"name": "Random",
"document": "Since the core of Elm is pure, randomness must be handled via signals.\n\n# Random Numbers\n@docs range, float, floatList",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "float",
"comment": "Produces a new signal that changes whenever the input signal changes.\nThe new values are random numbers in [0..1).",
"raw": "float : Signal a -\u003e Signal Float",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"Float"
]
]
]
},
{
"name": "floatList",
"comment": "Produces a new signal of lists that changes whenever the input signal\nchanges. The input signal specifies the length of the random list. Each value is\na random number in [0..1).",
"raw": "floatList : Signal Int -\u003e Signal [Float]",
"type": [
"-\u003e",
[
"Signal",
[
"Int"
]
],
[
"Signal",
[
"_List",
[
"Float"
]
]
]
]
},
{
"name": "range",
"comment": "Given a range from low to high and a signal of values, this produces\na new signal that changes whenever the input signal changes. The new\nvalues are random number between 'low' and 'high' inclusive.",
"raw": "range : Int -\u003e Int -\u003e Signal a -\u003e Signal Int",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"Int"
]
]
]
]
]
}
]
},
{
"name": "Set",
"document": "A set of unique values. The values can be any comparable type. This\nincludes `Int`, `Float`, `Time`, `Char`, `String`, and tuples or lists\nof comparable types.\n\nInsert, remove, and query operations all take *O(log n)* time.\n\n# Build\n@docs empty, singleton, insert, remove\n\n# Query\n@docs member\n\n# Combine\n@docs union, intersect, diff\n\n# Lists\n@docs toList, fromList\n\n# Transform\n@docs map, foldl, foldr",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "diff",
"comment": "Get the difference between the first set and the second. Keeps values\nthat do not appear in the second set.",
"raw": "diff : Set comparable -\u003e Set comparable -\u003e Set comparable",
"type": [
"-\u003e",
[
"Set",
"comparable"
],
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable"
]
]
]
},
{
"name": "empty",
"comment": "Create an empty set.",
"raw": "empty : Set comparable",
"type": [
"Set",
"comparable"
]
},
{
"name": "foldl",
"comment": "Fold over the values in a set, in order from lowest to highest.",
"raw": "foldl : (comparable -\u003e b -\u003e b) -\u003e b -\u003e Set comparable -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"comparable",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Set",
"comparable"
],
"b"
]
]
]
},
{
"name": "foldr",
"comment": "Fold over the values in a set, in order from highest to lowest.",
"raw": "foldr : (comparable -\u003e b -\u003e b) -\u003e b -\u003e Set comparable -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
"comparable",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Set",
"comparable"
],
"b"
]
]
]
},
{
"name": "fromList",
"comment": "Convert a list into a set, removing any duplicates.",
"raw": "fromList : [comparable] -\u003e Set comparable",
"type": [
"-\u003e",
[
"_List",
"comparable"
],
[
"Set",
"comparable"
]
]
},
{
"name": "insert",
"comment": "Insert a value into a set.",
"raw": "insert : comparable -\u003e Set comparable -\u003e Set comparable",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable"
]
]
]
},
{
"name": "intersect",
"comment": "Get the intersection of two sets. Keeps values that appear in both sets.",
"raw": "intersect : Set comparable -\u003e Set comparable -\u003e Set comparable",
"type": [
"-\u003e",
[
"Set",
"comparable"
],
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable"
]
]
]
},
{
"name": "map",
"comment": "Map a function onto a set, creating a new set with no duplicates.",
"raw": "map : (comparable -\u003e comparable') -\u003e Set comparable -\u003e Set comparable'",
"type": [
"-\u003e",
[
"-\u003e",
"comparable",
"comparable'"
],
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable'"
]
]
]
},
{
"name": "member",
"comment": "Determine if a value is in a set.",
"raw": "member : comparable -\u003e Set comparable -\u003e Bool",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Bool"
]
]
]
},
{
"name": "remove",
"comment": "Remove a value from a set. If the value is not found, no changes are made.",
"raw": "remove : comparable -\u003e Set comparable -\u003e Set comparable",
"type": [
"-\u003e",
"comparable",
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable"
]
]
]
},
{
"name": "singleton",
"comment": "Create a set with one value.",
"raw": "singleton : comparable -\u003e Set comparable",
"type": [
"-\u003e",
"comparable",
[
"Set",
"comparable"
]
]
},
{
"name": "toList",
"comment": "Convert a set into a list.",
"raw": "toList : Set comparable -\u003e [comparable]",
"type": [
"-\u003e",
[
"Set",
"comparable"
],
[
"_List",
"comparable"
]
]
},
{
"name": "union",
"comment": "Get the union of two sets. Keep all values.",
"raw": "union : Set comparable -\u003e Set comparable -\u003e Set comparable",
"type": [
"-\u003e",
[
"Set",
"comparable"
],
[
"-\u003e",
[
"Set",
"comparable"
],
[
"Set",
"comparable"
]
]
]
}
]
},
{
"name": "Signal",
"document": "The library for general signal manipulation. Includes lift functions up to\n`lift8` and infix lift operators `\u003c~` and `~`, combinations, filters, and\npast-dependence.\n\nSignals are time-varying values. Lifted functions are reevaluated whenver any of\ntheir input signals has an event. Signal events may be of the same value as the\nprevious value of the signal. Such signals are useful for timing and\npast-dependence.\n\nSome useful functions for working with time (e.g. setting FPS) and combining\nsignals and time (e.g. delaying updates, getting timestamps) can be found in\nthe [`Time`](/docs/Signal/Time.elm) library.\n\n# Combine\n@docs constant, lift, lift2, merge, merges, combine\n\n# Past-Dependence\n@docs foldp, count, countIf\n\n#Filters\n@docs keepIf, dropIf, keepWhen, dropWhen, dropRepeats, sampleOn\n\n# Pretty Lift\n@docs (\u003c~), (~)\n\n# Do you even lift?\n@docs lift3, lift4, lift5, lift6, lift7, lift8",
"aliases": [],
"datatypes": [
{
"name": "Signal",
"comment": "",
"raw": "data Signal a = Signal",
"typeVariables": [
"a"
],
"constructors": [
{
"name": "Signal",
"type": [
"Signal",
"a"
]
}
]
}
],
"values": [
{
"name": "\u003c~",
"comment": "An alias for `lift`. A prettier way to apply a function to the current value\nof a signal.",
"raw": "(\u003c~) : (a -\u003e b) -\u003e Signal a -\u003e Signal b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"b"
]
]
],
"associativity": "left",
"precedence": 4
},
{
"name": "combine",
"comment": "Combine a list of signals into a signal of lists.",
"raw": "combine : [Signal a] -\u003e Signal [a]",
"type": [
"-\u003e",
[
"_List",
[
"Signal",
"a"
]
],
[
"Signal",
[
"_List",
"a"
]
]
]
},
{
"name": "constant",
"comment": "Create a constant signal that never changes.",
"raw": "constant : a -\u003e Signal a",
"type": [
"-\u003e",
"a",
[
"Signal",
"a"
]
]
},
{
"name": "count",
"comment": "Count the number of events that have occured.",
"raw": "count : Signal a -\u003e Signal Int",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"Int"
]
]
]
},
{
"name": "countIf",
"comment": "Count the number of events that have occured that satisfy a given predicate.",
"raw": "countIf : (a -\u003e Bool) -\u003e Signal a -\u003e Signal Int",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"Int"
]
]
]
]
},
{
"name": "dropIf",
"comment": "Drop events that satisfy the given predicate. Elm does not allow undefined\nsignals, so a base case must be provided in case the predicate is never\nsatisfied.",
"raw": "dropIf : (a -\u003e Bool) -\u003e a -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
"a",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
]
},
{
"name": "dropRepeats",
"comment": "Drop sequential repeated values. For example, if a signal produces the\nsequence `[1,1,2,2,1]`, it becomes `[1,2,1]` by dropping the values that are the\nsame as the previous value.",
"raw": "dropRepeats : Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
},
{
"name": "dropWhen",
"comment": "Drop events when the first signal is true. When the first signal becomes\nfalse, the most recent value of the second signal will be propagated. Until the\nfirst signal becomes true again, all events will be propagated. Elm does not\nallow undefined signals, so a base case must be provided in case the first\nsignal is always true.",
"raw": "dropWhen : Signal Bool -\u003e a -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"Signal",
[
"Bool"
]
],
[
"-\u003e",
"a",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
]
},
{
"name": "foldp",
"comment": "Create a past-dependent signal. Each value given on the input signal will\nbe accumulated, producing a new output value.\n\nFor instance, `foldp (+) 0 (fps 40)` is the time the program has been running,\nupdated 40 times a second.",
"raw": "foldp : (a -\u003e b -\u003e b) -\u003e b -\u003e Signal a -\u003e Signal b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"b"
]
]
]
]
},
{
"name": "keepIf",
"comment": "Keep only events that satisfy the given predicate. Elm does not allow\nundefined signals, so a base case must be provided in case the predicate is\nnever satisfied.",
"raw": "keepIf : (a -\u003e Bool) -\u003e a -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"Bool"
]
],
[
"-\u003e",
"a",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
]
},
{
"name": "keepWhen",
"comment": "Keep events only when the first signal is true. When the first signal\nbecomes true, the most recent value of the second signal will be propagated.\nUntil the first signal becomes false again, all events will be propagated. Elm\ndoes not allow undefined signals, so a base case must be provided in case the\nfirst signal is never true.",
"raw": "keepWhen : Signal Bool -\u003e a -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"Signal",
[
"Bool"
]
],
[
"-\u003e",
"a",
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
]
},
{
"name": "lift",
"comment": "Transform a signal with a given function.",
"raw": "lift : (a -\u003e b) -\u003e Signal a -\u003e Signal b",
"type": [
"-\u003e",
[
"-\u003e",
"a",
"b"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"b"
]
]
]
},
{
"name": "lift2",
"comment": "Combine two signals with a given function.",
"raw": "lift2 : (a -\u003e b -\u003e c) -\u003e Signal a -\u003e Signal b -\u003e Signal c",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
"c"
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"Signal",
"c"
]
]
]
]
},
{
"name": "lift3",
"comment": "",
"raw": "lift3 : (a -\u003e b -\u003e c -\u003e d) -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
"d"
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"Signal",
"d"
]
]
]
]
]
},
{
"name": "lift4",
"comment": "",
"raw": "lift4 : (a -\u003e b -\u003e c -\u003e d -\u003e e) -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d -\u003e Signal e",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
[
"-\u003e",
"d",
"e"
]
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"-\u003e",
[
"Signal",
"d"
],
[
"Signal",
"e"
]
]
]
]
]
]
},
{
"name": "lift5",
"comment": "",
"raw": "lift5 : (a -\u003e b -\u003e c -\u003e d -\u003e e -\u003e f) -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d -\u003e Signal e -\u003e Signal f",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
[
"-\u003e",
"d",
[
"-\u003e",
"e",
"f"
]
]
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"-\u003e",
[
"Signal",
"d"
],
[
"-\u003e",
[
"Signal",
"e"
],
[
"Signal",
"f"
]
]
]
]
]
]
]
},
{
"name": "lift6",
"comment": "",
"raw": "lift6 : (a -\u003e b -\u003e c -\u003e d -\u003e e -\u003e f -\u003e g)\n -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d -\u003e Signal e -\u003e Signal f -\u003e Signal g",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
[
"-\u003e",
"d",
[
"-\u003e",
"e",
[
"-\u003e",
"f",
"g"
]
]
]
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"-\u003e",
[
"Signal",
"d"
],
[
"-\u003e",
[
"Signal",
"e"
],
[
"-\u003e",
[
"Signal",
"f"
],
[
"Signal",
"g"
]
]
]
]
]
]
]
]
},
{
"name": "lift7",
"comment": "",
"raw": "lift7 : (a -\u003e b -\u003e c -\u003e d -\u003e e -\u003e f -\u003e g -\u003e h)\n -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d -\u003e Signal e -\u003e Signal f -\u003e Signal g -\u003e Signal h",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
[
"-\u003e",
"d",
[
"-\u003e",
"e",
[
"-\u003e",
"f",
[
"-\u003e",
"g",
"h"
]
]
]
]
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"-\u003e",
[
"Signal",
"d"
],
[
"-\u003e",
[
"Signal",
"e"
],
[
"-\u003e",
[
"Signal",
"f"
],
[
"-\u003e",
[
"Signal",
"g"
],
[
"Signal",
"h"
]
]
]
]
]
]
]
]
]
},
{
"name": "lift8",
"comment": "",
"raw": "lift8 : (a -\u003e b -\u003e c -\u003e d -\u003e e -\u003e f -\u003e g -\u003e h -\u003e i)\n -\u003e Signal a -\u003e Signal b -\u003e Signal c -\u003e Signal d -\u003e Signal e -\u003e Signal f -\u003e Signal g -\u003e Signal h -\u003e Signal i",
"type": [
"-\u003e",
[
"-\u003e",
"a",
[
"-\u003e",
"b",
[
"-\u003e",
"c",
[
"-\u003e",
"d",
[
"-\u003e",
"e",
[
"-\u003e",
"f",
[
"-\u003e",
"g",
[
"-\u003e",
"h",
"i"
]
]
]
]
]
]
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"-\u003e",
[
"Signal",
"c"
],
[
"-\u003e",
[
"Signal",
"d"
],
[
"-\u003e",
[
"Signal",
"e"
],
[
"-\u003e",
[
"Signal",
"f"
],
[
"-\u003e",
[
"Signal",
"g"
],
[
"-\u003e",
[
"Signal",
"h"
],
[
"Signal",
"i"
]
]
]
]
]
]
]
]
]
]
},
{
"name": "merge",
"comment": "Merge two signals into one, biased towards the first signal if both signals\nupdate at the same time.",
"raw": "merge : Signal a -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
},
{
"name": "merges",
"comment": "Merge many signals into one, biased towards the left-most signal if multiple\nsignals update simultaneously.",
"raw": "merges : [Signal a] -\u003e Signal a",
"type": [
"-\u003e",
[
"_List",
[
"Signal",
"a"
]
],
[
"Signal",
"a"
]
]
},
{
"name": "sampleOn",
"comment": "Sample from the second input every time an event occurs on the first input.\nFor example, `(sampleOn clicks (every second))` will give the approximate time\nof the latest click.",
"raw": "sampleOn : Signal a -\u003e Signal b -\u003e Signal b",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"-\u003e",
[
"Signal",
"b"
],
[
"Signal",
"b"
]
]
]
},
{
"name": "~",
"comment": "Informally, an alias for `liftN`. Intersperse it between additional signal\narguments of the lifted function.\n\nFormally, signal application. This takes two signals, holding a function and\na value. It applies the current function to the current value.\n\nThe following expressions are equivalent:\n\n scene \u003c~ Window.dimensions ~ Mouse.position\n lift2 scene Window.dimensions Mouse.position",
"raw": "(~) : Signal (a -\u003e b) -\u003e Signal a -\u003e Signal b",
"type": [
"-\u003e",
[
"Signal",
[
"-\u003e",
"a",
"b"
]
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"b"
]
]
],
"associativity": "left",
"precedence": 4
}
]
},
{
"name": "String",
"document": "A built-in representation for efficient string manipulation. String literals\nare enclosed in `\"double quotes\"`. Strings are *not* lists of characters.\n\n# Basics\n@docs isEmpty, length, reverse, repeat\n\n# Building and Splitting\n@docs cons, uncons, append, concat, split, join, words, lines\n\n# Get Substrings\n@docs sub, left, right, dropLeft, dropRight\n\n# Check for Substrings\n@docs contains, startsWith, endsWith, indexes, indices\n\n# Conversions\n@docs toInt, toFloat, toList, fromList\n\n# Formatting\nCosmetic operations such as padding with extra characters or trimming whitespace.\n\n@docs toUpper, toLower,\n pad, padLeft, padRight,\n trim, trimLeft, trimRight\n\n# Higher-Order Functions\n@docs map, filter, foldl, foldr, any, all",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "all",
"comment": "Check to see if *all* characters satisfy a predicate.\n\n all isDigit \"90210\" == True\n all isDigit \"R2-D2\" == False\n any isDigit \"heart\" == False",
"raw": "all : (Char -\u003e Bool) -\u003e String -\u003e Bool",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"Bool"
]
],
[
"-\u003e",
[
"String"
],
[
"Bool"
]
]
]
},
{
"name": "any",
"comment": "Check to see if *any* characters satisfy a predicate.\n\n any isDigit \"90210\" == True\n any isDigit \"R2-D2\" == True\n any isDigit \"heart\" == False",
"raw": "any : (Char -\u003e Bool) -\u003e String -\u003e Bool",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"Bool"
]
],
[
"-\u003e",
[
"String"
],
[
"Bool"
]
]
]
},
{
"name": "append",
"comment": "Append two strings. You can also use [the `(++)` operator](/library/List.elm#++)\nto do this.\n\n append \"butter\" \"fly\" == \"butterfly\"",
"raw": "append : String -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "concat",
"comment": "Concatenate many strings into one.\n\n concat [\"never\",\"the\",\"less\"] == \"nevertheless\"",
"raw": "concat : [String] -\u003e String",
"type": [
"-\u003e",
[
"_List",
[
"String"
]
],
[
"String"
]
]
},
{
"name": "cons",
"comment": "Add a character to the beginning of a string",
"raw": "cons : Char -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Char"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "contains",
"comment": "See if a string contains another one.\n\n contains \"the\" \"theory\" == True\n contains \"hat\" \"theory\" == False\n contains \"THE\" \"theory\" == False",
"raw": "contains : String -\u003e String -\u003e Bool",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"Bool"
]
]
]
},
{
"name": "dropLeft",
"comment": "Drop N characters from the left side of a string.",
"raw": "dropLeft : Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "dropRight",
"comment": "Drop N characters from the right side of a string.",
"raw": "dropRight : Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "endsWith",
"comment": "See if a string ends with another one.\n\n endsWith \"the\" \"theory\" == False\n endsWith \"ory\" \"theory\" == True",
"raw": "endsWith : String -\u003e String -\u003e Bool",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"Bool"
]
]
]
},
{
"name": "filter",
"comment": "Keep only the characters that satisfy the predicate:\n\n filter isDigit \"R2-D2\" == \"22\"",
"raw": "filter : (Char -\u003e Bool) -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"Bool"
]
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "foldl",
"comment": "Reduce a string from the left:\n\n foldl cons \"\" \"time\" == \"emit\"",
"raw": "foldl : (Char -\u003e b -\u003e b) -\u003e b -\u003e String -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"String"
],
"b"
]
]
]
},
{
"name": "foldr",
"comment": "Reduce a string from the right:\n\n foldr cons \"\" \"time\" == \"time\"",
"raw": "foldr : (Char -\u003e b -\u003e b) -\u003e b -\u003e String -\u003e b",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"-\u003e",
"b",
"b"
]
],
[
"-\u003e",
"b",
[
"-\u003e",
[
"String"
],
"b"
]
]
]
},
{
"name": "fromList",
"comment": "Convert a list of characters into a String. Can be useful if you\nwant to create a string primarly by consing, perhaps for decoding\nsomething.\n\n fromList ['a','b','c'] == \"abc\"",
"raw": "fromList : String -\u003e [Char]",
"type": [
"-\u003e",
[
"String"
],
[
"_List",
[
"Char"
]
]
]
},
{
"name": "indexes",
"comment": "Get all of the indexes for a substring.\n\n indexes \"i\" \"Mississippi\" == [1,4,7,10]\n indexes \"ss\" \"Mississippi\" == [2,5]\n indexes \"needle\" \"haystack\" == []",
"raw": "indexes : String -\u003e String -\u003e [Int]",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"_List",
[
"Int"
]
]
]
]
},
{
"name": "indices",
"comment": "Alias for `indexes`",
"raw": "indices : String -\u003e String -\u003e [Int]",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"_List",
[
"Int"
]
]
]
]
},
{
"name": "isEmpty",
"comment": "Check if a string is empty `(isEmpty \"\" == True)`",
"raw": "isEmpty : String",
"type": [
"String"
]
},
{
"name": "join",
"comment": "Put many strings together with a given separator.\n\n join \" \" [\"cat\",\"dog\",\"cow\"] == \"cat dog cow\"\n join \"/\" [\"home\",\"evan\",\"Desktop\"] == \"home/evan/Desktop\"",
"raw": "join : String -\u003e [String] -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"_List",
[
"String"
]
],
[
"String"
]
]
]
},
{
"name": "left",
"comment": "Take N characters from the left side of a string.",
"raw": "left : Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "length",
"comment": "Get the length of a string `(length \"innumerable\" == 11)`",
"raw": "length : String -\u003e Int",
"type": [
"-\u003e",
[
"String"
],
[
"Int"
]
]
},
{
"name": "lines",
"comment": "Break a string into lines, splitting on newlines.\n\n lines \"How are you?\\nGood? == [\"How are you?\", \"Good?\"]",
"raw": "lines : String -\u003e [String]",
"type": [
"-\u003e",
[
"String"
],
[
"_List",
[
"String"
]
]
]
},
{
"name": "map",
"comment": "Transform every character in a string\n\n map (\\c -\u003e if c == '/' then '.' else c) \"a/b/c\" == \"a.b.c\"",
"raw": "map : (Char -\u003e Char) -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"-\u003e",
[
"Char"
],
[
"Char"
]
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "pad",
"comment": "Pad a string on both sides until it has a given length.\n\n pad 5 ' ' \"1\" == \" 1 \"\n pad 5 ' ' \"11\" == \" 11 \"\n pad 5 ' ' \"121\" == \" 121 \"",
"raw": "pad : Int -\u003e Char -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Char"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
]
},
{
"name": "padLeft",
"comment": "Pad a string on the left until it has a given length.\n\n pad 5 '.' \"1\" == \"....1\"\n pad 5 '.' \"11\" == \"...11\"\n pad 5 '.' \"121\" == \"..121\"",
"raw": "padLeft : Int -\u003e Char -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Char"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
]
},
{
"name": "padRight",
"comment": "Pad a string on the right until it has a given length.\n\n pad 5 '.' \"1\" == \"1....\"\n pad 5 '.' \"11\" == \"11...\"\n pad 5 '.' \"121\" == \"121..\"",
"raw": "padRight : Int -\u003e Char -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Char"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
]
},
{
"name": "repeat",
"comment": "Repeat a string N times `(repeat 3 \"ha\" == \"hahaha\")`",
"raw": "repeat : Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "reverse",
"comment": "Reverse a string. `(reverse \"stressed\" == \"desserts\")`",
"raw": "reverse : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "right",
"comment": "Take N characters from the right side of a string.",
"raw": "right : Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
},
{
"name": "split",
"comment": "Split a string using a given separator.\n\n split \",\" \"cat,dog,cow\" == [\"cat\",\"dog\",\"cow\"]\n split \"/\" \"home/evan/Desktop/\" == [\"home\",\"evan\",\"Desktop\"]",
"raw": "split : String -\u003e String -\u003e [String]",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"_List",
[
"String"
]
]
]
]
},
{
"name": "startsWith",
"comment": "See if a string starts with another one.\n\n startsWith \"the\" \"theory\" == True\n startsWith \"ory\" \"theory\" == False",
"raw": "startsWith : String -\u003e String -\u003e Bool",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"String"
],
[
"Bool"
]
]
]
},
{
"name": "sub",
"comment": "Take a substring given a start and end index. Negative indexes\nare taken starting from the *end* of the list.\n\n sub 7 9 \"snakes on a plane!\" == \"on\"\n sub 0 6 \"snakes on a plane!\" == \"snakes\"\n sub 0 -7 \"snakes on a plane!\" == \"snakes on a\"\n sub -6 -1 \"snakes on a plane!\" == \"plane\"",
"raw": "sub : Int -\u003e Int -\u003e String -\u003e String",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"String"
]
]
]
]
},
{
"name": "toFloat",
"comment": "Try to convert a string into a float, failing on improperly formatted strings.\n\n toFloat \"123\" == Just 123.0\n toFloat \"-42\" == Just -42.0\n toFloat \"3.1\" == Just 3.1\n toFloat \"31a\" == Nothing",
"raw": "toFloat : String -\u003e Maybe Float",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"Float"
]
]
]
},
{
"name": "toInt",
"comment": "Try to convert a string into an int, failing on improperly formatted strings.\n\n toInt \"123\" == Just 123\n toInt \"-42\" == Just -42\n toInt \"3.1\" == Nothing\n toInt \"31a\" == Nothing",
"raw": "toInt : String -\u003e Maybe Int",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"Int"
]
]
]
},
{
"name": "toList",
"comment": "Convert a string to a list of characters.\n\n toList \"abc\" == ['a','b','c']",
"raw": "toList : String -\u003e [Char]",
"type": [
"-\u003e",
[
"String"
],
[
"_List",
[
"Char"
]
]
]
},
{
"name": "toLower",
"comment": "Convert a string to all lower case. Useful for case insensitive comparisons.",
"raw": "toLower : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "toUpper",
"comment": "Convert a string to all upper case. Useful for case insensitive comparisons\nand VIRTUAL YELLING.",
"raw": "toUpper : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "trim",
"comment": "Get rid of whitespace on both sides of a string.\n\n trim \" hats \\n\" == \"hats\"",
"raw": "trim : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "trimLeft",
"comment": "Get rid of whitespace on the left of a string.\n\n trimLeft \" hats \\n\" == \"hats \\n\"",
"raw": "trimLeft : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "trimRight",
"comment": "Get rid of whitespace on the left of a string.\n\n trimRight \" hats \\n\" == \" hats\"",
"raw": "trimRight : String -\u003e String",
"type": [
"-\u003e",
[
"String"
],
[
"String"
]
]
},
{
"name": "uncons",
"comment": "Split a non-empty string into its head and tail. This lets you\npattern match on strings exactly as you would with lists.\n\n uncons \"abc\" == Just ('a',\"bc\")\n uncons \"\" == Nothing",
"raw": "uncons : String -\u003e Maybe (Char, String)",
"type": [
"-\u003e",
[
"String"
],
[
"Maybe",
[
"_Tuple2",
[
"Char"
],
[
"String"
]
]
]
]
},
{
"name": "words",
"comment": "Break a string into words, splitting on chunks of whitespace.\n\n words \"How are \\t you? \\n Good?\" == [\"How\",\"are\",\"you?\",\"Good?\"]",
"raw": "words : String -\u003e [String]",
"type": [
"-\u003e",
[
"String"
],
[
"_List",
[
"String"
]
]
]
}
]
},
{
"name": "Text",
"document": "Functions for displaying text\n\n# Creating Text\n@docs toText\n\n# Creating Elements\n@docs plainText, asText, text, centered, justified, righted\n\n# Formatting\n@docs color, typeface, height, link\n\n# Simple Formatting\n@docs monospace, header, bold, italic, underline, overline, strikeThrough",
"aliases": [],
"datatypes": [
{
"name": "Text",
"comment": "",
"raw": "data Text = Text",
"typeVariables": [],
"constructors": [
{
"name": "Text",
"type": [
"Text"
]
}
]
}
],
"values": [
{
"name": "asText",
"comment": "Convert anything to its textual representation and make it displayable in\nthe browser:\n\n asText == text . monospace . show\n\nExcellent for debugging.",
"raw": "asText : a -\u003e Element",
"type": [
"-\u003e",
"a",
[
"Element"
]
]
},
{
"name": "bold",
"comment": "Make a string bold.",
"raw": "bold : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "centered",
"comment": "Display centered, styled text.",
"raw": "centered : Text -\u003e Element",
"type": [
"-\u003e",
[
"Text"
],
[
"Element"
]
]
},
{
"name": "color",
"comment": "Set the color of a string.",
"raw": "color : Color -\u003e Text -\u003e Text",
"type": [
"-\u003e",
[
"Color"
],
[
"-\u003e",
[
"Text"
],
[
"Text"
]
]
]
},
{
"name": "header",
"comment": "Make text big and noticable.",
"raw": "header : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "height",
"comment": "Set the height of text in pixels.",
"raw": "height : Float -\u003e Text -\u003e Text",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Text"
],
[
"Text"
]
]
]
},
{
"name": "italic",
"comment": "Italicize a string.",
"raw": "italic : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "justified",
"comment": "Display justified, styled text.",
"raw": "justified : Text -\u003e Element",
"type": [
"-\u003e",
[
"Text"
],
[
"Element"
]
]
},
{
"name": "link",
"comment": "Create a link.",
"raw": "link : String -\u003e Text -\u003e Text",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Text"
],
[
"Text"
]
]
]
},
{
"name": "markdown",
"comment": "for internal use only",
"raw": "markdown : Element",
"type": [
"Element"
]
},
{
"name": "monospace",
"comment": "Switch to a monospace typeface. Good for code snippets.",
"raw": "monospace : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "overline",
"comment": "Draw a line above a string.",
"raw": "overline : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "plainText",
"comment": "Display a plain string.",
"raw": "plainText : String -\u003e Element",
"type": [
"-\u003e",
[
"String"
],
[
"Element"
]
]
},
{
"name": "righted",
"comment": "Display right justified, styled text.",
"raw": "righted : Text -\u003e Element",
"type": [
"-\u003e",
[
"Text"
],
[
"Element"
]
]
},
{
"name": "strikeThrough",
"comment": "Draw a line through a string.",
"raw": "strikeThrough : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
},
{
"name": "text",
"comment": "Display styled text.",
"raw": "text : Text -\u003e Element",
"type": [
"-\u003e",
[
"Text"
],
[
"Element"
]
]
},
{
"name": "toText",
"comment": "Convert a string into text which can be styled and displayed.",
"raw": "toText : String -\u003e Text",
"type": [
"-\u003e",
[
"String"
],
[
"Text"
]
]
},
{
"name": "typeface",
"comment": "Set the typeface of some text. The first argument should be a comma\nseparated listing of the desired typefaces:\n\n \"helvetica, arial, sans-serif\"\n\nWorks the same as the CSS font-family property.",
"raw": "typeface : String -\u003e Text -\u003e Text",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Text"
],
[
"Text"
]
]
]
},
{
"name": "underline",
"comment": "Underline a string.",
"raw": "underline : Text -\u003e Text",
"type": [
"-\u003e",
[
"Text"
],
[
"Text"
]
]
}
]
},
{
"name": "Time",
"document": "Library for working with time.\n\n# Units\n@docs Time, millisecond, second, minute, hour,\n inMilliseconds, inSeconds, inMinutes, inHours\n\n# Tickers\n@docs fps, fpsWhen, every\n\n# Timing\n@docs timestamp, delay, since",
"aliases": [
{
"name": "Time",
"comment": "Type alias to make it clearer when you are working with time values.\nUsing the `Time` constants instead of raw numbers is very highly recommended.",
"raw": "type Time = Float",
"typeVariables": [],
"type": [
"Float"
]
}
],
"datatypes": [],
"values": [
{
"name": "delay",
"comment": "Delay a signal by a certain amount of time. So `(delay second Mouse.clicks)`\nwill update one second later than any mouse click.",
"raw": "delay : Time -\u003e Signal a -\u003e Signal a",
"type": [
"-\u003e",
[
"Time"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
"a"
]
]
]
},
{
"name": "every",
"comment": "Takes a time interval t. The resulting signal is the current time, updated\nevery t.",
"raw": "every : Time -\u003e Signal Time",
"type": [
"-\u003e",
[
"Time"
],
[
"Signal",
[
"Time"
]
]
]
},
{
"name": "fps",
"comment": "Takes desired number of frames per second (fps). The resulting signal\ngives a sequence of time deltas as quickly as possible until it reaches\nthe desired FPS. A time delta is the time between the last frame and the\ncurrent frame.",
"raw": "fps : number -\u003e Signal Time",
"type": [
"-\u003e",
"number",
[
"Signal",
[
"Time"
]
]
]
},
{
"name": "fpsWhen",
"comment": "Same as the fps function, but you can turn it on and off. Allows you\nto do brief animations based on user input without major inefficiencies.\nThe first time delta after a pause is always zero, no matter how long\nthe pause was. This way summing the deltas will actually give the amount\nof time that the output signal has been running.",
"raw": "fpsWhen : number -\u003e Signal Bool -\u003e Signal Time",
"type": [
"-\u003e",
"number",
[
"-\u003e",
[
"Signal",
[
"Bool"
]
],
[
"Signal",
[
"Time"
]
]
]
]
},
{
"name": "hour",
"comment": "",
"raw": "hour : Time",
"type": [
"Time"
]
},
{
"name": "inHours",
"comment": "",
"raw": "inHours : Time -\u003e Float",
"type": [
"-\u003e",
[
"Time"
],
[
"Float"
]
]
},
{
"name": "inMilliseconds",
"comment": "",
"raw": "inMilliseconds : Time -\u003e Float",
"type": [
"-\u003e",
[
"Time"
],
[
"Float"
]
]
},
{
"name": "inMinutes",
"comment": "",
"raw": "inMinutes : Time -\u003e Float",
"type": [
"-\u003e",
[
"Time"
],
[
"Float"
]
]
},
{
"name": "inSeconds",
"comment": "",
"raw": "inSeconds : Time -\u003e Float",
"type": [
"-\u003e",
[
"Time"
],
[
"Float"
]
]
},
{
"name": "millisecond",
"comment": "Units of time, making it easier to specify things like a half-second\n`(500 * milliseconds)` without remembering Elm’s underlying units of time.",
"raw": "millisecond : Time",
"type": [
"Time"
]
},
{
"name": "minute",
"comment": "",
"raw": "minute : Time",
"type": [
"Time"
]
},
{
"name": "second",
"comment": "",
"raw": "second : Time",
"type": [
"Time"
]
},
{
"name": "since",
"comment": "Takes a time `t` and any signal. The resulting boolean signal is true for\ntime `t` after every event on the input signal. So ``(second `since`\nMouse.clicks)`` would result in a signal that is true for one second after\neach mouse click and false otherwise.",
"raw": "since : Time -\u003e Signal a -\u003e Signal Bool",
"type": [
"-\u003e",
[
"Time"
],
[
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"Bool"
]
]
]
]
},
{
"name": "timestamp",
"comment": "Add a timestamp to any signal. Timestamps increase monotonically. Each\ntimestamp is related to a specfic event, so `Mouse.x` and `Mouse.y` will always\nhave the same timestamp because they both rely on the same underlying event.",
"raw": "timestamp : Signal a -\u003e Signal (Time, a)",
"type": [
"-\u003e",
[
"Signal",
"a"
],
[
"Signal",
[
"_Tuple2",
[
"Time"
],
"a"
]
]
]
}
]
},
{
"name": "Touch",
"document": "This is an early version of the touch library. It will likely grow to\ninclude gestures that would be useful for both games and web-pages.\n\n# Touches\n@docs Touch, touches\n\n# Gestures\n@docs taps",
"aliases": [
{
"name": "Touch",
"comment": "Every `Touch` has `xy` coordinates. It also has an identifier\n`id` to distinguish one touch from another.\n\nA touch also keeps info about the initial point and time of contact:\n`x0`, `y0`, and `t0`. This helps compute more complicated gestures\nlike taps, drags, and swipes which need to know about timing or direction.",
"raw": "type Touch = { x:Int, y:Int, id:Int, x0:Int, y0:Int, t0:Time }",
"typeVariables": [],
"type": {
"y0": [
"Int"
],
"y": [
"Int"
],
"x": [
"Int"
],
"id": [
"Int"
],
"t0": [
"Time"
],
"x0": [
"Int"
]
}
}
],
"datatypes": [],
"values": [
{
"name": "taps",
"comment": "The last position that was tapped. Default value is `{x=0,y=0}`.\nUpdates whenever the user taps the screen.",
"raw": "taps : Signal { x:Int, y:Int }",
"type": [
"Signal",
{
"y": [
"Int"
],
"x": [
"Int"
]
}
]
},
{
"name": "touches",
"comment": "A list of ongoing touches.",
"raw": "touches : Signal [Touch]",
"type": [
"Signal",
[
"_List",
[
"Touch"
]
]
]
}
]
},
{
"name": "Transform2D",
"document": "A library for performing [2D matrix transformations](http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations).\nIt is used primarily with the `groupTransform` function from `Graphics.Collage` and\nallows you to do things like rotation, scaling, translation, shearing, and reflection.\n\n# Basic Transforms\n@docs identity, matrix, rotation\n\n# Multiplication\n@docs multiply",
"aliases": [],
"datatypes": [
{
"name": "Transform2D",
"comment": "",
"raw": "data Transform2D = Transform2D",
"typeVariables": [],
"constructors": [
{
"name": "Transform2D",
"type": [
"Transform2D"
]
}
]
}
],
"values": [
{
"name": "identity",
"comment": "Create an identity transform. Transforming by the identity does\nnot change anything, but it can come in handy as a default or\nbase case.\n\n / 1 0 \\\n \\ 0 1 /",
"raw": "identity : Transform2D",
"type": [
"Transform2D"
]
},
{
"name": "matrix",
"comment": "Creates a transformation matrix. This lets you create transforms\nsuch as scales, shears, reflections, and translations.\n\n matrix a b c d dx dy\n\n / a b \\\n \\ c d /\n\nAnd `dx` and `dy` are the translation values.",
"raw": "matrix : Float -\u003e Float -\u003e Float -\u003e Float -\u003e Float -\u003e Float -\u003e Transform2D",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Transform2D"
]
]
]
]
]
]
]
},
{
"name": "multiply",
"comment": "Multiplies two transforms together:\n\n multiply a b\n\n / a11 a12 \\ . / b11 b12 \\\n \\ a21 a22 / \\ b21 b22 /",
"raw": "multiply : Transform2D -\u003e Transform2D -\u003e Transform2D",
"type": [
"-\u003e",
[
"Transform2D"
],
[
"-\u003e",
[
"Transform2D"
],
[
"Transform2D"
]
]
]
},
{
"name": "rotation",
"comment": "Creates a [rotation matrix](http://en.wikipedia.org/wiki/Rotation_matrix).\nGiven an angle t, it creates a counterclockwise rotation matrix:\n\n / cos t -sin t \\\n \\ sin t cos t /",
"raw": "rotation : Float -\u003e Transform2D",
"type": [
"-\u003e",
[
"Float"
],
[
"Transform2D"
]
]
}
]
},
{
"name": "WebSocket",
"document": "A library for low latency HTTP communication. See the HTTP library for\nstandard requests like GET, POST, etc. The API of this library is likely to\nchange to make it more flexible.\n\n# Open a Connection\n@docs connect",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "connect",
"comment": "Create a web-socket. The first argument is the URL of the desired\nweb-socket server. The input signal holds the outgoing messages,\nand the resulting signal contains the incoming ones.",
"raw": "connect : String -\u003e Signal String -\u003e Signal String",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Signal",
[
"String"
]
],
[
"Signal",
[
"String"
]
]
]
]
}
]
},
{
"name": "Window",
"document": "Provides information about the container that your Elm program lives in.\nWhen you embed Elm in a `\u003cdiv\u003e` it gives the dimensions of the container, not\nthe whole window.\n\n# Dimensions\n@docs dimensions, width, height",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "dimensions",
"comment": "The current width and height of the window (i.e. the area viewable to the\nuser, not including scroll bars).",
"raw": "dimensions : Signal (Int,Int)",
"type": [
"Signal",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
]
]
},
{
"name": "height",
"comment": "The current height of the window.",
"raw": "height : Signal Int",
"type": [
"Signal",
[
"Int"
]
]
},
{
"name": "width",
"comment": "The current width of the window.",
"raw": "width : Signal Int",
"type": [
"Signal",
[
"Int"
]
]
}
]
},
{
"name": "Graphics.Collage",
"document": "The collage API is for freeform graphics. You can move, rotate, scale, etc.\nall sorts of forms including lines, shapes, images, and elements.\n\n# Unstructured Graphics\n@docs collage\n \n# Creating Forms\n@docs toForm, filled, textured, gradient, outlined, traced\n \n# Transforming Forms\n@docs move, moveX, moveY, scale, rotate, alpha\n \n# Grouping Forms\nGrouping forms makes it easier to write modular graphics code. You can create\na form that is a composite of many subforms. From there it is easy to transform\nit as a single unit.\n\n@docs group, groupTransform\n \n# Shapes\n@docs rect, oval, square, circle, ngon, polygon\n\n# Paths\n@docs segment, path\n \n# Line Styles\n@docs solid, dashed, dotted, LineStyle, LineCap, LineJoin, defaultLine",
"aliases": [
{
"name": "Form",
"comment": "",
"raw": "type Form = {\n theta : Float,\n scale : Float,\n x : Float,\n y : Float,\n alpha : Float,\n form : BasicForm\n }",
"typeVariables": [],
"type": {
"alpha": [
"Float"
],
"y": [
"Float"
],
"form": [
"BasicForm"
],
"x": [
"Float"
],
"theta": [
"Float"
],
"scale": [
"Float"
]
}
},
{
"name": "LineStyle",
"comment": "All of the attributes of a line style. This lets you build up a line style\nhowever you want. You can also update existing line styles with record updates.",
"raw": "type LineStyle = {\n color : Color,\n width : Float,\n cap : LineCap,\n join : LineJoin,\n dashing : [Int],\n dashOffset : Int\n }",
"typeVariables": [],
"type": {
"width": [
"Float"
],
"dashOffset": [
"Int"
],
"color": [
"Color"
],
"join": [
"LineJoin"
],
"dashing": [
"_List",
[
"Int"
]
],
"cap": [
"LineCap"
]
}
},
{
"name": "Path",
"comment": "",
"raw": "type Path = [(Float,Float)]",
"typeVariables": [],
"type": [
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
]
},
{
"name": "Shape",
"comment": "",
"raw": "type Shape = [(Float,Float)]",
"typeVariables": [],
"type": [
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
]
}
],
"datatypes": [
{
"name": "BasicForm",
"comment": "",
"raw": "data BasicForm\n = FPath LineStyle Path\n | FShape (Either LineStyle FillStyle) Shape\n | FImage Int Int (Int,Int) String\n | FElement Element\n | FGroup Transform2D [Form]",
"typeVariables": [],
"constructors": [
{
"name": "FPath",
"type": [
"-\u003e",
[
"LineStyle"
],
[
"-\u003e",
[
"Path"
],
[
"BasicForm"
]
]
]
},
{
"name": "FShape",
"type": [
"-\u003e",
[
"Either",
[
"LineStyle"
],
[
"FillStyle"
]
],
[
"-\u003e",
[
"Shape"
],
[
"BasicForm"
]
]
]
},
{
"name": "FImage",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
],
[
"-\u003e",
[
"String"
],
[
"BasicForm"
]
]
]
]
]
},
{
"name": "FElement",
"type": [
"-\u003e",
[
"Element"
],
[
"BasicForm"
]
]
},
{
"name": "FGroup",
"type": [
"-\u003e",
[
"Transform2D"
],
[
"-\u003e",
[
"_List",
[
"Form"
]
],
[
"BasicForm"
]
]
]
}
]
},
{
"name": "FillStyle",
"comment": "",
"raw": "data FillStyle\n = Solid Color\n | Texture String\n | Grad Gradient",
"typeVariables": [],
"constructors": [
{
"name": "Solid",
"type": [
"-\u003e",
[
"Color"
],
[
"FillStyle"
]
]
},
{
"name": "Texture",
"type": [
"-\u003e",
[
"String"
],
[
"FillStyle"
]
]
},
{
"name": "Grad",
"type": [
"-\u003e",
[
"Gradient"
],
[
"FillStyle"
]
]
}
]
},
{
"name": "LineCap",
"comment": "The shape of the ends of a line.",
"raw": "data LineCap = Flat | Round | Padded",
"typeVariables": [],
"constructors": [
{
"name": "Flat",
"type": [
"LineCap"
]
},
{
"name": "Round",
"type": [
"LineCap"
]
},
{
"name": "Padded",
"type": [
"LineCap"
]
}
]
},
{
"name": "LineJoin",
"comment": "The shape of the “joints” of a line, where each line segment\nmeets. `Sharp` takes an argument to limit the length of the joint. This\ndefaults to 10.",
"raw": "data LineJoin = Smooth | Sharp Float | Clipped",
"typeVariables": [],
"constructors": [
{
"name": "Smooth",
"type": [
"LineJoin"
]
},
{
"name": "Sharp",
"type": [
"-\u003e",
[
"Float"
],
[
"LineJoin"
]
]
},
{
"name": "Clipped",
"type": [
"LineJoin"
]
}
]
}
],
"values": [
{
"name": "alpha",
"comment": "Set the alpha of a `Form`. The default is 1, and 0 is totally transparent.",
"raw": "alpha : Float -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "circle",
"comment": "A circle with a given radius.",
"raw": "circle : Float -\u003e Shape",
"type": [
"-\u003e",
[
"Float"
],
[
"Shape"
]
]
},
{
"name": "collage",
"comment": "A collage is a collection of 2D forms. There are no strict positioning\nrelationships between forms, so you are free to do all kinds of 2D graphics.",
"raw": "collage : Int -\u003e Int -\u003e [Form] -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"_List",
[
"Form"
]
],
[
"Element"
]
]
]
]
},
{
"name": "dashed",
"comment": "Create a dashed line style with a given color. Dashing equals `[8,4]`.",
"raw": "dashed : Color -\u003e LineStyle",
"type": [
"-\u003e",
[
"Color"
],
[
"LineStyle"
]
]
},
{
"name": "defaultLine",
"comment": "The default line style, which is solid black with flat caps and sharp joints.\nYou can use record updates to build the line style you\nwant. For example, to make a thicker line, you could say:\n\n { defaultLine | width \u003c- 10 }",
"raw": "defaultLine : LineStyle",
"type": [
"LineStyle"
]
},
{
"name": "dotted",
"comment": "Create a dotted line style with a given color. Dashing equals `[3,3]`.",
"raw": "dotted : Color -\u003e LineStyle",
"type": [
"-\u003e",
[
"Color"
],
[
"LineStyle"
]
]
},
{
"name": "filled",
"comment": "Create a filled in shape.",
"raw": "filled : Color -\u003e Shape -\u003e Form",
"type": [
"-\u003e",
[
"Color"
],
[
"-\u003e",
[
"Shape"
],
[
"Form"
]
]
]
},
{
"name": "form",
"comment": "",
"raw": "form : BasicForm -\u003e Form",
"type": [
"-\u003e",
[
"BasicForm"
],
[
"Form"
]
]
},
{
"name": "gradient",
"comment": "Fill a shape with a [gradient](/library/Color.elm#linear).",
"raw": "gradient : Gradient -\u003e Shape -\u003e Form",
"type": [
"-\u003e",
[
"Gradient"
],
[
"-\u003e",
[
"Shape"
],
[
"Form"
]
]
]
},
{
"name": "group",
"comment": "Flatten many forms into a single `Form`. This lets you move and rotate them\nas a single unit, making it possible to build small, modular components.",
"raw": "group : [Form] -\u003e Form",
"type": [
"-\u003e",
[
"_List",
[
"Form"
]
],
[
"Form"
]
]
},
{
"name": "groupTransform",
"comment": "Flatten many forms into a single `Form` and then apply a matrix\ntransformation.",
"raw": "groupTransform : Transform2D -\u003e [Form] -\u003e Form",
"type": [
"-\u003e",
[
"Transform2D"
],
[
"-\u003e",
[
"_List",
[
"Form"
]
],
[
"Form"
]
]
]
},
{
"name": "move",
"comment": "Move a form by the given amount. This is a relative translation so\n`(move (10,10) form)` would move `form` ten pixels up and ten pixels to the\nright.",
"raw": "move : (Float,Float) -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "moveX",
"comment": "Move a shape in the x direction. This is relative so `(moveX 10 form)` moves\n`form` 10 pixels to the right.",
"raw": "moveX : Float -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "moveY",
"comment": "Move a shape in the y direction. This is relative so `(moveY 10 form)` moves\n`form` upwards by 10 pixels.",
"raw": "moveY : Float -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "ngon",
"comment": "A regular polygon with N sides. The first argument specifies the number\nof sides and the second is the radius. So to create a pentagon with radius\n30 you would say:\n\n ngon 5 30",
"raw": "ngon : Int -\u003e Float -\u003e Shape",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Float"
],
[
"Shape"
]
]
]
},
{
"name": "outlined",
"comment": "Outline a shape with a given line style.",
"raw": "outlined : LineStyle -\u003e Shape -\u003e Form",
"type": [
"-\u003e",
[
"LineStyle"
],
[
"-\u003e",
[
"Shape"
],
[
"Form"
]
]
]
},
{
"name": "oval",
"comment": "An oval with a given width and height.",
"raw": "oval : Float -\u003e Float -\u003e Shape",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Shape"
]
]
]
},
{
"name": "path",
"comment": "Create a path that follows a sequence of points.",
"raw": "path : [(Float,Float)] -\u003e Path",
"type": [
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
],
[
"Path"
]
]
},
{
"name": "polygon",
"comment": "Create an arbitrary polygon by specifying its corners in order.\n`polygon` will automatically close all shapes, so the given list\nof points does not need to start and end with the same position.",
"raw": "polygon : [(Float,Float)] -\u003e Shape",
"type": [
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
]
],
[
"Shape"
]
]
},
{
"name": "rect",
"comment": "A rectangle with a given width and height.",
"raw": "rect : Float -\u003e Float -\u003e Shape",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Float"
],
[
"Shape"
]
]
]
},
{
"name": "rotate",
"comment": "Rotate a form by a given angle. Rotate takes standard Elm angles (radians)\nand turns things counterclockwise. So to turn `form` 30° to the left\nyou would say, `(rotate (degrees 30) form)`.",
"raw": "rotate : Float -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "scale",
"comment": "Scale a form by a given factor. Scaling by 2 doubles the size.",
"raw": "scale : Float -\u003e Form -\u003e Form",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Form"
],
[
"Form"
]
]
]
},
{
"name": "segment",
"comment": "Create a path along a given line segment.",
"raw": "segment : (Float,Float) -\u003e (Float,Float) -\u003e Path",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"-\u003e",
[
"_Tuple2",
[
"Float"
],
[
"Float"
]
],
[
"Path"
]
]
]
},
{
"name": "solid",
"comment": "Create a solid line style with a given color.",
"raw": "solid : Color -\u003e LineStyle",
"type": [
"-\u003e",
[
"Color"
],
[
"LineStyle"
]
]
},
{
"name": "sprite",
"comment": "Create a sprite from a sprite sheet. It cuts out a rectangle\nat a given position.",
"raw": "sprite : Int -\u003e Int -\u003e (Int,Int) -\u003e String -\u003e Form",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
],
[
"-\u003e",
[
"String"
],
[
"Form"
]
]
]
]
]
},
{
"name": "square",
"comment": "A square with a given edge length.",
"raw": "square : Float -\u003e Shape",
"type": [
"-\u003e",
[
"Float"
],
[
"Shape"
]
]
},
{
"name": "textured",
"comment": "Create a textured shape. The texture is described by some url and is\ntiled to fill the entire shape.",
"raw": "textured : String -\u003e Shape -\u003e Form",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Shape"
],
[
"Form"
]
]
]
},
{
"name": "toForm",
"comment": "Turn any `Element` into a `Form`. This lets you use text, gifs, and video\nin your collage. This means you can move, rotate, and scale\nan `Element` however you want.",
"raw": "toForm : Element -\u003e Form",
"type": [
"-\u003e",
[
"Element"
],
[
"Form"
]
]
},
{
"name": "traced",
"comment": "Trace a path with a given line style.",
"raw": "traced : LineStyle -\u003e Path -\u003e Form",
"type": [
"-\u003e",
[
"LineStyle"
],
[
"-\u003e",
[
"Path"
],
[
"Form"
]
]
]
}
]
},
{
"name": "Graphics.Element",
"document": "Graphical elements that snap together to build complex widgets and layouts.\nEach Element is a rectangle with a known width and height, making them easy to\ncombine and position.\n\n# Images\n@docs image, fittedImage, croppedImage, tiledImage\n\n# Styling\n@docs width, height, size, color, opacity, link, tag\n\n# Inspection\n@docs widthOf, heightOf, sizeOf\n\n# Layout\n@docs flow, up, down, left, right, inward, outward\n\n## Layout Aliases\nThere are also some convenience functions for working\nwith `flow` in specific cases:\n\n@docs layers, above, below, beside\n\n# Positioning\n@docs spacer, container\n\n## Specific Positions\n\nTo create a `Position` you can use any of the built-in positions\nwhich cover nine common positions.\n@docs middle, midTop, midBottom, midLeft, midRight, topLeft, topRight,\n bottomLeft, bottomRight\n\nIf you need more precision, you can create custom positions.\n\n@docs absolute, relative, middleAt, midTopAt, midBottomAt, midLeftAt,\n midRightAt, topLeftAt, topRightAt, bottomLeftAt, bottomRightAt",
"aliases": [
{
"name": "Element",
"comment": "",
"raw": "type Element = { props : Properties, element : ElementPrim }",
"typeVariables": [],
"type": {
"props": [
"Properties"
],
"element": [
"ElementPrim"
]
}
},
{
"name": "Position",
"comment": "",
"raw": "type Position = { horizontal : Three, vertical : Three, x : Pos, y : Pos }",
"typeVariables": [],
"type": {
"y": [
"Pos"
],
"horizontal": [
"Three"
],
"x": [
"Pos"
],
"vertical": [
"Three"
]
}
},
{
"name": "Properties",
"comment": "",
"raw": "type Properties = {\n id : Int,\n width : Int,\n height : Int,\n opacity : Float,\n color : Maybe Color,\n href : JSString,\n tag : JSString,\n hover : ()\n }",
"typeVariables": [],
"type": {
"height": [
"Int"
],
"href": [
"JSString"
],
"width": [
"Int"
],
"id": [
"Int"
],
"color": [
"Maybe",
[
"Color"
]
],
"opacity": [
"Float"
],
"hover": [
"_Tuple0"
],
"tag": [
"JSString"
]
}
}
],
"datatypes": [
{
"name": "Direction",
"comment": "",
"raw": "data Direction = DUp | DDown | DLeft | DRight | DIn | DOut",
"typeVariables": [],
"constructors": [
{
"name": "DUp",
"type": [
"Direction"
]
},
{
"name": "DDown",
"type": [
"Direction"
]
},
{
"name": "DLeft",
"type": [
"Direction"
]
},
{
"name": "DRight",
"type": [
"Direction"
]
},
{
"name": "DIn",
"type": [
"Direction"
]
},
{
"name": "DOut",
"type": [
"Direction"
]
}
]
},
{
"name": "ElementPrim",
"comment": "",
"raw": "data ElementPrim\n = Image ImageStyle Int Int JSString\n | Container Position Element\n | Flow Direction [Element]\n | Spacer\n | RawHtml JSString\n | Custom",
"typeVariables": [],
"constructors": [
{
"name": "Image",
"type": [
"-\u003e",
[
"ImageStyle"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"JSString"
],
[
"ElementPrim"
]
]
]
]
]
},
{
"name": "Container",
"type": [
"-\u003e",
[
"Position"
],
[
"-\u003e",
[
"Element"
],
[
"ElementPrim"
]
]
]
},
{
"name": "Flow",
"type": [
"-\u003e",
[
"Direction"
],
[
"-\u003e",
[
"_List",
[
"Element"
]
],
[
"ElementPrim"
]
]
]
},
{
"name": "Spacer",
"type": [
"ElementPrim"
]
},
{
"name": "RawHtml",
"type": [
"-\u003e",
[
"JSString"
],
[
"ElementPrim"
]
]
},
{
"name": "Custom",
"type": [
"ElementPrim"
]
}
]
},
{
"name": "ImageStyle",
"comment": "",
"raw": "data ImageStyle = Plain | Fitted | Cropped (Int,Int) | Tiled",
"typeVariables": [],
"constructors": [
{
"name": "Plain",
"type": [
"ImageStyle"
]
},
{
"name": "Fitted",
"type": [
"ImageStyle"
]
},
{
"name": "Cropped",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
],
[
"ImageStyle"
]
]
},
{
"name": "Tiled",
"type": [
"ImageStyle"
]
}
]
},
{
"name": "Pos",
"comment": "",
"raw": "data Pos = Absolute Int | Relative Float",
"typeVariables": [],
"constructors": [
{
"name": "Absolute",
"type": [
"-\u003e",
[
"Int"
],
[
"Pos"
]
]
},
{
"name": "Relative",
"type": [
"-\u003e",
[
"Float"
],
[
"Pos"
]
]
}
]
},
{
"name": "Three",
"comment": "",
"raw": "data Three = P | Z | N",
"typeVariables": [],
"constructors": [
{
"name": "P",
"type": [
"Three"
]
},
{
"name": "Z",
"type": [
"Three"
]
},
{
"name": "N",
"type": [
"Three"
]
}
]
}
],
"values": [
{
"name": "above",
"comment": "Stack elements vertically.\nTo put `a` above `b` you would say: ``a `above` b``",
"raw": "above : Element -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "absolute",
"comment": "",
"raw": "absolute : Int -\u003e Pos",
"type": [
"-\u003e",
[
"Int"
],
[
"Pos"
]
]
},
{
"name": "below",
"comment": "Stack elements vertically.\nTo put `a` below `b` you would say: ``a `below` b``",
"raw": "below : Element -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "beside",
"comment": "Put elements beside each other horizontally.\nTo put `a` beside `b` you would say: ``a `beside` b``",
"raw": "beside : Element -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "bottomLeft",
"comment": "",
"raw": "bottomLeft : Position",
"type": [
"Position"
]
},
{
"name": "bottomLeftAt",
"comment": "",
"raw": "bottomLeftAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "bottomRight",
"comment": "",
"raw": "bottomRight : Position",
"type": [
"Position"
]
},
{
"name": "bottomRightAt",
"comment": "",
"raw": "bottomRightAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "color",
"comment": "Create an `Element` with a given background color.",
"raw": "color : Color -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Color"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "container",
"comment": "Put an element in a container. This lets you position the element really\neasily, and there are tons of ways to set the `Position`.\nTo center `element` exactly in a 300-by-300 square you would say:\n\n container 300 300 middle element\n\nBy setting the color of the container, you can create borders.",
"raw": "container : Int -\u003e Int -\u003e Position -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Position"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
]
]
},
{
"name": "croppedImage",
"comment": "Create a cropped image. Take a rectangle out of the picture starting\nat the given top left coordinate. If you have a 140-by-140 image,\nthe following will cut a 100-by-100 square out of the middle of it.\n\n croppedImage (20,20) 100 100 \"yogi.jpg\"",
"raw": "croppedImage : (Int,Int) -\u003e Int -\u003e Int -\u003e String -\u003e Element",
"type": [
"-\u003e",
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"Element"
]
]
]
]
]
},
{
"name": "down",
"comment": "",
"raw": "down : Direction",
"type": [
"Direction"
]
},
{
"name": "fittedImage",
"comment": "Create a fitted image given a width, height, and image source.\nThis will crop the picture to best fill the given dimensions.",
"raw": "fittedImage : Int -\u003e Int -\u003e String -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"Element"
]
]
]
]
},
{
"name": "flow",
"comment": "Have a list of elements flow in a particular direction.\nThe `Direction` starts from the first element in the list.\n\n flow right [a,b,c]\n\n +---+---+---+\n | a | b | c |\n +---+---+---+",
"raw": "flow : Direction -\u003e [Element] -\u003e Element",
"type": [
"-\u003e",
[
"Direction"
],
[
"-\u003e",
[
"_List",
[
"Element"
]
],
[
"Element"
]
]
]
},
{
"name": "height",
"comment": "Create an `Element` with a given height.",
"raw": "height : Int -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "heightOf",
"comment": "Get the height of an Element",
"raw": "heightOf : Element -\u003e Int",
"type": [
"-\u003e",
[
"Element"
],
[
"Int"
]
]
},
{
"name": "image",
"comment": "Create an image given a width, height, and image source.",
"raw": "image : Int -\u003e Int -\u003e String -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"Element"
]
]
]
]
},
{
"name": "inward",
"comment": "",
"raw": "inward : Direction",
"type": [
"Direction"
]
},
{
"name": "layers",
"comment": "Layer elements on top of each other, starting from the bottom:\n`layers == flow outward`",
"raw": "layers : [Element] -\u003e Element",
"type": [
"-\u003e",
[
"_List",
[
"Element"
]
],
[
"Element"
]
]
},
{
"name": "left",
"comment": "",
"raw": "left : Direction",
"type": [
"Direction"
]
},
{
"name": "link",
"comment": "Create an `Element` that is a hyper-link.",
"raw": "link : String -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "midBottom",
"comment": "",
"raw": "midBottom : Position",
"type": [
"Position"
]
},
{
"name": "midBottomAt",
"comment": "",
"raw": "midBottomAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "midLeft",
"comment": "",
"raw": "midLeft : Position",
"type": [
"Position"
]
},
{
"name": "midLeftAt",
"comment": "",
"raw": "midLeftAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "midRight",
"comment": "",
"raw": "midRight : Position",
"type": [
"Position"
]
},
{
"name": "midRightAt",
"comment": "",
"raw": "midRightAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "midTop",
"comment": "",
"raw": "midTop : Position",
"type": [
"Position"
]
},
{
"name": "midTopAt",
"comment": "",
"raw": "midTopAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "middle",
"comment": "",
"raw": "middle : Position",
"type": [
"Position"
]
},
{
"name": "middleAt",
"comment": "",
"raw": "middleAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "opacity",
"comment": "Create an `Element` with a given opacity. Opacity is a number between 0 and 1\nwhere 0 means totally clear.",
"raw": "opacity : Float -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Float"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "outward",
"comment": "",
"raw": "outward : Direction",
"type": [
"Direction"
]
},
{
"name": "relative",
"comment": "",
"raw": "relative : Float -\u003e Pos",
"type": [
"-\u003e",
[
"Float"
],
[
"Pos"
]
]
},
{
"name": "right",
"comment": "",
"raw": "right : Direction",
"type": [
"Direction"
]
},
{
"name": "size",
"comment": "Create an `Element` with a new width and height.",
"raw": "size : Int -\u003e Int -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
]
},
{
"name": "sizeOf",
"comment": "Get the width and height of an Element",
"raw": "sizeOf : Element -\u003e (Int,Int)",
"type": [
"-\u003e",
[
"Element"
],
[
"_Tuple2",
[
"Int"
],
[
"Int"
]
]
]
},
{
"name": "spacer",
"comment": "Create an empty box. This is useful for getting your spacing right and\nfor making borders.",
"raw": "spacer : Int -\u003e Int -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"Element"
]
]
]
},
{
"name": "tag",
"comment": "Create an `Element` with a tag. This lets you link directly to it.\nThe element `(tag \"all-about-badgers\" thirdParagraph)` can be reached\nwith a link lik this: `/facts-about-animals.elm#all-about-badgers`",
"raw": "tag : String -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "tiledImage",
"comment": "",
"raw": "tiledImage : Int -\u003e Int -\u003e String -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"String"
],
[
"Element"
]
]
]
]
},
{
"name": "topLeft",
"comment": "",
"raw": "topLeft : Position",
"type": [
"Position"
]
},
{
"name": "topLeftAt",
"comment": "",
"raw": "topLeftAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "topRight",
"comment": "",
"raw": "topRight : Position",
"type": [
"Position"
]
},
{
"name": "topRightAt",
"comment": "",
"raw": "topRightAt : Pos -\u003e Pos -\u003e Position",
"type": [
"-\u003e",
[
"Pos"
],
[
"-\u003e",
[
"Pos"
],
[
"Position"
]
]
]
},
{
"name": "up",
"comment": "",
"raw": "up : Direction",
"type": [
"Direction"
]
},
{
"name": "width",
"comment": "Create an `Element` with a given width.",
"raw": "width : Int -\u003e Element -\u003e Element",
"type": [
"-\u003e",
[
"Int"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
},
{
"name": "widthOf",
"comment": "Get the width of an Element",
"raw": "widthOf : Element -\u003e Int",
"type": [
"-\u003e",
[
"Element"
],
[
"Int"
]
]
}
]
},
{
"name": "Graphics.Input",
"document": "This module is for creating standard input widgets such as buttons and\ntext boxes. In general, functions in this library return a signal representing\nevents from the user.\n\nThe simplest inputs are *one-way inputs*, meaning the user can update\nthem, but the programmer cannot. If you need to update an input from\nwithin the program you want the slightly more complex *two-way inputs*.\nThis document will always show the one-way inputs first, *then* the\ntwo-way inputs.\n\n# Buttons\n@docs button, customButton, buttons, customButtons\n\n# Fields\n@docs field, password, email, fields, FieldState, emptyFieldState\n\n# Checkboxes\n@docs checkbox, checkboxes\n\n# Drop Downs\n@docs stringDropDown, dropDown\n\n# Mouse Hover\n@docs hoverable, hoverables",
"aliases": [
{
"name": "FieldState",
"comment": "Represents the current state of a text field. The `string` represents the\ncharacters filling the text field. The `selectionStart` and `selectionEnd`\nvalues represent what the user has selected with their mouse or keyboard.\nFor example:\n\n { string=\"She sells sea shells\", selectionStart=3, selectionEnd=0 }\n\nThis means the user highlighted the substring `\"She\"` backwards.",
"raw": "type FieldState = { string:String, selectionStart:Int, selectionEnd:Int }",
"typeVariables": [],
"type": {
"selectionEnd": [
"Int"
],
"selectionStart": [
"Int"
],
"string": [
"String"
]
}
}
],
"datatypes": [],
"values": [
{
"name": "button",
"comment": "Create a button with a given label. The result is an `Element` and\na signal of units. This signal triggers whenever the button is pressed.",
"raw": "button : String -\u003e (Element, Signal ())",
"type": [
"-\u003e",
[
"String"
],
[
"_Tuple2",
[
"Element"
],
[
"Signal",
[
"_Tuple0"
]
]
]
]
},
{
"name": "buttons",
"comment": "Create a group of buttons.\n\n * The first argument is the default value of the `events` signal.\n * The `events` signal represents all of the activity in this group\n of buttons.\n * The `button` function creates a button\n with the given name, like “Submit” or “Cancel”.\n The `a` value is sent to `events` whenever the button is pressed.",
"raw": "buttons : a -\u003e { events : Signal a,\n button : a -\u003e String -\u003e Element }",
"type": [
"-\u003e",
"a",
{
"events": [
"Signal",
"a"
],
"button": [
"-\u003e",
"a",
[
"-\u003e",
[
"String"
],
[
"Element"
]
]
]
}
]
},
{
"name": "checkbox",
"comment": "Create a checkbox with a given start state. Unlike `button`, this\nresult is a *signal* of elements. That is because a checkbox has state\nthat updates based on user input. The boolean signal represents the\ncurrent state of the checkbox.",
"raw": "checkbox : Bool -\u003e (Signal Element, Signal Bool)",
"type": [
"-\u003e",
[
"Bool"
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
[
"Bool"
]
]
]
]
},
{
"name": "checkboxes",
"comment": "Create a group of checkboxes.\n\n * The first argument is the default value of the `events` signal.\n * The `events` signal represents all of the activity in this group\n of checkboxes.\n * The `checkbox` function creates a\n checkbox with a given state. The `(Bool -\u003e a)` function is used\n when the checkbox is modified. It takes the new state and turns\n it into a value that can be sent to `events`. For example, this\n lets you add an ID to distinguish between checkboxes.",
"raw": "checkboxes : a -\u003e { events : Signal a,\n checkbox : (Bool -\u003e a) -\u003e Bool -\u003e Element }",
"type": [
"-\u003e",
"a",
{
"events": [
"Signal",
"a"
],
"checkbox": [
"-\u003e",
[
"-\u003e",
[
"Bool"
],
"a"
],
[
"-\u003e",
[
"Bool"
],
[
"Element"
]
]
]
}
]
},
{
"name": "customButton",
"comment": "Create a button with custom states for up, hovering, and down\n(given in that order). The result is an `Element` and a signal of\nunits. This signal triggers whenever the button is pressed.",
"raw": "customButton : Element -\u003e Element -\u003e Element -\u003e (Element, Signal ())",
"type": [
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"_Tuple2",
[
"Element"
],
[
"Signal",
[
"_Tuple0"
]
]
]
]
]
]
},
{
"name": "customButtons",
"comment": "Create a group of custom buttons.\n\n * The first argument is the default value of the `events` signal.\n * The `events` signal represents all of the activity in this group\n of custom buttons.\n * The `customButton` function creates a button with three different visual\n states, one for up, hovering, and down. The resulting button has dimensions\n large enough to fit all three possible `Elements`.\n The `a` value is sent to `events` whenever the button is pressed.",
"raw": "customButtons : a -\u003e { events : Signal a,\n customButton : a -\u003e Element -\u003e Element -\u003e Element -\u003e Element }",
"type": [
"-\u003e",
"a",
{
"customButton": [
"-\u003e",
"a",
[
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
]
]
],
"events": [
"Signal",
"a"
]
}
]
},
{
"name": "dropDown",
"comment": "Create a drop-down menu. When the user selects a string,\nthe current state of the drop-down is set to the associated\nvalue. This lets you avoid manually mapping the string onto\nfunctions and values.",
"raw": "dropDown : [(String,a)] -\u003e (Signal Element, Signal a)",
"type": [
"-\u003e",
[
"_List",
[
"_Tuple2",
[
"String"
],
"a"
]
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
"a"
]
]
]
},
{
"name": "email",
"comment": "Same as `field` but it adds an annotation that this field is for email\naddresses. This is helpful for auto-complete and for mobile users who may\nget a custom keyboard with an `@` and `.com` button.",
"raw": "email : String -\u003e (Signal Element, Signal String)",
"type": [
"-\u003e",
[
"String"
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
[
"String"
]
]
]
]
},
{
"name": "emptyFieldState",
"comment": "The empty field state:\n\n { string=\"\", selectionStart=0, selectionEnd=0 }",
"raw": "emptyFieldState : FieldState",
"type": [
"FieldState"
]
},
{
"name": "field",
"comment": "Create a field with the given default text. The output is an element\nthat updates to match the user input and a signal of strings representing\nthe content of the field.",
"raw": "field : String -\u003e (Signal Element, Signal String)",
"type": [
"-\u003e",
[
"String"
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
[
"String"
]
]
]
]
},
{
"name": "fields",
"comment": "Create a group of text input fields.\n\n * The first argument is the default value of the `events` signal.\n * The `events` signal represents all of the activity in this group\n of text fields.\n * The `field` function creates a\n field with the given ghost text and initial field state.\n When the field is modified, the `(FieldState -\u003e a)` function\n takes the new state and turns\n it into a value that can be sent to `events`. For example, this\n lets you add an ID to distinguish between input fields.",
"raw": "fields : a -\u003e { events : Signal a,\n field : (FieldState -\u003e a) -\u003e String -\u003e FieldState -\u003e Element }",
"type": [
"-\u003e",
"a",
{
"events": [
"Signal",
"a"
],
"field": [
"-\u003e",
[
"-\u003e",
[
"FieldState"
],
"a"
],
[
"-\u003e",
[
"String"
],
[
"-\u003e",
[
"FieldState"
],
[
"Element"
]
]
]
]
}
]
},
{
"name": "hoverable",
"comment": "Detect when the mouse is hovering over a specifici `Element`.",
"raw": "hoverable : Element -\u003e (Element, Signal Bool)",
"type": [
"-\u003e",
[
"Element"
],
[
"_Tuple2",
[
"Element"
],
[
"Signal",
[
"Bool"
]
]
]
]
},
{
"name": "hoverables",
"comment": "Detect when the mouse is hovering over some elements. This\nallows you to create and destroy elements dynamically and still\ndetect hover information.",
"raw": "hoverables : a -\u003e { events : Signal a,\n hoverable : (Bool -\u003e a) -\u003e Element -\u003e Element }",
"type": [
"-\u003e",
"a",
{
"hoverable": [
"-\u003e",
[
"-\u003e",
[
"Bool"
],
"a"
],
[
"-\u003e",
[
"Element"
],
[
"Element"
]
]
],
"events": [
"Signal",
"a"
]
}
]
},
{
"name": "password",
"comment": "Same as `field` but the UI element blocks out each characters.",
"raw": "password : String -\u003e (Signal Element, Signal String)",
"type": [
"-\u003e",
[
"String"
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
[
"String"
]
]
]
]
},
{
"name": "stringDropDown",
"comment": "Create a drop-down menu for selecting strings. The resulting\nsignal of strings represents the string that is currently selected.",
"raw": "stringDropDown : [String] -\u003e (Signal Element, Signal String)",
"type": [
"-\u003e",
[
"_List",
[
"String"
]
],
[
"_Tuple2",
[
"Signal",
[
"Element"
]
],
[
"Signal",
[
"String"
]
]
]
]
}
]
},
{
"name": "JavaScript.Experimental",
"document": "A pair of very experimental functions for converting between\nElm records and JavaScript objects. It currently uses a best effort\nconversion that can cause runtime errors. This API should change and\nimprove as we find its key failings.\n\n# Converting between Elm records and JS Objects\n@docs toRecord, fromRecord",
"aliases": [],
"datatypes": [],
"values": [
{
"name": "fromRecord",
"comment": "Turn arbitrary Elm records into JavaScript objects.\nLists become arrays, nested records are allowed. No ADTs.\n\n -- OK records\n { student=\"Steve\", scores=[83,94,99,72] }\n { errorLevel=10, critical=True }\n\n -- BAD records\n { answer = Nothing }\n { result = Left \"An error occurred\" }",
"raw": "fromRecord : a -\u003e JSObject",
"type": [
"-\u003e",
"a",
[
"JSObject"
]
]
},
{
"name": "toRecord",
"comment": "Turn arbitrary JavaScript objects into Elm records.\nArrays are converted into lists, nested objects are allowed.\nNo `null` values or non-homogeneous arrays.\n\n -- OK objects\n { student:\"Steve\", scores:[83,94,99,72] }\n { errorLevel:10, critical:true }\n\n -- BAD objects\n { answer:null }\n { info:[true,42,'what'] }",
"raw": "toRecord : JSObject -\u003e a",
"type": [
"-\u003e",
[
"JSObject"
],
"a"
]
}
]
}
]