quox/examples/fail.quox

11 lines
284 B
Text
Raw Normal View History

#[fail "but cases for"]
2023-09-22 07:48:11 -04:00
def missing-b : {a, b} → {a} =
λ x ⇒ case x return {a} of { 'a ⇒ 'a }
#[fail "duplicate arms"]
def repeat-enum-case : {a} → {a} =
λ x ⇒ case x return {a} of { 'a ⇒ 'a; 'a ⇒ 'a }
2023-09-22 07:48:11 -04:00
#[fail "duplicate tags"]
2023-09-22 07:48:11 -04:00
def repeat-enum-type : {a, a} = 'a