dex-lang icon indicating copy to clipboard operation
dex-lang copied to clipboard

Compiler bug when inferring "Fields" value in a data constructor

Open RobertStanforth opened this issue 3 years ago • 0 comments

This code:

data Tracer =
  AsTracer paramFields:Fields init:(Key -> ({&...paramFields}))

def wrap (tracer : Tracer) : Tracer =
  (AsTracer ps tracer_init) = tracer
  AsTracer _ (\key. pushAt #p 0. (tracer_init key))

produces:

Compiler bug!
Please report this at github.com/google-research/dex-lang/issues

Not a valid labeled row substitution
CallStack (from HasCallStack):
  error, called at src/lib/Syntax.hs:1253:8 in dex-0.1.0.0-1c1KJ1laoEjKvvidxV1QZ9:Syntax

RobertStanforth avatar Jun 22 '21 14:06 RobertStanforth