tvl-depot/users/glittershark/achilles/ach/functions.ach
Griffin Smith e2a3aea451 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>
2021-03-20 20:20:20 +00:00

8 lines
134 B
Text

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