Detect whether the input pattern is irrefutable and will always match any given value.
Detect whether the input pattern is irrefutable and will always match any given value. An irrefutable pattern does not constrain the input value but merely puts variables on the value or on its parts.
Examples of irrefutable patterns are a(_)
, a(x)
, and a( z@(x,y,_) )
, where a(...)
is a molecule with a suitable value type.
Examples of refutable patterns are a(1)
, a(Some(x))
, a( (_, None) )
.
true
if the pattern is irrefutable, false
otherwise.
Represents compile-time information about the pattern matching for values carried by input molecules. Possibilities:
a(_)
is represented by WildcardInputa(x)
is represented by SimpleVarInput with valueSimpleVar(v = 'x, cond = None)
a(x) if x > 0
is represented by SimpleVarInput with valueSimpleVar(v = 'x, cond = Some({ case x : Int if x > 0 => }))
a(Some(1))
is represented by ConstInputPattern with valueSimpleConst(v = Some(1))
a( (x, Some((y,z)))) ) if x > y
is represented by OtherInputPattern with value