To my
> When processing this tree, it would be natural to write in each node
>m + b and min [m,b].
>
> The former is "necessary" due to the infix-binary tradition.
> The latter uses [,] because it is good to have one function min for a
> list and for the two eleme
Sergey Mechveliani wrote:
>For example, the static error report for
> if {-# static x #-} then error ...
> else y
>takes pace only when the compiler proves that `else' never performs,
>when everything is computed "lazily".
>
>If only I u
"S.D.Mechveliani" wrote:
> When processing this tree, it would be natural to write in each node
>m + b and min [m,b].
>
> The former is "necessary" due to the infix-binary tradition.
> The latter uses [,] because it is good to have one function min for a
> list an
>to tell the compiler 'evaluate this to a static value'. I'd suggest
>doing it via a pseudo-function
> static :: a -> a
>which behaved like the identity function, except that it evaluated
>its argument rather eagerly at compile time.
AFAIK eagerness isn't addressed by the Haskell language
Simon Peyton-Jones wrote:
>a function with an assert that always fails
>is indeed a good candidate for a compile-time error message.
When I developed compilers for Fortran and C++, from time to time we would
get reports from customers that the compiler had failed to diagnose an
error in their cod
> > Sun, 21 May 2000 17:26:13 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> On a related note, Hugs and ghc both allow the following module
>
> module Bar(List(..)) where
> type List = []
>
> without complaint, but according to the Haskell report (5.2) the
> syntax `(..)' should only be u
On 21-May-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote:
> Sun, 21 May 2000 17:26:13 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
>
> > But being able to import and/or re-export such symbols is necessary
> > if you want to be able to implement an alternative prelude.
>
> No: th
To my
| Here is some strange question:
| how to force the compiler to evaluate some things more statically
| and to convert some run-time errors into the compile-time ones?
Simon Peyton-Jones <[EMAIL PROTECTED]> writes
> Not strange at all. It would be quite reasonable to have some way
>
Sun, 21 May 2000 11:53:39 +0400 (MSD), S.D.Mechveliani <[EMAIL PROTECTED]> pisze:
> The economy of names is more important.
Convenience of programming is important too. Many Prelude functions
are unnecessary, but are convenient. (++) and concat are not needed
(you can write flip (foldr (:)) for
Sun, 21 May 2000 17:26:13 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> But being able to import and/or re-export such symbols is necessary
> if you want to be able to implement an alternative prelude.
No: they can be simply always available, just as \ and let.
Standard Prelude has to be
On my proposal for minBy, gcd ... :: [a] -> a
and remark on +, && ... being the exceptions
Matt Harden <[EMAIL PROTECTED]> writes on 19 May 2000
>> (+), (&&) ... are different. Because they have classical tradition
>> to be applied as binary infix operations.
>> And gcd, min, max, lcm
On 21-May-2000, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote:
> Sat, 20 May 2000 13:13:22 -0700, Simon Peyton-Jones <[EMAIL PROTECTED]> pisze:
>
> > Explicit lists [a,b,c]
> > List comprehensions
> > Numeric constants (1 means 'fromInteger 1')
> > do notation
> >
> > Here
12 matches
Mail list logo