Andrew Wagner <wagner.andrew <at> gmail.com> writes: > > If you change your type declarations to 'newtype' declarations, I > believe you would get the effect that you want, depending on what you > mean by 'equivalent'. In that case, Foo and Bar would essentially be > strings, but you could not use either of them in a place where the > other is expected, nor where a String is expected. See > http://haskell.org/haskellwiki/Newtype for more information. Hope this > helps!
I wanted to avoid wrapping the string with a constructor. I suppose what I'm really asking for is for each type to implicitly define a 'type class with no methods', and to be able to create new instances of that type class which simply behave as the underlying type. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe