Re: type class VS struct/functor

2002-01-23 Thread Mike Gunter
You can also export the type without exporting the constructors. That way "import"ers can use the type in type signatures and instance declarations while still not being able to use anything but the exported interface. E.g. instead of Module Set ( emptySet , makeSet

Re: type class VS struct/functor

2002-01-23 Thread Rijk-Jan van Haaften
At 13:15 2002-01-22 -0500, Hongwei Xi wrote: ><...> >In Haskell, I guess that the one implemented later is always chosen. >Why can't I have two different implementations for an interface? Actually, I can't think of situations where I would desire this. Could you please give an example? >Another

Re: Translation of SML into Haskell

2002-01-23 Thread Ashley Yakeley
At 2002-01-23 08:35, Till Mossakowski wrote: >Is there any tool for translating SML into Haskell? >(say, a suitable subset, i.e. just pure > features, and no functors) Oh you can do modules and functors too, can't you? See for instance: ML