Open chadaustin opened 8 years ago
I think this is safe.
@andyfriesen Any gut sense as to why the type checker fails this program?
Since the array is mutable, the type variable isn't being universally quantified. It's being made weakly polymorphic. This is the machinery that prevents us from making a forall a. IORef (Maybe a)
.
We need to think for a bit to really understand what the rules for weak polymorphism are if we want this case to work.
This program fails to typecheck:
@andyfriesen any ideas?