From af5f12d67261ce4bafcdec44adba8b60cc01c95c Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 30 Apr 2010 19:27:53 +0000 Subject: [PATCH] upgrade the testsuite to work with GHC 6.12 --- .../check/cyclic/abs-types/test1.gfs.gold | 8 +- .../check/cyclic/abs-types/test2.gfs.gold | 8 +- .../compiler/check/cyclic/opers/test.gfs.gold | 16 +- .../check/cyclic/params/test.gfs.gold | 8 +- .../compiler/check/lincat-types/test.gfs.gold | 14 +- testsuite/compiler/check/lins/lins.gfs.gold | 74 ++++----- .../check/oper-definition/test.gfs.gold | 10 +- testsuite/compiler/renamer/funpatt.gfs.gold | 10 +- testsuite/compiler/renamer/varpatt.gfs.gold | 8 +- .../typecheck/abstract/LetInTypesAbs.gfs.gold | 2 +- .../typecheck/abstract/test_A.gfs.gold | 10 +- .../typecheck/abstract/test_B.gfs.gold | 10 +- .../typecheck/abstract/test_C.gfs.gold | 10 +- .../typecheck/concrete/test_A.gfs.gold | 10 +- .../compiler/update/ArrityCheck.gfs.gold | 16 +- testsuite/runtime/eval/eval.gfs.gold | 128 +++++++-------- testsuite/runtime/eval/lazy.gfs.gold | 4 +- .../runtime/linearize/linearize.gfs.gold | 60 +++---- testsuite/runtime/paraphrase/lambda.gfs.gold | 24 +-- .../typecheck/implicit-arguments.gfs.gold | 44 +++--- .../runtime/typecheck/typecheck.gfs.gold | 148 +++++++++--------- 21 files changed, 311 insertions(+), 311 deletions(-) diff --git a/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold index b8bde0be7..9e241effb 100644 --- a/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold +++ b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold @@ -1,4 +1,4 @@ - - -checking module Test1Abs - circular definitions: A B + + +checking module Test1Abs + circular definitions: A B diff --git a/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold index 4caf3ae2c..c52a5373d 100644 --- a/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold +++ b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold @@ -1,4 +1,4 @@ - - -checking module Test2Abs - circular definitions: f g + + +checking module Test2Abs + circular definitions: f g diff --git a/testsuite/compiler/check/cyclic/opers/test.gfs.gold b/testsuite/compiler/check/cyclic/opers/test.gfs.gold index f2a1e5c22..cc052494c 100644 --- a/testsuite/compiler/check/cyclic/opers/test.gfs.gold +++ b/testsuite/compiler/check/cyclic/opers/test.gfs.gold @@ -1,8 +1,8 @@ - - -checking module TestOpers - circular definitions: A B - - -checking module TestOperTypes - circular definitions: A T + + +checking module TestOpers + circular definitions: A B + + +checking module TestOperTypes + circular definitions: A T diff --git a/testsuite/compiler/check/cyclic/params/test.gfs.gold b/testsuite/compiler/check/cyclic/params/test.gfs.gold index bcd6a118e..dea8440d1 100644 --- a/testsuite/compiler/check/cyclic/params/test.gfs.gold +++ b/testsuite/compiler/check/cyclic/params/test.gfs.gold @@ -1,4 +1,4 @@ - - -checking module TestParams - circular definitions: A B + + +checking module TestParams + circular definitions: A B diff --git a/testsuite/compiler/check/lincat-types/test.gfs.gold b/testsuite/compiler/check/lincat-types/test.gfs.gold index 9f19766e5..34aa5352c 100644 --- a/testsuite/compiler/check/lincat-types/test.gfs.gold +++ b/testsuite/compiler/check/lincat-types/test.gfs.gold @@ -1,7 +1,7 @@ - - -checking module TestCnc - Happened in linearization type of S in TestCnc.gf, line 3: - type of PTrue - expected: Type - inferred: PBool + + +checking module TestCnc + Happened in linearization type of S in TestCnc.gf, line 3: + type of PTrue + expected: Type + inferred: PBool diff --git a/testsuite/compiler/check/lins/lins.gfs.gold b/testsuite/compiler/check/lins/lins.gfs.gold index cdec8fbed..14b08a591 100644 --- a/testsuite/compiler/check/lins/lins.gfs.gold +++ b/testsuite/compiler/check/lins/lins.gfs.gold @@ -1,37 +1,37 @@ -checking module linsCnc - Warning: no linearization type for C, inserting default {s : Str} - Warning: no linearization of test -abstract lins { - cat C Nat - cat Float - cat Int - cat Nat - cat String - fun test : C zero - fun zero : Nat -} -concrete linsCnc { - productions - C0 -> F0[CVar] - C1 -> F1[CVar] - C1 -> F2[] - functions - F0 := (S0) [__gfV] - F1 := () [__gfV] - F2 := () [zero] - sequences - S0 := <0,0> - categories - C := range [C0 .. C0] - labels ["s"] - Float := range [CFloat .. CFloat] - labels ["s"] - Int := range [CInt .. CInt] - labels ["s"] - Nat := range [C1 .. C1] - labels [] - String := range [CString .. CString] - labels ["s"] - __gfVar := range [CVar .. CVar] - labels ["s"] -} +checking module linsCnc + Warning: no linearization type for C, inserting default {s : Str} + Warning: no linearization of test +abstract lins { + cat C Nat + cat Float + cat Int + cat Nat + cat String + fun test : C zero + fun zero : Nat +} +concrete linsCnc { + productions + C0 -> F0[CVar] + C1 -> F1[CVar] + C1 -> F2[] + functions + F0 := (S0) [__gfV] + F1 := () [__gfV] + F2 := () [zero] + sequences + S0 := <0,0> + categories + C := range [C0 .. C0] + labels ["s"] + Float := range [CFloat .. CFloat] + labels ["s"] + Int := range [CInt .. CInt] + labels ["s"] + Nat := range [C1 .. C1] + labels [] + String := range [CString .. CString] + labels ["s"] + __gfVar := range [CVar .. CVar] + labels ["s"] +} diff --git a/testsuite/compiler/check/oper-definition/test.gfs.gold b/testsuite/compiler/check/oper-definition/test.gfs.gold index cf2f7f5ec..6d1d6bc77 100644 --- a/testsuite/compiler/check/oper-definition/test.gfs.gold +++ b/testsuite/compiler/check/oper-definition/test.gfs.gold @@ -1,5 +1,5 @@ - - -checking module Res - Happened in operation my_oper in Res.gf, line 3: - No definition given to the operation + + +checking module Res + Happened in operation my_oper in Res.gf, line 3: + No definition given to the operation diff --git a/testsuite/compiler/renamer/funpatt.gfs.gold b/testsuite/compiler/renamer/funpatt.gfs.gold index f96aabdb1..382428255 100644 --- a/testsuite/compiler/renamer/funpatt.gfs.gold +++ b/testsuite/compiler/renamer/funpatt.gfs.gold @@ -1,5 +1,5 @@ - - -renaming module funpatt - renaming definition of d in funpatt.gf, line 12 - data constructor expected but funpatt.D1 is found instead + + +renaming module funpatt + renaming of d in funpatt.gf, line 11 + data constructor expected but funpatt.D1 is found instead diff --git a/testsuite/compiler/renamer/varpatt.gfs.gold b/testsuite/compiler/renamer/varpatt.gfs.gold index 8d4409e5d..ad0a7854e 100644 --- a/testsuite/compiler/renamer/varpatt.gfs.gold +++ b/testsuite/compiler/renamer/varpatt.gfs.gold @@ -1,4 +1,4 @@ -1 - -1 - +1 + +1 + diff --git a/testsuite/compiler/typecheck/abstract/LetInTypesAbs.gfs.gold b/testsuite/compiler/typecheck/abstract/LetInTypesAbs.gfs.gold index 784f3fa8c..588b1643d 100644 --- a/testsuite/compiler/typecheck/abstract/LetInTypesAbs.gfs.gold +++ b/testsuite/compiler/typecheck/abstract/LetInTypesAbs.gfs.gold @@ -1 +1 @@ -fun f : (Int -> Int) -> Int -> Int +fun f : (Int -> Int) -> Int -> Int diff --git a/testsuite/compiler/typecheck/abstract/test_A.gfs.gold b/testsuite/compiler/typecheck/abstract/test_A.gfs.gold index 79c77eb84..19a217175 100644 --- a/testsuite/compiler/typecheck/abstract/test_A.gfs.gold +++ b/testsuite/compiler/typecheck/abstract/test_A.gfs.gold @@ -1,5 +1,5 @@ - - -checking module A - Prod expected for function A instead of Type - in category B in A.gf, line 4 + + +checking module A + Prod expected for function A instead of Type + in category B in A.gf, line 4 diff --git a/testsuite/compiler/typecheck/abstract/test_B.gfs.gold b/testsuite/compiler/typecheck/abstract/test_B.gfs.gold index 2e9ff8aaa..b2839881d 100644 --- a/testsuite/compiler/typecheck/abstract/test_B.gfs.gold +++ b/testsuite/compiler/typecheck/abstract/test_B.gfs.gold @@ -1,5 +1,5 @@ - - -checking module B - Prod expected for function S instead of Type - in type of function f in B.gf, line 5 + + +checking module B + Prod expected for function S instead of Type + in type of function f in B.gf, line 5 diff --git a/testsuite/compiler/typecheck/abstract/test_C.gfs.gold b/testsuite/compiler/typecheck/abstract/test_C.gfs.gold index 0bfb204a3..dd15dab89 100644 --- a/testsuite/compiler/typecheck/abstract/test_C.gfs.gold +++ b/testsuite/compiler/typecheck/abstract/test_C.gfs.gold @@ -1,5 +1,5 @@ - - -checking module C - {Int <> S} - in definition of function f in C.gf, line 6 + + +checking module C + {Int <> S} + in definition of function f in C.gf, line 6 diff --git a/testsuite/compiler/typecheck/concrete/test_A.gfs.gold b/testsuite/compiler/typecheck/concrete/test_A.gfs.gold index f35da4b18..4f8d307aa 100644 --- a/testsuite/compiler/typecheck/concrete/test_A.gfs.gold +++ b/testsuite/compiler/typecheck/concrete/test_A.gfs.gold @@ -1,5 +1,5 @@ - - -checking module A - Happened in operation silly in A.gf, line 5: - A function type is expected for a_Det instead of type Str + + +checking module A + Happened in operation silly in A.gf, line 5: + A function type is expected for a_Det instead of type Str diff --git a/testsuite/compiler/update/ArrityCheck.gfs.gold b/testsuite/compiler/update/ArrityCheck.gfs.gold index 3f0cb2a78..28f98f445 100644 --- a/testsuite/compiler/update/ArrityCheck.gfs.gold +++ b/testsuite/compiler/update/ArrityCheck.gfs.gold @@ -1,8 +1,8 @@ - - -C:\gf_3\testsuite\compiler\update\ArrityCheck.gf:6:1: cannot unify the informations - fun f : Int -> Int -> Int ; - def f 0 = \x -> x ; -and - def f 1 1 = 0 ; -in module ArrityCheck + + +C:\gf\testsuite\compiler\update\ArrityCheck.gf:6:1: cannot unify the informations + fun f : Int -> Int -> Int ; + def f 0 = \x -> x ; +and + def f 1 1 = 0 ; +in module ArrityCheck diff --git a/testsuite/runtime/eval/eval.gfs.gold b/testsuite/runtime/eval/eval.gfs.gold index 665ee86fb..9aaaafd7e 100644 --- a/testsuite/runtime/eval/eval.gfs.gold +++ b/testsuite/runtime/eval/eval.gfs.gold @@ -1,64 +1,64 @@ -\x -> x 1 - -?1 1 - -?3 1 - -f 1 2 - -\x -> x - -?1 - -f - -f 1 2 - -2 - -g 0 - -\x -> g x - -g ?1 - -5 - -3 - -g2 - -f 32 - -g2 23 - -3.14 - -succ zero - -?1 - -zeroF - -dec (succF zeroF) - -dec zeroF - -\x -> dec x - -dec ?1 - -g3 ?3 0 - -g (g2 ?1 0) - -succ (succ zero) - -zero - -dec2 0 err - -succ err - -\x -> dec (dec x) - +\x -> x 1 + +?1 1 + +?3 1 + +f 1 2 + +\x -> x + +?1 + +f + +f 1 2 + +2 + +g 0 + +\x -> g x + +g ?1 + +5 + +3 + +g2 + +f 32 + +g2 23 + +3.14 + +succ zero + +?1 + +zeroF + +dec (succF zeroF) + +dec zeroF + +\x -> dec x + +dec ?1 + +g3 ?3 0 + +g (g2 ?1 0) + +succ (succ zero) + +zero + +dec2 0 err + +succ err + +\x -> dec (dec x) + diff --git a/testsuite/runtime/eval/lazy.gfs.gold b/testsuite/runtime/eval/lazy.gfs.gold index 6b97546b4..264873708 100644 --- a/testsuite/runtime/eval/lazy.gfs.gold +++ b/testsuite/runtime/eval/lazy.gfs.gold @@ -1,2 +1,2 @@ -succ (succ (succ zero)) - +succ (succ (succ zero)) + diff --git a/testsuite/runtime/linearize/linearize.gfs.gold b/testsuite/runtime/linearize/linearize.gfs.gold index 90630ee0b..8a17ab506 100644 --- a/testsuite/runtime/linearize/linearize.gfs.gold +++ b/testsuite/runtime/linearize/linearize.gfs.gold @@ -1,30 +1,30 @@ -?1 is even - - -exists x such that x is even - - -a - - -aa a - - -a b - - -abcd is string - - -100 is integer - - -12.4 is float - - -xyz is string - - - - - +?1 is even + + +exists x such that x is even + + +a + + +aa a + + +a b + + +abcd is string + + +100 is integer + + +12.4 is float + + +xyz is string + + + + + diff --git a/testsuite/runtime/paraphrase/lambda.gfs.gold b/testsuite/runtime/paraphrase/lambda.gfs.gold index 5735dc175..04fb7e166 100644 --- a/testsuite/runtime/paraphrase/lambda.gfs.gold +++ b/testsuite/runtime/paraphrase/lambda.gfs.gold @@ -1,12 +1,12 @@ -\x -> x - -1 - -\x -> x - -\x -> 2 - -1 - -2 - +\x -> x + +1 + +\x -> x + +\x -> 2 + +1 + +2 + diff --git a/testsuite/runtime/typecheck/implicit-arguments.gfs.gold b/testsuite/runtime/typecheck/implicit-arguments.gfs.gold index 8a5c08461..85448469a 100644 --- a/testsuite/runtime/typecheck/implicit-arguments.gfs.gold +++ b/testsuite/runtime/typecheck/implicit-arguments.gfs.gold @@ -1,22 +1,22 @@ -Expression: join {n1} {n2} {n3} l12 (link {n2} {n3} l23) -Type: Path n1 n3 - -Expression: join {n1} {n2} {n3} l12 (link {n2} {n3} l23) -Type: Path n1 n3 - -Expression: -Type: Label {?1} - -Expression: -Type: Label {n1} - -{n1} is implicit argument but not implicit argument is expected here -Expression: <\{_1}, x -> x : ({m} : Node) -> (n : Node) -> Node> -Type: ({m} : Node) -> (n : Node) -> Node - -Expression: <\{_1} -> n1 : ({m} : Node) -> Node> -Type: ({m} : Node) -> Node - -Expression: <\{_1} -> ?1 : ({m} : Node) -> Node> -Type: ({m} : Node) -> Node - +Expression: join {n1} {n2} {n3} l12 (link {n2} {n3} l23) +Type: Path n1 n3 + +Expression: join {n1} {n2} {n3} l12 (link {n2} {n3} l23) +Type: Path n1 n3 + +Expression: +Type: Label {?1} + +Expression: +Type: Label {n1} + +{n1} is implicit argument but not implicit argument is expected here +Expression: <\{_1}, x -> x : ({m} : Node) -> (n : Node) -> Node> +Type: ({m} : Node) -> (n : Node) -> Node + +Expression: <\{_1} -> n1 : ({m} : Node) -> Node> +Type: ({m} : Node) -> Node + +Expression: <\{_1} -> ?1 : ({m} : Node) -> Node> +Type: ({m} : Node) -> Node + diff --git a/testsuite/runtime/typecheck/typecheck.gfs.gold b/testsuite/runtime/typecheck/typecheck.gfs.gold index bdc675587..634e769a1 100644 --- a/testsuite/runtime/typecheck/typecheck.gfs.gold +++ b/testsuite/runtime/typecheck/typecheck.gfs.gold @@ -1,74 +1,74 @@ -Couldn't match expected type Nat - against inferred type String -In the expression: "0" -Category Int should have 0 argument(s), but has been given 1 -In the type: Int 0 -A function type is expected for the expression 1 instead of type Int -Couldn't match expected type Int -> Int - against inferred type Int -In the expression: 1 -unknown category of function identifier unknown_fun - -Category unknown_cat is not in scope -Cannot infer the type of expression \x -> x -A function type is expected for the expression \x -> x instead of type Int -Expression: append (succ (succ zero)) (succ zero) (vector (succ (succ zero))) (vector (succ zero)) -Type: Vector (succ (succ (succ zero))) - -Expression: <\m, n -> vector (plus m n) : (m : Nat) -> (n : Nat) -> Vector (plus m n)> -Type: (m : Nat) -> (n : Nat) -> Vector (plus m n) - -Expression: mkMorph (\x -> succ zero) -Type: Morph (\x -> succ zero) - -Expression: idMorph (mkMorph (\x -> x)) -Type: Nat - -Couldn't match expected type Morph (\x -> x) - against inferred type Morph (\x -> succ zero) -In the expression: mkMorph (\x -> succ zero) -Expression: Vector (succ zero) -> Vector (succ zero)> -Type: Vector zero -> Vector (succ zero) -> Vector (succ zero) - -Expression: <\n, v1, n1, v2 -> append n n1 v1 v2 : (n : Nat) -> Vector n -> (m : Nat) -> Vector m -> Vector (plus n m)> -Type: (n : Nat) -> Vector n -> (m : Nat) -> Vector m -> Vector (plus n m) - -Category EQ is not in scope -Expression: <\v1, v2 -> cmpVector ?7 v1 v2 : Vector ?7 -> Vector ?7 -> Int> (vector ?7) -Type: Vector ?7 -> Int - -Couldn't match expected type (m : Nat) -> Vector ?1 - against inferred type (n : Nat) -> Vector n -In the expression: vector -Expression: f1 (\v -> v) vector -Type: Int - -Expression: f1 (\v -> succ v) (\x -> vector (succ x)) -Type: Int - -Couldn't match expected type Vector x - against inferred type Vector (succ x) -In the expression: vector (succ x) -Couldn't match expected type Vector n - against inferred type Vector (succ n) -In the expression: vector (succ n) -Expression: h ?2 (u0 ?2) -Type: Int - -Couldn't match expected type U ?2 ?2 - against inferred type U ?2 (succ ?2) -In the expression: u1 ?2 -Meta variable(s) ?11 should be resolved -in the expression: cmpVector (succ (succ zero)) (vector (succ (succ zero))) (append ?11 (succ zero) (vector ?11) (vector (succ zero))) -Expression: diff (succ (succ (succ zero))) (succ (succ zero)) (vector (succ (succ (succ (succ (succ zero)))))) (vector (succ (succ (succ zero)))) -Type: Vector (succ (succ zero)) - -Couldn't match expected type Vector (plus (succ (succ (succ zero))) (succ (succ zero))) - against inferred type Vector (succ (succ (succ (succ zero)))) -In the expression: vector (succ (succ (succ (succ zero)))) -Couldn't match expected type Vector ?1 - against inferred type Vector zero -In the expression: vector zero -Couldn't match expected type Vector zero - against inferred type Vector n -In the expression: x +Couldn't match expected type Nat + against inferred type String +In the expression: "0" +Category Int should have 0 argument(s), but has been given 1 +In the type: Int 0 +A function type is expected for the expression 1 instead of type Int +Couldn't match expected type Int -> Int + against inferred type Int +In the expression: 1 +unknown category of function identifier unknown_fun + +Category unknown_cat is not in scope +Cannot infer the type of expression \x -> x +A function type is expected for the expression \x -> x instead of type Int +Expression: append (succ (succ zero)) (succ zero) (vector (succ (succ zero))) (vector (succ zero)) +Type: Vector (succ (succ (succ zero))) + +Expression: <\m, n -> vector (plus m n) : (m : Nat) -> (n : Nat) -> Vector (plus m n)> +Type: (m : Nat) -> (n : Nat) -> Vector (plus m n) + +Expression: mkMorph (\x -> succ zero) +Type: Morph (\x -> succ zero) + +Expression: idMorph (mkMorph (\x -> x)) +Type: Nat + +Couldn't match expected type Morph (\x -> x) + against inferred type Morph (\x -> succ zero) +In the expression: mkMorph (\x -> succ zero) +Expression: Vector (succ zero) -> Vector (succ zero)> +Type: Vector zero -> Vector (succ zero) -> Vector (succ zero) + +Expression: <\n, v1, n1, v2 -> append n n1 v1 v2 : (n : Nat) -> Vector n -> (m : Nat) -> Vector m -> Vector (plus n m)> +Type: (n : Nat) -> Vector n -> (m : Nat) -> Vector m -> Vector (plus n m) + +Category EQ is not in scope +Expression: <\v1, v2 -> cmpVector ?7 v1 v2 : Vector ?7 -> Vector ?7 -> Int> (vector ?7) +Type: Vector ?7 -> Int + +Couldn't match expected type (m : Nat) -> Vector ?1 + against inferred type (n : Nat) -> Vector n +In the expression: vector +Expression: f1 (\v -> v) vector +Type: Int + +Expression: f1 (\v -> succ v) (\x -> vector (succ x)) +Type: Int + +Couldn't match expected type Vector x + against inferred type Vector (succ x) +In the expression: vector (succ x) +Couldn't match expected type Vector n + against inferred type Vector (succ n) +In the expression: vector (succ n) +Expression: h ?2 (u0 ?2) +Type: Int + +Couldn't match expected type U ?2 ?2 + against inferred type U ?2 (succ ?2) +In the expression: u1 ?2 +Meta variable(s) ?11 should be resolved +in the expression: cmpVector (succ (succ zero)) (vector (succ (succ zero))) (append ?11 (succ zero) (vector ?11) (vector (succ zero))) +Expression: diff (succ (succ (succ zero))) (succ (succ zero)) (vector (succ (succ (succ (succ (succ zero)))))) (vector (succ (succ (succ zero)))) +Type: Vector (succ (succ zero)) + +Couldn't match expected type Vector (plus (succ (succ (succ zero))) (succ (succ zero))) + against inferred type Vector (succ (succ (succ (succ zero)))) +In the expression: vector (succ (succ (succ (succ zero)))) +Couldn't match expected type Vector ?1 + against inferred type Vector zero +In the expression: vector zero +Couldn't match expected type Vector zero + against inferred type Vector n +In the expression: x