Problem with class Control.Monad.Error noMsg usage

I have been trying to build the Scheme in 24 Hours on WikiBooks :- http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://jonathan.tang.name/files/scheme_in_48/code/listing10.hs But I am getting an error :- scheme.hs:289:6: `noMsg' is not a (visible) method of class `Error' scheme.hs:290:6: `strMsg' is not a (visible) method of class `Error' with the following :- instance Error LispError where noMsg = Default "An error has occurred" strMsg = Default if I try importing them :- import Control.Monad.Error (noMsg, strMsg) I get the following :- scheme.hs:4:29: Module `Control.Monad.Error' does not export `noMsg' scheme.hs:4:36: Module `Control.Monad.Error' does not export `strMsg' Many thanks in advance, Aaron

On Tuesday 21 December 2010 16:40:38, Henning Thielemann wrote:
Aaron Gray schrieb:
if I try importing them :-
import Control.Monad.Error (noMsg, strMsg)
I think it was moved to Control.Monad.Error.Class.
But it's still re-exported from Control.Monad.Error, so they ought to be in scope. And the code works here (with an additional type signature for a reads result and {-# LANGUAGE ExistentialQuantification #-}), both with 6.12.3 and with 7.0.1.

On 21 December 2010 15:40, Henning Thielemann < schlepptop@henning-thielemann.de> wrote:
Aaron Gray schrieb:
if I try importing them :-
import Control.Monad.Error (noMsg, strMsg)
I think it was moved to Control.Monad.Error.Class.
Great, importing Control.Monad.Error.Class does the trick. Thanks, Aaron

On Tue, Dec 21, 2010 at 03:28:22PM +0000, Aaron Gray wrote:
I have been trying to build the Scheme in 24 Hours on WikiBooks :-
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
http://jonathan.tang.name/files/scheme_in_48/code/listing10.hs
But I am getting an error :-
scheme.hs:289:6: `noMsg' is not a (visible) method of class `Error'
scheme.hs:290:6: `strMsg' is not a (visible) method of class `Error'
I don't get that here. Perhaps you're using an old version of monads-fd (0.1.0.0). I'd recommend installing mtl-2.0.1.0 instead.
participants (4)
-
Aaron Gray
-
Daniel Fischer
-
Henning Thielemann
-
Ross Paterson