G'day all.
On Wed, Aug 20, 2003 at 07:42:59AM +0200, Jan Scheffczyk wrote:
> I always thought that there is a tiny difference between "let" and "where":
They're semantically equivalent. See, for example:
http://haskell.org/onlinereport/decls.html#sect4.4.3.2
Cheers,
Andrew Bromage
___
Hi Andrew,
> let x = expensiveComputation foo in x + x
>
> I would certainly hope that expensiveComputation wasn't called twice,
> and even though the language doesn't guarantee it, I have already
> written code that assumed it.
I always thought that there is a tiny difference between "let"
Latest version can be downloaded via
http://www.comp.nus.edu.sg/~sulzmann/chameleon/
You might also want to check out
http://www.comp.nus.edu.sg/~sulzmann/chr/publications.html
- The Chameleon Type Debugger (Tool Demonstration)
- Interactive Type Debugging in Haskell
Martin
G'day all.
On Tue, Aug 19, 2003 at 11:11:23AM +0100, Ganesh Sittampalam wrote:
> I was thinking of a situation like
>
> let x = unsafePerformIO readFooFromDB in x+x
>
> I see from your "Secrets of the GHC inliner" paper that x wouldn't be
> inlined by GHC, but it seems to me like a serious abu
Briefly,
http://www.isi.edu/~hdaume/HWordNet/
HWordNet is a Haskell binding to the WordNet database. You will actually
need to have WordNet installed to use the Haskell interface, but you won't
need any of the source (the Haskell interface is 100% pure Haskell; no
crummy FFI bindings here!). H
> On Tuesday, 2003-08-19, 13:18, Simon Marlow wrote:
> > [...]
>
> > Yes, I agree that one shouldn't rely on the "no duplication of work"
> > property. However, folloing this argument we arrive at the
> conclusion that
> > hGetContents is an invalid use of unsafePerformIO. (which
> is someth
On Tuesday, 2003-08-19, 13:18, Simon Marlow wrote:
> [...]
> Yes, I agree that one shouldn't rely on the "no duplication of work"
> property. However, folloing this argument we arrive at the conclusion that
> hGetContents is an invalid use of unsafePerformIO. (which is something I've
> been sayi
> >> Isn't there the possibility of inlining causing a read to
> >> happen twice even if it only appears to happen once?
> >
> >In theory that would be a valid transformation, but in practice no
> >compiler would duplicate arbitrary computations. GHC
> certainly doesn't.
>
> I was thinking of
On Tue, 19 Aug 2003 10:52:57 +0100, "Simon Marlow" <[EMAIL PROTECTED]>
wrote:
>> Isn't there the possibility of inlining causing a read to
>> happen twice even if it only appears to happen once?
>
>In theory that would be a valid transformation, but in practice no
>compiler would duplicate arbitr
> >If the databases *do* change over time, then there are two
> >possibilities:
> >
> > 1. the contents change due to external factors only
> > 2. the contents change because this program doing the writing
> >
> >in (1), you can still pretend the interface is pure, by
> imagining that
> >all t
On Tue, 19 Aug 2003 10:27:23 +0100, "Simon Marlow" <[EMAIL PROTECTED]>
wrote:
>If the databases *do* change over time, then there are two
>possibilities:
>
> 1. the contents change due to external factors only
> 2. the contents change because this program doing the writing
>
>in (1), you can sti
Hello,
I think, I realized now what my mistake was. The handling of overlapping
instances comes into play when the compiler has to decide which method
definition to choose for a specific instance. It is not for choosing one of
more possible instances.
In my example, C Int (Int,Char,Bool) Int a
> I'm finishing up my Haskell interface to WordNet
> (http://www.cogsci.princeton.edu/~wn/) and have a standard
> unsafePerformIO question :).
>
> Basically, the interface functions by first calling an initialization
> function, 'initializeWordNet :: IO WordNetEnv'. WordNetEnv is
> essentially
Please apologize in case you receive multiple copies of this information.
==
2nd CALL FOR PAPERS
Workshop on
High-Level Approaches to Parallel and Distributed Computing
held in the context of the
14 matches
Mail list logo