shithub: MicroHs

Download patch

ref: 5b60ee45befe166285c4d1237d677ae96640edfb
parent: e494ac5786800ae9d7e71f0677bd008a8bca8c83
author: Lennart Augustsson <lennart@augustsson.net>
date: Fri Sep 20 07:20:20 EDT 2024

Commented out code.

--- a/src/MicroHs/EncodeData.hs
+++ b/src/MicroHs/EncodeData.hs
@@ -137,6 +137,10 @@
     [] -> dflt
     [(i, xs, e)] | hi - lo == 1 -> match tup xs e
                  | otherwise    -> encIf (eqInt n i) (match tup xs e) dflt
+{- This only slows things down slightly
+    [(i, xs, e), (_, xs', e')]
+                 | hi - lo == 2 -> encIf (eqInt n i) (match tup xs e) (match tup xs' e')
+-}
     _ ->
       let !(pesl, pesh@((i, _, _):_)) = splitAt (length pes `quot` 2) pes
       in  encIf (ltInt n i) (caseTree n tup lo i pesl dflt) (caseTree n tup i hi pesh dflt)
--