erg/examples/quantified.er
Shunsuke Shibayama 7906eff50d Fix parse.rs
2022-10-01 14:39:30 +09:00

12 lines
267 B
Python

id|T: Type|(x: T): T = x
assert id(1) == 1
assert id(True) == True
assert id("hello") == "hello"
const|T: Type, C: Type|(c: C): C = (_: T,) -> c
assert const(1)(2) == 1
assert const(True)(2) == True
print_to_str!|S <: Show|(s: S): Str =
print! s
s.to_str()