[Haskell-cafe] Problem with Data.Map

michael rice nowgate at yahoo.com
Mon Jun 8 12:42:04 EDT 2009


I'm trying to understand Map type for possible use in another problem I'm working on, but am stymied right off the bat.

==========Here's my source:

import Data.Map (Map)
import qualified Data.Map as Map

l1 = "abc"

l2 = [1,2,3]

==========Here's my error:

Prelude> :l maptest
[1 of 1] Compiling Main             ( maptest.hs, interpreted )
Ok, modules loaded: Main.
*Main> l1
Loading package syb ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.0 ... linking ... done.
"abc"
*Main> l2
[1,2,3]
*Main> zip l1 l2
[('a',1),('b',2),('c',3)]
*Main> fromList $ zip l1 l2

<interactive>:1:0: Not in scope: `fromList'
*Main> 

===========

Why isn't this working?

Michael




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090608/6b966d2b/attachment.html


More information about the Haskell-Cafe mailing list