VisibleTypeApplication and AllowAmbiguousTypes

Andrew Martin andrew.thaddeus at gmail.com
Mon Mar 14 18:40:28 UTC 2016


I'm posting this because Richard said it would be the best place to raise
this issue. I know it's a little bit late in the GHC8 development process,
but I would like to get the idea out there.

To my knowledge, in GHC8, turning on VisibleTypeApplication will also turn
on AllowAmbiguousTypes. I think that a better behavior for most end users
would be to not have this happen.

I need AllowAmbiguousTypes turned on in modules where I want to declare
functions that are presently uncalled. At a call site though, I only need
VisibleTypeApplication, not both extensions. The only reason I bring this
up is because having AllowAmbiguousTypes on is usually bad. It makes it
possible to write functions that don't work, but you don't learn that until
you get to the call site. If I write libraries that require
VisibleTypeAppliaction to call certain functions, I don't want users
accidentally ending up turning on AllowAmbiguousTypes in their own code.

-- 
-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160314/a77f352a/attachment.html>


More information about the ghc-devs mailing list