Skip to content

Commit

Permalink
Add qualified Nat and Int modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Dec 2, 2024
1 parent 0c45672 commit 561425e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Stdlib/Data/Field.juvix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Stdlib.Data.Field;

import Stdlib.Data.Field.Base open using {Field} public;
import Stdlib.Data.Field.Base as Field;
import Stdlib.Data.Field.Base as Field public;
import Stdlib.Data.String.Base open;
import Stdlib.Data.Nat;

Expand Down
14 changes: 8 additions & 6 deletions Stdlib/Data/Int.juvix
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
module Stdlib.Data.Int;

import Stdlib.Data.Int.Base open hiding {+; -; *; div; mod} public;
-- should be re-exported qualified
import Stdlib.Data.Int.Base as Int;
import Stdlib.Data.Int.Base open hiding {module Int; +; -; *; div; mod} public;

module Int;
open Stdlib.Data.Int.Base.Int public;

import Stdlib.Data.Int.Base open public;
import Stdlib.Data.Int.Ord open public;
end;

import Stdlib.Data.String open;
import Stdlib.Data.Bool open;
Expand All @@ -15,9 +20,6 @@ import Stdlib.Trait.FromNatural open;
import Stdlib.Trait.Integral open;
import Stdlib.Trait.DivMod open;

-- should be re-exported qualified
import Stdlib.Data.Int.Ord as Int;

--- Converts an ;Int; into ;String;.
builtin int-to-string
axiom intToString : Int -> String;
Expand Down
17 changes: 10 additions & 7 deletions Stdlib/Data/Nat.juvix
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
module Stdlib.Data.Nat;

import Juvix.Builtin.V1.Nat open public;
import Stdlib.Data.Nat.Base open hiding {+; *; div; mod} public;
-- should be re-exported qualified
import Stdlib.Data.Nat.Base as Nat;
import Juvix.Builtin.V1.Nat open hiding {module Nat} public;
import Stdlib.Data.Nat.Base open hiding {module Nat; +; *; div; mod} public;

module Nat;
open Stdlib.Data.Nat.Base.Nat public;

import Stdlib.Data.Nat.Base open public;
import Stdlib.Data.Nat.Ord open public;
end;

import Stdlib.Data.String.Base open;

import Stdlib.Trait.Eq open public;
Expand All @@ -13,9 +19,6 @@ import Stdlib.Trait.Natural open public;
import Stdlib.Trait.FromNatural open public;
import Stdlib.Trait.DivMod open public;

-- should be re-exported qualified
import Stdlib.Data.Nat.Ord as Nat;

--- Converts a ;Nat; into a ;String;.
builtin nat-to-string
axiom natToString : Nat -> String;
Expand Down

0 comments on commit 561425e

Please sign in to comment.