Proposal: unify constant functors

wren ng thornton wren at
Tue May 8 03:33:33 CEST 2012

On 5/5/12 9:20 PM, Brandon Allbery wrote:
> On Sat, May 5, 2012 at 8:36 PM, wren ng thornton<wren at>  wrote:
>> On 5/4/12 10:44 AM, Andreas Abel wrote:
>>> open import Data.Functor.Constant renaming (Constant to K)
>>> Maybe that could be a feature of future Haskell as well?
>> Seems like it should be easy enough to implement too (sayeth he who hasn't
>> hacked on GHC). The real difficulty methinks would be in specifying the
>> module import syntax, since there's a conflict between (1) creating a
>> coherent integrated system for qualified, unqualified, renamed, explicit,
>> and hidden imports (plus any other features we want to add at the same
>> time); and (2) backwards compatibility.
> Actually I'm pretty sure there is no such issue.  As it is, "as" and
> "hiding" aren't even keywords; the syntax is flexible enough that they
> don't need to be keywords to avoid ambiguity.

I was meaning issues with bikeshedding rather than with syntax per se.

For instance, what is the significance in distinguishing (via the 
"renaming") the "as" for qualified module renaming from the "as"/"to" 
for term renaming? Why not just:

     import Foo as F (foo as f)

Live well,

More information about the Libraries mailing list