diff options
| author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-03-19 17:47:55 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@well-typed.com> | 2019-07-09 11:52:45 -0400 |
| commit | 6a03d77b9a9915e4b37fe1ea6688c135e7b00654 (patch) | |
| tree | 4154abaa768adbfadc4eb17db620c3ed08b82c5f /testsuite/tests/ghc-api/annotations/parseTree.hs | |
| parent | 5af815f2e43e9f1b5ca9ec0803f9fccabb49e2fe (diff) | |
| download | haskell-6a03d77b9a9915e4b37fe1ea6688c135e7b00654.tar.gz | |
Use an empty data type in TTG extension constructors (#15247)
To avoid having to `panic` any time a TTG extension constructor is
consumed, this MR introduces an uninhabited 'NoExtCon' type and uses
that in every extension constructor's type family instance where it
is appropriate. This also introduces a 'noExtCon' function which
eliminates a 'NoExtCon', much like 'Data.Void.absurd' eliminates
a 'Void'.
I also renamed the existing `NoExt` type to `NoExtField` to better
distinguish it from `NoExtCon`. Unsurprisingly, there is a lot of
code churn resulting from this.
Bumps the Haddock submodule. Fixes #15247.
Diffstat (limited to 'testsuite/tests/ghc-api/annotations/parseTree.hs')
| -rw-r--r-- | testsuite/tests/ghc-api/annotations/parseTree.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/ghc-api/annotations/parseTree.hs b/testsuite/tests/ghc-api/annotations/parseTree.hs index b04be775c3..badf59150f 100644 --- a/testsuite/tests/ghc-api/annotations/parseTree.hs +++ b/testsuite/tests/ghc-api/annotations/parseTree.hs @@ -52,9 +52,9 @@ testOneFile libdir fileName = do doLHsTupArg :: LHsTupArg GhcPs -> [(SrcSpan,String,HsExpr GhcPs)] doLHsTupArg (L l arg@(Present {})) - = [(l,"p",ExplicitTuple noExt [L l arg] Boxed)] + = [(l,"p",ExplicitTuple noExtField [L l arg] Boxed)] doLHsTupArg (L l arg@(Missing {})) - = [(l,"m",ExplicitTuple noExt [L l arg] Boxed)] + = [(l,"m",ExplicitTuple noExtField [L l arg] Boxed)] showAnns anns = "[\n" ++ (intercalate "\n" |
