[core libraries] Re: Tightening up on inferred type signatures

Ganesh Sittampalam ganesh at earth.li
Wed Apr 30 06:10:08 UTC 2014

On 23/04/2014 20:04, dm-list-haskell-libraries at scs.stanford.edu wrote:
> Edward Kmett <ekmett at gmail.com> writes:
>> 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.
> Good point.  In particular, it's not weird at all want to export type
> synonyms on their own, particularly where ghost type parameters are used
> to select between only a few cases.  Consider something like this
> (inspired by postgresql-orm):

Is there an abstraction being protected by only exporting the type
synonym in cases like this?



More information about the Glasgow-haskell-users mailing list