[Haskell-cafe] Re: Small displeasure with associated type synonyms

David Roundy droundy at darcs.net
Fri Mar 7 08:37:50 EST 2008


On Fri, Mar 07, 2008 at 08:07:57AM +0100, Tom Schrijvers wrote:
> >Am I correct in thinking this would have worked if it were an
> >associated type instead of an associated type synonym?
> >
> >ie,
> >
> >class C a where
> >   data T a
> >   val :: T a
> 
> Yes, you are. Associate data type constructors (as well as ordinary 
> algebraic data constructors) are injective. So we have:

Yay, that's what I though! (but was hesitant to suggest anything, since
I've never actually used associated anything...)  It's nice to hear that I
do understand some of this stuff.  :)
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Haskell-Cafe mailing list