sva-formula 0.7.17

Laws in t and f: the normal form, the rule table, and the observations a law answers without sampling
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Concern: declares Origin, the opaque token a refusal names a subterm by | Non-concern: resolving one to file:line:col (sva-engine) | IO: none

/// Excluded from every hash and every sort key: two spellings written in different files
/// are one value.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct Origin(u32);

impl Origin {
    pub const UNKNOWN: Origin = Origin(u32::MAX);

    pub fn new(token: u32) -> Origin {
        Origin(token)
    }

    pub fn token(self) -> u32 {
        self.0
    }
}