Curry's Constraint Syntax

From: Sven Panne <>
Date: Mon, 09 Feb 1998 10:09:35 +0100

If Curry wants to stay compatible with Haskell, there is a problem
with Curry's constraint syntax and Haskell's labeled updates:

   data T1 = C1 Constraint
   data T2 = C2 { x :: Int }

   foo y = C1 { x = y } -- this is a constraint
   bar y = C2 { x = y } -- this is a labeled update

IMHO, it's rather inelegant if parsing depends on type information:

   * It makes an implementation more un-modular.

   * It's hard to read for humans. Imagine T1 and T2 being declared in
     modules different from the one where foo and bar are defined.
     Without having the modules at hand or doing some type inference
     for herself, the user can't decide which way to parse foo/bar.

To solve this problem, one has to use a different kind of parentheses.
Propostion: #{ ... } # is an ASCsymbol and therefore a symbol in
Haskell, but at the moment I don't think that # and { can follow each
other in a legal Haskell program without intervening space.

Hmmm, this is mail ranked between "1" and "2" following
Some Comments anyway?

Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67            D-80538 Muenchen
Received on Mo Feb 09 1998 - 10:07:00 CET

This archive was generated by hypermail 2.3.0 : So Sep 20 2020 - 07:15:02 CEST