[Haskell-cafe] Not in scope: type constructor or class `Map'

2010-12-30 Thread michael rice
Not sure what's going on here. Doesn't like line 5, the type statement. And what's with the semicolons in that line and in function main? Michael = From: http://www.haskell.org/ghc/docs/6.10.3/html/libraries/mtl/Control-Monad-Reader.html import Control.Monad.Reader import qualified

Re: [Haskell-cafe] Not in scope: type constructor or class `Map'

2010-12-30 Thread Eric Stansifer
Because Data.Map is imported qualified, any symbols in it (including Map) needs to be qualified: type Bindings = Map.Map String Int A standard idiom is to do import like so: import qualified Data.Map as Map import Map (Map) so that the Map symbol itself does not need qualification. Eric

Re: [Haskell-cafe] Not in scope: type constructor or class `Map'

2010-12-30 Thread Pedro Vasconcelos
On Thu, 30 Dec 2010 08:01:01 -0800 (PST) michael rice nowg...@yahoo.com wrote: Not sure what's going on here. Doesn't like line 5, the type statement. And what's with the semicolons in that line and in function main? import Control.Monad.Reader import qualified Data.Map as Map import

Re: [Haskell-cafe] Not in scope: type constructor or class `Map'

2010-12-30 Thread michael rice
Thanks, all. Just tried type Bindings = Map.Map String Int and it also seems to work. Michael  --- On Thu, 12/30/10, Pedro Vasconcelos p...@dcc.fc.up.pt wrote: From: Pedro Vasconcelos p...@dcc.fc.up.pt Subject: Re: [Haskell-cafe] Not in scope: type constructor or class `Map' To: haskell-cafe

[Haskell-cafe] Not in scope

2009-04-25 Thread siso dagbovie
Hi, I've defined the datatype: data Graph a b = Empty | Context a b : Graph a b and the function isEmpty :: Graph a b - Bool isEmpty Empty = True isEmpty _ = False and when I do a test run with the graph, ( [ ],2,'c',[(down,3)]) : Empty Haskell is bringing the message Not in

Re: [Haskell-cafe] Not in scope

2009-04-25 Thread Jochem Berndsen
siso dagbovie wrote: Hi, I've defined the datatype: data Graph a b = Empty | Context a b : Graph a b and the function isEmpty :: Graph a b - Bool isEmpty Empty = True isEmpty _ = False and when I do a test run with the graph, ( [ ],2,'c',[(down,3)]) : Empty

[Haskell-cafe] Hoogle search scope question -- was: [HXT] Simple question

2007-12-22 Thread Steve Lihn
I have a hoogle question. While I was reading the HXT discussion (below), I tried to search runX and readString in Hoogle (since I am new to HXT and Arrows). But neither search yielded any result and I had to use google to find the Haskell docs. So I am wondering what is the scope of Hoogle that

Re: [Haskell-cafe] Hoogle search scope question -- was: [HXT] Simple question

2007-12-22 Thread Neil Mitchell
Hi I have a hoogle question. While I was reading the HXT discussion (below), I tried to search runX and readString in Hoogle (since I am new to HXT and Arrows). But neither search yielded any result and I had to use google to find the Haskell docs. So I am wondering what is the scope of

[Haskell-cafe] Re: Controlling scope using monadic classes

2006-05-18 Thread Daniel McAllansmith
On Wednesday 17 May 2006 19:55, [EMAIL PROTECTED] wrote: Daniel McAllansmith wrote: I'm trying to control the scope within which functions can be used by putting them in a type class. Unfortunately I can't seem to figure out how to get it done. Any advice would be much appreciated.