ot;methods" subsection empty?
13.3 Alternative class
This class hasn't been fully integrated into the report.
It is missing from the Standard Prelude (Section 9)
and from its natural place after 6.3.6.
<|> appears here without definition and is not in the index.
Why is
> The good thing about laTeX is that out of all the candidates it is the
> most likely one to still work 40 years from now,
If past results are any measure of future performance, the only
candidate with demonstrated 40-year longevity is troff/groff :)
Doug M
> I often see a confusion between greater expresiveness (good goal) and
> having to type less (largely irrelevant goal). By all means make the module
> system more expressive, but try to avoid "clever" things for convenience.
To expand upon this principle a bit, syntactic sugar that promises to
affairs, and that GHC will provide a
compliant implementation.
Doug McIlroy
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Sorry for a stylistic lapse in a post I just sent from
the wrong file. A tail should be called ts, not tss, in the
proposed reference definition for List.transpose
Doug
transpose xss = case [h | (h:_) - xss] of
[] - []
hs - hs : transpose [ts | (_:ts) - xss]
Not having participated in haskell' before, I'm not sure how
to put these perfecting amendments--mot langauge changes--into
the pot.
Doug McIlroy
The specification of List.transpose does not tell what a column
of a ragged-right list of rows is, either directly or by example.
Here is a fuller
By analogy to ML, which has let and let rec, where the latter
corresponds to Haskell's let, one is led to let nonrec. I
would definitely not like shadow, for it means that new
variable does NOT cast a shadow on its definining expression.
I fear also that let nonrec by any name would introduce
definition's oafish attempt to get right things
like [0.0,0.1..1.0] needs major revision.
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
, Doug McIlroy d...@cs.dartmouth.edu wrote:
Not always. For example, you can't mess with the declaration
of a standard class, such as Num.
On Sun, Apr 28, 2013 at 12:06 PM, Edward Kmett ekm...@gmail.com
wrote:
You can always put those helper functions in the class and then just
such functions have to be declared outside the scope in
which they are used.
Doug McIlroy
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime
at 10:49 AM, Doug McIlroy d...@cs.dartmouth.eduwrote:
Is there any strong reason why the where clause in an instance
declaration cannot declare anything other than class
operators? If not, I suggest relaxing the restriction.
It is not unusual for declarations of class operators to
refer
.
2. Ifdefs violate program structure.
All ifdefs appear at top level. Yet, save for those that control
top-level declarations, they embody conditionals at inner levels
of structure.
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe
lagged on data types.
FP also deserves credit for infinite data structures (though the special
case of stream processing dates way back).
Doug McIlroy
* It's amusing to note that real Booleans--the ones that Boole
used--were integers. For Boole, or(a,b) = a + b - a*b
Lazy evaluation--at the heart of spreadsheets since the beginning.
Never thought of that -- nice!
Unfortunately it's not literally true, because spreadsheets push
recalculated values to all the variables that depend on them,
rather than waiting until the dependent values are needed. But
the
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
and transpose.transpose==id do not hold unless row lengths
are monotone non-increasing.
[It might be well to restrict the input so the identities do hold.
This would simplify explanation, implementation, and proofs. Has
anybody found transpose useful outside this domain?]
Doug McIlroy
started.]
What principles guide the selection of components for all
you need to get up and running?
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
\xe\x1 is unambiguous.
There are two things wrong with this solution:
(1) It descends to another level of discourse--binary encoding of characters.
(2) It does not actually eliminate the need for \. Consider the
string \SOH1. It cannot be written \x11, or even \x011.
Doug McIlroy
://www.netlib.org/fp/dtoa.c.
(Alas, dtoa.c achieves calculational perfection via a
murmuration of #ifdefs.)
It's disheartening to hear that important Haskell code has
needlessly fallen from perfection--perhaps even deliberately.
Doug McIlroy
___
Haskell-Cafe
the theorem without
the help of Haskell. (This without even bringing in the heavy
artillery of higher-order functions and monads.)
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
the theorem without
the help of Haskell. (This without even bringing in the heavy
artillery of higher-order functions and monads.)
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
From: Richard O'Keefe o...@cs.otago.ac.nz
Date: Thu, 29 Mar 2012 16:34:46 +1300
On 29/03/2012, at 3:08 PM, Doug McIlroy wrote:
- without newtype
toSeries f = f : repeat 0 -- coerce scalar to series
instance Num a = Num [a] where
(f:fs) + (g:gs) = f+g : fs+gs
On windows I have long used hugs under cygwin, but hugs
doesn't get along well with cygwin's latest terminal
emulator. So I switched to winhugs. Small problem
that looms big: how do you interrupt an interminable
expression evaluation in winhugs?
Doug
Date: Tue, 27 Mar 2012 11:03:54 +1300
From: Richard O'Keefe o...@cs.otago.ac.nz
Subject: Re: [Haskell-cafe] adding the elements of two lists
To: jerzy.karczmarc...@unicaen.fr
Cc: haskell-cafe@haskell.org
And *that* is why I stopped trying to define instance Num t = Num [t].
If I KNEW that
Here's an example that fits comfortably in 5 minutes--if
your audience knows elementary calculus:
http://www.cs.dartmouth.edu/~doug/powswer.html
It depends critically on lazy evaluation, which knocks out
a lot of competing languages right from the start.
The five-minute version would begin with
Sorry, a typo in the url for the power-series example.
It should have been
http://www.cs.dartmouth.edu/~doug/powser.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
reside.)
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Markus: What about hoogle/hayoo and hackage?
Antoine: Do you have any links to examples that we should imitate?
Hackage is notionally similar to the Java API documentation at
http://www.oracle.com/technetwork/java/javase/documentation/
But Hackage Documentation pages typically only give syntax,
rewritten with the operators set off by spaces:
( fs : gs ) + ( g : gs ) = f + g : fs + gs
And it becomes too long and too subtly modulated to take in at
a glance if more spacing is added to emphasize precedence:
( f : fs ) + ( g : gs ) = f + g : fs + gs
Doug McIlroy
.
If you even have to think once about what needs to be strict or
non-strict, then non-strict is the only viable default. I can't
imagine writing any interesting Haskell code that will successfully
run all strict.
Doug McIlroy
___
Haskell-Cafe mailing
After loading the one-line file
default (Integer,Rational,Double)
the input
1::Fractional t = t
in ghci yields the output
1.0
and in hugs
1%1
The ghci answer appears not to respect the default
declaration. What's going on?
Doug McIlroy
Sequences.
Doug McIlroy
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime
One of Knuth's sources is the well-named book Hacker's Delight by
Henry S. Warren; see hackersdelight.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Is there a deep reason (beyond saving a sentence
or two in the language definition) for requiring
all patterns in a function binding to have the
same explicit arity?
For example, in
dropWhile0 :: Num a = [a] - [a]
dropWhile0 (0:xs) = dropWhile0 xs
dropWhile0 xs = xs
why
it be strengthened to do so?
Or is there a declarative trick (perhaps with dependent
classes) that will accomplish the goal?
Doug McIlroy
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
, functional inverse
and coercion from scalars. --A telling demonstration of the
power of lazy evaluation and of Haskell's attunement to math.
Doug McIlroy
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
? Parsimony is part of the allure of Haskell. What do
the new facilities enable one to discard from the Haskell 98 report?
Doug McIlroy
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
functions
whose domain includes the integers.
Doug McIlroy
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
38 matches
Mail list logo