Gabriella439 / Gabriella439/Haskell-Morte-Library
Cleaner syntax?
- Dominant language
- Haskell
- Stars
- 384
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
I've written an alternative parser for Morte with less symbols using `binder:type body` for λ, `binder-type body` for ∀. If you ignore λ's, ∀'s and arrows, and allow empty binders, you get something quite similar. For example, `Zero`, which currently is `λ(a : *) → λ(succ : a → a → a) → λ(zero : a) → zero`, could be written as `λ a : * -> λ succ : (-a -a a) -> λ zero : a -> zero`. But you can also drop those symbols and add line breaks:
a: *
succ: -a -a a
zero: a
zero
Another example, `List.map`:
u: * # from type
v: * # to type
f: -u v # function to map
l: (List u) # mapped list
a: *
cons: -v -a a
nil: a
(l a (h:u (cons (f h))) nil)
IMO that looks cleaner.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.