1use std::{borrow::Cow, sync::Arc};
2
3use super::Term;
4
5pub type Str = Cow<'static, str>;
6
7pub enum Value {
8 Point,
9 Prim(Primitive),
10 Rec(Record),
11 Extern(Calculate),
12 Append { left: Arc<Value>, right: Arc<Value> },
13 Box { context: Arc<Value>, proceed: Term },
14}
15
16pub struct Calculate;
17
18pub enum Primitive {
19 Long(u64),
20 Text(String),
21}
22
23pub struct Record {
24 pub values: Vec<Value>,
25 pub names: Arc<Vec<Str>>,
26}
27
28
29
30pub enum Type {
31 Universe,
32 Bool,
33 Long,
34 Text,
35 Function { dom: Arc<Type>, codom: Arc<Type> },
36 And { left: Arc<Type>, right: Arc<Type> },
37}