Skip to content

arbitrary lvalues for named/constraint patterns #86

@lutzhamel

Description

@lutzhamel

Both of the following programs should work,

let q = [1,2,3].
let q@1:%integer = 0. -- constraint applied to list location

assert( q == [1,0,3] ).

and

structure Foo with
  data a.
  function __init__
     with x do
       let this@a:%integer = 1.  -- constraining the modification of the data field
     end.
end

let f = Foo(1).
assert( f is Foo(1) ).

That is we should be able to apply named/constraint patterns to any arbitrary lval structure.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions