Ticket #50 (new defect)

Opened 5 years ago

Last modified 4 years ago

Emit error for dangerous vars at top level.

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

Description

Exporting mutable data containing monomorphic type vars is not sound because two different modules might update it at different types.

At the moment we seem to silently default such types to Unit.

thing 	:: forall a. Ref %r1 (a -> a)
	:- Mutable %r1

thing	= Ref id

In the .di file we get

foreign import thing
        :: Base.Ref %r1 (Base.Unit -> Base.Unit)
        :- Base.Mutable %r1
        ,  Base.Direct %r1
        :$ Base.Data;

Change History

Changed 5 years ago by benl

Test is T50-TopLevelMonoMutable

Changed 5 years ago by benl

  • version set to 0.1.2

Changed 5 years ago by benl

  • summary changed from Emit error for dangrous vars at top level. to Emit error for dangerous vars at top level.

Changed 4 years ago by benl

  • priority changed from blocker to normal
Note: See TracTickets for help on using tickets.