#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
}}}
Bug reported by Geraint Jones
--
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/92>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
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?