diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2016-10-08 10:06:01 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2016-10-08 10:07:14 +0100 |
commit | e660f4bf546e90fb6719ad268ca3daaecdce4b82 (patch) | |
tree | 7c23ed1a6983d951c8950f8105d3889914619d81 /testsuite/tests/module/T11970.hs | |
parent | 46b78e604c06c8878e436fea93729158dcf55269 (diff) | |
download | haskell-e660f4bf546e90fb6719ad268ca3daaecdce4b82.tar.gz |
Rework renaming of children in export lists.
The target of this patch is exports such as:
```
module Foo ( T(A, B, C) ) where
```
Essentially this patch makes sure that we use the correct lookup functions in order
to lookup the names in parent-children export lists. This change
highlighted the complexity of this small part of GHC which accounts for
the scale.
This change was motivated by wanting to
remove the `PatternSynonym` constructor from `Parent`. As with all these
things, it quickly spiraled out of control into a much larger refactor.
Reviewers: simonpj, goldfire, bgamari, austin
Subscribers: adamgundry, thomie
Differential Revision: https://phabricator.haskell.org/D2179
GHC Trac Issues: #11970
Diffstat (limited to 'testsuite/tests/module/T11970.hs')
-rw-r--r-- | testsuite/tests/module/T11970.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/module/T11970.hs b/testsuite/tests/module/T11970.hs new file mode 100644 index 0000000000..3c90c6913d --- /dev/null +++ b/testsuite/tests/module/T11970.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE PatternSynonyms #-} + +module T11970(B(recSel), Foo((--.->)), C(C,P,x,Q, B, recSel)) where + +pattern D = Nothing + +newtype B = B { recSel :: Int } + +class Foo a where + type (--.->) a + +newtype C = C Int + +pattern P x = C x + +pattern Q{x} = C x |