vekatze / neut

A functional programming language with static memory management
https://vekatze.github.io/neut/
MIT License
840 stars 11 forks source link

fix: don't suppress the names of resource types when printing terms #211

Closed vekatze closed 1 month ago

vekatze commented 1 month ago

This PR replaces <resource> with the name of a resource type when printing terms.


Consider the following program:

resource some-type {..}

define make(): some-type {..}

define main(): unit {
  let x: binary = make() in
  Unit
}

The output of neut check before the fix is:

Expected:
  <resource>
Found:
  some-type

The output of neut check after the fix is:

Expected:
  binary
Found:
  some-type