tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

Translate case expressions to SystemF #142

Open florentc opened 2 years ago

florentc commented 2 years ago

135 brought an improved surface language including case expressions (to avoid having to manually call match_Something functions). Support for these expressions is only syntaxic.

E.g.

  case @Bool @(Maybe x) mx of {
    Nothing -> False ;
    Just _ -> True
  }

Translation of these expressions to system F remains to be implemented in the Language.Pirouette.QuasiQuoter.ToTerm module.

Tests and examples making use of explicit calls to match_Something functions then have to be updated accordingly to use case expressions. Especially in Language.Pirouette.Example.IsUnity and the many test modules under tests/Pirouette.