From: sof Date: Mon, 26 May 1997 05:46:37 +0000 (+0000) Subject: [project @ 1997-05-26 05:42:53 by sof] X-Git-Tag: Approximately_1000_patches_recorded~460 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=349880a7ab565d31c0a0f91eb3776be63d9bfa84;p=ghc-hetmet.git [project @ 1997-05-26 05:42:53 by sof] Updated for 2.03 --- diff --git a/ghc/compiler/tests/typecheck/Makefile b/ghc/compiler/tests/typecheck/Makefile index 4d26d0d..5633177 100644 --- a/ghc/compiler/tests/typecheck/Makefile +++ b/ghc/compiler/tests/typecheck/Makefile @@ -1,6 +1,6 @@ -TOP = ../../../.. -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk SUBDIRS = should_fail should_succeed stress -include $(TOP)/mk/subdir.mk +include $(TOP)/mk/target.mk diff --git a/ghc/compiler/tests/typecheck/should_fail/Digraph.stderr b/ghc/compiler/tests/typecheck/should_fail/Digraph.stderr index a61101c..03ae28a 100644 --- a/ghc/compiler/tests/typecheck/should_fail/Digraph.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/Digraph.stderr @@ -1,8 +1,58 @@ -"Digraph.hs", line 19: Type signature is too polymorphic: - Signature: [Edge v] - Monomorphic type variables: v - In a type signature: [Edge v] -Fail: Compilation errors found +Digraph.hs:19: A type signature is more polymorphic than the inferred type + Some type variables in the inferred type can't be forall'd, namely: + `v{-a13W-}' + Possible cause: the RHS mentions something subject to the monomorphism restriction + When checking signature for `reversed_edges' + In an equation for function `stronglyConnComp': + `stronglyConnComp es vs = PrelTup.snd + (span_tree + (new_range + reversed_edges) + (PrelBase.[], (PrelBase.[])) + (PrelTup.snd + (dfs (new_range + es) + (PrelBase.[], (PrelBase.[])) + vs))) + where + span_tree + r (vs, ns) PrelBase.[] + = (vs, (ns)) + span_tree + r (vs, ns) (x PrelBase.: xs) + | [x PrelList.elem vs] = + span_tree + r (vs, (ns)) xs + | [PrelBase.otherwise] = + span_tree + r + (vs', ((x PrelBase.: ns') PrelBase.: ns)) + xs + where + (vs', ns') + = dfs r + (x PrelBase.: vs, (PrelBase.[])) + (r x) + new_range + PrelBase.[] w + = PrelBase.[] + new_range + ((x, y) PrelBase.: xys) w + = if x PrelBase.== w then + (y + PrelBase.: (new_range + xys w)) + else + (new_range + xys w) + swap + (x, y) = (y, (x)) + reversed_edges :: + _forall_ [v] {PrelBase.Eq v} => [Edge v] + reversed_edges + = PrelBase.map + swap es' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/Makefile b/ghc/compiler/tests/typecheck/should_fail/Makefile index a3594b8..accc024 100644 --- a/ghc/compiler/tests/typecheck/should_fail/Makefile +++ b/ghc/compiler/tests/typecheck/should_fail/Makefile @@ -1,19 +1,34 @@ -TOP = ../../../../.. -GhcRunTestRules = YES -# These options apply to all tests -RUNSTDTEST_OPTS = -noC -ddump-tc -x1 -include $(TOP)/ghc/mk/ghc.mk +TOP = ../../../.. +include $(TOP)/mk/boilerplate.mk -runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) +HS_SRCS = $(wildcard *.hs) -tcfail045_flags = -fglasgow-exts -tcfail059_flags = -hi -tcfail060_flags = -hi -tcfail061_flags = -hi -tcfail062_flags = -hi -tcfail063_flags = -hi -tcfail064_flags = -hi -tcfail065_flags = -hi -tcfail066_flags = -hi -tcfail067_flags = -hi -tcfail068_flags = -fglasgow-exts +SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 1 +HC_OPTS += -noC -ddump-tc -dppr-user + +%.o : %.hs + +%.o : %.hs + $(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) + +all :: $(HS_OBJS) + +# Not all of them fail, allthough they're advertised as doing so.. +tcfail021_RUNTEST_OPTS = -x 0 +tcfail041_RUNTEST_OPTS = -x 0 +tcfail045_HC_OPTS = -fglasgow-exts +tcfail059_HC_OPTS = -hi +tcfail059_RUNTEST_OPTS = -x 0 +tcfail060_HC_OPTS = -hi +tcfail060_RUNTEST_OPTS = -x 0 +tcfail061_HC_OPTS = -hi +tcfail062_HC_OPTS = -hi +tcfail063_HC_OPTS = -hi +tcfail064_HC_OPTS = -hi +tcfail065_HC_OPTS = -hi +tcfail066_HC_OPTS = -hi +tcfail066_RUNTEST_OPTS = -x 0 +tcfail067_HC_OPTS = -hi +tcfail068_HC_OPTS = -fglasgow-exts + +include $(TOP)/mk/target.mk diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail001.hs b/ghc/compiler/tests/typecheck/should_fail/tcfail001.hs index 4e4ae93..dafb83a 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail001.hs +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail001.hs @@ -1,5 +1,6 @@ --!!! This should fail with a type error: the instance method --!!! has a function type when it should have the type [a]. +module Test where class A a where op :: a diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail001.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail001.stderr index bb40cb4..3a60d37 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail001.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail001.stderr @@ -1,8 +1,21 @@ -"tcfail001.hs", line 8: - Couldn't match type "[tt5] -> [tt6]" against "[a]". - Inside a function binding: - op ... [] = [] -Fail: Compilation errors found +tcfail001.hs:9:warning: + Duplicate class assertion `[(`A', + `a'), + (`A', + `a')]' in context: + [(`A', + `a'), + (`A', + `a')] + +tcfail001.hs:9: Couldn't match the type + `PrelBase.[]' against `GHC.-> [t{-anj-}]' + Expected: `[a{-ani-}]' + Inferred: `[t{-anj-}] -> [t{-ank-}]' + In an equation for function `op': + `op PrelBase.[] + = PrelBase.[]' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail002.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail002.stderr index 449dd5c..2848f77 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail002.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail002.stderr @@ -1,9 +1,10 @@ -"tcfail002.hs", line 3: - Type variable "tt4" occurs within the type "[tt4]". - Inside two equations or case alternatives: - ... (x : y) -> x - ... z -> z -Fail: Compilation errors found +tcfail002.hs:4: Cannot construct the infinite type (occur check) + `t{-amM-}' = `[t{-amM-}]' + Expected: `[t{-amM-}] -> t{-amM-}' + Inferred: `[t{-amM-}] -> [t{-amM-}]' + In an equation for function `c': + `c z = z' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail003.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail003.stderr index b875b06..cdec675 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail003.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail003.stderr @@ -1,6 +1,8 @@ -"tcfail003.hs", line 3: No such instance: - class "Num", type "Char" (at an overloaded literal: 1) -Fail: Compilation errors found +tcfail003.hs:3: No instance for: + `PrelBase.Num PrelBase.Char' + tcfail003.hs:3: + at an overloaded literal: 1 -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail004.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail004.stderr index 6272111..b5ea751 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail004.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail004.stderr @@ -1,8 +1,11 @@ -"tcfail004.hs", line 3: - Couldn't match type "(ot0, ot1)" against "(tt6, tt8, tt10)". +tcfail004.hs:3: Couldn't match the type + `PrelTup.(,)' against `PrelTup.(,,) t{-aXz-}' + Expected: `(t{-aXt-}, t{-aXw-})' + Inferred: `(t{-aXz-}, t{-aXC-}, t{-aXF-})' In a pattern binding: - (f, g) = (1, 2, 3) -Fail: Compilation errors found + (`f', `g') + = `(1, 2, 3)' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail005.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail005.stderr index f3c1a12..ebce13f 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail005.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail005.stderr @@ -1,8 +1,11 @@ -"tcfail005.hs", line 3: - Couldn't match type "[tt4]" against "(tt5, Char)". +tcfail005.hs:3: Couldn't match the type + `PrelBase.[]' against `PrelTup.(,) t{-aWN-}' + Expected: `[t{-aWJ-}]' + Inferred: `(t{-aWN-}, PrelBase.Char)' In a pattern binding: - (h : i) = (1, 'a') -Fail: Compilation errors found + (`h' `PrelBase.:' `i') + = `(1, ('a'))' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail006.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail006.stderr index 122557c..02d96f4 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail006.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail006.stderr @@ -1,6 +1,8 @@ -"tcfail006.hs", line 5: No such instance: - class "Num", type "Bool" (at an overloaded literal: 1) -Fail: Compilation errors found +tcfail006.hs:4: No instance for: + `PrelBase.Num PrelBase.Bool' + tcfail006.hs:4: + at an overloaded literal: 1 -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail007.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail007.stderr index 207597e..cbf5b51 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail007.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail007.stderr @@ -1,6 +1,8 @@ -"tcfail007.hs", line 4: No such instance: - class "Num", type "Bool" (at an overloaded literal: 1) -Fail: Compilation errors found +tcfail007.hs:4: No instance for: + `PrelBase.Num PrelBase.Bool' + tcfail007.hs:4: + at a use of an overloaded identifier: `PrelBase.+' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail008.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail008.stderr index c4a2f19..ce2d768 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail008.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail008.stderr @@ -1,6 +1,18 @@ -"tcfail008.hs", line 3: No such instance: - class "Num", type "[tt3]" (at an overloaded literal: 2) -Fail: Compilation errors found +tcfail008.hs:3: No instance for: + `PrelBase.Num [t{-aHf-}]' + tcfail008.hs:3: + at an overloaded literal: 2 + +tcfail008.hs:3: No instance for: + `PrelBase.Num [t{-aHf-}]' + tcfail008.hs:3: + at an overloaded literal: 2 + +tcfail008.hs:3: No instance for: + `PrelBase.Num [PrelBase.Int]' + tcfail008.hs:3: + at an overloaded literal: 2 + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail009.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail009.stderr index 86760a4..b293ca4 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail009.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail009.stderr @@ -1,7 +1,12 @@ -"tcfail009.hs", line 3: - Couldn't match type "Integer" against "Int". - In an arithmetic sequence: [ (1 :: Int) .. (2 :: Integer) ] -Fail: Compilation errors found +tcfail009.hs:3: Couldn't match the type + `PrelBase.Integer' against `PrelBase.Int' + Expected: `PrelBase.Int' + Inferred: `PrelBase.Integer' + In an arithmetic sequence: + `[(1 :: + PrelBase.Int) .. (2 :: + PrelBase.Integer)]' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail010.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail010.stderr index 46c8072..986ac2a 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail010.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail010.stderr @@ -1,6 +1,13 @@ -"tcfail010.hs", line 3: No such instance: - class "Num", type "[tt4]" (at a use of an overloaded identifier: +) -Fail: Compilation errors found +tcfail010.hs:3: No instance for: + `PrelBase.Num [t{-aHi-}]' + tcfail010.hs:3: + at a use of an overloaded identifier: `PrelBase.+' + +tcfail010.hs:3: No instance for: + `PrelBase.Num [t{-aHi-}]' + tcfail010.hs:3: + at a use of an overloaded identifier: `PrelBase.+' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail011.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail011.stderr index 9ec109e..5cd8c3e 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail011.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail011.stderr @@ -1,5 +1,6 @@ -"tcfail011.hs", line 3: undefined value: y -Fail: Compilation errors found +tcfail011.hs:3: + Value not in scope: `y' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail012.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail012.stderr index c1bb07e..2e525ce 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail012.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail012.stderr @@ -1,8 +1,11 @@ -"tcfail012.hs", line 3: - Couldn't match type "Bool" against "[tt0]". +tcfail012.hs:3: Couldn't match the type + `PrelBase.Bool' against `[t{-amB-}]' + Expected: `PrelBase.Bool' + Inferred: `[t{-amB-}]' In a pattern binding: - True = [] -Fail: Compilation errors found + `PrelBase.True' + = `PrelBase.[]' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail013.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail013.stderr index 81b18dd..45fefc8 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail013.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail013.stderr @@ -1,9 +1,11 @@ -"tcfail013.hs", line 3: - Couldn't match type "[tt2]" against "Bool". - Inside two equations or case alternatives: - ... [] -> 1 - ... True -> 2 -Fail: Compilation errors found +tcfail013.hs:4: Couldn't match the type + `[t{-aHg-}]' against `PrelBase.Bool' + Expected: `[t{-aHg-}] -> t{-aHi-}' + Inferred: `PrelBase.Bool -> t{-aHl-}' + In an equation for function `f': + `f PrelBase.True + = 2' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail014.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail014.stderr index c9390b2..2515260 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail014.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail014.stderr @@ -1,10 +1,21 @@ -"tcfail014.hs", line 5: - Type variable "ot8" occurs within the type "ot8 -> ot9". - Too many arguments in application of function "z" +tcfail014.hs:5: Cannot construct the infinite type (occur check) + `o{-aHw-}' = `o{-aHw-} -> o{-aIe-}' + Expected: `o{-aHw-}' + Inferred: `o{-aHw-} -> o{-aIe-}' + In the first argument of `z', namely + `z' + In an equation for function `h': + `h z = z z' + In an equation for function `g': + `g y = h PrelBase.+ 2 + where + h z = z z' -"tcfail014.hs", line 6: No such instance: - class "Num", type "tt19 -> tt20" (at an overloaded literal: 1) -Fail: Compilation errors found +tcfail014.hs:5: No instance for: + `PrelBase.Num (t{-aHZ-} -> t{-aI0-})' + tcfail014.hs:5: + at a use of an overloaded identifier: `PrelBase.+' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail015.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail015.stderr index 4463818..5ae8866 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail015.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail015.stderr @@ -1,6 +1,8 @@ -"tcfail015.hs", line 7: No such instance: - class "Num", type "Bool" (at an overloaded literal: 2) -Fail: Compilation errors found +tcfail015.hs:7: No instance for: + `PrelBase.Num PrelBase.Bool' + tcfail015.hs:7: + at an overloaded literal: 2 -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail016.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail016.stderr index 9d2fc28..5688999 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail016.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail016.stderr @@ -1,11 +1,15 @@ -"tcfail016.hs", line 8: - Couldn't match type "(a, Expr a)" against "Expr a". - Inside a function binding: - g ... (Var name) - = [name] - (App e1 e2) - = (g e1) ++ (g e2) -Fail: Compilation errors found +tcfail016.hs:9: Couldn't match the type + `PrelTup.(,) a{-aX1-}' against `Expr' + Expected: `Expr a{-aWV-}' + Inferred: `AnnExpr a{-aX1-}' + In the first argument of `g', namely + `e1' + In the first argument of `PrelBase.++', namely + (`g' `e1') + In an equation for function `g': + `g (App e1 e2) + = (g e1) PrelBase.++ (g e2)' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail017.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail017.stderr index 2c17257..4d854ce 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail017.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail017.stderr @@ -1,6 +1,9 @@ -"tcfail017.hs", line 11: No such instance: - class "C", type "[a]" (at an instance declaration) -Fail: Compilation errors found +tcfail017.hs:11: No instance for: + `C [a{-anj-}]' + tcfail017.hs:11: + in an instance declaration + When checking superclass constraints of an instance declaration -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail018.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail018.stderr index 7f564f4..df711e5 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail018.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail018.stderr @@ -1,6 +1,13 @@ -"tcfail018.hs", line 5: No such instance: - class "Num", type "[tt3]" (at an overloaded literal: 1) -Fail: Compilation errors found +tcfail018.hs:5: No instance for: + `PrelBase.Num [t{-aHg-}]' + tcfail018.hs:5: + at an overloaded literal: 1 + +tcfail018.hs:5: No instance for: + `PrelBase.Num [t{-aHg-}]' + tcfail018.hs:5: + at an overloaded literal: 1 + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail019.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail019.stderr index 7ac11dc..58cae59 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail019.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail019.stderr @@ -1,6 +1,27 @@ -"tcfail019.hs", line 20: No such instance: - class "B", type "[a]" (at an instance declaration) -Fail: Compilation errors found +tcfail019.hs:20: No instance for: + `B [a{-anU-}]' + tcfail019.hs:20: + in an instance declaration + When checking methods of an instance declaration + +tcfail019.hs:20: No instance for: + `C [a{-anU-}]' + tcfail019.hs:20: + in an instance declaration + When checking methods of an instance declaration + +tcfail019.hs:20: No instance for: + `B [a{-anU-}]' + tcfail019.hs:20: + in an instance declaration + When checking superclass constraints of an instance declaration + +tcfail019.hs:20: No instance for: + `C [a{-anU-}]' + tcfail019.hs:20: + in an instance declaration + When checking superclass constraints of an instance declaration + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail020.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail020.stderr index 760faee..ef738f0 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail020.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail020.stderr @@ -1,6 +1,9 @@ -"tcfail020.hs", line 12: No such instance: - class "A", type "[a]" (at an instance declaration) -Fail: Compilation errors found +tcfail020.hs:12: No instance for: + `A [a{-aGH-}]' + tcfail020.hs:12: + in an instance declaration + When checking superclass constraints of an instance declaration -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail021.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail021.stderr index 8b4e139..1e8c603 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail021.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail021.stderr @@ -1,6 +1,17 @@ - -"tcfail021.hs", line 2: multiple declarations of variable in pattern: - x ( "tcfail021.hs", line 2, "tcfail021.hs", line 2) -Fail: Compilation errors found -ghc: execution of the Haskell compiler had trouble + +--================================================================================ +Typechecked: +AbsBinds +[`t{-aHp-}', `t{-aHr-}', `t{-aHm-}'] +[`d.Num'] +[([`t{-aHp-}', `t{-aHr-}', `t{-aHm-}'], `f', `f')] + `fromInt' = + `PrelBase.fromInt' + `t{-aHm-}' + `d.Num' + `lit' = + `fromInt' + `PrelBase.I#' + 2# + `f' `x' `x' = `lit' diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail022.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail022.stderr index 277f09d..43d06b7 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail022.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail022.stderr @@ -1,6 +1,8 @@ -"tcfail022.hs", line 2: multiple declarations of variable: - f ( "tcfail022.hs", line 2, "tcfail022.hs", line 6) -Fail: Compilation errors found +tcfail022.hs:2: + Conflicting exports for local name: f + module Main + module Main -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail023.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail023.stderr index 52dd9fa..1626fb7 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail023.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail023.stderr @@ -1,11 +1,27 @@ -"tcfail023.hs", line 8: Duplicate/overlapping instances: - class "A", type "B"; at "tcfail023.hs", line 8 and "tcfail023.hs", line 11 - -"tcfail023.hs", line 11: - Couldn't match type "Bool" against "B". - Inside a function binding: - op ... C = True -Fail: Compilation errors found +tcfail023.hs:2: Duplicate or overlapping instance declarations + Class `A' type `B' + at tcfail023.hs:8 and tcfail023.hs:11 + +tcfail023.hs:2: Duplicate or overlapping instance declarations + Class `A' type `B' + at tcfail023.hs:8 and tcfail023.hs:11 + +tcfail023.hs:11: Couldn't match the type + `B' against `PrelBase.Bool' + Expected: `B' + Inferred: `PrelBase.Bool' + In an equation for function `op': + `op C = PrelBase.True' + +tcfail023.hs:8: Couldn't match the type + `B' against `PrelBase.Bool' + Expected: `B' + Inferred: `PrelBase.Bool' + In an equation for function `op': + `op C = PrelBase.True' + +tcfail023.hs:2: Module Main must include a definition for `Main.main' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail024.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail024.stderr index f48129d..a483112 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail024.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail024.stderr @@ -1,6 +1,5 @@ -"tcfail024.hs", line 2: multiple declarations of variable: - A ( "tcfail024.hs", line 2, "tcfail024.hs", line 4) -Fail: Compilation errors found +tcfail024.hs:2: Module Main must include a definition for `Main.main' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail025.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail025.stderr index 02efd9b..6a0f830 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail025.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail025.stderr @@ -1,6 +1,8 @@ -"tcfail025.hs", line 6: multiple declarations of type synonym: - A ( "tcfail025.hs", line 6, "tcfail025.hs", line 2) -Fail: Compilation errors found +tcfail025.hs:2: + Conflicting exports for local name: A + module Main + module Main -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail026.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail026.stderr index 950e459..23e90f7 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail026.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail026.stderr @@ -1,6 +1,13 @@ -"tcfail026.hs", line 9: multiple declarations of class: - A ( "tcfail026.hs", line 9, "tcfail026.hs", line 3) -Fail: Compilation errors found +tcfail026.hs:2: + Conflicting exports for local name: A + module Main + module Main + +tcfail026.hs:6: + Class type variable ``a'' does not appear in method signature: + op2 :: + `b' -> `b' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail027.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail027.stderr index e86e6ab..617dd4b 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail027.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail027.stderr @@ -1,7 +1,7 @@ -The following classes form a cycle: - "tcfail027.hs", line 4: A - "tcfail027.hs", line 7: B -Fail: Compilation errors found +tcfail027.hs:3: Cycle in class declarations ... + `A' tcfail027.hs:4 + `B' tcfail027.hs:7 -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail028.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail028.stderr index edc5403..d61467c 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail028.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail028.stderr @@ -1,6 +1,9 @@ -"tcfail028.hs", line 3: Type has too few arguments: - "A" should have 2 argument(s), but has been given 1 argument(s) instead -Fail: Compilation errors found +tcfail028.hs:4: Couldn't match the kind + ka2865 -> * against * + When unifying two kinds + ka2865 -> * and * + In the data declaration for `A' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail029.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail029.stderr index 2ba7250..26cac09 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail029.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail029.stderr @@ -1,6 +1,8 @@ -"tcfail029.hs", line 5: No such instance: - class "Ord", type "Foo" (at a use of an overloaded identifier: >) -Fail: Compilation errors found +tcfail029.hs:6: No instance for: + `PrelBase.Ord Foo' + tcfail029.hs:6: + at a use of an overloaded identifier: `PrelBase.>' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail030.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail030.stderr index 72c2f6f..3dbe460 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail030.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail030.stderr @@ -1,3 +1,5 @@ -Typechecked: + +tcfail030.hs:0: Module Main must include a definition for `Main.main' +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail031.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail031.stderr index 5f304ee..a50843e 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail031.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail031.stderr @@ -1,6 +1,12 @@ -"tcfail031.hs", line 2: - Couldn't match type "Char" against "Bool". In a predicate expression: 'a' -Fail: Compilation errors found +tcfail031.hs:3: Couldn't match the type + `PrelBase.Bool' against `PrelBase.Char' + Expected: `PrelBase.Bool' + Inferred: `PrelBase.Char' + In a predicate expression: + `'a'' + In an equation for function `f': + `f x = if 'a' then 1 else 2' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail032.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail032.stderr index 53fee2d..7229913 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail032.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail032.stderr @@ -1,8 +1,11 @@ -"tcfail032.hs", line 14: Type signature is too polymorphic: - Signature: a -> Int - Monomorphic type variables: a - In an expression with a type signature: x:: a -> Int -Fail: Compilation errors found +tcfail032.hs:14: A type signature is more polymorphic than the inferred type + Some type variables in the inferred type can't be forall'd, namely: + `a{-aG1-}' + Possible cause: the RHS mentions something subject to the monomorphism restriction + In an expression with a type signature: + `x :: + _forall_ [a] {PrelBase.Eq a} => a -> PrelBase.Int' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail033.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail033.stderr index b441c25..72b2c88 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail033.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail033.stderr @@ -1,8 +1,12 @@ -"tcfail033.hs", line 3: - Type variable "tt2" occurs within the type "(tt2, tt3)". +tcfail033.hs:4: Cannot construct the infinite type (occur check) + `t{-aKn-}' = `(t{-aKn-}, t{-aKq-})' + Expected: `a{-aKs-} (t{-aKn-}, t{-aKq-})' + Inferred: `a{-aKs-} t{-aKn-}' In a pattern binding: - buglet = [ x | (x, y) <- buglet ] -Fail: Compilation errors found + `buglet' + = `[ x | + (x, y) <- buglet ]' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail034.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail034.stderr index db6fbf4..ec4adbd 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail034.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail034.stderr @@ -1,7 +1,8 @@ -These overloadings don't match type signature: - "tcfail034.hs", line 15; class "Integral", type "a" - (at a use of an overloaded identifier: mod) -Fail: Compilation errors found +tcfail034.hs:13: tcfail034.hs:17: Context required by inferred type, but missing on a type signature: + at a use of an overloaded identifier: `PrelNum.mod' + `PrelNum.Integral' `a{-aZO-}' + When checking signature(s) for: `test' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail035.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail035.stderr index e69de29..e94c4d0 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail035.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail035.stderr @@ -0,0 +1,11 @@ + +tcfail035.hs:3: Duplicate or overlapping instance declarations + Class `PrelBase.Num' type `NUM' + at tcfail035.hs:6 and tcfail035.hs:7 + +tcfail035.hs:3: Duplicate or overlapping instance declarations + Class `PrelBase.Num' type `NUM' + at tcfail035.hs:6 and tcfail035.hs:7 + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail036.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail036.stderr index e69de29..f374fcb 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail036.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail036.stderr @@ -0,0 +1,61 @@ + +tcfail036.hs:9: Class used as a type constructor: `PrelBase.Num' + +tcfail036.hs:3: Duplicate or overlapping instance declarations + Class `PrelBase.Num' type `NUM' + at tcfail036.hs:7 and tcfail036.hs:8 + +tcfail036.hs:3: Duplicate or overlapping instance declarations + Class `PrelBase.Num' type `NUM' + at tcfail036.hs:7 and tcfail036.hs:8 + +tcfail036.hs:8: No instance for: + `PrelBase.Eq NUM' + tcfail036.hs:8: + in an instance declaration + When checking methods of an instance declaration + +tcfail036.hs:8: No instance for: + `PrelBase.Show NUM' + tcfail036.hs:8: + in an instance declaration + When checking methods of an instance declaration + +tcfail036.hs:8: No instance for: + `PrelBase.Eq NUM' + tcfail036.hs:8: + in an instance declaration + When checking superclass constraints of an instance declaration + +tcfail036.hs:8: No instance for: + `PrelBase.Show NUM' + tcfail036.hs:8: + in an instance declaration + When checking superclass constraints of an instance declaration + +tcfail036.hs:7: No instance for: + `PrelBase.Eq NUM' + tcfail036.hs:7: + in an instance declaration + When checking methods of an instance declaration + +tcfail036.hs:7: No instance for: + `PrelBase.Show NUM' + tcfail036.hs:7: + in an instance declaration + When checking methods of an instance declaration + +tcfail036.hs:7: No instance for: + `PrelBase.Eq NUM' + tcfail036.hs:7: + in an instance declaration + When checking superclass constraints of an instance declaration + +tcfail036.hs:7: No instance for: + `PrelBase.Show NUM' + tcfail036.hs:7: + in an instance declaration + When checking superclass constraints of an instance declaration + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail037.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail037.stderr index e69de29..b18a95d 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail037.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail037.stderr @@ -0,0 +1,8 @@ + +tcfail037.hs:3: + Conflicting definitions for: `+' + Defined at tcfail037.hs:10 + Imported from Prelude at tcfail037.hs:3 + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail038.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail038.stderr index e69de29..84e74e1 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail038.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail038.stderr @@ -0,0 +1,9 @@ + +tcfail038.hs:8: + Conflicting definitions for `/=' in the bindings in an instance declaration + +tcfail038.hs:7: + Conflicting definitions for `==' in the bindings in an instance declaration + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail039.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail039.stderr index e69de29..574b888 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail039.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail039.stderr @@ -0,0 +1,8 @@ + +tcfail039.hs:3: + Conflicting definitions for: `==' + Defined at tcfail039.hs:7 + Imported from Prelude at tcfail039.hs:3 + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail040.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail040.stderr index e69de29..51d6bfd 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail040.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail040.stderr @@ -0,0 +1,7 @@ + +tcfail040.hs:3: tcfail040.hs:19: Ambiguous overloading: + at a use of an overloaded identifier: `<<' + `ORD' `a{-aGQ-}' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail041.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail041.stderr index e69de29..c2e2b69 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail041.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail041.stderr @@ -0,0 +1,87 @@ + + +--================================================================================ +Typechecked: +`d.Ord' = + `PrelBase.$d6' +`<=' = + `PrelBase.<=' + `PrelBase.Int' + `d.Ord' +`d.Num' = + `PrelBase.$d3' +`fromInt' = + `PrelBase.fromInt' + `PrelBase.Int' + `d.Num' +`lit' = + `fromInt' + `PrelBase.I#' + 1# +`d.Integral' = + `PrelNum.$d36' +`div' = + `PrelNum.div' + `PrelBase.Int' + `d.Integral' +`fromInt' = + `fromInt' +`lit' = + `fromInt' + `PrelBase.I#' + 2# +AbsBinds +[`a{-a121-}'] +[] +[([`a{-a121-}'], `init_last', `init_last')] + `init_last' + `a' `b' = `(a, a)' +AbsBinds +[`a{-a12a-}'] +[`d.Ord'] +[([`a{-a12a-}'], `merge', `merge')] + `merge' + `xs' `ys' + = `xs' +AbsBinds [`a{-a12l-}'] [`d.Ord'] [([`a{-a12l-}'], `sort', `sort')] + `d.Ord' = + `d.Ord' + `sort' + `xs' = `s xs + PrelList.length + a{-a12l-} + xs' + where + AbsBinds [`b{-a12s-}'] [`d.Ord'] [([`b{-a12s-}'], `s', `s')] + `d.Ord' = + `d.Ord' + `merge' = + `merge' + `b{-a12s-}' + `d.Ord' + `d.Ord' = + `d.Ord' + `sort' = + `sort' + `b{-a12s-}' + `d.Ord' + `sort' = + `sort' + `s' `xs' `k' + = `if k <= lit then + xs + else + merge + sort + ys + sort + zs' + where + AbsBinds [] [] [([], `ys', `ys'), ([], `zs', `zs')] + (`ys', `zs') + = `init_last + b{-a12s-} + xs k div lit' + `s' = + `s' `a{-a12l-}' + `d.Ord' diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail042.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail042.stderr index e69de29..6bc8552 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail042.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail042.stderr @@ -0,0 +1,10 @@ + +tcfail042.hs:16: tcfail042.hs:16: Context required by inferred type, but missing on a type signature: + in an instance declaration + `PrelBase.Num' `a{-aN7-}' + When checking superclass constraints of an instance declaration + +tcfail042.hs:4: Module Main must include a definition for `Main.main' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail043.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail043.stderr index e69de29..5454a6a 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail043.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail043.stderr @@ -0,0 +1,13 @@ + +tcfail043.hs:16: + Conflicting definitions for: `and' + Defined at tcfail043.hs:42 + Imported from Prelude at tcfail043.hs:16 + +tcfail043.hs:16: + Conflicting definitions for: `null' + Defined at tcfail043.hs:57 + Imported from Prelude at tcfail043.hs:16 + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail044.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail044.stderr index e69de29..6a17c88 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail044.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail044.stderr @@ -0,0 +1,14 @@ + +tcfail044.hs:12: No instance for: + `PrelBase.Eval (a{-a19I-} -> a{-a19I-})' + tcfail044.hs:12: + in an instance declaration + When checking superclass constraints of an instance declaration + +tcfail044.hs:20: No instance for: + `PrelBase.Eval (PrelBase.Float -> PrelBase.Float)' + tcfail044.hs:20: + at a use of an overloaded identifier: `PrelBase.+' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail045.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail045.stderr index e69de29..638a617 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail045.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail045.stderr @@ -0,0 +1,6 @@ + +tcfail045.hs:4: + Could not find valid interface file `PreludeGlaST' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail046.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail046.stderr index e69de29..858e48e 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail046.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail046.stderr @@ -0,0 +1,35 @@ + +tcfail046.hs:4: No instance for class + `PrelBase.Eq' + at type + `Process a{-r7b-}' + +tcfail046.hs:4: No instance for class + `PrelBase.Eq' + at type + `Process a{-r7g-}' + +tcfail046.hs:4: No instance for class + `PrelBase.Eq' + at type + `Process a{-r7b-}' + +tcfail046.hs:4: No instance for class + `PrelBase.Eq' + at type + `Process a{-r7g-}' + +tcfail046.hs:23: No instance for: + `PrelBase.Eq (Process a{-a11o-})' + tcfail046.hs:23: + at a use of an overloaded identifier: `PrelBase.==' + When checking methods of an instance declaration + +tcfail046.hs:15: No instance for: + `PrelBase.Eq (Process a{-a14I-})' + tcfail046.hs:15: + at a use of an overloaded identifier: `PrelBase.==' + When checking methods of an instance declaration + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail047.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail047.stderr index fd0781b..895309f 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail047.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail047.stderr @@ -1,2 +1,7 @@ -"tcfail047.hs", line 5: syntax error; on input: ( -ghc: execution of the Haskell parser had trouble + +tcfail047.hs:6: The type ``(a{-r3e-}, (b{-r3f-}, c{-r3g-}))'' cannot be used as an instance type. + +tcfail047.hs:2: Module Main must include a definition for `Main.main' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail048.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail048.stderr index 5d16831..b6fa067 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail048.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail048.stderr @@ -1,5 +1,6 @@ -"tcfail048.hs", line 3: undefined class: B -Fail: Compilation errors found +tcfail048.hs:4: + Type constructor or class not in scope: `B' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail049.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail049.stderr index 8156893..d74b045 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail049.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail049.stderr @@ -1,5 +1,6 @@ -"tcfail049.hs", line 2: undefined value: g -Fail: Compilation errors found +tcfail049.hs:3: + Value not in scope: `g' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail050.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail050.stderr index 0f3df12..c879f63 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail050.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail050.stderr @@ -1,5 +1,6 @@ -"tcfail050.hs", line 2: undefined value: B -Fail: Compilation errors found +tcfail050.hs:3: + Data constructor not in scope: `B' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail051.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail051.stderr index 1ea74dc..9136d3a 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail051.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail051.stderr @@ -1,7 +1,6 @@ -"tcfail051.hs", line 3: undefined class: B - -"tcfail051.hs", line 3: "op1" is not an operation of class "*UNBOUND*B". -Fail: Compilation errors found +tcfail051.hs:4: + Type constructor or class not in scope: `B' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail052.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail052.stderr index 33d2255..e31db78 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail052.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail052.stderr @@ -1,5 +1,6 @@ -"tcfail052.hs", line 2: undefined type variable: c -Fail: Compilation errors found +tcfail052.hs:4: + Type variable not in scope: `c' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail053.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail053.stderr index 8030f97..96cd3dd 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail053.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail053.stderr @@ -1,5 +1,6 @@ -"tcfail053.hs", line 2: undefined type constructor: A -Fail: Compilation errors found +tcfail053.hs:3: + Type constructor or class not in scope: `A' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail054.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail054.stderr index 4c2a2f6..6b7e65f 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail054.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail054.stderr @@ -1,5 +1,6 @@ -"tcfail054.hs", line 2: undefined value: B -Fail: Compilation errors found +tcfail054.hs:3: + Data constructor not in scope: `B' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail055.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail055.stderr index c3bd561..3e6317c 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail055.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail055.stderr @@ -1,7 +1,12 @@ -"tcfail055.hs", line 2: - Couldn't match type "Int" against "Float". - In an expression with a type signature: (x (+) 1 :: Int):: Float -Fail: Compilation errors found +tcfail055.hs:3: Couldn't match the type + `PrelBase.Int' against `PrelBase.Float' + Expected: `PrelBase.Float' + Inferred: `PrelBase.Int' + In an expression with a type signature: + `(x PrelBase.+ 1 :: + PrelBase.Int) :: + PrelBase.Float' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail056.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail056.stderr index cb7ca89..e7afc4d 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail056.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail056.stderr @@ -1,5 +1,13 @@ -"tcfail056.hs", line 9: "<=" is not an operation of class "Eq". -Fail: Compilation errors found +tcfail056.hs:1: Duplicate or overlapping instance declarations + Class `PrelBase.Eq' type `Foo' + at tcfail056.hs:6 and tcfail056.hs:10 + +tcfail056.hs:1: Duplicate or overlapping instance declarations + Class `PrelBase.Eq' type `Foo' + at tcfail056.hs:6 and tcfail056.hs:10 + +tcfail056.hs:10: Class `PrelBase.Eq' does not have a method `<=' + -ghc: execution of the Haskell compiler had trouble +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail057.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail057.stderr index 8159127..96199e7 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail057.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail057.stderr @@ -1,5 +1,5 @@ -"tcfail057.hs", line 5: undefined type constructor: RealFrac -Fail: Compilation errors found +tcfail057.hs:5: Class used as a type constructor: `PrelNum.RealFrac' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail058.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail058.stderr index 2ab1191..d771e0e 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail058.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail058.stderr @@ -1,5 +1,5 @@ -"tcfail058.hs", line 5: undefined class: Array -Fail: Compilation errors found +tcfail058.hs:6: Type constructor used as a class: `ArrBase.Array' -ghc: execution of the Haskell compiler had trouble + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail059.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail059.stderr index e69de29..89ffb65 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail059.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail059.stderr @@ -0,0 +1,15 @@ + + +--================================================================================ +Typechecked: +`Bar' = + `\ tpl -> + Bar {tpl}' +`Y' = + `Y {}' +AbsBinds [] [] [([], `$d1', `d.Eval')] + `d.Eval' = + ({-dict-} [] []) +AbsBinds [] [] [([], `$d2', `d.Eval')] + `d.Eval' = + ({-dict-} [] []) diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail060.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail060.stderr index e69de29..9694aee 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail060.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail060.stderr @@ -0,0 +1,24 @@ + + +--================================================================================ +Typechecked: +`Y' = + `Y {}' +`Bar' = + `\ tpl -> + Bar {tpl}' +`opx' = + `_/\_ a{-r6B-} -> \ tpl -> + tpl' +AbsBinds [`a{-aHH-}'] [`d.Baz'] [([`a{-aHH-}'], `$mopx', `opx')] + AbsBinds [] [] [([], `opx', `opx')] + `opx' + = `GHCerr.noDefaultMethodError + (PrelBase.Int -> Bar -> a{-aHH-} -> a{-aHH-}) + "Class Baz Method opx"' +AbsBinds [] [] [([], `$d1', `d.Eval')] + `d.Eval' = + ({-dict-} [] []) +AbsBinds [] [] [([], `$d2', `d.Eval')] + `d.Eval' = + ({-dict-} [] []) diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail061.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail061.stderr index e69de29..e9c3c39 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail061.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail061.stderr @@ -0,0 +1,15 @@ + +tcfail061.hs:11: + Type variable not in scope: `b' + +tcfail061.hs:11: + Type variable not in scope: `b' + +tcfail061.hs:5: + Type variable not in scope: `b' + +tcfail061.hs:5: + Type variable not in scope: `b' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail062.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail062.stderr index e69de29..7cffa7b 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail062.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail062.stderr @@ -0,0 +1,9 @@ + +tcfail062.hs:33: + Type variable not in scope: `behaviouralExpression' + +tcfail062.hs:33: + Type variable not in scope: `behaviouralExpression' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail063.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail063.stderr index e69de29..bdec0c8 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail063.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail063.stderr @@ -0,0 +1 @@ +tcfail063.hs:5:1: is_context_format: variable missing after class name on input: "moby" diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr index e69de29..1709a47 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr @@ -0,0 +1,5 @@ + +tcfail064.hs:0: Module Main must include a definition for `Main.main' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail065.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail065.stderr index e69de29..c579c2e 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail065.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail065.stderr @@ -0,0 +1,9 @@ + +: A type signature is more polymorphic than the inferred type + Some type variables in the inferred type can't be forall'd, namely: + `x{-aNe-}' + Possible cause: the RHS mentions something subject to the monomorphism restriction + When checking signature for `setX' + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail066.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail066.stderr index e69de29..9d8a6a1 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail066.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail066.stderr @@ -0,0 +1,74 @@ + + +--================================================================================ +Typechecked: +`IMonadOk' = + `_/\_ a{-r44-} -> \ tpl tpl -> + IMonadOk + {_@_ a{-r44-} tpl tpl}' +`IMonadFail' = + `_/\_ a{-r44-} -> \ tpl tpl -> + IMonadFail + {_@_ a{-r44-} tpl tpl}' +AbsBinds [`a{-aKg-}'] [] [([`a{-aKg-}'], `$d1', `d.Eval')] + `d.Eval' = + ({-dict-} [] []) +`d.Num' = + `PrelBase.$d3' +`+' = + `PrelBase.+' + `IMonadState' + `d.Num' +AbsBinds [] [] [([], `tickI', `tickI')] + `tickI' + `n' = `\ s0 -> IMonadOk + PrelBase.() + s0 + n PrelBase.()' +AbsBinds +[`t{-aJ6-}', `a{-aIN-}', `a{-aIR-}'] +[] +[([`t{-aJ6-}', `a{-aIN-}', `a{-aIR-}'], `thenI', `thenI')] + `thenI' + `m' `k' = `\ s0 -> case m s0 of + (IMonadFail s1 msg) + -> IMonadFail + a{-aIN-} + s1 msg + (IMonadOk s1 r1) + -> k r1 s1' +AbsBinds [`a{-aJg-}'] [] [([`a{-aJg-}'], `failI', `failI')] + `failI' + `msg' = `\ s0 -> IMonadFail + a{-aJg-} + s0 msg' +AbsBinds [`a{-aJn-}'] [] [([`a{-aJn-}'], `returnI', `returnI')] + `returnI' + `r' = `\ s0 -> IMonadOk + a{-aJn-} + s0 r' +AbsBinds +[`t{-aJz-}', `t{-aJC-}'] +[] +[([`t{-aJz-}', `t{-aJC-}'], `mapI', `mapI')] + `mapI' + `f' `PrelBase.[]' + = `returnI + [t{-aJz-}] + PrelBase.[] + t{-aJz-}' + `mapI' + `f' (`x' `PrelBase.:' `xs') + = `thenI + [IMonadState, [t{-aJz-}], t{-aJz-}] + (f x) + (\ fx -> thenI + [IMonadState, [t{-aJz-}], [t{-aJz-}]] + (mapI + f xs) + (\ fxs -> returnI + [t{-aJz-}] + PrelBase.: + t{-aJz-} + fx fxs))' + +NOTE: Simplifier still going after 4 iterations; bailing out. diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail067.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail067.stderr index e69de29..724cb48 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail067.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail067.stderr @@ -0,0 +1,13 @@ + +tcfail067.hs:1: tcfail067.hs:76: Context required by inferred type, but missing on a type signature: + at a use of an overloaded identifier: `SubRange' + `PrelBase.Ord' `a{-a1dZ-}' + When checking signature(s) for: `numSubRangeBinOp' + +tcfail067.hs:65: tcfail067.hs:61: Context required by inferred type, but missing on a type signature: + at a use of an overloaded identifier: `numSubRangeNegate' + `PrelBase.Ord' `a{-a1fx-}' + When checking methods of an instance declaration + + +Compilation had errors diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail068.hs b/ghc/compiler/tests/typecheck/should_fail/tcfail068.hs index 64bf294..0d081b9 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail068.hs +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail068.hs @@ -4,7 +4,7 @@ module IndTree(IndTree(..), itgen, itiap, itrap, itrapstate) where --partain: import Auxiliary -import PreludeGlaST +import GlaExts type IndTree s t = MutableArray s (Int,Int) t diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail068.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail068.stderr index e69de29..47bc53f 100644 --- a/ghc/compiler/tests/typecheck/should_fail/tcfail068.stderr +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail068.stderr @@ -0,0 +1,69 @@ + +tcfail068.hs:4: + Conflicting definitions for: `Just' + Defined at tcfail068.hs:68 + Imported from Prelude at tcfail068.hs:4 + +tcfail068.hs:4: + Conflicting definitions for: `Nothing' + Defined at tcfail068.hs:70 + Imported from Prelude at tcfail068.hs:4 + +tcfail068.hs:4: + Conflicting definitions for: `Maybe' + Defined at tcfail068.hs:68 + Imported from Prelude at tcfail068.hs:4 + +tcfail068.hs:14: + Value not in scope: `runST' + +tcfail068.hs:21: + Value not in scope: `runST' + +tcfail068.hs:19: + Value not in scope: `returnStrictlyST' + +tcfail068.hs:19: + Value not in scope: `seqStrictlyST' + +tcfail068.hs:21: + Value not in scope: `thenStrictlyST' + +tcfail068.hs:26: + Value not in scope: `returnStrictlyST' + +tcfail068.hs:26: + Value not in scope: `seqStrictlyST' + +tcfail068.hs:29: + Value not in scope: `returnStrictlyST' + +tcfail068.hs:30: + Value not in scope: `seqStrictlyST' + +tcfail068.hs:29: + Value not in scope: `thenStrictlyST' + +tcfail068.hs:32: + Value not in scope: `runST' + +tcfail068.hs:38: + Value not in scope: `returnStrictlyST' + +tcfail068.hs:38: + Value not in scope: `thenStrictlyST' + +tcfail068.hs:41: + Value not in scope: `returnStrictlyST' + +tcfail068.hs:42: + Value not in scope: `seqStrictlyST' + +tcfail068.hs:41: + Value not in scope: `thenStrictlyST' + +tcfail068.hs:45: + Value not in scope: `runST' + + +Compilation had errors