From e7bed242ba52e6d3233928f2c6189e701cfa5e4c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 14 Mar 2024 23:21:53 +0100 Subject: Some typechecker work --- src/HSVIS/AST.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/HSVIS/AST.hs') diff --git a/src/HSVIS/AST.hs b/src/HSVIS/AST.hs index f95a3cc..8bb2d6c 100644 --- a/src/HSVIS/AST.hs +++ b/src/HSVIS/AST.hs @@ -1,15 +1,10 @@ -{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE PolyKinds #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} -{-# LANGUAGE TypeApplications #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ConstrainedClassMethods #-} module HSVIS.AST where @@ -63,7 +58,7 @@ type family EMapperTelescope fs s1 s2 a where newtype Name = Name String - deriving (Show, Eq) + deriving (Show, Eq, Ord) data Program s = Program [DataDef s] [FunDef s] deriving instance (Show (DataDef s), Show (FunDef s)) => Show (Program s) @@ -89,6 +84,8 @@ data Kind s -- extension point | KExt (X Kind s) !(E Kind s) deriving instance (Show (X Kind s), Show (E Kind s)) => Show (Kind s) +deriving instance (Eq (X Kind s), Eq (E Kind s)) => Eq (Kind s) +deriving instance (Ord (X Kind s), Ord (E Kind s)) => Ord (Kind s) data Type s = TApp (X Type s) (Type s) [Type s] -- cgit v1.2.3-70-g09d2