Syntax for output-only arrows?

Lauri Alanko la at iki.fi
Mon Jun 7 20:47:04 EDT 2004


When I use arrows, I find that many of my primitives are of type (a () b)
(for some arrow type a): they produce a value but don't take any input.
E.g. deterministic parsers are like this.

The syntactic sugar for arrows is lovely, but I find it a bit tedious
writing "foo -< ()" all the time. The syntax allows the output of arrows
to be ignored, why not input too?

Would it cause unreasonable parsing problems simply to allow a simple
expression of an arrow type to be a legal command inside a proc
expression, with an implicit -< () input? Or are there other reasons
against it?

I for one find it extremely convenient that I can write "purely
imperative" code with a simple syntax like do { foo; bar; baz }. I'd
like similar simplicity when dealing with arrows, too.


Lauri Alanko
la at iki.fi


More information about the Glasgow-haskell-users mailing list