Opened 10 years ago

Closed 9 years ago

Last modified 7 years ago

#5 closed defect (fixed)

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

Reported by: benl Owned by: bens
Priority: blocker Milestone:
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 (8)

comment:1 Changed 10 years ago by erikd

What's a CAF?

comment:3 Changed 9 years ago by bens

  • Owner set to bens
  • Status changed from new to assigned

comment:4 Changed 9 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.

comment:5 Changed 9 years ago by bens

  • Component changed from Source Type Inferencer to Core Type Checker

comment:6 Changed 9 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.

comment:7 Changed 9 years ago by bens

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:8 Changed 7 years ago by benl

  • Milestone 0.1.3 deleted

Milestone 0.1.3 deleted

Note: See TracTickets for help on using tickets.