Hugs and cygwin

Karl Pflästerer sigurd@12move.de
Mon, 28 Apr 2003 17:16:35 +0200


Hi,
I wanted to take a look at Haskell and thougt Hugs would be a good tool
to start with. I have a windows as OS so I first downloaded the windows
binaries.  But they didn't play well with my editor (XEmacs).

In XEmacs I have a command to send the content of a buffer to a hugs
process; that command saves the buffer and calls in a running hugs
process the command `:load' with the file name as parameter. But the
windows version didn't understand the pathnames from my XEmacs (it is
build under cygwin and for that uses unix path notation).

So what to do? I could frob all functions in hugs mode that deal with
sending filenames to send a pathname understood by a windows version of
hugs. I didn't like that idea and tried to build from the source.

It worked OOTB (and now I had readline in hugs) but there is one minor
problem. If I use the `:edit' command with absolute pathnames the
gets mangled in a weird way.

Suppose I work on c:\ .  If I start a session all looks fine

,----
| $ hugs -E"winclient %s"
| __   __ __  __  ____   ___      _________________________________________
| ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
| ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2002
| ||---||         ___||           World Wide Web: http://haskell.org/hugs
| ||   ||                         Report bugs to: hugs-bugs@haskell.org
| ||   || Version: November 2002  _________________________________________
| 
| Haskell 98 mode: Restart with command line option -98 to enable extensions
| 
| Reading file "/usr/local/lib/hugs/lib/Prelude.hs":
|                    
| Hugs session for:
| /usr/local/lib/hugs/lib/Prelude.hs
`----

If I say now `edit' the editor is called with
/c/usr/local/lib/hugs/lib/Prelude.hs as filename. if I work on another
drive lets say e:\ the filename gets
/e/usr/local/lib/hugs/lib/Prelude.hs

But if I use a relative pathname; eg `:load ./foo.hs' and say after that
`edit' all is fine.

What can I do to change that behaviour?

bye
   KP

-- 
'Twas brillig, and the slithy toves
    Did gyre and gimble in the wabe;
  All mimsy were the borogoves,
   And the mome raths outgrabe.   "Lewis Carroll" "Jabberwocky"