Glynn Clements | 1 Sep 2002 07:02
Favicon

Re: Hugs, Mac OS X 10.1.5, and pathnames


Hamilton Richards wrote:

> In OS X, pathnames have two distinct syntaxes. The GUI uses the pre-X 
> syntax, in which a pathname begins with a volume name and the 
> separator is `:', as in
> 
> 	Macintosh HD:Users:ham:Documents:whatever.hs
> 
> In the Darwin (i.e., unix) command-line "underworld", a pathname 
> begins with /Volumes, spaces are escaped with `\', and the separator 
> is `/', as in
> 
> 	/Volumes/Macintosh\ HD/Users/ham/Documents/whatever.hs
> 
> When you drag a file icon onto the command line, Terminal does the 
> right thing-- it converts the pathname from the GUI syntax to the 
> Darwin syntax, and utilities such as more work just as they should.
> 
> Hugs, however, doesn't do so well. For example,
> 
>     Prelude> :l /Volumes/Macintosh\ HD/Users/ham/Documents/whatever.hs
>     Reading file "/Volumes/Macintosh\":
>     ERROR "/Volumes/Macintosh\" - Unable to open file "/Volumes/Macintosh\"
> 
> Quoting the pathname changes the problem, but doesn't cure it:
> 
>     Prelude> :l "/Volumes/Macintosh\ HD/Users/ham/Documents/whatever.hs"
>     ERROR - Missing `\' terminating string literal gap
> 
(Continue reading)

Ross Paterson | 2 Sep 2002 22:31
Picon
Favicon

transitive imports & hiding

With these modules:

	module A(function, Class(method)) where
	function = id
	class Class a where method :: a

	module B(function, Class(..)) where
	import A

	module C where
	import B hiding (function)
	f = method

hugs C.hs yields
ERROR "C.hs":3 - Undefined variable "method"
Iavor S. Diatchki | 3 Sep 2002 21:03
Picon

local qualified names

hi,
here is a module system bug:

module List where

data T a = Nil | Cons a (T a)

nil :: List.T a
nil = T.Nil

ERROR "test.hs":5 - Undefined type constructor "List.T"
(and also the value constructor is not defined).

one should be able to refer to local names with their qualified names.
this is good for documentation purposes, when one programs in a certain 
style (1 datatype/module, and it is always called T).

it is also important when combined with the "lazy name clash" feature of 
the haskell module system to resolve conflicts.

bye
iavor

--

-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================
(Continue reading)

Sigbjorn Finne | 3 Sep 2002 22:10
Favicon

Re: transitive imports & hiding

Thanks, fixed in a local copy (changes hopefully
committed before the day is up.)

--sigbjorn

----- Original Message ----- 
From: "Ross Paterson" <ross <at> soi.city.ac.uk>
To: <hugs-bugs <at> haskell.org>
Sent: Monday, September 02, 2002 13:31
Subject: transitive imports & hiding

> With these modules:
> 
> module A(function, Class(method)) where
> function = id
> class Class a where method :: a
> 
> module B(function, Class(..)) where
> import A
> 
> module C where
> import B hiding (function)
> f = method
> 
> hugs C.hs yields
> ERROR "C.hs":3 - Undefined variable "method"
Sigbjorn Finne | 3 Sep 2002 22:11
Favicon

Re: local qualified names

Hi,

[I presume you meant List.Nil on the RHS of 'nil']

thanks, this has one has been fixed in the current
sources (+ it also implements H98's lazy name conflict
reporting.)

--sigbjorn

----- Original Message ----- 
From: "Iavor S. Diatchki" <diatchki <at> cse.ogi.edu>
To: <hugs-bugs <at> haskell.org>
Sent: Tuesday, September 03, 2002 12:03
Subject: local qualified names

> hi,
> here is a module system bug:
> 
> module List where
> 
> data T a = Nil | Cons a (T a)
> 
> nil :: List.T a
> nil = T.Nil
> 
> ERROR "test.hs":5 - Undefined type constructor "List.T"
> (and also the value constructor is not defined).
> 
> one should be able to refer to local names with their qualified names.
(Continue reading)

Volker Stolz | 4 Sep 2002 19:21

hugs98: configure Linuxism

Hi, there's a Linuxism in hugs98-Dec2001/src/unix/configure:

if (test "`basename ${YACC}`x" == "byaccx"); then
   echo "Found 'byacc', but the Hugs98 parser is incompatible with it."

The test should be one simple "=" for string equality. This will make
configure trip e.g. on FreeBSD (though it'll do no harm -- yet).

Regards,
  Volker
--

-- 
plonk :: m a -> m ()
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
Glynn Clements | 5 Sep 2002 00:26
Favicon

Re: hugs98: configure Linuxism


Volker Stolz wrote:

> Hi, there's a Linuxism in hugs98-Dec2001/src/unix/configure:
> 
> if (test "`basename ${YACC}`x" == "byaccx"); then
>    echo "Found 'byacc', but the Hugs98 parser is incompatible with it."
> 
> The test should be one simple "=" for string equality. This will make
> configure trip e.g. on FreeBSD (though it'll do no harm -- yet).

Actually "==" is a "bash 2.x"-ism. Any system (Linux or otherwise)
where /bin/sh is bash 1.x will also choke on the above code.

--

-- 
Glynn Clements <glynn.clements <at> virgin.net>
Alastair Reid | 5 Sep 2002 14:24
Picon

Unexpected signal on hclosing stdout twice


Running 'hClose stdout' twice in a row causes Hugs to abort:

Prelude> :l IO
Reading file "/home/reid/local/lib/hugs/lib/IO.hs":
Reading file "/home/reid/local/lib/hugs/lib/Ix.hs":
Reading file "/home/reid/local/lib/hugs/lib/IO.hs":

Hugs session for:
/home/reid/local/lib/hugs/lib/Prelude.hs
/home/reid/local/lib/hugs/lib/Ix.hs
/home/reid/local/lib/hugs/lib/IO.hs
IO> hPutStr stdout "abcde" >> hClose stdout
abcde
IO> hPutStr stdout "abcde" >> hClose stdout

Unexpected signal

--
Alastair Reid                 alastair <at> reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/
Sigbjorn Finne | 5 Sep 2002 16:38
Favicon

Re: Unexpected signal on hclosing stdout twice

 "Alastair Reid" <alastair <at> reid-consulting-uk.ltd.uk> writes:
> 
> Running 'hClose stdout' twice in a row causes Hugs to abort:
> 
  ...
> IO> hPutStr stdout "abcde" >> hClose stdout
> abcde
> IO> hPutStr stdout "abcde" >> hClose stdout
> 
> Unexpected signal
> 

Thanks for the report - the repeated closing isn't the problem,
but the handle you're trying to close. I've modified IO.hClose
to treat closing of any of the standard handles as a nop.

--sigbjorn
Alastair Reid | 6 Sep 2002 20:05
Picon

Re: hugs98: configure Linuxism


> Hi, there's a Linuxism in hugs98-Dec2001/src/unix/configure: if
> (test "`basename ${YACC}`x" == "byaccx"); then echo "Found 'byacc',
> but the Hugs98 parser is incompatible with it."

I didn't see any response to this so I had a quick look.
It has been fixed in the CVS repository so it will be in the next release.

Thanks,

--
Alastair Reid                 alastair <at> reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/

Gmane