I don't think it's a good idea to export it from GHC.hs, because it works in terms of TcRn, which isn't exposed via GHC. Someone using this API will need to use other bits from the typechecker.

It's fine to export it from TcRnDriver (and of course add a comment to explain why). Maybe there should be an "official" API at this level too, but someone will need to do some design work and figure out what needs to be provided. For now it's fine to use the internal APIs, with the caveat that they often change from version to version.

Cheers,
Simon

On 04/02/2014 00:05, Simon Peyton Jones wrote:
No, there’s no reason it’s not exported, excepting only that it’s not
currently called outside TcRnDriver.

Go ahead and create a ticket and patch.  It should be exported from
GHC.hs (ie the official GHC API), not merely from TcRnDriver.  And I
suggest you add a comment with the export from GHC.hs to explain why
it’s exported.  Otherwise someone might delete it again!

Thx

Simon

*From:*ghc-devs [mailto:[email protected]] *On Behalf Of
*[email protected]
*Sent:* 29 January 2014 09:55
*To:* [email protected]
*Subject:* Request: export runTcInteractive from TcRnDriver

Dear GHC-devs,

Is there a reason why, in HEAD, TcRnDriver does **not** export
runTcInteractive? If not, can it please be added? (I considered sending
a patch with this email, but it’s so trivial a change that the check of
the patch is more work than manually adding runTcInteractive to the
export list.)

I’m developing against the GHC API of 7.6.3 and it would have saved me
hours of work to have precisely that function. Seeing it’s in HEAD, but
not being exported seems a shame ;)

Regards,

Philip



_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to