Changes between Initial Version and Version 1 of Ticket #3830


Ignore:
Timestamp:
Jan 20, 2010 11:45:28 AM (4 years ago)
Author:
simonpj
Comment:

Good point. The message from 6.12 is better

T3830.hs:4:3:
    Data constructor `Odd' returns type `forall a.
                                         Parity (Int, Int, a)'
      instead of an instance of its parent type `Parity a'
    In the definition of data constructor `Odd'
    In the data type declaration for `Parity'

Nevertheless, I also added a little more info to HsTyVarBndr to prevent this kind of thing happening again.

Simon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3830

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #3830 – Description

    initial v1  
     1{{{ 
    12{-# LANGUAGE GADTs, RankNTypes  #-} 
    23 
    34data Parity a where 
    45  Odd :: Int -> forall a. Parity (Int,Int,a) 
    5  
     6}}} 
    67 
    78(the "forall a" is in the wrong place) gives the error message 
    8  
     9{{{ 
    910    Malformed constructor result type: 
    1011      forall a :: k_a3Gz. Parity (Int, Int, a) 
    11  
     12}}} 
    1213That k_a3Gz. is a little bit cryptic. 
    1314