Ticket #5 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

Check that top level CAFs don't have side effects.

Reported by: benl Owned by: bens
Priority: blocker Milestone: 0.1.3
Component: Core Type Checker Version: 0.1.2
Keywords: Cc:

Description

There is no implied order of evaluation for top level CAFS. Indeed, Core.Sequence rearranges them so that they can be initialised in the correct order.

Check that CAFs don't have side effects, and throw a type error if they do.

Change History

Changed 5 years ago by erikd

What's a CAF?

Changed 5 years ago by bens

  • owner set to bens
  • status changed from new to assigned

Changed 5 years ago by bens

A !Read %r1 effect on the CAF is ok as long as a !Const %r1 witness is also in scope. Any other sort of side effect on the CAF's expression should be a type error.

Changed 5 years ago by bens

  • component changed from Source Type Inferencer to Core Type Checker

Changed 5 years ago by bens

There was no easy way to discover what !Const witnesses are in scope for a top-level binding, so I've added an envWitnessConst field to the Type.Util.Environment.Env record. This field gets updated when processing top-level PRegion values with the witnesses they contain.

Changed 5 years ago by bens

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.