Skip to content

Commit

Permalink
Add general Natural -> FromNatural coercion with specialize pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcadman committed Jul 30, 2024
1 parent 2025370 commit 968db25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/package-base/Juvix/Builtin/V1/Trait/Natural.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ type Natural A :=

open Natural public;

{-# specialize: true, inline: case #-}
coercion instance
FromNaturalNaturalI {A} {{N : Natural A}} : FromNatural A := mkFromNatural@{fromNat};
fromNaturalNatI {A} {{Natural A}} : FromNatural A :=
mkFromNatural@{
fromNat := Natural.fromNat
};

0 comments on commit 968db25

Please sign in to comment.