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
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
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
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
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
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
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
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
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.