Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anoma/juvix-stdlib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 663fe952f70f95a20deef64545f9dc469293a2aa
Choose a base ref
..
head repository: anoma/juvix-stdlib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 561425ecb3bca7d6c8ec6b4f93932510597c4c59
Choose a head ref
Showing with 7 additions and 4 deletions.
  1. +4 −2 Stdlib/Data/List.juvix
  2. +1 −0 Stdlib/Data/Map.juvix
  3. +1 −1 Stdlib/Trait/Foldable/Monomorphic.juvix
  4. +1 −1 Stdlib/Trait/Functor/Monomorphic.juvix
6 changes: 4 additions & 2 deletions Stdlib/Data/List.juvix
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ phead {A} {{Partial}} : List A -> A
| (x :: _) := x
| nil := fail "head: empty list";

{-# specialize: true, inline: case #-}
instance
eqListI {A} {{Eq A}} : Eq (List A) :=
let
@@ -37,6 +38,7 @@ eqListI {A} {{Eq A}} : Eq (List A) :=
isMember {A} {{Eq A}} (elem : A) (list : List A) : Bool :=
isElement (Eq.eq) elem list;

{-# specialize: true, inline: case #-}
instance
ordListI {A} {{Ord A}} : Ord (List A) :=
let
@@ -71,7 +73,7 @@ functorListI : Functor List :=
map := listMap;
};

{-# specialize: true, inline: true #-}
{-# specialize: true, inline: case #-}
instance
monomorphicFunctorListI {A} : Monomorphic.Functor (List A) A :=
fromPolymorphicFunctor;
@@ -84,7 +86,7 @@ polymorphicFoldableListI : Polymorphic.Foldable List :=
rfor := listRfor;
};

{-# specialize: true, inline: true #-}
{-# specialize: true, inline: case #-}
instance
foldableListI {A} : Foldable (List A) A := fromPolymorphicFoldable;

1 change: 1 addition & 0 deletions Stdlib/Data/Map.juvix
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ value {Key Value} (binding : Binding Key Value) : Value :=
toPair {Key Value} (binding : Binding Key Value) : Pair Key Value :=
key binding, value binding;

{-# specialize: true, inline: case #-}
instance
bindingKeyOrdering {Key Value} {{Ord Key}} : Ord (Binding Key Value) :=
mkOrd@{
2 changes: 1 addition & 1 deletion Stdlib/Trait/Foldable/Monomorphic.juvix
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ open Foldable public;

--- Make a monomorphic ;Foldable; instance from a polymorphic one.
--- All polymorphic types that are an instance of ;Poly.Foldable; should use this function to create their monomorphic ;Foldable; instance.
{-# inline: case #-}
{-# inline: always #-}
fromPolymorphicFoldable
{F : Type -> Type}
{{foldable : Poly.Foldable F}}
2 changes: 1 addition & 1 deletion Stdlib/Trait/Functor/Monomorphic.juvix
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ type Functor (Container Elem : Type) :=

open Functor public;

{-# inline: case #-}
{-# inline: always #-}
fromPolymorphicFunctor
{F : Type -> Type} {{Poly.Functor F}} {Elem} : Functor (F Elem) Elem :=
mkFunctor@{