Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell import module

Tags:

haskell

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?

like image 527
MrD Avatar asked Oct 26 '13 01:10

MrD


1 Answers

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

like image 154
Christian Ternus Avatar answered Nov 15 '22 08:11

Christian Ternus