feat(gs/achilles): Prefix top-level ascriptions with ty

This makes parsing less ambiguous, which is nice (we can continue to not
actually care about indentation!) and aligns nicely with `fn` for the
declaration itself.

Change-Id: Id48f064e2a1e01c5105297be355d0991b312b76d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2615
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
Griffin Smith 2021-03-20 15:08:55 -04:00 committed by glittershark
parent 2c838ab845
commit e2a3aea451
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
ty id : fn a -> a
fn id x = x
ty plus : fn int -> int
fn plus (x: int) (y: int) = x + y
ty main : fn -> int
fn main = plus (id 2) 7