MicroHaskell by Lennart Augustsson (YouTube)

New Lennart video just dropped

15 Likes

Thank you, @augustss (and thank you, Professor Turner).

3 Likes

Some context for a few of the design choices in MicroHaskell can be found here:

The interactive Lazy ML system (1993)

1 Like

Wow, a lot of development is going on. While records weren’t supported when I posted this originally, they are there now. There are even nested record dot updates. Quote from a section in the README:

MicroHs implements the record dot extensions. So accessing a field a in record r is written r.a.
Updating a field has the usual Haskell syntax r{ a = e }, but the type is overloaded so this can update the a field in any record. The typeclass HasField captures this. HasField "name" rec ty expresses that the record type rec has a field name with type ty. Record updates can also update nested fields, e.g., r{ a.b.c = e }. Note that this will not easily work in GHC, since GHC does not fully implement OverloadedRecordUpdate. When GHC decides how to do it, MicroHs will follow suit.

This is interesting:

So that feature is already working in MicroHs.

Considering just how long this chapter of the epic Haskell-records saga has been going for already e.g:

https://gitlab.haskell.org/ghc/ghc/-/wikis/records/overloaded-record-fields?version_id=6fe8e40b2a17bbcaa34c7a047b6503a2512589be

…it’ll probably be faster to reuse in GHC what MicroHs does now.

(If only Unicode existed in 1987…)