Skip to content

Commit

Permalink
Fixes compilation errors due to deprecated typeclasses in lattice
Browse files Browse the repository at this point in the history
The deprecated typeclasses are JoinSemiLattice and MeetSemiLattices. haskellari/lattices#95
  • Loading branch information
romero-jose committed Oct 21, 2024
1 parent 05009fe commit 3fe5938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Language/Grift/Source/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ data Type t =
deriving instance (Show a, Show t) => Show (BindF t (Ann a (ExpF t)))
deriving instance (Show a, Show t) => Show (ExpF t (Ann a (ExpF t)))

instance (MeetSemiLattice t, Show t) => MeetSemiLattice (Type t) where
instance (Lattice t, Show t) => Lattice (Type t) where
-- meet
Dyn /\ t = t
t /\ Dyn = t
CharTy /\ CharTy = CharTy
Expand All @@ -124,7 +125,7 @@ instance (MeetSemiLattice t, Show t) => MeetSemiLattice (Type t) where
t1 /\ t2 =
error ("/\\: undefined on " ++ show t1 ++ " and " ++ show t2)

instance (JoinSemiLattice t, Show t) => JoinSemiLattice (Type t) where
-- join
Dyn \/ _ = Dyn
_ \/ Dyn = Dyn
CharTy \/ CharTy = CharTy
Expand All @@ -146,7 +147,5 @@ instance (JoinSemiLattice t, Show t) => JoinSemiLattice (Type t) where
t1 \/ t2 =
error ("\\/: undefined on " ++ show t1 ++ " and " ++ show t2)

instance (JoinSemiLattice t, MeetSemiLattice t, Show t) => Lattice (Type t) where

(⊑) :: (Eq t, Show t, JoinSemiLattice t) => Type t -> Type t -> Bool
(⊑) :: (Eq t, Show t, Lattice t) => Type t -> Type t -> Bool
(⊑) = joinLeq
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-12.11
resolver: lts-18.28
packages:
- .
extra-deps:
Expand Down

0 comments on commit 3fe5938

Please sign in to comment.