aboutsummaryrefslogtreecommitdiff
path: root/test/Arith/NonBase.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-08-29 11:08:50 +0200
committerTom Smeding <tom@tomsmeding.com>2024-08-29 11:08:50 +0200
commit1f441a57c55e9d038144f1ec92a54387dcb0ae6d (patch)
tree60a9eab5b91dc8f557362e77a22ac232daaf7994 /test/Arith/NonBase.hs
parent3a71d9c6c61afa3efb6bc190bf1ddae644ca0dff (diff)
TH conversion works somewhat
Diffstat (limited to 'test/Arith/NonBase.hs')
-rw-r--r--test/Arith/NonBase.hs5
1 files changed, 4 insertions, 1 deletions
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)