mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-26 11:07:48 +03:00
13 lines
332 B
Plaintext
13 lines
332 B
Plaintext
structural ability Abort where
|
|
Abort : forall a . () -> {Abort} a
|
|
|
|
foo n = if n >= 1000 then n else !Abort.Abort
|
|
|
|
bar : (Nat -> {} Nat) -> Nat -> Nat
|
|
bar f i = f i
|
|
|
|
bar foo 3
|
|
|
|
-- as of 3935b366383fe8184f96cfe714c31ca04234cf27, this typechecks (unexpected)
|
|
-- and then bombs in the runtime because the Abort ability isn't handled.
|