[commit: ghc] master: Simply Data instance context for AmbiguousFieldOcc (f337a20)
git at git.haskell.org
git at git.haskell.org
Sat Oct 7 22:01:51 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f337a208b1e1a53cbdfee8b49887858cc3a500f6/ghc
>---------------------------------------------------------------
commit f337a208b1e1a53cbdfee8b49887858cc3a500f6
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Sat Oct 7 17:59:07 2017 -0400
Simply Data instance context for AmbiguousFieldOcc
The current, verbose instance context can be compacted into
`DataId pass`. Indeed, that's what most of the `Data` instances
in this module already do, so this just makes things consistent.
>---------------------------------------------------------------
f337a208b1e1a53cbdfee8b49887858cc3a500f6
compiler/hsSyn/HsTypes.hs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs
index e9dea63..e9fc71b 100644
--- a/compiler/hsSyn/HsTypes.hs
+++ b/compiler/hsSyn/HsTypes.hs
@@ -1129,10 +1129,7 @@ mkFieldOcc rdr = FieldOcc rdr PlaceHolder
data AmbiguousFieldOcc pass
= Unambiguous (Located RdrName) (PostRn pass (IdP pass))
| Ambiguous (Located RdrName) (PostTc pass (IdP pass))
-deriving instance ( Data pass
- , Data (PostTc pass (IdP pass))
- , Data (PostRn pass (IdP pass)))
- => Data (AmbiguousFieldOcc pass)
+deriving instance DataId pass => Data (AmbiguousFieldOcc pass)
instance Outputable (AmbiguousFieldOcc pass) where
ppr = ppr . rdrNameAmbiguousFieldOcc
More information about the ghc-commits
mailing list