Add some more hardcoded builtin types

This commit is contained in:
Richard Feldman 2020-02-12 21:24:38 -05:00
parent 4aa92ea8a1
commit 403d9353f1
2 changed files with 20 additions and 0 deletions

View File

@ -547,6 +547,8 @@ define_builtins! {
1 FLOAT_FLOATINGPOINT: "FloatingPoint" // Float : Num FloatingPoint
2 FLOAT_AT_FLOATINTPOINT: "@FloatingPoint" // the Float.@FloatingPoint private tag
3 FLOAT_DIV: "div"
4 FLOAT_HIGHEST: "highest"
5 FLOAT_LOWEST: "lowest"
}
4 BOOL: "Bool" => {
0 BOOL_BOOL: "Bool" // the Bool.Bool type alias

View File

@ -368,6 +368,24 @@ impl SolvedType {
),
);
// highest : Float
types.insert(
Symbol::FLOAT_HIGHEST,
(
SolvedType::Apply(Symbol::FLOAT_FLOAT, Vec::new()),
Region::zero(),
),
);
// lowest : Float
types.insert(
Symbol::FLOAT_LOWEST,
(
SolvedType::Apply(Symbol::FLOAT_FLOAT, Vec::new()),
Region::zero(),
),
);
// List module
// List elem : [ @List elem ]