Sigbjorn writes:
>john_r_velman <[EMAIL PROTECTED]> writes: 
>>
>> I've been using HUGS for a few weeks, learning Haskell, and fairly
>> excited about it.  When I saw the GHC 4 announcement, I decided to try 
>> to install GHC.  But..
>>  [snip]
>     
>Hi,
>     
>have a look at
>     
>  http://www.dcs.gla.ac.uk/~sof/ghc-win32.html
>     
>it contains info on how to set up a ghc-3.03 binary distribution under 
>cygwin32 b19.

It seems like it almost worked.  

I had a fair amount of trouble with the well known cygwin32 CRLF
problem.  I have my cyg-win/gnu-win environment set up so that
everything works if there are no CRs next to the LFs in  shell
scripts, and apparently also in perl scripts.  Apparently the tar file
ghc-3_03-cygwin32_tar.gz, was prepared in an environment that resulted
in the included shell scripts and perl scripts having CRLFs (or else
something has gone wrong with my installation recently! -- not exactly
an impossible event).  

I wrote a shell script to replace the most obvious scripts with
versions with the CRs stripped out.  Once that was done, 'configure'
and 'make install' went smoothly, apparently.  (I did what little
makefile editing I needed with Vim, which is very honest about showing
the CRs if there are any, and not putting them in unless explicitly
asked to.) Next step (after fixing my .bashrc to add
/usr/local/ghc3_03/bin) to my PATH was to try the "hello world"
example.

Instead of using cat as in the example,  used Vim (truth in problem
explanation).  I've put together two versions: one with CRs and one
without.

Time now for an image of a bash session:

-- bash-2.01$ pwd
-- /home/haskelltest/ghc
-- bash-2.01$ ls
-- main.hs    maincr.hs
-- bash-2.01$ cat main.hs
-- module Main(main) where
-- 
-- main = putStrLn "Hello World!"
-- bash-2.01$ cat maincr.hs
-- module Main(main) where
-- 
-- main = putStrLn "Hello World!"
-- bash-2.01$ type ghc
-- ghc is hashed (/usr/local/ghc3_03/bin/ghc)
-- bash-2.01$ type ghc-3.03
-- ghc-3.03 is hashed (/usr/local/ghc3_03/bin/ghc-3.03)
-- bash-2.01$ ghc -o main main.hs
-- 
-- headFS: empty FS:
-- bash-2.01$ ls
-- main.hs    maincr.hs
-- bash-2.01$
-- 

One suspects that there is still a CRLF lurking somewhere important
but somehow invisible.  On the otherhand, I may have just missed
something obvious.

By the way, main.hs works with Hugs.  Also, with ghc I get the same
results whether I try to compile main.hs or maincr.hs.  Or, if I use
ghc-3.03 instead of the linked version.

Thanks,

John Velman
[EMAIL PROTECTED]
(Message composed with NTemacs, mailed with ccmail)

Reply via email to