ref: 3b3c5368c74d4d22a1073ad8cf44e574f8166a6a
parent: b36e72a80a8d1a90f84da10a09055d9a450d3410
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Fri Nov 3 15:27:45 EDT 2023
Remove junk.
--- a/comb/mhs.comb
+++ b/comb/mhs.comb
@@ -1,3 +1,3 @@
v4.0
-1293
-((A :0 ((B (B (B (B C)))) ((B (B (B C))) ((B (B C)) P)))) ((A :1 (T (BK (BK (BK K))))) ((A :2 (T (K (BK (BK K))))) ((A :3 (T (K (K (BK K))))) ((A :4 (T (K (K (K K))))) ((A :5 (T (K (K (K A))))) ((A :6 (K (noDefault "Alternative.empty"))) ((A :7 (K (noDefault "Alternative.<|>"))) ((A :8 ((S (((S' S') ((B _14) _1)) (((C' _129) ((B _12) _1)) _303))) _5)) ((A :9 ((S (((S' C') _3) _4)) (((C' _13) _1) _302))) ((A :10 (((S' P) _2) (((C' _13) _1) _1051))) ((A :11 ((B (B (B (B C)))) ((B (B (B C))) ((B (B C)) P)))) ((A :12 (T (BK (BK (BK K))))) ((A :13 (T (K (BK (BK K))))) ((A :14 (T (K (K (BK K))))) ((A :15 (T (K (K (K K))))) ((A :16 (T (K (K (K A))))) ((A :17 (K (noDefault "Applicative.pure"))) ((A :18 (K (noDefault "Applicative.<*>"))) ((A :19 (((S' B) _14) (((C' _126) _12) _118))) ((A :20 (((S' B) _14) (((C' _129) _12) _119))) ((A :21 _1124) ((A :22 ((B _1167) _21)) ((A :23 (((S' _1167) _21) I)) ((A :24 _1094) ((A :25 (_24 "undefined")) ((A :26 I) ((A :27 (((C' B) _1123) ((C _117) _26))) ((A :28 (((C' _27) ((_125 _1137) _98)) ((_117 (_34 _1139)) _97))) ((A :29 ((B ((S _1167) (_34 _1139))) _24)) ((A :30 ((B (B (B C))) ((B (B C)) P))) ((A :31 (T (BK (BK K)))) ((A :32 (T (K (BK K)))) ((A :33 (T (K (K K)))) ((A :34 (T (K (K A)))) ((A :35 (K (noDefault "Monad.>>="))) ((A :36 (((C' (C' B)) _32) K)) ((A :37 ((B _13) _31)) ((A :38 (((S' (C' B)) _32) (((S' (C' B)) _32) (B' _34)))) ((A :39 P) ((A :40 (T K)) ((A :41 (T A)) ((A :42 (K _24)) ((A :43 ((B (B Y)) (((S' B) (B' ((B P) ((C _34) _302)))) (((S' (C' B)) ((B (B (C' B))) (B' _32))) (((S' (C' (C' B))) (B' _32)) (((C' B) (B' _34)) _303)))))) ((A :44 ((B (B Y)) (((S' B) (B' ((B P) ((C _34) _1051)))) (((C' (C' B)) ((B (B (C' B))) (B' _32))) BK)))) ((A :45 ((B T) ((C _34) _1051))) ((A :46 ((C _43) _118)) ((A :47 ((B _120) _32)) ((A :48 ((B C) ((B C') _32))) ((A :49 ((B _120) _48)) ((A :50 T) ((A :51 ((_124 ((B (B (_115 _50))) ((B ((C' C) _54)) (B P)))) (_128 _51))) ((A :52 (((((_11 _51) ((B (_115 _50)) P)) (_38 _53)) ((B (B (_115 _50))) (((C' B) ((B C) _54)) (BK _54)))) (_20 _52))) ((A :53 ((((_30 _52) ((B (B (_115 _50))) (((C' B) ((B C) _54)) (B _54)))) (_15 _52)) (_13 _52))) ((A :54 (T I)) ((A :55 ((B (_117 _358)) _54)) ((A :56 ((B (_115 _50)) (B (P _1051)))) ((A :57 ((B (_115 _50)) (BK (P _1051)))) ((A :58 ((_115 _50) ((S P) I))) ((A :59 ((B (_115 _50)) ((C (S' P)) I))) ((A :60 ((_102 ((C ((C S') _65)) I)) (_106 _60))) ((A :61 (((_1265 (K ((P (_1274 "False")) (_1274 "True")))) (_1270 _61)) (_1271 _61))) ((A :62 ((_69 _67) _68)) ((A :63 (R _68)) ((A :64 (T _67)) ((A :65 ((P _68) _67)) ((A :66 _68) ((A :67 K) ((A :68 A) ((A :69 P) ((A :70 (T K)) ((A :71 (T A)) ((A :72 (K (noDefault "Bounded.minBound"))) ((A :73 (K (noDefault "Bounded.maxBound"))) ((A :74 ((_102 _1088) _1089)) ((A :75 ((((((((_335 _74) (_344 _75)) _1090) _1091) _1092) _1093) (_349 _75)) (_350 _75))) ((A :76 ((_102 _1098) (_106 _76))) ((A :77 ((((((((_335 _76) _1097) (((C' (C' (_103 _351))) _1097) _355)) (((C' (C' (_104 _351))) _1097) _357)) (((C' (C' (_103 _351))) _1097) _357)) (((C' (C' (_104 _351))) _1097) _357)) (_349 _77)) (_350 _77))) ((A :78 ((_69 (_79 #0)) (_79 #127))) ((A :79 _1099) ((A :80 _1100) ((A :81 (((S' _64) (_1091 #97)) ((C _1091) #122))) ((A :82 (((S' _64) (_1091 #65)) ((C _1091) #90))) ((A :83 (((S' _63) _81) _82)) ((A :84 (((S' _64) (_1091 #48)) ((C _1091) #57))) ((A :85 (((S' _63) _83) _84)) ((A :86 (((S' _64) (_1091 #32)) ((C _1091) #126))) ((A :87 (((S' _63) ((C (_103 _74)) #32)) (((S' _63) ((C (_103 _74)) #9)) ((C (_103 _74)) #10)))) ((A :88 ((S ((S (((S' _64) (_1091 #65)) ((C _1091) #90))) (_68 (((noMatch "lib/Data/Char.hs") #86) #9)))) ((B _79) (((C' (_320 _130)) (((C' (_321 _130)) _80) (_80 #65))) (_80 #97))))) ((A :89 ((S ((S (((S' _64) (_1091 #97)) ((C _1091) #97))) (_68 (((noMatch "lib/Data/Char.hs") #90) #9)))) ((B _79) (((C' (_320 _130)) (((C' (_321 _130)) _80) (_80 #97))) (_80 #65))))) ((A :90 (((_1265 (K ((C ((S ((C ==) #39)) ((B (_117 (_1273 #39))) (((C' _117) ((B _1274) _91)) (_1273 #39))))) (_1274 "'\92&''")))) (_1270 _90)) ((B (_117 (_1273 #34))) (Y ((B (P (_1273 #34))) (((S' C) ((B
\ No newline at end of file
+1291
+((A :0 ((B (B (B (B C)))) ((B (B (B C))) ((B (B C)) P)))) ((A :1 (T (BK (BK (BK K))))) ((A :2 (T (K (BK (BK K))))) ((A :3 (T (K (K (BK K))))) ((A :4 (T (K (K (K K))))) ((A :5 (T (K (K (K A))))) ((A :6 (K (noDefault "Alternative.empty"))) ((A :7 (K (noDefault "Alternative.<|>"))) ((A :8 ((S (((S' S') ((B _14) _1)) (((C' _129) ((B _12) _1)) _302))) _5)) ((A :9 ((S (((S' C') _3) _4)) (((C' _13) _1) _301))) ((A :10 (((S' P) _2) (((C' _13) _1) _1049))) ((A :11 ((B (B (B (B C)))) ((B (B (B C))) ((B (B C)) P)))) ((A :12 (T (BK (BK (BK K))))) ((A :13 (T (K (BK (BK K))))) ((A :14 (T (K (K (BK K))))) ((A :15 (T (K (K (K K))))) ((A :16 (T (K (K (K A))))) ((A :17 (K (noDefault "Applicative.pure"))) ((A :18 (K (noDefault "Applicative.<*>"))) ((A :19 (((S' B) _14) (((C' _126) _12) _118))) ((A :20 (((S' B) _14) (((C' _129) _12) _119))) ((A :21 _1122) ((A :22 ((B _1165) _21)) ((A :23 (((S' _1165) _21) I)) ((A :24 _1092) ((A :25 (_24 "undefined")) ((A :26 I) ((A :27 (((C' B) _1121) ((C _117) _26))) ((A :28 (((C' _27) ((_125 _1135) _98)) ((_117 (_34 _1137)) _97))) ((A :29 ((B ((S _1165) (_34 _1137))) _24)) ((A :30 ((B (B (B C))) ((B (B C)) P))) ((A :31 (T (BK (BK K)))) ((A :32 (T (K (BK K)))) ((A :33 (T (K (K K)))) ((A :34 (T (K (K A)))) ((A :35 (K (noDefault "Monad.>>="))) ((A :36 (((C' (C' B)) _32) K)) ((A :37 ((B _13) _31)) ((A :38 (((S' (C' B)) _32) (((S' (C' B)) _32) (B' _34)))) ((A :39 P) ((A :40 (T K)) ((A :41 (T A)) ((A :42 (K _24)) ((A :43 ((B (B Y)) (((S' B) (B' ((B P) ((C _34) _301)))) (((S' (C' B)) ((B (B (C' B))) (B' _32))) (((S' (C' (C' B))) (B' _32)) (((C' B) (B' _34)) _302)))))) ((A :44 ((B (B Y)) (((S' B) (B' ((B P) ((C _34) _1049)))) (((C' (C' B)) ((B (B (C' B))) (B' _32))) BK)))) ((A :45 ((B T) ((C _34) _1049))) ((A :46 ((C _43) _118)) ((A :47 ((B _120) _32)) ((A :48 ((B C) ((B C') _32))) ((A :49 ((B _120) _48)) ((A :50 T) ((A :51 ((_124 ((B (B (_115 _50))) ((B ((C' C) _54)) (B P)))) (_128 _51))) ((A :52 (((((_11 _51) ((B (_115 _50)) P)) (_38 _53)) ((B (B (_115 _50))) (((C' B) ((B C) _54)) (BK _54)))) (_20 _52))) ((A :53 ((((_30 _52) ((B (B (_115 _50))) (((C' B) ((B C) _54)) (B _54)))) (_15 _52)) (_13 _52))) ((A :54 (T I)) ((A :55 ((B (_117 _357)) _54)) ((A :56 ((B (_115 _50)) (B (P _1049)))) ((A :57 ((B (_115 _50)) (BK (P _1049)))) ((A :58 ((_115 _50) ((S P) I))) ((A :59 ((B (_115 _50)) ((C (S' P)) I))) ((A :60 ((_102 ((C ((C S') _65)) I)) (_106 _60))) ((A :61 (((_1263 (K ((P (_1272 "False")) (_1272 "True")))) (_1268 _61)) (_1269 _61))) ((A :62 ((_69 _67) _68)) ((A :63 (R _68)) ((A :64 (T _67)) ((A :65 ((P _68) _67)) ((A :66 _68) ((A :67 K) ((A :68 A) ((A :69 P) ((A :70 (T K)) ((A :71 (T A)) ((A :72 (K (noDefault "Bounded.minBound"))) ((A :73 (K (noDefault "Bounded.maxBound"))) ((A :74 ((_102 _1086) _1087)) ((A :75 ((((((((_334 _74) (_343 _75)) _1088) _1089) _1090) _1091) (_348 _75)) (_349 _75))) ((A :76 ((_102 _1096) (_106 _76))) ((A :77 ((((((((_334 _76) _1095) (((C' (C' (_103 _350))) _1095) _354)) (((C' (C' (_104 _350))) _1095) _356)) (((C' (C' (_103 _350))) _1095) _356)) (((C' (C' (_104 _350))) _1095) _356)) (_348 _77)) (_349 _77))) ((A :78 ((_69 (_79 #0)) (_79 #127))) ((A :79 _1097) ((A :80 _1098) ((A :81 (((S' _64) (_1089 #97)) ((C _1089) #122))) ((A :82 (((S' _64) (_1089 #65)) ((C _1089) #90))) ((A :83 (((S' _63) _81) _82)) ((A :84 (((S' _64) (_1089 #48)) ((C _1089) #57))) ((A :85 (((S' _63) _83) _84)) ((A :86 (((S' _64) (_1089 #32)) ((C _1089) #126))) ((A :87 (((S' _63) ((C (_103 _74)) #32)) (((S' _63) ((C (_103 _74)) #9)) ((C (_103 _74)) #10)))) ((A :88 ((S ((S (((S' _64) (_1089 #65)) ((C _1089) #90))) (_68 (((noMatch "lib/Data/Char.hs") #72) #9)))) ((B _79) (((C' (_319 _130)) (((C' (_320 _130)) _80) (_80 #65))) (_80 #97))))) ((A :89 ((S ((S (((S' _64) (_1089 #97)) ((C _1089) #97))) (_68 (((noMatch "lib/Data/Char.hs") #76) #9)))) ((B _79) (((C' (_319 _130)) (((C' (_320 _130)) _80) (_80 #97))) (_80 #65))))) ((A :90 (((_1263 (K ((C ((S ((C ==) #39)) ((B (_117 (_1271 #39))) (((C' _117) ((B _1272) _91)) (_1271 #39))))) (_1272 "'\92&''")))) (_1268 _90)) ((B (_117 (_1271 #34))) (Y ((B (P (_1271 #34))) (((S' C) ((B
\ No newline at end of file
--- a/lib/Data/Char.hs
+++ b/lib/Data/Char.hs
@@ -65,20 +65,6 @@
isPrint :: Char -> Bool
isPrint c = primCharLE ' ' c && primCharLE c '~'
-{--eqChar :: Char -> Char -> Bool
-eqChar = primCharEQ
-
-neChar :: Char -> Char -> Bool
-neChar = primCharNE
-
-leChar :: Char -> Char -> Bool
-leChar = primCharLE
-
-ltChar :: Char -> Char -> Bool
-ltChar = primCharLT
--}
-
isSpace :: Char -> Bool
isSpace c = c == ' ' || c == '\t' || c == '\n'
--- a/lib/Data/Integer.hs
+++ b/lib/Data/Integer.hs
@@ -76,10 +76,10 @@
isZero :: Integer -> Bool
isZero (I _ ds) = null ds
-eqSign :: Sign -> Sign -> Bool
-eqSign Plus Plus = True
-eqSign Minus Minus = True
-eqSign _ _ = False
+instance Eq Sign where
+ (==) Plus Plus = True
+ (==) Minus Minus = True
+ (==) _ _ = False
-- Trim off 0s and make an Integer
sI :: Sign -> [Digit] -> Integer
@@ -164,7 +164,7 @@
mulI (I sx xs) (I sy ys) = I (mulSign sx sy) (mulM xs ys)
mulSign :: Sign -> Sign -> Sign
-mulSign s t = if eqSign s t then Plus else Minus
+mulSign s t = if s == t then Plus else Minus
-- Multiply with a single digit, and add carry.
mulD :: Digit -> [Digit] -> Digit -> [Digit]
@@ -282,7 +282,7 @@
readUnsignedInteger = foldl (\ r c -> r * tenI + _intToInteger (ord c - ord '0')) zeroI
eqI :: Integer -> Integer -> Bool
-eqI (I sx xs) (I sy ys) = eqSign sx sy && eqList (==) xs ys
+eqI (I sx xs) (I sy ys) = sx == sy && xs == ys
neI :: Integer -> Integer -> Bool
neI x y = not (eqI x y)
@@ -305,6 +305,8 @@
-- These two functions return an (opaque) representation of an
-- Integer as [Int].
-- This is used by the compiler to generate Integer literals.
+-- First _integerToIntList is used in the compiler to get a list of
+-- Int, and the generated code will have a call to _intListToInteger.
_integerToIntList :: Integer -> [Int]
_integerToIntList (I Plus ds) = ds
_integerToIntList (I Minus ds) = (-1::Int) : ds
--- a/lib/Data/List.hs
+++ b/lib/Data/List.hs
@@ -334,11 +334,6 @@
nth n (x:xs) = if n == (0::Int) then x else nth (n - (1::Int)) xs
in nth i axs
-eqList :: forall a . (a -> a -> Bool) -> [a] -> [a] -> Bool
-eqList _ [] [] = True
-eqList eq (x:xs) (y:ys) = eq x y && eqList eq xs ys
-eqList _ _ _ = False
-
partition :: forall a . (a -> Bool) -> [a] -> ([a], [a])
partition p xs = (filter p xs, filter (not . p) xs)
--- a/lib/Data/Tuple.hs
+++ b/lib/Data/Tuple.hs
@@ -24,9 +24,6 @@
snd :: forall a b . (a, b) -> b
snd (_, b) = b
-eqPair :: forall a b . (a -> a -> Bool) -> (b -> b -> Bool) -> (a, b) -> (a, b) -> Bool
-eqPair eqa eqb (a1, b1) (a2, b2) = eqa a1 a2 && eqb b1 b2
-
instance forall a b . (Eq a, Eq b) => Eq (a, b) where
(a1, b1) == (a2, b2) = a1 == a2 && b1 == b2
--
⑨