[commit: base] master: Add isNewtype to GHC.Generics (FIX #7631) (afa9f59)
José Pedro Magalhães
jpm at cs.uu.nl
Wed Feb 13 11:40:56 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/afa9f591fb3c5faf08ae09fb40fda06850bbb092
>---------------------------------------------------------------
commit afa9f591fb3c5faf08ae09fb40fda06850bbb092
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date: Wed Feb 13 10:40:28 2013 +0000
Add isNewtype to GHC.Generics (FIX #7631)
>---------------------------------------------------------------
GHC/Generics.hs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/GHC/Generics.hs b/GHC/Generics.hs
index 649f1f1..672e725 100644
--- a/GHC/Generics.hs
+++ b/GHC/Generics.hs
@@ -131,6 +131,9 @@ class Datatype d where
datatypeName :: t d (f :: * -> *) a -> [Char]
-- | The fully-qualified name of the module where the type is declared
moduleName :: t d (f :: * -> *) a -> [Char]
+ -- | Marks if the datatype is actually a newtype
+ isNewtype :: t d (f :: * -> *) a -> Bool
+ isNewtype _ = False
-- | Class for datatypes that represent records
More information about the ghc-commits
mailing list