[Haskell-cafe] Re: Proving my point

Achim Schneider barsoap at web.de
Fri May 16 19:53:02 EDT 2008


Philippa Cowderoy <flippa at flippac.org> wrote:

> On Sat, 17 May 2008, Achim Schneider wrote:
> 
> > Definitely the easier and clearer
> > thing to do: I can have an end of line token that carries the
> > number of trailing spaces, so I got perfect indent information
> > without any pain involved, at all, and don't have to make parsers
> > fail based on state.
> > 
> 
> Definitely! Are you doing some form of layout? 

Yes, 

/pair x y m: m x y 
/fst z: z 
    \p q: p
/snd z: z \p q:
    q
/numbers: pair one two
/run: pair (fst numbers) (snd numbers)
run 

is supposed to work (/ indicates a let). I'm trying to purge scheme out
of my mind by implementing something that looks quite like it, and then
change it. The rule is simple: An indented line continues the previous,
and a non-indented closes every opened paren except one from the
previous line, eof closing all that are left. I still have to think
about recursive lets, but I guess I will go unlambda and just include a
Y combinator, keeping the syntax simple.

OTOH, I'm thinking about experimenting with a thing remotely resembling
varargs and streams, being able to generate and consume possibly
infinite argument streams, somewhat equalling tuples, lists and
application. Just playing around, you know.

-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 



More information about the Haskell-Cafe mailing list