You can wind up in perfectly legitimate situations where the name for the type you are working with isn't in scope, but where you can write a combinator that would infer to have that type. I'd hate to lose that.
It is admittedly of marginal utility at first glance, but there are some tricks that actually need it, and it can also arise if a type synonym expands to a type that isn't exported or brought into scope, so trying to push this line of reasoning too far I is possibly not too productive. Parts of lens, constraints and probably a few other packages I maintain would break as hard data points. -Edward On Tue, Apr 22, 2014 at 2:44 AM, Simon Peyton Jones <[email protected]>wrote: > | Independent of language extensions, what about types and classes whose > | names are not in scope. Is there an implicit "... if you import all > | the relevant symbols" and the end of the rule? > > Good point. I'm honestly unsure how far to push this one! (It'd be > relatively easy to check whether they were in scope and complain if not, > but ...) > > Simon > > | -----Original Message----- > | From: [email protected] [mailto:haskell-core- > | [email protected]] On Behalf Of David Mazieres > | Sent: 22 April 2014 00:41 > | To: Simon Peyton Jones; Haskell Libraries ([email protected]); > | [email protected]; GHC users > | Subject: [core libraries] Re: Tightening up on inferred type signatures > | > | Simon Peyton Jones <[email protected]> writes: > | > | > GHC generally obeys this rule > | > > | > * If GHC infers a type f::type, then it's OK for you to add a type > | > signature saying exactly that. > | > | Independent of language extensions, what about types and classes whose > | names are not in scope. Is there an implicit "... if you import all > | the relevant symbols" and the end of the rule? > | > | David > | > | -- > | You received this message because you are subscribed to the Google > | Groups "haskell-core-libraries" group. > | To unsubscribe from this group and stop receiving emails from it, send > | an email to [email protected]. > | For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "haskell-core-libraries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. >
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
