shithub: MicroHs

Download patch

ref: ddd6ef6148a2ea3902b7b80ed89d80cea89acfcf
parent: eea5c5c8e74312b821a51bbd49c3f18edd05e2f5
author: Lennart Augustsson <lennart@augustsson.net>
date: Mon Dec 25 06:55:11 EST 2023

Update with some record info.

--- a/README.md
+++ b/README.md
@@ -222,6 +222,12 @@
 ### FFI
 MicroHs supports calling C functions, but all such functions must be in a table in the runtime system.
 
+### Records
+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`.
+
 ### Features
 The runtime system can serialize and deserialize any expression
 and keep its graph structure (sharing and cycles).
--