[Haskell-cafe] A Procedural-Functional Language (WIP)

Joachim Durchholz jo at durchholz.org
Sun Oct 23 12:14:58 UTC 2016

Am 23.10.2016 um 10:52 schrieb Rik Howard:
> Hi Richard
> thank you for your reply.  It is becoming apparent that my explanation
> can be made clearer.  I'm investigating a language that takes something
> like core Haskell (a Lambda Calculus augmented with let blocks) to
> satisfy its pure function requirements but that takes a different
> approach when it comes to IO by employing procedures.

Are you aware how "monadic IO" became the standard in Haskell?
It was one of three competing approaches, and AFAIK one turned out to be 
less useful, and the other simply wasn't ready in time (so it might 
still be interesting to investigate).

> For IO, a procedure returns only 'okay' or an error via the mechanism
> that a function would use for returning values; the non-deterministic
> values returned by the procedure are done so with variable parameters.

What's the advantage here?

Given the obvious strong disadvantage that it forces callers into an 
idiom that uses updatable data structures, the advantage better be 

> For example, to define a procedure to echo once from standard in to out:
>     echo = try (read string) (write string) error
> The value coming from standard-in is to be captured in the 'string'
> out-variable and so is available to be written to standard-out, the
> 'try' built-in being analogous to 'if'.

What is the analogy?
That stuff is evaluated only on a by-need basis? That's already there in 

> Rough (inconsistent) examples exist; its grammar and type system are in
> a slightly better state but not yet written up properly.  What I could
> quickly add as an appendix, I have but the notation needs to be made
> more standard for easier comparison.  I am working on another paper that
> will address the need for a more-concrete and standard presentation.  I
> hope that this goes some way to answering your questions; please say if
> it doesn't!

Right now I fail to see what's new&better in this.


More information about the Haskell-Cafe mailing list