Bugs in name translation #8

JonasDuregard opened this Issue Sep 1, 2011 · 1 comment


None yet
2 participants

JonasDuregard commented Sep 1, 2011

There is at least one bug in name translations:

parseExp "(,) 3 4 " =>
Right (AppE (AppE (ConE GHC.Unit.(,)) (LitE (IntegerL 3))) (LitE
(IntegerL 4)))

Ghc.Unit does not export tuple constructors.

The instance ToName Hs.SpecialCon is the culprit. The elegant solution would be to use tupleDataName from TH.Syntax.

Unfortunately special type constructors and special data construtor are treated the same way in src-exts, but not in TH. One solution would be to split the ToName class into a ToTypeName and a ToDataName. The instance is rather broken at the moment, returning data names for some cases and type names for other.


bmillwood commented Sep 7, 2012

Hmm. The specific case you cite was fixed by c6d1818, but I don't understand what your ToTypeName and ToDataName comments are for. So far as I can tell, both tuple values and tuple types are working.

Feel free to reopen if I'm wrong.

@bmillwood bmillwood closed this Sep 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment