Hi,
Given a file test of size 2342.
The program Bug.hs behaves correctly (the result is
(2048,384)), but when uncommenting the seemingly innocent
line, the program behaves incorrectly (result is
(2048,2048)), and the buffer is filled with garbage.
main =
do han - openFile test ReadMode
Given a file test of size 2342.
The program Bug.hs behaves correctly (the result is
(2048,384)), but when uncommenting the seemingly innocent
line, the program behaves incorrectly (result is
(2048,2048)), and the buffer is filled with garbage.
main =
do han - openFile test ReadMode
Thanks, I've made Hugs98 comply with the Report.
--sigbjorn
- Original Message -
From: Ian Lynagh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 09, 2001 10:43
Subject: --+ not treated as a start of a comment
If I have
foo = 0 --+ 1
then ghc tells me
No, GHC just does not support this. GHC tries to avoid duplicating
information (which might become inconsistent with catastrophic results),
so C.hi simply records the dependency on A.hi and B.hi.
You must have both of the latter available.
Simon
| -Original Message-
| From: Ashley
My understanding is that GHC tries to have it both ways. Here's my
understanding of how it works (implementors should probably chime in
if my memory is faulty or out of date):
1) There is a single, canonical copy of every nullary constructor.
This canonical copy is used wherever
[Apologies for multiple copies of this announcement]
**
*** first call for papers and participation
**
Hello,
If I have..
data Path = L Path | R Path | T
paths = T : branch paths
branch (p:ps) = L p : R p : branch ps
This will be a CAF which can never be garbage collected, but
may grow indefinitely large as it gets reduced. Correct?
Is it possible to avoid this problem
If I have..
data Path = L Path | R Path | T
paths = T : branch paths
branch (p:ps) = L p : R p : branch ps
This will be a CAF which can never be garbage collected, but
may grow indefinitely large as it gets reduced. Correct?
Any decent compiler will garbage collect the
Apologies if you receive multiple copies...
PRELIMINARY CALL FOR PAPERS
[Deadline for submission: 3rd June 2002]
WAAAPL 2002
apologies if you receive multiple copies...
FORMAL METHODS EUROPE
FME 2002
Formal Methods: Getting IT Right
International Symposium and Tutorials
http://floc02.diku.dk/FME/
I'm curious, how does GHC determine that the CAF is no longer required
if it is referenced by code (somehow)? If code was also some kind of
heap allocated data structure I guess this would be possible, but I
thought this wasn't so with GHC.
GHC actually tracks references to top-level
data Path = L Path | R Path | T
paths = T : branch paths
branch (p:ps) = L p : R p : branch ps
This code was originally written in Clean, and the Clean designers
addressed this problem by allowing the programmer to distinguish
between constants and functions with no
Well, how about the following little circular program?
paths :: () - [Path]
paths () = let r = T : branch r in r
As far as I can understand what you are looking for, I think
this meets
the bill. Every use of the expression `paths ()' will re-evaluate
the infinite
You can't rely on adding dummy arguments to cause re-evaluation:
full-laziness (enabled when optimisation is on in GHC) will do the
opposite transformation.
Well in this case, you may find it harder to claim that the full
laziness transformation constitutes an `optimisation'. Maybe the
GHC
You can't rely on adding dummy arguments to cause re-evaluation:
full-laziness (enabled when optimisation is on in GHC) will do the
opposite transformation.
Well in this case, you may find it harder to claim that the full
laziness transformation constitutes an `optimisation'. Maybe the
On Mon, Dec 10, 2001 at 04:03:27PM +, Ian Lynagh wrote:
In the thread Literate scripts not handled correctly Simon Marlow
said:
Yes, it looks like GHC's unlit program removes whitespace when looking
for \begin{code}, but not for \end{code}. The report isn't explicit
about whether
Mark P Jones comments:
...
| Simon Peyton-Jones. The implementation of functional
| programming languages. Prentice-Hall, 1987
...
| This book is already on-line at
|
| http://research.microsoft.com/Users/simonpj/Papers/student.ps.gz
That's a useful resource too, but it's
Hi Marcin,
| There's no solid technical reason for this, but Haskell doesn't allow
| it at the moment because there isn't an easy way to name an instance
| declaration.
|
| There is another problem: even if we created a syntax to name them,
| if they would not be exported by default then
| Simon Peyton-Jones. The implementation of functional
| programming languages. Prentice-Hall, 1987
|
| is this book could be made available online ? cos on amazon
| it seems out of print.
I'm planning to scan it in and make the copy available online.
In the next month or two.
Simon
David Feuer [EMAIL PROTECTED] writes:
1. Why can't [instances] be hidden in module imports/exports?
The way I see it, an instance declaration is an assertion that a
certain data type supports a certain set of operations. Thus, if the
data type and the operations on it are in scope, it makes
On Mon, Dec 10, 2001 at 12:58:33AM -0800, Simon Peyton-Jones wrote:
| Simon Peyton-Jones. The implementation of functional
| programming languages. Prentice-Hall, 1987
|
| is this book could be made available online ? cos on amazon
| it seems out of print.
I'm planning to scan
Hello!
On Sun, Dec 09, 2001 at 01:07:08PM +, Marcin 'Qrczak' Kowalczyk wrote:
Fri, 7 Dec 2001 17:12:52 -0500 (EST), David Feuer [EMAIL PROTECTED] pisze:
I'm wondering why Haskell doesn't support Scheme-like cond statements
or a pattern matching predicate.
I agree that both constructs
uma kompella wrote:
hi
i am new to haskell and am having a problem to write
function which takes a boolean expression and returns
a truthvalue stating whether or not it is a tautology.
Can anyone please help me??
Thanks a lot
uma
I assume this is your homework. It is better to
At 2001-12-10 16:07, uma kompella wrote:
i am new to haskell and am having a problem to write
function which takes a boolean expression and returns
a truthvalue stating whether or not it is a tautology.
If you really want to impress your tutor, see if you can find a function
that does this in
24 matches
Mail list logo