Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Nov 29, 2024
1 parent 9534bd2 commit fde9ac2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Stdlib/Data/Result.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import Stdlib.Trait open;

{-# specialize: true, inline: case #-}
deriving instance
ordResultI
{Error Value} {{Ord Error}} {{Ord Value}} : Ord (Result Error Value);
ordResultI {Error Value} {{Ord Error}} {{Ord Value}} : Ord (Result Error Value);

{-# specialize: true, inline: case #-}
deriving instance
Expand Down
6 changes: 5 additions & 1 deletion Stdlib/Trait/Eq.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import Stdlib.Data.Fixity open;
--- A trait defining equality
builtin eq
trait
type Eq A := mkEq@{builtin isEqual eq : A -> A -> Bool};
type Eq A :=
mkEq@{
builtin isEqual
eq : A -> A -> Bool;
};

syntax operator == comparison;
syntax operator /= comparison;
Expand Down
6 changes: 5 additions & 1 deletion Stdlib/Trait/Ord.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import Stdlib.Data.Ordering open public;
--- A trait for defining a total order
builtin ord
trait
type Ord A := mkOrd@{builtin compare cmp : A -> A -> Ordering};
type Ord A :=
mkOrd@{
builtin compare
cmp : A -> A -> Ordering;
};

deriving instance
orderingOrdI : Ord Ordering;
Expand Down
5 changes: 4 additions & 1 deletion Stdlib/Trait/Partial.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import Stdlib.Data.String.Base open;
import Stdlib.Debug.Fail as Debug;

trait
type Partial := mkPartial@{fail : {A : Type} -> String -> A};
type Partial :=
mkPartial@{
fail : {A : Type} -> String -> A;
};

open Partial public;

Expand Down
5 changes: 4 additions & 1 deletion Stdlib/Trait/Show.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ module Stdlib.Trait.Show;
import Juvix.Builtin.V1.String open public;

trait
type Show A := mkShow@{show : A -> String};
type Show A :=
mkShow@{
show : A -> String;
};

0 comments on commit fde9ac2

Please sign in to comment.