diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr | 100 |
1 files changed, 52 insertions, 48 deletions
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr index c97acc25a7..8141caf5b5 100644 --- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr +++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr @@ -1,64 +1,68 @@ TcCoercibleFail.hs:11:8: error: - Couldn't match representation of type ‘Int’ with that of ‘()’ - arising from a use of ‘coerce’ - In the expression: coerce - In the expression: coerce $ one :: () - In an equation for ‘foo1’: foo1 = coerce $ one :: () + • Couldn't match representation of type ‘Int’ with that of ‘()’ + arising from a use of ‘coerce’ + • In the expression: coerce + In the expression: coerce $ one :: () + In an equation for ‘foo1’: foo1 = coerce $ one :: () TcCoercibleFail.hs:14:8: error: - Couldn't match representation of type ‘m Int’ with that of ‘m Age’ - arising from a use of ‘coerce’ - NB: We cannot know what roles the parameters to ‘m’ have; - we must assume that the role is nominal - In the expression: coerce - In the expression: coerce $ (return one :: m Int) - In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int) - Relevant bindings include - foo2 :: m Age (bound at TcCoercibleFail.hs:14:1) + • Couldn't match representation of type ‘m Int’ + with that of ‘m Age’ + arising from a use of ‘coerce’ + NB: We cannot know what roles the parameters to ‘m’ have; + we must assume that the role is nominal + • In the expression: coerce + In the expression: coerce $ (return one :: m Int) + In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int) + • Relevant bindings include + foo2 :: m Age (bound at TcCoercibleFail.hs:14:1) TcCoercibleFail.hs:16:8: error: - Couldn't match type ‘Int’ with ‘Age’ arising from a use of ‘coerce’ - In the expression: coerce - In the expression: coerce $ Map one () :: Map Age () - In an equation for ‘foo3’: foo3 = coerce $ Map one () :: Map Age () + • Couldn't match type ‘Int’ with ‘Age’ + arising from a use of ‘coerce’ + • In the expression: coerce + In the expression: coerce $ Map one () :: Map Age () + In an equation for ‘foo3’: foo3 = coerce $ Map one () :: Map Age () TcCoercibleFail.hs:18:8: error: - Couldn't match representation of type ‘Int’ with that of ‘Down Int’ - arising from a use of ‘coerce’ - The data constructor ‘Down’ of newtype ‘Down’ is not in scope - In the expression: coerce - In the expression: coerce $ one :: Down Int - In an equation for ‘foo4’: foo4 = coerce $ one :: Down Int + • Couldn't match representation of type ‘Int’ + with that of ‘Down Int’ + arising from a use of ‘coerce’ + The data constructor ‘Down’ of newtype ‘Down’ is not in scope + • In the expression: coerce + In the expression: coerce $ one :: Down Int + In an equation for ‘foo4’: foo4 = coerce $ one :: Down Int TcCoercibleFail.hs:21:8: error: - Couldn't match representation of type ‘Void’ with that of ‘()’ - arising from a use of ‘coerce’ - In the expression: coerce :: Void -> () - In an equation for ‘foo5’: foo5 = coerce :: Void -> () + • Couldn't match representation of type ‘Void’ with that of ‘()’ + arising from a use of ‘coerce’ + • In the expression: coerce :: Void -> () + In an equation for ‘foo5’: foo5 = coerce :: Void -> () TcCoercibleFail.hs:24:9: error: - Couldn't match representation of type ‘VoidBad ()’ - with that of ‘()’ - arising from a use of ‘coerce’ - In the expression: coerce :: (VoidBad ()) -> () - In an equation for ‘foo5'’: foo5' = coerce :: (VoidBad ()) -> () + • Couldn't match representation of type ‘VoidBad ()’ + with that of ‘()’ + arising from a use of ‘coerce’ + • In the expression: coerce :: (VoidBad ()) -> () + In an equation for ‘foo5'’: foo5' = coerce :: (VoidBad ()) -> () TcCoercibleFail.hs:28:8: error: - Reduction stack overflow; size = 201 - When simplifying the following type: Fix (Either Age) - Use -freduction-depth=0 to disable this check - (any upper bound you could choose might fail unpredictably with - minor updates to GHC, so disabling the check is recommended if - you're sure that type checking should terminate) - In the expression: coerce :: Fix (Either Int) -> Fix (Either Age) - In an equation for ‘foo6’: - foo6 = coerce :: Fix (Either Int) -> Fix (Either Age) + • Reduction stack overflow; size = 201 + When simplifying the following type: + Coercible (Fix (Either Int)) (Fix (Either Age)) + Use -freduction-depth=0 to disable this check + (any upper bound you could choose might fail unpredictably with + minor updates to GHC, so disabling the check is recommended if + you're sure that type checking should terminate) + • In the expression: coerce :: Fix (Either Int) -> Fix (Either Age) + In an equation for ‘foo6’: + foo6 = coerce :: Fix (Either Int) -> Fix (Either Age) TcCoercibleFail.hs:29:8: error: - Couldn't match representation of type ‘Either - Int (Fix (Either Int))’ - with that of ‘()’ - arising from a use of ‘coerce’ - In the expression: coerce :: Fix (Either Int) -> () - In an equation for ‘foo7’: foo7 = coerce :: Fix (Either Int) -> () + • Couldn't match representation of type ‘Either + Int (Fix (Either Int))’ + with that of ‘()’ + arising from a use of ‘coerce’ + • In the expression: coerce :: Fix (Either Int) -> () + In an equation for ‘foo7’: foo7 = coerce :: Fix (Either Int) -> () |