ref: 61eb00e93d1cf875a7d2d6d86fd3bbd3dd528e16
parent: 241e15cc1348f5c22a234330ca1042b0c07e591f
author: Lennart Augustsson <lennart@augustsson.net>
date: Sat Nov 4 14:44:57 EDT 2023
Make it compile.
--- a/TODO
+++ b/TODO
@@ -41,7 +41,7 @@
* Implement fundeps
* instance Bits ...
* Split eval.c
-* Overloaded FP literals
+* Implement defaulting
Bugs
* Removing [] from prim table
--- a/Tools/Addcombs.hs
+++ b/Tools/Addcombs.hs
@@ -10,7 +10,7 @@
in as : chunkify n bs
showChunk :: [Char] -> String
-showChunk = concatMap (\ c -> showInt (ord c) ++ ",")
+showChunk = concatMap (\ c -> show (ord c) ++ ",")
main :: IO ()
main = do
@@ -24,7 +24,7 @@
let size = length file
chunks = chunkify 20 file
putStrLn $ "struct { BFILE mets; size_t b_size; size_t b_pos; uint8_t b_buffer[]; } combs =\n { { getb_buf, ungetb_buf, closeb_buf }, "- ++ showInt size ++ ", 0, {"+ ++ show size ++ ", 0, {"mapM_ (putStrLn . showChunk) chunks
putStrLn "}};"
putStrLn "BFILE *comb_internal = (BFILE*)&combs;"
--- a/Tools/Compress.hs
+++ b/Tools/Compress.hs
@@ -35,13 +35,13 @@
t' = if s < maxDict then M.insertBy compareString p' s t else t
in
-- trace ("compress " ++ showString p') $--- trace (showList (showPair showString showInt) (M.toList t)) $
+-- trace show (M.toList t)) $
case M.lookupBy compareString p' t of
Just _ ->
-- trace "found" $
compress t cs p'
Nothing ->
--- trace ("not found p=" ++ showString p ++ " " ++ showMaybe showInt (M.lookupBy compareString p t)) $+-- trace ("not found p=" ++ show p ++ " " ++ show (M.lookupBy compareString p t)) $(t ! p) : compress t' cs [c]
-- Initial table is ' ' .. '~', and '\n'
--
⑨