Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell: Cannot use dropWhileEnd, modules Data.Text.Lazy/Data.Lazy not found

First I have to admit: I am totally new to Haskell. I have practiced a bit with it and now have some trouble concerning string-manipulation:

I need to erase/drop characters beginning from the end of a string. I expected the function dropWhileEnd to do this, but when I try to import Data.Text.Lazy or Data.Lazy, ghc tells me it couldn't find those modules.

My question is: why doesn't ghc find them? Shouldn't they be in the standard library? I am using Haskell Platform 2010.2.0.0 with the included ghc on Windows.

like image 868
thelaui Avatar asked Nov 27 '25 03:11

thelaui


1 Answers

The 'text' package is part of the Haskell Platform 2011.2 -- it was only added this year. You have two choices:

Stay with 2010.2, and install the text package:

  • cabal install text

Upgrade to 2011.2 here:

  • http://haskell.org/platform
like image 114
Don Stewart Avatar answered Nov 29 '25 20:11

Don Stewart