mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-04 01:03:36 +03:00
639 B
639 B
scratch/main> builtins.merge
Tests for an unsound case of ability checking that was erroneously being accepted before. In certain cases, abilities were able to be added to rows in invariant positions.
structural type Runner g = Runner (forall a. '{g} a -> {} a)
pureRunner : Runner {}
pureRunner = Runner base.force
-- this compiles, but shouldn't the effect type parameter on Runner be invariant?
runner : Runner {IO}
runner = pureRunner
Application version:
structural type A g = A (forall a. '{g} a ->{} a)
anA : A {}
anA = A base.force
h : A {IO} -> ()
h _ = ()
> h anA