I'm puzzled by the Haskell 98 report, as it doesn't seem to explain
how to desugar top-level pattern declarations, such as
(x,y) = e
In Section 4.4.3 (Function and Pattern Bindings) under Pattern
Bindings it essentially says
``A simple pattern binding has form p = e. The pattern p is matc
I've looked at the pattern matching semantics as defined in the
Haskell 98 report and there is few things I don't understand.
1) In Figure 3 (Semantics of Case Expressions, Part 1) clause c reads:
case v of { p | g1 -> e1 ; ...
| gn -> en where { decls }
_ -
Thanks John,
that's what I want to hear. Now the obvious follow up questions:
1) are anyone pursuing this line of work, and
2) is the software available?
Best wishes,
Tommy
John Hughes writes:
> The results of the GRIN experiment are written up in Urban Boquist's
> PhD thesis from l
Long time ago I read
The GRIN Project:
A Highly Optimising Back End for Lazy
Functional Languages
Urban Boquist
Thomas Johnson
I thought it sounded very promising, but nev
First let me thank the authors of the prototype Haskell parser (Simon
Marlow, Sven.Panne, and Noel Winstanley). It's a beautiful piece of
work.
While writing a desugarer for this, it occurred to me that somebody
might already have done the work and be willing to share it, if not
I'll make it ava
Isn't it possible to constrain instances?
I tried the following where the idea is to implement a simple monad,
but one which can only pass and return values that are showable.
newtype Show a => TracingEv a = TE (Int -> IO (Int,a))
unTE :: Show a => TracingEv a -> Int -> IO (Int,a)
unTE (T
"D. Tweed" wrote:
> Another reason for the popularity of Perl is that it's _popular_ &
> _ubiquitous_. Although I like Haskell and some other languages (e.g.,
> Mathematica, python, even C++) more than Perl, when I want to produce
> something that I hope other people in my lab will use/contribute
Chris Okasaki wrote:
> For the people that share this sentiment, can you please
> explain why ints that are too big should not similarly
> give an error? I can see both being ok, or both being
> errors. I just don't see why one should be ok and the
> other an error.
IMHO, both should be errors
S. Alexander Jacobson writes:
> The correct definitions would be:
>
> take -2 -- drops the last 2 elements from the list
> (takes everything except the last 2 elements)
> drop -2 -- grabs the last 2 elements from the list
> (drops everything except the last 2 eleme
I makes very little sense to compare GCC (C++) with GHC (Haskell) inspite of the
sneaky names.
1) While no C++ expert, I'd conjecture that compiling C++ is roughly five times
harder than C, due to C++ being a much larger language with _many many_ ugly
corners. The difficulty in compiling Haskell
Sven Panne wrote/a ecrit/skrev:
> William Lee Irwin III wrote:
> > Personally, I'd like to see some equivalent of the C system call
> > select(2) in GHC's socket library; [...]
>
> About a year ago this has been discussed, but the implementation has
> somehow vanished from GHC's sources. Strange.
Andy Gill wrote/a ecrit/skrev:
> I've got a stylistic question about Haskell.
> What's the best way to add optional arguments to a
> embedded DSL?
>
> For example, say I've got an library of HTML combinators.
> To represent
>
> This is a Header
>
> you might write
>
> h1 (strin
Peter Hancock wrote/a ecrit/skrev:
> I don't think its crazy. I thought that one could start with
> something simple, like a "before" list and an "after list".
Indeed. When I was getting into Haskell, I hacked the ansi.hs example
from the Hugs distribution to add editing. Parts of the function
I have another pet peeve: ease of use of tools.
The Haskell standard (intentionally?) leaves the interface to tools an
implementors question. Unfortunate, IMHO, every Haskell compiler I've
tried (GHC, NHC, HBC) have just had plain horrible interfaces.
Interpreters are inherently a different st
Jens' question gave my a perfect opportunity to open my a pet peeve of
mine: the ditatorship of `Main'.
In Haskell, the `main' function must reside in the `Main' module.
Add to this that the `Main' module must reside in a `Main' file and
you have an unfortunate consequence that you can only have
Dear Jens,
the problem is quite simple, but alas, the error message leaves much
to be disired: standalone Haskell program must contain a `main'
function in the `Main' module (thus the missing Main_main_closure
reference). Furthermore, this `main' function must have the type
signature `IO ()' (or
Alastair Reid wrote/a ecrit/skrev:
> > * import-chasing as part of the spec
>
> This is an environment feature not a language feature.
>
> What does it mean for GHC?
> Are you wanting to do away with Makefiles?
> Makefiles can do an awful lot more than import chasing can
> and GNU makefiles are
Thats a wonderful idea. With that it will be so much easier to write
robust code without bloating the code with error checks.
I've always been annoyed that I couldn't trap arbitrary errors, say to
close down the application cleanly.
Now, we only need extendible data types, and then we have an (
Hi there,
Just a my "deux centimes" to say that I'm happy with "application"
oriented discussion on the Haskell list. In fact, I'd be happy to see
more "applications" discussed, like CGI, Fran, Happy, ...
/Tommy
> Incidentally, the above def of `sep' doesn't match Hughes' in an important
> way. Consider:
Aiee, I knew this was gonna backfire. No, my `sep' does not (and
wasn't intended to) have exactly the same semantics as Hughes' `sep'.
Also, please understand that Phil never proposed such a `sep'.
nting Library
Hacked somewhat to pieces by Tommy Thorn, 26/3-1998
Major changes:
- <+> and $$ has nil (empty) as unit.
- bline is a blind line that disappears when flattened
> module WadlersPretty where
> infixr 5 :<|>
> infixr 6 :<>
> infixr 6 <>, <+>
&
S. Alexander Jacobson wrote/a ecrit/skrev:
> I just started playing with Haskell for CGI applications.
> I would like to try writing a more serious CGI app, but
> missing infrastructure makes it more difficult than conventional
> approaches.
On a general note, I too try employ Haskell for more an
Victor M. Gulias wrote/a ecrit/skrev:
> As a naive implementation of "all" and "any", one of my students coped with
> these definitions:
>
> any' p xs = [x | x <- xs, p x] /= []
> all' p xs = [x | x <- xs, p x] == xs
I used to be in favor of the monadic overloading of list operations,
but
Koen Claessen:
> This brings us to another issue. Doesn't the following definition look
> a bit awkward?
>
> R{ x = x }
Definitely wierd. The left and right-hand side denotes two different
things, which AFAIK is the only place where `=' behaves like this.
Wouldn't `<-' have been a better cho
John Hughes wrote on the Std Haskell board:
> `Punning' can be used in three places in Haskell. Suppose a record
> type is defined by
>
> data R = R{x :: Int}
>
> Then
> * R{x} constructs a record, and is equivalent to R{x=x}
> * r{x} updates the x field of record r, and is equivalent
David Wilczynski raises some very important and interesting questions
about Haskell from a "Real World" point of view. I would very much
like to see this kind of discussions, which I feel are essential if
Haskell is ever to move out of the laboratories. Please do *not* move
this discussion into
I can see the arguments for the pattern guard extension and the syntax
seem reasonable.
I also agree with Chris on the shortcomings of if-then-else. (I have
disliked it in any language where I've seen it, and it "feels"
un-Haskell-like to me.) On the other hand, the suggested
case
| ..
Please, could anybody explain me what the rationale behind the current
foldM in Monad? At least of the IO monad, it seems important to have
a left associative fold instead of the right associative foldM.
Adding to my confusion, it seems that earlier in time, there was
indeed two monad fold's inst
Quoting from "Introducing Haskell 1.3" (http://www.cs.yale.edu/
HTML/YALE/CS/haskell/haskell13.html):
"The final version of the Haskell 1.3 is expected to be complete in
January, 1996."
Does anyone know what happens?
Regards, Tommy
--
"When privacy is outlawed, only outlaws will have priv
29 matches
Mail list logo