Skip to content

Make Ulf Norell's define example work in all backends #363

Closed
@andreasabel

Description

@andreasabel

The original example for define by Ulf Norell is currently only accepted by the Haskell backends.

define if e s = If e s (Block []) ;
define for i c s b = Block [i, While c (Block [b, s])] ;

  • Agda: wrong list constructors
  • C: list constructors rendered wrongly as make_(:) and make_[].
  • CPP: missing sanitization of if and for (keyword clash, regression), wrong list constructors.
  • Ocaml: missing sanitization (regression), list cons (:) (a,b) instead of (a :: b).
  • Java: missing sanitization (regression), complaint that if clashes with If. Works in 2.9.1 with --force.

Missing sanitization is a regression wrt. 2.9.1, introduced by #287.
The list constructors probably never worked.

Metadata

Metadata

Assignees

Labels

AgdaIssues of the Agda backendCC++JavaOCamlbugdefineIssue with define pragmalistsConcerning list categories and separator/terminator/delimiter pragmasregression in master

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions