Proposal for stand-alone deriving declarations?

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Thu Nov 2 06:16:04 EST 2006


Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:

> >  import M1 hiding (instance C T)
> 
> i vote for this feature too.
> also, expicit instance imports was in prewvious Haskell versions.

I'm fairly confident that Haskell has never historically permitted the
explicit import and export of instances.  It is not semantically sound,
unless you are able to name the instances separately, but Haskell has
always had anonymous instances, with only one instance permitted per
concrete type.

However, if Haskell' gets PolymorphicComponents in records, then at last
you will be able to construct dictionaries explicitly, have more than
one per type, name them, and pass them around.  (But the downside is
that if you do dictionaries explicitly, you will no longer have access
to the class machinery to do predicate resolution and simplification for
you - that would become a manual process.  But you only pay the price if
you want the explicitness.)

Regards,
    Malcolm


More information about the Haskell-prime mailing list