This commit is contained in:
crumbtoo
2024-03-14 01:15:55 -06:00
parent 257d12e532
commit 175e58f13c
9 changed files with 185 additions and 77 deletions

View File

@@ -53,7 +53,7 @@ programDecls = lens (\ (Program ds) -> ds) (const Program)
data Decl b a = FunD b [Pat b] a
| DataD b [b] [DataCon b]
| TySigD b (Type b)
deriving Show
deriving (Show, Functor)
data DataCon b = DataCon b [Type b]
deriving (Show, Generic)
@@ -217,3 +217,7 @@ instance (Hashable b) => Hashable1 (ExprF b)
makeBaseFunctor ''Type
instance Core.HasArrowStops (Type b) (Type b) (Type b) (Type b) where
arrowStops k (s Core.:-> t) = (Core.:->) <$> k s <*> Core.arrowStops k t
arrowStops k t = k t