automatic show instance generating loop
I have the following code :
{-# LANGUAGE TypeFamilies, DataKinds #-}
data Status = Valid | Invalid deriving(Show)
data A s = A (TF s)
type family TF (s:: Status) where
TF Valid = Int
TF Invalid = Either String Int
instance Show (A Valid)
instance Show (A Invalid)
a :: A Valid
a = A 3
Printing a
results in a stackoverflow.
I'm using GHC-7.10.3 (and 7.8.4) on Ubuntu under a VM
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |