aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/type/dynamic.lux
blob: 10ccdf349debbd1bdde75a72320d8f8d5490d8a7 (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
(.module:
  [library
   [lux {"-" [and]}
    ["$" 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
  ""
  [(: Dynamic
      (:dynamic 123))])

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

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