Fix IfaceType generation for TyCons without TyVars
ClosedPublic

Authored by osa1 on Jan 18 2016, 5:40 PM.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
osa1 updated this revision to Diff 6282.Jan 18 2016, 5:40 PM
osa1 retitled this revision from to Fix IfaceType generation for TyCons without TyVars.
osa1 edited the test plan for this revision. (Show Details)
osa1 added a reviewer: goldfire.
osa1 updated the Trac tickets for this revision.
osa1 updated this object.
osa1 updated this revision to Diff 6283.Jan 18 2016, 5:42 PM
osa1 edited edge metadata.

nolint

osa1 added a comment.Jan 18 2016, 5:45 PM

About the big test file: I don't know how else to test this, because the error was caused by data (~R#) c d in GHC.Prim, and I don't think it's possible to have a similar thing in user-defined modules -- it looks magical.

If anybody knows how to do this I'd love to update the test file.

Ping @bgamari @goldfire.

osa1 updated this revision to Diff 6284.Jan 18 2016, 5:57 PM
osa1 edited edge metadata.
  • remove useless hs file
osa1 updated this revision to Diff 6285.Jan 18 2016, 6:12 PM
osa1 edited edge metadata.
  • delete the output file
osa1 added a comment.Jan 18 2016, 6:14 PM

The problem with huge stdout file is fixed thanks to @thomie.

bgamari requested changes to this revision.Jan 19 2016, 2:52 AM
bgamari edited edge metadata.

Great work @osa1. That being said, I'm not sure I understand the rationale for this change. I think a comment is in order.

compiler/iface/MkIface.hs
1425

Hmm, what is going on here? I see that here the current typing environment is used, whereas in your fix you use an empty environment, but why? This deserves a comment.

This revision now requires changes to proceed.Jan 19 2016, 2:52 AM
osa1 updated this revision to Diff 6294.Jan 19 2016, 7:17 AM
osa1 edited edge metadata.
  • add comments
osa1 updated this revision to Diff 6295.Jan 19 2016, 7:21 AM
osa1 edited edge metadata.
(rebased)
osa1 marked an inline comment as done.Jan 19 2016, 7:23 AM

@bgamari, I added comments, but the right way to solve this might be to actually remove the where-bindings (because those definitions are in scope in the whole expression) and add let-bindings to individual cases. What do you think?

osa1 updated this revision to Diff 6298.Jan 19 2016, 1:49 PM
osa1 edited edge metadata.
  • (rebase)
  • remove useless hs file
  • delete the output file
  • add comments
  • reword the second comment
This revision was automatically updated to reflect the committed changes.