[GHC] #7631: Allow to differentiate between newtypes and datatypes

GHC cvs-ghc at haskell.org
Sun Jan 27 21:53:38 CET 2013


#7631: Allow to differentiate between newtypes and datatypes
-----------------------------+----------------------------------------------
Reporter:  Feuerbach         |          Owner:                   
    Type:  feature request   |         Status:  new              
Priority:  normal            |      Component:  libraries (other)
 Version:  7.6.1             |       Keywords:  generics         
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple 
 Failure:  None/Unknown      |      Blockedby:                   
Blocking:                    |        Related:                   
-----------------------------+----------------------------------------------
 When writing a generic instance, I would like to be able to tell whether
 the type under consideration has been declared using newtype or data.

 For example, in SmallCheck we generate values of certain "depth". It is
 natural to treat datatype constructors as increasing the depth of the
 constructed value, and newtype constructors as preserving the depth.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7631>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list