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

#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

#7631: Allow to differentiate between newtypes and datatypes when using Generics -----------------------------+---------------------------------------------- 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: -----------------------------+---------------------------------------------- -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7631#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7631: Allow to differentiate between newtypes and datatypes when using Generics -----------------------------+---------------------------------------------- Reporter: Feuerbach | Owner: dreixel Type: feature request | Status: new Priority: normal | Component: libraries (other) Version: 7.7 | Keywords: generics Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Changes (by dreixel): * owner: => dreixel * version: 7.6.1 => 7.7 Comment: I'm happy to implement this. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7631#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7631: Allow to differentiate between newtypes and datatypes when using Generics
-----------------------------+----------------------------------------------
Reporter: Feuerbach | Owner: dreixel
Type: feature request | Status: new
Priority: normal | Component: libraries (other)
Version: 7.7 | Keywords: generics
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
Comment(by jpm@…):
commit 6046b25ea35291f9fb0b30633f6f8b8d83a7a00a
{{{
Author: Jose Pedro Magalhaes

#7631: Allow to differentiate between newtypes and datatypes when using Generics ---------------------------------+------------------------------------------ Reporter: Feuerbach | Owner: dreixel Type: feature request | Status: closed Priority: normal | Component: libraries (other) Version: 7.7 | Resolution: fixed Keywords: generics | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by dreixel): * status: new => closed * resolution: => fixed Comment: Done. New test is `GenNewtype`. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7631#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC