aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/type/dynamic.lux
blob: 1140e615848c4002c390a10e1235329184093191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(.using
 [library
  [lux {"-" static}
   ["$" documentation {"+" documentation:}]
   [control
    ["<>" parser
     ["<[0]>" code]]]
   [data
    ["[0]" text {"+" \n}
     ["%" format {"+" format}]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(documentation: /.Dynamic
  "A value coupled with its type, so it can be checked later.")

(documentation: /.dynamic
  ""
  [(is Dynamic
       (dynamic 123))])

(documentation: /.static
  ""
  [(is (try.Try Nat)
       (static Nat (dynamic 123)))])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Dynamic
             ..dynamic
             ..static
             ($.default /.wrong_type)
             ($.default /.format)]
            []))