[Haskell-beginners] Re: How to import the Data.Char library in Hugs?

Benjamin L.Russell DekuDekuplex at Yahoo.com
Thu Sep 17 22:39:50 EDT 2009


On Thu, 17 Sep 2009 15:02:21 +0200, Adrian Neumann
<aneumann at inf.fu-berlin.de> wrote:

>You do
>
>> :l Data.Char

That command didn't work; see the following results:

--8<---------------cut here---------------start------------->8---
Hugs>:| Data.Char
Command not recognised.  Type :? for help
Hugs>
--8<---------------cut here---------------end--------------->8---

-- Benjamin L. Russell

>
>As far as I know you can't have multiple loaded modules unless you put
>them in a file and load that.
>
>Regards,
>
>Adrian
>
>Benjamin L.Russell schrieb:
>> My apologies if this is an extremely elementary question, but I am
>> having difficulties in importing the Data.Char library in Hugs.
>> 
>> In GHCi, the command "import Data.Char" works correctly, as follows:
>> 
>> --8<---------------cut here---------------start------------->8---
>> GHCi, version 6.10.3: http://www.haskell.org/ghc/  :? for help
>> Loading package ghc-prim ... linking ... done.
>> Loading package integer ... linking ... done.
>> Loading package base ... linking ... done.
>>    ___         ___ _
>>   / _ \ /\  /\/ __(_)
>>  / /_\// /_/ / /  | |   GHC Interactive, for Haskell 98.
>> / /_\\/ __  / /___| |   http://www.haskell.org/ghc/
>> \____/\/ /_/\____/|_|   Type :? for help.
>> 
>> Prelude> import Data.Char
>> Prelude Data.Char>
>> --8<---------------cut here---------------end--------------->8---
>> 
>> However, in Hugs, the same command fails with an error, as follows:
>> 
>> --8<---------------cut here---------------start------------->8---
>> __   __ __  __  ____   ___ _________________________________________
>> ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
>> ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
>> ||---||         ___||           World Wide Web: http://haskell.org/hugs
>> ||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
>> ||   || Version: 20051031       _________________________________________
>> 
>> Haskell 98 mode: Restart with command line option -98 to enable
>> extensions
>> 
>> Type :? for help
>> Hugs> import Data.Char
>> ERROR - Syntax error in expression (unexpected keyword "import")
>> Hugs>
>> --8<---------------cut here---------------end--------------->8---
>> 
>> Does anybody know how to import the Data.Char library in Hugs?
>> 
>> -- Benjamin L. Russell
>
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto." 
-- Matsuo Basho^ 



More information about the Beginners mailing list