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

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: type class VS struct/functor

2002-01-23 Thread Mike Gunter
You can also export the type without exporting the constructors. That way importers 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: Compilation bug

2002-01-23 Thread Leon Smith
Ok, I configured ghc-5.02.2 using the option --with-hc=/usr/local/bin/ghc-5.02.2.Then, when I compiled it, sometime it would use /usr/local/bin/ghc-5.02.2, and sometimes it would use /usr/bin/ghc, which is ghc-4.08.1 that was supplied with my Debian system. Then, I changed my path to

Why a context reduction stack overflow?

2002-01-23 Thread Mike Gunter
Compilation, with ghc 5.02, of the following program: data Zero = Zero deriving Show data Succ a = Succ aderiving Show -- Compilations succeeds with the following line uncommented. -- t :: Succ Zero -- = t = Zero `p` (Succ Zero)

Re: performance of monads

2002-01-23 Thread Paul Hudak
Eric Allen Wohlstadter wrote: I see a lot of literature that says that monads simulate the effects of imperative programming concepts. It seems to me that the relative performance of monadic implementations must be equivalant to imperative ones to provide a strong case for functional

more parsing paper

2002-01-23 Thread David Feuer
The paper I am reading uses the following in an instance declaration for parsers: p = f = Parser (\cs - concat [parse (f a) cs' | (a,cs') - parse p cs]) Isn't this the same as p = f = Parser (\cs - [(a',cs'') | (a,cs') - parse p cs,

Re: Monad composition

2002-01-23 Thread Tom Bevan
Andre, I can't work out how it should be done. The way I see it, the StateIO monad should have four functions associated with it. 1/ update - a function to update the state 2/ retrieve - a function to retrieve the state from the monad These two are inherited from the standard State monad 3/