diff options
Diffstat (limited to 'src/Example.hs')
-rw-r--r-- | src/Example.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Example.hs b/src/Example.hs index f2e5966..ee07edf 100644 --- a/src/Example.hs +++ b/src/Example.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DataKinds #-} module Example where +import Data.Some + import AST import AST.Pretty import CHAD @@ -13,6 +15,11 @@ bin op a b = EOp ext op (EPair ext a b) senv1 :: SList STy [TScal TF32, TScal TF32] senv1 = STScal STF32 `SCons` STScal STF32 `SCons` SNil +descr1 :: Storage a -> Storage b + -> Descr [TScal TF32, TScal TF32] [b, a] +descr1 a b = DTop `DPush` (t, a) `DPush` (t, b) + where t = STScal STF32 + -- x y |- x * y + x -- -- let x3 = (x1, x2) |