diff --git a/test/Language/SystemF/ExpressionSpec.hs b/test/Language/SystemF/ExpressionSpec.hs index 24726a736c925983f4d32966daedcd355ef8125d..d570d854eb3744c3a750ebc3843662d1fc2dba2f 100644 --- a/test/Language/SystemF/ExpressionSpec.hs +++ b/test/Language/SystemF/ExpressionSpec.hs @@ -73,3 +73,9 @@ spec = describe "prettyPrint" $ do prettyPrint (TyForAll "A" (TyArrow (TyVar "A") (TyVar "A"))) `shouldBe` "forall A. A -> A" + it "prints nested forall types" $ + prettyPrint (TyForAll "W" + (TyForAll "X" + (TyArrow (TyVar "W") (TyArrow (TyVar "X") (TyVar "Y"))))) + `shouldBe` "forall W. forall X. W -> X -> Y" +