shithub: MicroHs

Download patch

ref: 0815b5bf4efbe7eebfff8632251a0ae1ce2df5a7
parent: 7f0888567aa181bc6a7c6802c25f3ab4ee0bf683
author: Lennart Augustsson <lennart@augustsson.net>
date: Mon Apr 1 06:40:23 EDT 2024

Get rid of Text.String

--- a/lib/AllOfLib.hs
+++ b/lib/AllOfLib.hs
@@ -98,7 +98,6 @@
 import Text.PrettyPrint.HughesPJClass
 import Text.Read
 import Text.Show
-import Text.String
 import Unsafe.Coerce
 
 main :: IO ()
--- a/lib/Prelude.hs
+++ b/lib/Prelude.hs
@@ -35,7 +35,6 @@
   module System.IO,
   module Text.Read,
   module Text.Show,
-  module Text.String,
   Float, Double,
   usingMhs, _wordSize, _isWindows,
   ) where
@@ -84,7 +83,6 @@
                  cprint)
 import Text.Read(ReadS, Read(..), read, reads, readParen, lex)
 import Text.Show(Show(..), ShowS, shows, showChar, showString, showParen)
-import Text.String
 import Primitives(_wordSize, _isWindows)
 
 -- So we can detect mhs vs ghc
--- a/lib/Text/String.hs
+++ /dev/null
@@ -1,27 +1,0 @@
--- Copyright 2023 Lennart Augustsson
--- See LICENSE file for full license.
-module Text.String(module Text.String) where
-import Prelude()              -- do not import Prelude
-import Primitives
-import Data.Bool
-import Data.Char
-import Data.Either
-import Data.Eq
-import Data.Fractional
-import Data.Function
-import Data.Int
-import Data.Integer
-import Data.Integral
-import Data.List
-import Data.Maybe
-import Data.Num
-import Data.Ord
-import Data.Ratio
-import Data.Real
-import Data.String
-import Data.Tuple
-import Text.Read
-import Text.Show
-
-showPairS :: forall a b . (a -> String) -> (b -> String) -> (a, b) -> String
-showPairS sa sb (a, b) = "(" ++ sa a ++ "," ++ sb b ++ ")"
--- a/src/MicroHs/List.hs
+++ b/src/MicroHs/List.hs
@@ -58,3 +58,5 @@
 substString from to xs@(c:cs) | Just rs <- stripPrefix from xs = to ++ substString from to rs
                               | otherwise = c : substString from to cs
 
+showPairS :: forall a b . (a -> String) -> (b -> String) -> (a, b) -> String
+showPairS sa sb (a, b) = "(" ++ sa a ++ "," ++ sb b ++ ")"
--