diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-06-03 14:15:52 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-06-03 14:24:08 +0100 |
commit | b4856f9f4f0fb3db473901b247d3fa94a11c25a0 (patch) | |
tree | 64512fff57acca9baf54d0e72d516679763711a9 /testsuite/tests/roles/should_compile/Roles2.stderr | |
parent | da64c97f1c0b147ea80a34fe64fe947ba7820c00 (diff) | |
download | haskell-b4856f9f4f0fb3db473901b247d3fa94a11c25a0.tar.gz |
Do pretty-printing of TyThings via IfaceDecl (Trac #7730)
All the initial work on this was done fy 'archblob' (fcsernik@gmail.com);
thank you!
I reviewed the patch, started some tidying, up and then ended up in a huge
swamp of changes, not all of which I can remember now. But:
* To suppress kind arguments when we have -fno-print-explicit-kinds,
- IfaceTyConApp argument types are in a tagged list IfaceTcArgs
* To allow overloaded types to be printed with =>, add IfaceDFunTy to IfaceType.
* When printing data/type family instances for the user, I've made them
print out an informative RHS, which is a new feature. Thus
ghci> info T
data family T a
data instance T Int = T1 Int Int
data instance T Bool = T2
* In implementation terms, pprIfaceDecl has just one "context" argument,
of type IfaceSyn.ShowSub, which says
- How to print the binders of the decl
see note [Printing IfaceDecl binders] in IfaceSyn
- Which sub-comoponents (eg constructors) to print
* Moved FastStringEnv from RnEnv to OccName
It all took a ridiculously long time to do. But it's done!
Diffstat (limited to 'testsuite/tests/roles/should_compile/Roles2.stderr')
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles2.stderr | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr index f5bcbe6829..e6f9bcd8d0 100644 --- a/testsuite/tests/roles/should_compile/Roles2.stderr +++ b/testsuite/tests/roles/should_compile/Roles2.stderr @@ -1,19 +1,7 @@ TYPE SIGNATURES TYPE CONSTRUCTORS - T1 :: * -> * - data T1 a - No C type associated - Roles: [representational] - RecFlag NonRecursive, Not promotable - = K1 :: forall a. (IO a) -> T1 a Stricts: _ - FamilyInstance: none - T2 :: * -> * - data T2 a - No C type associated - Roles: [representational] - RecFlag NonRecursive, Not promotable - = K2 :: forall a. (FunPtr a) -> T2 a Stricts: _ - FamilyInstance: none + data T1 a = K1 (IO a) + data T2 a = K2 (FunPtr a) COERCION AXIOMS Dependent modules: [] Dependent packages: [base, ghc-prim, integer-gmp] |