Ticket #50 (new defect)
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
Note: See
TracTickets for help on using
tickets.
