Ticket #83 (new enhancement)

Opened 6 years ago

Last modified 5 years ago

Look in data definition when checking dangerous vars

Reported by: benl Owned by:
Priority: blocker Milestone: 0.1.5
Component: Source Type Inferencer Version:
Keywords: Cc:

Description

data TwoThings r1 r2 r3 a 
      = ThingOne (Int r2)
      | ThingTwo (Maybe r3 b)

wrt the mutability / backtracking problem.

The rule should be at generalisation time, If a region var makes other variables dangerous, then hold it constant unless it already has a mutability constraint. If the user wants it to be mutable, then require them to supply a type signature. Otherwise leave it constant.

For example, if we are to generalise:

 foo :: TwoThings r1 r2 r3

then make r1 and r3 constant, but leave r2 unconstrained.

Change History

Changed 5 years ago by benl

  • summary changed from Look in data definition when checking dangrous vars to Look in data definition when checking dangerous vars
Note: See TracTickets for help on using tickets.