Using FiniteMap in ghci

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using FiniteMap in ghci

KwangYul Seo
Hello,

I tried to load FiniteMap module in ghci and encountered an error message
like the following:

Prelude> import FiniteMap
Could not find module `FiniteMap':
  it is a member of package ghc-6.8.2, which is hidden

The error message says that it is hidden. How can I use the FiniteMap?

Regards,
Kwang Yul Seo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090902/1823774e/attachment.html
Reply | Threaded
Open this post in threaded view
|

Using FiniteMap in ghci

Chaddaï Fouché
On Wed, Sep 2, 2009 at 1:21 PM, KwangYul Seo<[hidden email]> wrote:
> The error message says that it is hidden. How can I use the FiniteMap?

FiniteMap has been superceded by Data.Map, this is probably what you
want to use (or Data.IntMap if your keys are Int).

--
Jeda?
Reply | Threaded
Open this post in threaded view
|

Using FiniteMap in ghci

KwangYul Seo
Oh, I see. Thanks.

I was playing with code from Yet Another Haskell Tutorial, and it uses
FiniteMap there. I think the tutorial needs to be updated too.

Regards,
Kwang Yul Seo


On Wed, Sep 2, 2009 at 9:02 PM, Chadda? Fouch? <[hidden email]> wrote:
>
> On Wed, Sep 2, 2009 at 1:21 PM, KwangYul Seo<[hidden email]> wrote:
> > The error message says that it is hidden. How can I use the FiniteMap?
>
> FiniteMap has been superceded by Data.Map, this is probably what you
> want to use (or Data.IntMap if your keys are Int).
>
> --
> Jeda?
Reply | Threaded
Open this post in threaded view
|

Using FiniteMap in ghci

Daniel Fischer-4
In reply to this post by KwangYul Seo
Am Mittwoch 02 September 2009 13:21:43 schrieb KwangYul Seo:

> Hello,
>
> I tried to load FiniteMap module in ghci and encountered an error message
> like the following:
>
> Prelude> import FiniteMap
> Could not find module `FiniteMap':
>   it is a member of package ghc-6.8.2, which is hidden
>
> The error message says that it is hidden. How can I use the FiniteMap?
>
> Regards,
> Kwang Yul Seo

As Chaddai said, it's obsolete and superceded by Data.Map and Data.IntMap.
But the names and types of some functions have been changed, if you don't want to change
the tutorial code so that it works with the new modules, you can

ghc-pkg expose ghc-6.8.2

then work with FiniteMap and afterwards

ghc-pkg hide ghc-6.8.2