Skip to content

Commit

Permalink
Adapting to new List type (part 1).
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Mar 5, 2024
1 parent 233f3bf commit eeebece
Show file tree
Hide file tree
Showing 188 changed files with 2,760 additions and 2,580 deletions.
4 changes: 2 additions & 2 deletions lux-cl/source/program.lux
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@
))
))))

(every (Reader of)
(-> of
(every (Reader it)
(-> it
(Try Any)))

(the (read_variant read host_object)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux/meta/type.lux
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@
... ($.definition /.literal
... "Takes a type expression and returns its representation as data-structure."
... ($.example (' (/.literal
... (for_any (_ of)
... (Maybe (List of)))))))
... (for_any (_ it)
... (Maybe (List it)))))))

(all list#composite
..\\projection
Expand Down
38 changes: 19 additions & 19 deletions stdlib/source/injection/lux/data/binary.lux
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@
[(n#+ sizeL sizeR)
(|>> mutL mutR)])))

(.every .public (Injection of)
(-> of
(.every .public (Injection it)
(-> it
Specification))

(the .public (value as value)
(for_any (_ of)
(-> (Injection of) of
(for_any (_ it)
(-> (Injection it) it
Binary))
(..instance (as value)))

Expand Down Expand Up @@ -133,9 +133,9 @@
(by ..monoid composite (pre preV) (post postV))))

(the .public (rec body)
(for_any (_ of)
(-> (-> (Injection of) (Injection of))
(Injection of)))
(for_any (_ it)
(-> (-> (Injection it) (Injection it))
(Injection it)))
(function (again value)
(body again value)))

Expand Down Expand Up @@ -213,9 +213,9 @@

(template.with [<name> <size> <write>]
[(the .public (<name> valueW)
(for_any (_ of)
(-> (Injection of)
(Injection (Sequence of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Sequence it))))
(function (_ value)
(let [original_count (sequence.size value)
capped_count (i64.and (..mask <size>)
Expand Down Expand Up @@ -250,23 +250,23 @@
)

(the .public maybe
(for_any (_ of)
(-> (Injection of)
(Injection (Maybe of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Maybe it))))
(..or ..any))

(the .public (stack value)
(for_any (_ of)
(-> (Injection of)
(Injection (Stack of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Stack it))))
(..rec
(|>> (..and value)
(..or ..any))))

(the .public (set value)
(for_any (_ of)
(-> (Injection of)
(Injection (Set of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Set it))))
(|>> set.stack
(..stack value)))

Expand Down
12 changes: 6 additions & 6 deletions stdlib/source/injection/lux/data/text.lux
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@
(by (modular.text (modular.modulus modular)) as modular))

(the .public (stack as)
(for_any (_ of)
(-> (Injection of)
(Injection (Stack of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Stack it))))
(|>> (stack#each (|>> as (.text " ")))
text.together
(text.enclosed ["(stack" ")"])))

(the .public (maybe as)
(for_any (_ of)
(-> (Injection of)
(Injection (Maybe of))))
(for_any (_ it)
(-> (Injection it)
(Injection (Maybe it))))
(function (_ value)
(when value
{.#None}
Expand Down
Loading

0 comments on commit eeebece

Please sign in to comment.