simplify: no distinction between generic types and 'normal' types.
This commit is contained in:
parent
b4826605af
commit
a664ddac8a
27 changed files with 535 additions and 360 deletions
|
|
@ -1,16 +0,0 @@
|
|||
import { getDefaultTypeParser }from "../lib/parser/type_parser.js";
|
||||
import { prettyGenT, prettyT } from "../lib/util/pretty.js";
|
||||
|
||||
const parse = getDefaultTypeParser();
|
||||
|
||||
console.log(prettyT(parse("Int"))); // Int
|
||||
|
||||
console.log(prettyT(parse("Int * Bool"))); // (Int ⨯ Bool)
|
||||
|
||||
console.log(prettyT(parse("(((((((Int)))) => ((Bool)))))"))); // (Int => Bool)
|
||||
|
||||
console.log(prettyT(parse("#0((Int * #0) + Unit)"))) // #0((Int ⨯ #0) + Unit)
|
||||
|
||||
console.log(prettyGenT(parse("∀a: #0((a * #0) + Unit"))); // ∀a: #0((a ⨯ #0) + Unit)
|
||||
|
||||
console.log(prettyGenT(parse("∀a,b,c,d: (a*b) + (c*d)"))); // ∀a,b,c,d: ((a ⨯ b) + (c ⨯ d))
|
||||
Loading…
Add table
Add a link
Reference in a new issue