MrD
MrD

Reputation: 5086

Haskell import module

I'm trying to use this module in my haskell code: http://hackage.haskell.org/package/MissingH-1.0.0/docs/Data-String-Utils.html to use the function "replace" - However, when I try this code:

import Data.String.Utils

Haskell tells me there is no such module.

What should I do?

Upvotes: 9

Views: 5452

Answers (1)

Christian Ternus
Christian Ternus

Reputation: 8492

You don't have the module installed, that's the problem. :) MissingH isn't distributed with the standard Haskell install -- it's a module you can install, but you have to download it first. cabal, the Haskell package installer (it is to Haskell what easy_install is to python or cpan is to Perl) will do that for you.

Follow the instructions at the Cabal page for Windows. Once cabal.exe is installed, do

cabal.exe update
cabal.exe install MissingH

(Data.String.Utils is in the MissingH module.)

Upvotes: 15

Related Questions