Word64 patch

2001-02-09 Thread Ian Lynagh
Hi all The Word64 type distributed with hugs (including the latest beta (Jan 2001) against which this patch was created) appears to be somewhat lacking in features that might make it useful. The attached patch makes it an instance of Num, Bits, Integral, Real and Enum. I haven't looked at the h

Hugs doesn't parse left sections correctly

2001-09-17 Thread Ian Lynagh
The following looks like it is valid to me, and ghc and nhc98 agree: Prelude> (5 * 6 +) 7 ERROR - Syntax error in expression (unexpected `)') Thanks Ian ___ Hugs-Bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/hugs-bugs

Literate scripts not handled correctly

2001-09-18 Thread Ian Lynagh
Hi all My understanding is that the following script: - cut here - > foo :: Int -> Int > foo _ = 2 \begin{code} bar :: Int -> Int bar _ = 1 \end{code} - cut here - should be valid and define foo and bar (although the report does say "It is not advisable to mix these two st

Export list (,) not allowed

2001-12-09 Thread Ian Lynagh
With this module: module Foo (,) where foo = 0 hugs gives me: ERROR tt.lhs:2 - Syntax error in module definition (unexpected comma) while the report (and GHC) allow it. hugs seems to be OK with import lists. Thanks Ian ___ Hugs-Bugs

Incorrect syntax errors

2001-12-11 Thread Ian Lynagh
Hi guys, With the module { foo = 5 } I get ERROR tt.hs:2 - Syntax error in input (unexpected `{', possibly due to bad layout) and with the module module Foo where { foo = 5 bar = 6 } ERROR tt.hs:4 - Syntax error in definition (un

Re: Incorrect syntax errors

2001-12-11 Thread Ian Lynagh
On Tue, Dec 11, 2001 at 01:17:07PM +, Ian Lynagh wrote: > > { > foo = 5 > } > > ERROR tt.hs:2 - Syntax error in input (unexpected `{', possibly due > to bad layout) I still think this is an error. > module Foo where {

Re: Incorrect syntax errors

2001-12-11 Thread Ian Lynagh
On Tue, Dec 11, 2001 at 11:39:48AM -0800, Johan Nordlander wrote: > On Tuesday, December 11, 2001, at 05:17 AM, Ian Lynagh wrote: > > > { > > foo = 5 > > } > > I'm afraid both your examples are incorrect. The first one > isn't a val

hugs gets confused when 2 modules are imported with the same name

2001-12-14 Thread Ian Lynagh
With this module: module Q (foo) where import List as Foo import Maybe as Foo foo = Foo.find hugs says ERROR tt.lhs:7 - Undefined qualified variable "Foo.find" "5.3.3 Local aliases" in the report makes it clear that this should be allowed. Thanks Ian ___

Parse errors

2001-12-16 Thread Ian Lynagh
It looks like hugs has a problem with empty topdecls (allowable via topdecl -> decl -> gendecl) - with both of these modules: type T = String; data D = D module Foo where { type T = String;; data D = D } I get ERROR "q.lhs":3 - Syntax error in definition (unexpecte

Left sections parse problem

2001-12-16 Thread Ian Lynagh
[I reported this a while back but it doesn't seem to be fixed in the December release] Prelude> (3 * 4 +) 5 ERROR - Syntax error in expression (unexpected `)') Thanks Ian ___ Hugs-Bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/l

hugs accepts derivings for classes when it can't provide the definition

2001-12-16 Thread Ian Lynagh
hugs accepts data D a = D a deriving (Show) despite not being able to derive the instance. This goes against There is a context cx' such that cx' =>C tij holds for each of the constituent types tij." in appendix D of the report. Ian

Re: hugs accepts derivings for classes when it can't provide the definition

2001-12-16 Thread Ian Lynagh
On Mon, Dec 17, 2001 at 12:09:54AM +, Ian Lynagh wrote: > > hugs accepts > > data D a = D a > deriving (Show) > > despite not being able to derive the instance. This goes against > > There is a context cx' such that cx' =>C tij holds

Name collisions

2002-12-20 Thread Ian Lynagh
Hi all I think this is a hugs bug, but the logic behind the rules in this sort of case is a bit lost on me. > module A (foo) where > foo :: Int > foo = 5 > module B (foo) where > import A > foo :: Int > foo = 4 ghci says: B.lhs:2: Ambiguous occurrence `foo' It could refer to

Signs, Word32 and Array

2003-01-10 Thread Ian Lynagh
This looks like a hugs bug to me - GHCi gets it right. Inflate> 4294967295 :: Word32 4294967295 Inflate> (4294967295 :: Word32) > 0 True Inflate> array (0, (4294967295 :: Word32)) [] // [(5, 98)] array Program error: {_out_of_bounds (0,-1) 5} Inflate> Incidentally, how do you get the Word and

Re: illegal export of lone data constructor

2003-09-17 Thread Ian Lynagh
On Sat, Sep 13, 2003 at 04:57:34PM +0200, Andrew Frank wrote: > i am moving fom the nov 99 to the nov 02 hugs.exe (under windows) > when recompiling old files i find two problems which i do not understand: > > i want to export (:) from the prelude because i do not use the standard > prelude usuall

0/0 => "nan", not "NaN". Also, empty hsc2hs dir and "invalid predicate `-wholename'"

2007-03-21 Thread Ian Lynagh
Hi all, hugs thinks that show (0/0 :: Double) is "nan", but it will only read "NaN". I'd suggest changing the behaviour of show rather than that of read, so as to match GHC: Prelude> show (0/0 :: Double) "NaN" Prelude> read "nan" :: Double *** Exception: Prelude.read: no parse Prelude> rea

Re: 0/0 => "nan", not "NaN". Also, empty hsc2hs dir and "invalid predicate `-wholename'"

2007-03-21 Thread Ian Lynagh
On Thu, Mar 22, 2007 at 01:13:58AM +, Ian Lynagh wrote: > > show (0/0 :: Double) > > is "nan", but it will only read "NaN". Oh, and the same for inf -> Infinity -int -> -Infinity of course. Thanks Ian _

Re: [Hugs] #75: Please update FAQ to address whether a "no install" version of Hugs is available. Thx!

2007-06-12 Thread Ian Lynagh
On Tue, Jun 12, 2007 at 11:01:10PM -, Hugs wrote: > #75: Please update FAQ to address whether a "no install" version of Hugs is > available. Thx! > > I don't understand the question. Please expand. I think he wants a hugs binary tarball/zip that you can just untar/unzip and use in-place.