Skip to content

Commit

Permalink
Merge pull request #8 from anoma/stdlib-instances
Browse files Browse the repository at this point in the history
Adapt to list functions using traits
  • Loading branch information
paulcadman authored Sep 25, 2023
2 parents 0a4cae9 + 08ded59 commit 95828ae
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Data/List.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ unzipWith
range : Nat -> List Nat
| n := rangeStep 1 n;

sortInt : List Int -> List Int := quickSort ordIntI;
sortInt : List Int -> List Int := quickSort;

eqListInt : List Int -> List Int -> Bool
| nil nil := true
Expand Down
2 changes: 1 addition & 1 deletion Example.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ prop-mergeSumLengths
mkFun
\ {ys :=
length xs Nat.+ length ys
Nat.== length (merge ordIntI xs ys)}};
Nat.== length (merge {{ordIntI}} xs ys)}};

prop-partition : Fun (List Int) (Fun (Fun Int Bool) Bool) :=
mkFun
Expand Down
4 changes: 3 additions & 1 deletion Test/QuickCheck/CoArbitrary.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Data.Random open;
import Data.Int open;
import Stdlib.Prelude open;
import Test.QuickCheck.Gen open;
import Test.QuickCheck.Fun open;
import Stdlib.Data.Int.Ord open;

import Stdlib.Data.Nat as Nat;
Expand Down Expand Up @@ -43,7 +44,8 @@ coarbitraryIntInt : CoArbitrary Int Int :=
mkCoarbitrary
\ {g n := mkGen \ {rand := Gen.run g (perturb n rand)}};

coarbitraryIntIntHof : CoArbitrary Int (Int -> Int) :=
instance
coarbitraryIntIntHof : CoArbitrary Int (Fun Int Int) :=
mkCoarbitrary
\ {g n := mkGen \ {rand := Gen.run g (perturb n rand)}};

Expand Down
2 changes: 1 addition & 1 deletion juvix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dependencies:
- git:
url: https://github.com/anoma/juvix-stdlib
name: stdlib
ref: 4facf14d9b2d06b81ce1be1882aa9050f768cb45
ref: ad27db542e0b220e117dec22f11ed6de78892f72

0 comments on commit 95828ae

Please sign in to comment.