Skip to content

tcrun032 regressed

The tcrun032 test:

{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}

-- This tests the recursive-dictionary stuff.
--
-- The derived instance needs 

module Main where

data Fix f = In (f (Fix f))  deriving( Show, Eq )
data L x = Nil | Cons Int x  deriving (Show, Eq)

main = do { print (In Nil);
        print (In Nil == In Nil) }

now fails with:

tcrun032.hs:9:5:
    No instance for (Show (f (Fix f)))
      arising from the 'deriving' clause of a data type declaration
      at tcrun032.hs:9:5
    Possible fix: add an instance declaration for (Show (f (Fix f)))
    When deriving the instance for `Show (Fix f)'

tcrun032.hs:9:5:
    No instance for (Eq (f (Fix f)))
      arising from the 'deriving' clause of a data type declaration
      at tcrun032.hs:9:5
    Possible fix: add an instance declaration for (Eq (f (Fix f)))
    When deriving the instance for `Eq (Fix f)'

in the 6.6 branch. Both 6.6 and the HEAD work.

Trac metadata
Trac field Value
Version 6.6
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information