rolle | 29 Dec 2010 04:10

MinHugs-Sep2006.exe does wrong Integer arithmetic

(Re-sending.  Does this list drop mail from non-subscribers?)

I've seen the hugs distribution that is hosted as
http://ndmitchell.googlecode.com/files/MinHugs-Sep2006.exe
and has the SHA1 checksum 02f62efe00334007eb7083d09bae6e692a48c7c2
evaluate the script below incorrectly on two different Windows XP
computers.

The correct output is [], but I get a non-empty list.  On one 
computer
I get different output for successive runs of the same script
(restarting hugs) by saying "main".  On the other one I get 
different
output by saying "main" versus "ls".

I can't reproduce the problem on two different UNIX-like systems 
with
the September 2006 version of hugs.  The problem goes away by 
replacing
"Integer" with "Int".

type Z = Integer

qs :: Z -> Z
qs 0 = 0
qs x = let (q,r) = divMod x 10 in r + qs q

iqs :: Z -> Z
iqs x = if x < 10 then x else iqs (qs x)

(Continue reading)

Olivier Lefevre | 6 Nov 2010 01:23
Picon
Favicon

"winhugs /edit" problem

Could someone explain *precisely* what happens when one tries
to execute that command? It gives me a registry error that I'd
like to debug but I don't have a clear idea of what this is
doing under the cover.

Thanks,

-- O.L.
Hugs | 1 Feb 2010 18:27
Favicon

[Hugs] #98: hugs accepts instance decls with methods that aren't in scope

#98: hugs accepts instance decls with methods that aren't in scope
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  minor   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 hugs (September 2006) accepts these modules:
 {{{
 module Q (Class) where

 class Class a where
     method :: a
 }}}

 {{{
 module W where

 import Q

 instance Class Int where
     method = 6
 }}}

 but the report says:
 {{{
 4.3.2  Instance Declarations
 [...]
 It is illegal to give a binding for a class method that is not in scope
(Continue reading)

Hugs | 23 Dec 2009 20:47
Favicon

[Hugs] #97: INTERNAL ERROR: discrArity

#97: INTERNAL ERROR: discrArity
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  minor   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 When loading nhc98's compiler sources in hugs. Specifically:
 {{{
 nhc98/src/compiler98 $ hugs -98 MainNhc98.hs
 [banner]
 INTERNAL ERROR: discrArity
 }}}
 Using hugs version September 2006.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/97>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
Hugs | 14 Dec 2009 01:52
Favicon

[Hugs] #96: redeclaration of function inside a class

#96: redeclaration of function inside a class
-------------------------------+--------------------------------------------
 Reporter:  guest              |       Owner:  neil  
     Type:  defect             |      Status:  new   
 Priority:  major              |   Milestone:        
Component:  winhugs            |     Version:  200605
 Keywords:  redefine function  |  
-------------------------------+--------------------------------------------
 please do apologize if this bug has been reported before

 i've been doing my homework assignment on parsers and monads when i hit
 error "INTERNAL ERROR: pmcTerm", when combined these definitions:


 {{{
 return v xs= [(v, xs)]

 class Monad m where
         return  :: a-> m a
 }}}

 INTERNAL ERROR: pmcTerm

 the compiler said that i should report this problem so i'm doing so

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/96>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
(Continue reading)

Hugs | 20 Sep 2009 08:35
Favicon

[Hugs] #95: local fixity declarations cause static errors

#95: local fixity declarations cause static errors
---------------------------------+------------------------------------------
 Reporter:  guest                |       Owner:  nobody
     Type:  defect               |      Status:  new   
 Priority:  major                |   Milestone:        
Component:  hugs                 |     Version:  200609
 Keywords:  fixity declarations  |  
---------------------------------+------------------------------------------
 Declarations such as
 {{{
 newExp (*) a c n
   = let
       infixl 7 *
     in
     a ^ n * c
 }}}
 work well with GHC but Hugs complains that "*" is not defined.

 The Report is not explicit about this, at least I couldn't find
 such case discussed there. But as a fixity change for an operator
 introduced as a formal parameter is perfectly reasonable and safe,
 I think that this should be legal.

 Härmel Nestra (harmel.nestra <at> ut.ee)

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/95>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
(Continue reading)

Sebastian Beschke | 10 Sep 2009 16:25
Picon

Problems building hugs under Windows

Hi,

I'm attempting to build the Hugs September 2006 release from source on
Windows XP. I installed MinGW as well as the MSYS base system, and the
build process went quite far, to stop with the below error.
Are there any other tools I need in order to build hugs? Or what else is
causing this error?

Thanks in advance,
Sebastian Beschke

---
Preprocessing Network/Hackage/Client
Preprocessing Network/Hackage/Interface
Preprocessing Network/Hackage/Version
runhugs: Error occurred
ERROR "libraries/bootlib\Data\HashTable.hs" - Can't find imported module
"Contro
l.Monad"

runhugs: Error occurred
ERROR "libraries/bootlib\Data\HashTable.hs" - Can't find imported module
"Contro
l.Monad"

runhugs: Error occurred
ERROR "libraries/bootlib\Data\HashTable.hs" - Can't find imported module
"Contro
l.Monad"

(Continue reading)

Hugs | 4 Sep 2009 04:58
Favicon

[Hugs] #94: pattern match failure on Chars with Unicode codepoint >0x4ff

#94: pattern match failure on Chars with Unicode codepoint >0x4ff
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody 
     Type:  defect  |      Status:  new    
 Priority:  major   |   Milestone:         
Component:  hugs    |     Version:  current
 Keywords:          |  
--------------------+-------------------------------------------------------
 hi,

 i tested the following code in Hugs:
 {{{
 patternMatchingWorks1 = case '\x4ff' of '\x4ff' -> True
 patternMatchingWorks2 = case '\x500' of '\x500' -> True
 patternMatchingWorks3 = f '\x4ff' where f '\x4ff' = True
 patternMatchingWorks4 = f '\x500' where f '\x500' = True
 patternMatchingWorks5 = (\'\x4ff'->True) '\x4ff'
 patternMatchingWorks6 = (\'\x500'->True) '\x500'
 }}}
 and got the following output:
 {{{
 Main> :load "M:\\haskell\\sources\\WinHugsPatternMatchingBug.hs"
 Main> patternMatchingWorks1
 True
 Main> patternMatchingWorks2

 Program error: pattern match failure: patternMatchingWorks2_v1621 '\1280'

 Main> patternMatchingWorks3
 True
(Continue reading)

Hugs | 2 Jul 2009 11:57
Favicon

[Hugs] #93: I get "INTERNAL ERROR : parse input" and a request to report the bug.

#93: I get "INTERNAL ERROR : parse input" and a request to report the bug.
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  major   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 I use Huggs 98 version Sep 2006.  For a class assignment I edited the file
 Practicum2 by :e and then closing the file without having changed it.  I
 then get the Internal Error.  The last change to Practicum2 before the
 error is this line: "separatorParser xs           |  let (f == "\n") in
 token1 f xs = [(Error, drop (length f) xs)]
 "
 With this line edited out I do not get the error.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/93>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
Hugs | 18 May 2009 18:13
Favicon

[Hugs] #92: Strict record fields aren't demanded

#92: Strict record fields aren't demanded
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  major   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 Given

 {{{
 data S = S { a :: Int, b :: ! Int }
 }}}

 In GHCi:

 {{{
 *Main> a (S { a = 0, b = 1 })
 0
 *Main> a (S { a = 0, b = undefined })
 *** Exception: Prelude.undefined
 }}}

 In Hugs:

 {{{
 Main> a (S { a = 0, b = 1 })
 0
 Main> a (S { a = 0, b = undefined })
 0
(Continue reading)

Geraint Jones | 6 May 2009 16:33
Picon
Picon
Favicon

Re: strictness of interpreted haskell implementations

Given a declaration

	data S = S { a :: Int, b :: ! Int }

I expect 

	a (S { a = 0, b = undefined })

to force the undefined in the b field of the S (and ghci agrees with me).
However:-

  __   __ __  __  ____   ___      _________________________________________
  ||   || ||  || ||  || ||__      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: September 2006 _________________________________________

  Haskell 98 mode: Restart with command line option -98 to enable extensions

  Type :? for help
  Main> a (S { a = 0, b = 1 })
  0
  Main> a (S { a = 0, b = undefined })
  0
  Main> 

Is this a known feature?

Gmane