How do you import Data.Heap?

Sorry for such a dumb question. I am trying to import Data.Heap , but I am getting this error message:

> import Data.Heap

<no location info>: error:
    Could not find moduleData.HeapPerhaps you meant
      Data.Map (from containers-0.5.7.1@containers-0.5.7.1)

      

There were no problems with other imports.

Thank.

+3


source to share


1 answer


As described in the comments, you need to install the package containing the module Data.Heap

. (See this related question on the difference between packages and modules in Haskell)



On the Hackage page in the top left corner, you will see the name and version of the package you are looking at: If you are using a stack, add to the file section and rebuild. If you're just using cabal, just run to get the most recent version of the package installed on your system.
heap package name: heap-1.0.3
heap

build-depends

project.cabal

cabal install heap

0


source







All Articles