summaryrefslogtreecommitdiff
path: root/src/Example.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Example.hs')
-rw-r--r--src/Example.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Example.hs b/src/Example.hs
index ee07edf..ee91981 100644
--- a/src/Example.hs
+++ b/src/Example.hs
@@ -92,6 +92,10 @@ ex4 =
senv5 :: SList STy [TScal TF32, TEither (TScal TF32) (TScal TF32)]
senv5 = STScal STF32 `SCons` STEither (STScal STF32) (STScal STF32) `SCons` SNil
+descr5 :: Storage a -> Storage b
+ -> Descr [TScal TF32, TEither (TScal TF32) (TScal TF32)] [b, a]
+descr5 a b = DTop `DPush` (STEither (STScal STF32) (STScal STF32), a) `DPush` (STScal STF32, b)
+
-- x:R+R y:R |- case x of {inl a -> a * y ; inr b -> b * (y + 1)}
ex5 :: Ex [TScal TF32, TEither (TScal TF32) (TScal TF32)] (TScal TF32)
ex5 =