From 1f441a57c55e9d038144f1ec92a54387dcb0ae6d Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 29 Aug 2024 11:08:50 +0200 Subject: TH conversion works somewhat --- test/Arith/NonBase.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/Arith/NonBase.hs') diff --git a/test/Arith/NonBase.hs b/test/Arith/NonBase.hs index 79c4428..ea27863 100644 --- a/test/Arith/NonBase.hs +++ b/test/Arith/NonBase.hs @@ -1,12 +1,13 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneKindSignatures #-} +{-# LANGUAGE TemplateHaskell #-} module Arith.NonBase where import Data.Kind import Data.Type.Equality --- import NonBaseTH +import NonBaseTH data Typ t where @@ -43,3 +44,5 @@ data Arith t where A_Pair :: Arith a -> Arith b -> Arith (a, b) A_If :: Arith Bool -> Arith a -> Arith a -> Arith a A_Mono :: Arith Bool -> Arith Bool + +defineBaseAST "ArithF" ''Arith ['A_Var, 'A_Let] (("AF_"++) . drop 2) -- cgit v1.2.3-70-g09d2