Skip to content

Complement of disjunction #3229

Answered by myitcv
hansbogert asked this question in Q&A
Jun 13, 2024 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @hansbogert - unfortunately you have just run into #2656.

Your intuition around using ! is solid: however in CUE that is actually spelt a different way.

What you tried to write was (play):

#foo: "1" | "2"

foo: !#foo & "3"

In CUE today that needs to be written as follows (play):

#foo: "1" | "2"

foo: "3"
_foo_ok: true & ((foo & #foo) == _|_)

In future (#943) this will be written:

#foo: "1" | "2"

foo: not(#foo) & "3"

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@hansbogert
Comment options

@myitcv
Comment options

@jpluscplusm
Comment options

@jpluscplusm
Comment options

Answer selected by hansbogert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants