Skip to content
Snippets Groups Projects

Add uncurry of recursive functions

Merged E. Rivas requested to merge er433/add/uncurry-recursion into dev

This MR introduces the old uncurrification (written by @tomjack?) for ast_typed, adapted to ast_aggregated and applied only on E_recursive.

It allows the following:

let rec foo (n : int) (x : string) : string = if n = 0 then x else foo (n - 1) (String.concat x "toto")

(the actual check of depth doesn't seem to be really needed, as later recursion only allows tail-position only? But anyway, I think it's better to keep the checks)

  • has a changelog entry
Edited by E. Rivas

Merge request reports

Merge train pipeline #459199609 passed with warnings

Merge train pipeline passed with warnings for 19bfdeeb

Test coverage 46.51% (0.10%) from 1 job

Merged by E. RivasE. Rivas 3 years ago (Jan 29, 2022 5:17pm UTC)

Loading

Pipeline #460306950 failed

Pipeline failed for acbf5bd5 on dev

Test coverage 46.51% (0.10%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading