X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FShow.lhs;h=bbfe45849b56f0affa5fc0e59817993e77cf8997;hb=HEAD;hp=2c673a82c876bd99ebbcafdd7e429500dc6c844f;hpb=5ba076a7ebba87a34293dca92d8b3d8ea0dd9648;p=ghc-base.git diff --git a/GHC/Show.lhs b/GHC/Show.lhs index 2c673a8..bbfe458 100644 --- a/GHC/Show.lhs +++ b/GHC/Show.lhs @@ -1,7 +1,7 @@ \begin{code} -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE NoImplicitPrelude, BangPatterns, MagicHash, StandaloneDeriving #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Show @@ -38,6 +38,8 @@ module GHC.Show import GHC.Base import Data.Maybe import GHC.List ((!!), foldr1, break) +-- For defining instances for the generic deriving mechanism +import GHC.Generics (Arity(..), Associativity(..), Fixity(..)) \end{code} @@ -429,3 +431,10 @@ itos n# cs itos' (x# `quotInt#` 10#) (C# c# : cs') } \end{code} +Instances for types of the generic deriving mechanism. + +\begin{code} +deriving instance Show Arity +deriving instance Show Associativity +deriving instance Show Fixity +\end{code}