Commit d2471964 authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Marge Bot

Add another test for #17267

This one came in a comment from James Payor
parent 35c99e72
Pipeline #12036 passed with stages
in 496 minutes and 7 seconds
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MonoLocalBinds #-}
module Main where
class Show a => Thing a b
instance Show a => Thing a b
class (Show a => Thing a ()) => PseudoShow a b
instance PseudoShow a b
pseudoShow :: PseudoShow a () => a -> String
pseudoShow = show
{-
[G] PseudoShow a ()
(and hence by SC)
[G] Show a => Thing a ()
(and hence by SC)
[G] Show a => Show a
The latter loops
-}
T17267e.hs:1:1: error:
The IO action ‘main’ is not defined in module ‘Main’
T17267e.hs:16:14: error:
• Reduction stack overflow; size = 201
When simplifying the following type: Show a
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: show
In an equation for ‘pseudoShow’: pseudoShow = show
......@@ -26,3 +26,4 @@ test('T17267a', normal, compile_fail, [''])
test('T17267b', normal, compile_fail, [''])
test('T17267c', normal, compile_fail, [''])
test('T17267d', normal, compile_and_run, [''])
test('T17267e', normal, compile_fail, [''])
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