Commit Graph

576 Commits

Author SHA1 Message Date
rhiannon morris 03c197bd04 add local bindings to context
- without this, inside the body of `let x = e in …`, the typechecker
  would forget that `x = e`
- now bound variables can reduce, if they have a definition, so RedexTest
  needs to take the context too
2023-12-07 01:43:39 +01:00
rhiannon morris cdf1ec6deb fix a comment 2023-12-04 23:38:17 +01:00
rhiannon morris 08a8c694b1 a usage in hello.quox. why not 2023-12-04 23:36:30 +01:00
rhiannon morris 8b8129027d update syntax.ebnf 2023-12-04 23:35:54 +01:00
rhiannon morris e48f03a61c multiple semi-sep binds in a let 2023-12-04 23:27:59 +01:00
rhiannon morris 415a823dec comment out an unfinished definition lmao 2023-12-04 22:49:32 +01:00
rhiannon morris b1699ce022 add let to the core 2023-12-04 22:47:52 +01:00
rhiannon morris 68d8019f00 add `let` to frontend syntax 2023-12-04 18:56:45 +01:00
rhiannon morris 59e7a457a6 let case be the head of an application too 2023-12-04 18:28:57 +01:00
rhiannon morris 4291afd51b allow fst/snd to take multiple arguments
also succ though that won't be well typed
2023-12-04 18:21:28 +01:00
rhiannon morris e2ad18ff1f hello.quox tweaks 2023-11-16 18:33:03 +01:00
rhiannon morris 310822ffa5 remove old replaced stuff 2023-11-16 18:32:38 +01:00
rhiannon morris d115672d49 example stuff 2023-11-10 15:07:19 +01:00
rhiannon morris cc78ccd940 fix some parenthesisation 2023-11-06 22:11:11 +01:00
rhiannon morris 50984aa1aa refactor #[attribute] stuff 2023-11-05 20:49:02 +01:00
rhiannon morris 246d80eea2 add io.quox 2023-11-05 15:48:01 +01:00
rhiannon morris c48b7be559 add html output highlighting 2023-11-05 15:47:52 +01:00
rhiannon morris 040a1862c3 refactor scheme prelude 2023-11-05 15:45:33 +01:00
rhiannon morris bf8cced888 swap some delim/syntax highlighting around 2023-11-05 15:45:07 +01:00
rhiannon morris 04af7ae942 highlight the @ in dim apps as a delim 2023-11-05 15:44:44 +01:00
rhiannon morris d9cdf1306d fix IsReserved
IsReserved should be true for e.g. "λ" but not "fun", since only the
first can show up in the lexer output
2023-11-05 15:43:20 +01:00
rhiannon morris 6c8ebfb804 fix some comments 2023-11-05 15:41:21 +01:00
rhiannon morris da3cd404f3 handle when getTermCols returns 0 2023-11-05 15:40:19 +01:00
rhiannon morris f58fa5218f subscript numbers are no longer special 2023-11-05 15:39:52 +01:00
rhiannon morris 580fbc8fd8 add misc.refl, misc.sing, nat.minus 2023-11-05 15:38:38 +01:00
rhiannon morris e211887a34 string/nat lit stuff 2023-11-05 15:38:13 +01:00
rhiannon morris 3b9a339e5e rename "Tag" highlight to "Constant" 2023-11-05 14:30:40 +01:00
rhiannon morris 2f8a2d2cd2 fix typo in error 2023-11-04 17:45:55 +01:00
rhiannon morris b6c435049d escape strings in scheme
the characters \, ", and everything below space or above ~ are replaced
with a \xdd;-style escape inside string literals
2023-11-03 20:17:35 +01:00
rhiannon morris 90cdcfe4da add \n and \t escapes to the lexer 2023-11-03 20:07:59 +01:00
rhiannon morris d4639a35c6 add hello.quox to examples 2023-11-03 18:05:54 +01:00
rhiannon morris b7e1f37b5b add some #[compile-scheme] 2023-11-03 18:05:54 +01:00
rhiannon morris 5dfefe443c more tidying of outputs 2023-11-03 18:05:54 +01:00
rhiannon morris 0514fff481 represent ℕ constants directly
instead of as huge `succ (succ (succ ⋯))` terms
2023-11-03 18:05:54 +01:00
rhiannon morris fa7f82ae5a rename Nat to NAT in AST 2023-11-03 18:05:54 +01:00
rhiannon morris e0ed37720f always vsep scheme lets, otherwise they are unreadable 2023-11-03 18:05:54 +01:00
rhiannon morris 4cc50c6bcd highlight errors even if real output is to a file
(unless told not to)
2023-11-03 18:05:54 +01:00
rhiannon morris 050346e344 add postulate, #[compile-scheme], #[main] 2023-11-03 18:05:54 +01:00
rhiannon morris cc0bade747 scheme output 2023-11-03 18:05:54 +01:00
rhiannon morris cd08a0fd98 more erasure 2023-11-03 18:05:54 +01:00
rhiannon morris 1f14e4ab9e automate more option stuff
if the elaborator writes it then it will be kept up to date
automatically
2023-11-03 18:05:54 +01:00
rhiannon morris 314e7f036d make nat elimination with erased IH non-recursive at runtime 2023-11-03 18:05:54 +01:00
rhiannon morris 6ab9637ab5 don't keep erased applications actually 2023-11-03 18:05:54 +01:00
rhiannon morris b6fd1e921e pretty printing improvements 2023-11-03 18:05:54 +01:00
rhiannon morris f4a45b6c52 keep the Except effect at the start of the list 2023-11-03 18:05:54 +01:00
rhiannon morris 8e0d66cab8 more erasure 2023-11-03 18:05:54 +01:00
rhiannon morris ea74c148b7 some of this EffExtra stuff doesn't work 2023-11-03 18:05:54 +01:00
rhiannon morris 83ab871d61 new main 2023-11-03 18:05:54 +01:00
rhiannon morris 421eb220fd erasure refactor 2023-11-03 18:05:54 +01:00
rhiannon morris fbb862c88b %default total 2023-11-03 18:05:54 +01:00