[Haskell-cafe] Strange error with type classes + associated types

Conal Elliott conal at conal.net
Mon Apr 19 12:40:25 EDT 2010


On Sun, Apr 18, 2010 at 9:02 PM, Brent Yorgey <byorgey at seas.upenn.edu>wrote:

> Conal,
>
> Thanks for looking into this!  Making (:-*) into a proper type seems
> promising.  I did try wrapping (:-*) in a newtype but that didn't
> help (although I didn't expect it to).
>

What do you mean by a "proper type"?  I didn't know what Roman meant either,
though I guessed he meant a newtype or data type.


> I see you just uploaded a new version of vector-space; what's new in
> 0.6.2?
>

The dependency on the Boolean package now specifies >= 0.0.1.


> -Brent
>
> On Sat, Apr 17, 2010 at 10:28:45AM -0700, Conal Elliott wrote:
> > Oh!  I'd completely forgotten about this idea.  Looking at Data.LinearMap
> in
> > vector-space, I see a comment about exactly this ambiguity, as well as
> the
> > start of a new module that wraps a data type around the linear map
> > representation.  I don't recall whether I got stuck or just distracted.
> >
> > On Sat, Apr 17, 2010 at 3:46 AM, Roman Leshchinskiy <rl at cse.unsw.edu.au
> >wrote:
> >
> > > On 17/04/2010, at 11:00, Conal Elliott wrote:
> > >
> > > > I'm unsure now, but I think I tried making Basis a data type (not
> syn)
> > > and ran into the problem I mentioned above.  The Basis *synonyms* also
> have
> > > HasTrie instances, which is crucially important.  If we switch to
> > > (injective) data types, then we lose the HasTrie instances.  I'd be
> okay
> > > with defining HasTrie instances (preferably via "deriving") for the
> > > associated Basis data types, but I couldn't figure out how to.  Maybe
> it's
> > > not possible currently, or maybe I just didn't know how.
> > >
> > > Could you perhaps make (:-*) a proper type rather than a synonym? That
> > > would help with the ambiguity.
> > >
> > > Roman
> > >
> > >
> > >
>
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100419/e25ecd76/attachment.html


More information about the Haskell-Cafe mailing list