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 /compiler/prelude/THNames.hs | |
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 'compiler/prelude/THNames.hs')
-rw-r--r-- | compiler/prelude/THNames.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/prelude/THNames.hs b/compiler/prelude/THNames.hs index 8c184f851e..fbda099d46 100644 --- a/compiler/prelude/THNames.hs +++ b/compiler/prelude/THNames.hs @@ -126,7 +126,8 @@ templateHaskellNames = [ overlappableDataConName, overlappingDataConName, overlapsDataConName, incoherentDataConName, -- DerivStrategy - stockDataConName, anyclassDataConName, newtypeDataConName, + stockStrategyDataConName, anyclassStrategyDataConName, + newtypeStrategyDataConName, -- TExp tExpDataConName, -- RuleBndr @@ -591,10 +592,11 @@ overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey incoherentDataConName = thCon (fsLit "Incoherent") incoherentDataConKey -- data DerivStrategy = ... -stockDataConName, anyclassDataConName, newtypeDataConName :: Name -stockDataConName = thCon (fsLit "Stock") stockDataConKey -anyclassDataConName = thCon (fsLit "Anyclass") anyclassDataConKey -newtypeDataConName = thCon (fsLit "Newtype") newtypeDataConKey +stockStrategyDataConName, anyclassStrategyDataConName, + newtypeStrategyDataConName :: Name +stockStrategyDataConName = thCon (fsLit "StockStrategy") stockDataConKey +anyclassStrategyDataConName = thCon (fsLit "AnyclassStrategy") anyclassDataConKey +newtypeStrategyDataConName = thCon (fsLit "NewtypeStrategy") newtypeDataConKey {- ********************************************************************* * * |