about summary refs log tree commit diff
path: root/users/glittershark/achilles/ach
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-03-20T19·08-0400
committerglittershark <grfn@gws.fyi>2021-03-20T20·20+0000
commite2a3aea4516425ddb2022a85a3d492c605f910d4 (patch)
tree3a87a2fd2a35735034feea314b0e1ba8fbed9d9c /users/glittershark/achilles/ach
parent2c838ab845bc54c5ef6cb0561332c84f34249368 (diff)
feat(gs/achilles): Prefix top-level ascriptions with `ty` r/2294
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>
Diffstat (limited to 'users/glittershark/achilles/ach')
-rw-r--r--users/glittershark/achilles/ach/functions.ach5
1 files changed, 5 insertions, 0 deletions
diff --git a/users/glittershark/achilles/ach/functions.ach b/users/glittershark/achilles/ach/functions.ach
index 0d2f07eff574..dc6e7a1f3e34 100644
--- a/users/glittershark/achilles/ach/functions.ach
+++ b/users/glittershark/achilles/ach/functions.ach
@@ -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