diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2016-12-09 15:44:15 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-09 16:38:46 -0500 |
commit | 5349d648fd7af3f50953e8594b3d148ab073017f (patch) | |
tree | 65d79db9557d9b3b2cf3d0b41afbe363e5eb1d6d /libraries | |
parent | d1df8d1c16b8f5bdf14ae41f514e38699f953054 (diff) | |
download | haskell-5349d648fd7af3f50953e8594b3d148ab073017f.tar.gz |
Rename TH constructors for deriving strategies
After talking to Richard, he and I concluded that choosing the rather
common name `Newtype` to represent the corresponding deriving strategy
in Template Haskell was a poor choice of name. I've opted to rename it
to something less common (`NewtypeStrategy`) while we still have time. I
also renamed the corrsponding datatype in the GHC internals so as to
match it.
Reviewers: austin, goldfire, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2814
GHC Trac Issues: #10598
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | 6 | ||||
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs index 8941a8ba81..803eaef2dc 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs @@ -380,9 +380,9 @@ ppr_dec _ (PatSynSigD name ty) ppr_deriv_strategy :: DerivStrategy -> Doc ppr_deriv_strategy ds = text $ case ds of - Stock -> "stock" - Anyclass -> "anyclass" - Newtype -> "newtype" + StockStrategy -> "stock" + AnyclassStrategy -> "anyclass" + NewtypeStrategy -> "newtype" ppr_overlap :: Overlap -> Doc ppr_overlap o = text $ diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs index afe961b50e..4e21e8b841 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs @@ -1633,9 +1633,9 @@ data DerivClause = DerivClause (Maybe DerivStrategy) Cxt deriving( Show, Eq, Ord, Data, Generic ) -- | What the user explicitly requests when deriving an instance. -data DerivStrategy = Stock -- ^ A \"standard\" derived instance - | Anyclass -- ^ @-XDeriveAnyClass@ - | Newtype -- ^ @-XGeneralizedNewtypeDeriving@ +data DerivStrategy = StockStrategy -- ^ A \"standard\" derived instance + | AnyclassStrategy -- ^ @-XDeriveAnyClass@ + | NewtypeStrategy -- ^ @-XGeneralizedNewtypeDeriving@ deriving( Show, Eq, Ord, Data, Generic ) -- | A Pattern synonym's type. Note that a pattern synonym's *fully* |