changeset 13:17b9b80fa047

Add sample term for simplebool
author atton
date Fri, 04 Nov 2016 05:11:16 +0000
parents d5e85961789f
children eae814cb4b34
files simplebool/SimpleBool.hs
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/simplebool/SimpleBool.hs	Thu Nov 03 10:02:24 2016 +0000
+++ b/simplebool/SimpleBool.hs	Fri Nov 04 05:11:16 2016 +0000
@@ -64,3 +64,19 @@
                                             if (ty2 == ty3) then return ty2
                                                             else Left "arms of conditional have different types"
   | otherwise              = Left "guard of conditional not a boolean"
+
+
+sampleContext1 = [("x" , VarBind TyBool)]
+sampleTerm1    = TmVar 0 1
+
+sampleContext2 = []
+sampleTerm2    = TmIf TmTrue (TmAbs "x" TyBool (TmVar 0 1)) (TmAbs "y" TyBool TmFalse)
+
+sampleContext3 = []
+sampleTerm3    = TmAbs "x" TyBool (TmVar 0 1)
+
+sampleContext4 = []
+sampleTerm4    = TmApp (TmAbs "x" (TyArr TyBool TyBool) (TmIf (TmApp (TmVar 0 1) TmFalse) TmTrue TmFalse)) (TmAbs "x" TyBool (TmIf (TmVar 0 1) TmFalse TmTrue))
+
+sampleContext5 = []
+sampleTerm5    = TmIf (TmAbs "x" TyBool TmFalse) TmTrue TmFalse