New Lennart video just dropped
Thank you, @augustss (and thank you, Professor Turner).
Some context for a few of the design choices in MicroHaskell can be found here:
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 recordr
is writtenr.a
.
Updating a field has the usual Haskell syntaxr{ a = e }
, but the type is overloaded so this can update thea
field in any record. The typeclassHasField
captures this.HasField "name" rec ty
expresses that the record typerec
has a fieldname
with typety
. 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 implementOverloadedRecordUpdate
. 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…)