RE: Dynamic scopes in Haskell

1999-12-06 Thread Simon Marlow
Is there any references to memoization techniques? I could not find any reference to memoization facilities in the Haskell report and library report. Neither in the Clean report. After looking at GHC, Hugs98 and nhc98, I have found that GCH provides the memo function used in the example.

Re: Dynamic scopes in Haskell

1999-12-03 Thread Michael Erik Florentin Nielsen
Koen Claessen [EMAIL PROTECTED] wrote: let x :: N Int x = veryBigExpression in plus x x Then "veryBigExpression" depending on an "Env" gets computed twice if you finally provide the "Env". I do not see this as a problem. In fact it forces you to think about the difference

Re: Dynamic scopes in Haskell

1999-12-03 Thread José Romildo Malaquias
Is there any references to memoization techniques? I could not find any reference to memoization facilities in the Haskell report and library report. Neither in the Clean report. After looking at GHC, Hugs98 and nhc98, I have found that GCH provides the memo function used in the example. Looking

Re: Dynamic scopes in Haskell

1999-12-03 Thread Koen Claessen
José Romildo Malaquias [EMAIL PROTECTED] asked: | Is there any references to memoization techniques? : | So, is it straightforward to implement the memo function in | Haskell 98 or in Clean? In my case, the memo function was only needed for the type "Env": memo :: (Env - a) - (Env - a)

Re: Dynamic scopes in Haskell

1999-12-03 Thread Koen Claessen
Michael Erik Florentin Nielsen wrote: |let x :: N Int |x = veryBigExpression | | in plus x x | | Then "veryBigExpression" depending on an "Env" gets computed twice if you | finally provide the "Env". | | I do not see this as a problem. [...] | One could imagine

Re: Dynamic scopes in Haskell

1999-12-02 Thread José Romildo Malaquias
On Thu, Dec 02, 1999 at 11:11:12AM +0100, Michael Erik Florentin Nielsen wrote: My problem: -- One of the algorithms I have to implement is the addition of symbolic expressions. It should have two symbolic expressions as arguments and should produce a symbolic expression as

Re: Dynamic scopes in Haskell

1999-12-02 Thread Jerzy Karczmarczuk
José Romildo Malaquias: M.E.F.N == In fact you would probably be better of by hiding the prelude and overloading + and friends on your own. Is there any directions on how to hide the prelude and still use the definitions it exports? Romildo. Selective import or selective hiding from

Re: Dynamic scopes in Haskell

1999-12-02 Thread Peter Hancock
"Jerzy" == Jerzy Karczmarczuk [EMAIL PROTECTED] writes: PS. Caeterum censeo, categoria Num delendam esse puto!! It would add a very scholarly tone to things if suggestions for the Haskell wish list were accepted only in Latin. Or category theory. -- Peter

Re: Dynamic scopes in Haskell

1999-12-01 Thread Marc van Dongen
Jerzy Karczmarczuk [EMAIL PROTECTED]: : I don't fully understand the issue. If it is only : a syntactic problem, and for a given chunk, say, : a module, your set of flags is fixed, and does not change : between one expression and another, you can always define : : add flagSet x y = ...-- your

Re: Dynamic scopes in Haskell

1999-12-01 Thread Juergen Pfitzenmaier
Marc van Dongen wrote: Unless I am missing somthing I think that in general this is not just a syntactical issue. E.g. consider polynomial remainder. At run time an order on terms is determined (A term order is an order on terms. It is a generalisation of a variable order). The order

Dynamic scopes in Haskell

1999-12-01 Thread José Romildo Malaquias
The scope: - Looking at the Hugs98 (November release) I found an interesting extension: dynamic scoped variables. (for reference, just read the Hugs98 documentation, that can be found at their site). http://www.cse.ogi.edu/PacSoft/projects/Hugs/hugsman/exts.html This extension just come

RE: Dynamic scopes in Haskell

1999-12-01 Thread Simon Peyton-Jones
| - Does other Haskell implementations (ghc, nhc, hbc, ...) | would provide this extension in next releases? (This way, | even been an extension, my system would be portable) Jeff Lewis is well advanced with adding functional dependencies into GHC; I believe that he plans then to add

Re: Dynamic scopes in Haskell

1999-12-01 Thread Jerzy Karczmarczuk
José Romildo Malaquias: One of the algorithms I have to implement is the addition of symbolic expressions. It should have two symbolic expressions as arguments and should produce a symbolic expression as the result. But how the result is produced is depending on series of flags that

Re: Dynamic scopes in Haskell

1999-12-01 Thread Ch. A. Herrmann
Hello, operators with suitable associations defined). So my symbolic expression type should be an instance of the Num class so that the (+) operator can be overloaded for it. But, as the function has now three arguments, it cannot be a binary operator anymore. maybe, an ad-hoc solution is

Re: Dynamic scopes in Haskell

1999-12-01 Thread Ch. A. Herrmann
I had just a fast look at the following I found at the page "http://www.cse.ogi.edu/PacSoft/projects/Hugs/hugsman/exts.html" for dynamic scoping: min :: [a] - a min = least with ?cmp = (=) Actually, I'm not sure how referential transparency can be established with these implicit

Re: Dynamic scopes in Haskell

1999-12-01 Thread Jeffrey R. Lewis
"Ch. A. Herrmann" wrote: I had just a fast look at the following I found at the page "http://www.cse.ogi.edu/PacSoft/projects/Hugs/hugsman/exts.html" for dynamic scoping: min :: [a] - a min = least with ?cmp = (=) Actually, I'm not sure how referential transparency can be

Re: Dynamic scopes in Haskell

1999-12-01 Thread José Romildo Malaquias
On Wed, Dec 01, 1999 at 02:05:04PM +, Jerzy Karczmarczuk wrote: José Romildo Malaquias: One of the algorithms I have to implement is the addition of symbolic expressions. It should have two symbolic expressions as arguments and should produce a symbolic expression as the result.

Re: Dynamic scopes in Haskell

1999-12-01 Thread Jeffrey R. Lewis
Simon Peyton-Jones wrote: | - Does other Haskell implementations (ghc, nhc, hbc, ...) | would provide this extension in next releases? (This way, | even been an extension, my system would be portable) Jeff Lewis is well advanced with adding functional dependencies into GHC; I believe

Re: Dynamic scopes in Haskell

1999-12-01 Thread José Romildo Malaquias
On Wed, Dec 01, 1999 at 08:59:09AM -0800, Jeffrey R. Lewis wrote: "Ch. A. Herrmann" wrote: I had just a fast look at the following I found at the page "http://www.cse.ogi.edu/PacSoft/projects/Hugs/hugsman/exts.html" for dynamic scoping: min :: [a] - a min = least with ?cmp =

Re: Dynamic scopes in Haskell

1999-12-01 Thread José Romildo Malaquias
On Wed, Dec 01, 1999 at 01:33:01PM +0100, Ch. A. Herrmann wrote: Hello, operators with suitable associations defined). So my symbolic expression type should be an instance of the Num class so that the (+) operator can be overloaded for it. But, as the function has now three