diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-03-14 23:21:53 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-03-14 23:21:53 +0100 |
commit | e7bed242ba52e6d3233928f2c6189e701cfa5e4c (patch) | |
tree | 4bdda2b7bc702c87d97f89946362e6b719126831 /src/HSVIS/AST.hs | |
parent | e8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 (diff) |
Some typechecker work
Diffstat (limited to 'src/HSVIS/AST.hs')
-rw-r--r-- | src/HSVIS/AST.hs | 11 |
1 files changed, 4 insertions, 7 deletions
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] |