shithub: MicroHs

Download patch

ref: 18f680c9a456456edeaaf9b5cb8022308269057d
parent: 265b6bf6c3e93eb0e51544d8cfae035c2203f027
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Sun Dec 10 15:25:54 EST 2023

Update

--- a/README.md
+++ b/README.md
@@ -102,7 +102,10 @@
 The function type, `->`, is (of course) also built in.
 
 All other types are defined with the language.  They are converted to lambda terms using
-the Scott encoding.   The runtime system knows how lists and booleans are encoded.
+an encoding.
+For types with few constructors (< 5) it uses Scott encoding, otherwise it is a pair with
+an integer tag and a tuple (Scott encoded) with all arguments.
+The runtime system knows how lists and booleans are encoded.
 
 
 ## Compiler
@@ -140,10 +143,15 @@
 
 ### Compiler modules
 
+* `Abstract`, combinator bracket abstraction and optimization.
 * `Compile`, top level compiler.  Maintains a cache of already compiled modules.
+* `CompileCache`, cache for compiled modules.
 * `Desugar`, desugar full expressions to simple expressions.
+* `EncodeData`, data type encoding.
 * `Exp`, simple expression type, combinator abstraction and optimization.
+* `ExpPrint`, serialize `Exp` for the runtime system.
 * `Expr`, parsed expression type.
+* `Fixity`, resolve operator fixities.
 * `Graph`, strongly connected component algorithm.
 * `Ident`, identifiers and related types.
 * `IdentMap`, map from identifiers to something.
--- a/TODO
+++ b/TODO
@@ -3,7 +3,7 @@
 * make the runtime system catch ^C and stop execution
 * use pointer stack during GC instead of recursion.
   - Somewhat improved now
-* whith dictionaries we need two optimizations to get rid of them
+* with dictionaries we need two optimizations to get rid of them
   -   case d of (d1,d2) -> ... (d1,d2) ...
     transforms to
       case d of (d1,d2) -> ... d ...
--