Commit c2722538 authored by André Pacak's avatar André Pacak

remove unused code in haskell implementation

parent f573137d
......@@ -221,7 +221,6 @@ checkType p@(Case e n1 t1 n2 t2 _) = do
checkType p@(Tag n t _) = do
ty <- requiredType p
types <- matchVariant ty (show p)
let lty = Map.lookup n types
lty <- liftMaybe (Map.lookup n types) "Label not contained in Variant"
checkType t
checkType p@(Match m cases _) = do
......@@ -45,7 +45,7 @@ tFailCaseRightShadowBinding = root $ (let' "a" zero (anno Nat (case' (anno (Sum
tFailWrongTypeForTaggedLabel = root $ (anno (Variant (fromList [("c", Nat), ("a", Nat), ("b", (Fun Nat Nat))])) (tag "b" zero))
tFailWrongLabel = root $ (anno (Variant (fromList [("c", Nat), ("a", Nat), ("b", (Fun Nat Nat))])) (tag "d" zero))
tFailMatchNotVariant = root $ (anno Nat (match1 (anno (Variant (fromList [("a", Nat)])) zero) ("a", "x", succ $ var "x")))
tFailMatchNotVariant = root $ (anno Nat (match1 (anno Nat zero) ("a", "x", succ $ var "x")))
tFailMatchUnequalTypesForCases = root $ (anno Nat (match2 (anno (Variant (fromList [("a", Nat), ("b", (Fun Nat Nat))])) (tag "b" (lam "x" (var "x")))) ("a", "x", succ $ var "x") ("b", "x", (var "x") )))
-- tOkMatchSingle = root $ (anno Nat (match1 (anno (Variant (fromList [("a", Nat)])) (tag "a" zero)) ("a", "x", succ $ var "x")))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment