Skip to content

Commit

Permalink
Exponentiation for multiple numbers and primality testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Feb 13, 2024
1 parent e0056b1 commit a97927f
Show file tree
Hide file tree
Showing 158 changed files with 1,098 additions and 872 deletions.
4 changes: 2 additions & 2 deletions lux-ruby/source/program.lux
Original file line number Diff line number Diff line change
Expand Up @@ -865,13 +865,13 @@
(monad.each ! (|>> (ffi.is java/lang/Object) ..read)))])
(when inputs
... It seems that org/jruby/runtime/Block::call can misbehave when getting called with a Lux state value.
(list info source location current_module modules scopes type_context expected seed scope_type_vars extensions eval host)
(list info source provenance current_module modules scopes type_context expected seed scope_type_vars extensions eval host)
(when partial_application
(list partial/0 partial/1)
(in (..to_host ((as (-> Any Any Any Any) phase)
partial/0
partial/1
[info source location current_module modules scopes type_context expected seed scope_type_vars extensions eval host])))
[info source provenance current_module modules scopes type_context expected seed scope_type_vars extensions eval host])))

_
(exception.except ..invaid_phase_application [partial_application inputs]))
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux.lux
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
($.definition /.Type
"This type represents the data-structures that are used to specify types themselves.")

($.definition /.Location
"Locations are for specifying the location of Code nodes in Lux files during compilation.")
($.definition /.Provenance
"Provenances are for specifying the provenance of Code nodes in Lux files during compilation.")

($.definition (/.Annotated meta_data datum)
"The type of things that can be annotated with meta-data of arbitrary types.")
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux/data/binary.lux
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
($.definition \\projection.set_elements_are_not_unique)
($.definition \\projection.name)
($.definition \\projection.type)
($.definition \\projection.location)
($.definition \\projection.provenance)
($.definition \\projection.code)

($.definition \\projection.segment
Expand Down Expand Up @@ -151,7 +151,7 @@
($.definition \\injection.set)
($.definition \\injection.name)
($.definition \\injection.type)
($.definition \\injection.location)
($.definition \\injection.provenance)
($.definition \\injection.code)

($.definition \\injection.segment
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/data/text.lux
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

($.definition \\injection.ratio)
($.definition \\injection.name)
($.definition \\injection.location)
($.definition \\injection.provenance)
($.definition \\injection.code)
($.definition \\injection.type)

Expand Down
8 changes: 4 additions & 4 deletions stdlib/source/documentation/lux/meta.lux
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
["[0]" /]]
["[0]" /
["[1][0]" code]
["[1][0]" location]
["[1][0]" provenance]
["[1][0]" name]
["[1][0]" type]
["[1][0]" macro]
Expand Down Expand Up @@ -110,8 +110,8 @@
"All the tags associated with a type definition."
($.example (' (tags_of type_name))))

($.definition /.location
"The location of the current expression being analyzed.")
($.definition /.provenance
"The provenance of the current expression being analyzed.")

($.definition /.expected_type
"The expected type of the current expression being analyzed.")
Expand Down Expand Up @@ -196,7 +196,7 @@
../compiler

/code.documentation
/location.documentation
/provenance.documentation
/name.documentation
/type.documentation
/macro.documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@
($.definition /.Bundle)
($.definition /.with_source_code)
($.definition /.with_current_module)
($.definition /.with_location)
($.definition /.with_provenance)
($.definition /.failure)
($.definition /.except)
($.definition /.assertion)
($.definition /.with_exception)
($.definition /.set_state)
($.definition /.set_source_code)
($.definition /.set_current_module)
($.definition /.set_location)
($.definition /.location)
($.definition /.set_provenance)
($.definition /.provenance)
($.definition /.source)
($.definition /.info)
($.definition /.state)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
($.definition /.injection)

($.definition /.here
"The Location of the current form."
"The Provenance of the current form."
($.example (' (here))))

($.definition /.with
""
($.example (' (with location error))))
($.example (' (with provenance error))))
))
13 changes: 6 additions & 7 deletions stdlib/source/injection/lux/data/binary.lux
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
[meta
[macro
["[0]" template]]]
[world
[time
["[0]" instant (.only Instant)]
["[0]" duration (.only Duration)]]]]]
[time
["[0]" instant (.only Instant)]
["[0]" duration (.only Duration)]]]]
["[0]" \\unsafe (.only Binary)]
["</>" \\projection (.only Offset Size)])

Expand Down Expand Up @@ -311,8 +310,8 @@
[10 .#Named (..and ..name again)]))
)))))))

(the .public location
(Injection Location)
(the .public provenance
(Injection Provenance)
(all ..and
..text
..natural
Expand All @@ -324,7 +323,7 @@
(..rec
(function (_ again)
(let [sequence (..list again)]
(..and ..location
(..and ..provenance
(function (_ altV)
(`` (when altV
(,, (template.with [<number> <tag> <injection>]
Expand Down
Loading

0 comments on commit a97927f

Please sign in to comment.