@@ -45,7 +45,6 @@ import Network.Ethereum.Core.BigNumber (BigNumber, toString, hexadecimal)
4545import Node.Encoding (Encoding (Hex, UTF8, ASCII))
4646import Partial.Unsafe (unsafePartial )
4747import Simple.JSON (class ReadForeign , class WriteForeign )
48- import Text.Parsing.Parser.String (class StringLike )
4948
5049-- ------------------------------------------------------------------------------
5150-- * Signed Values
@@ -58,13 +57,6 @@ derive instance eqSign :: Eq Sign
5857-- | Represents values that can be either positive or negative.
5958data Signed a = Signed Sign a
6059
61- instance showSigned :: Show a => Show (Signed a ) where
62- show (Signed s a) = s' <> show a
63- where
64- s' = case s of
65- Pos -> " "
66- Neg -> " -"
67-
6860instance eqSigned :: Eq a => Eq (Signed a ) where
6961 eq (Signed s a) (Signed s' a') = (s `eq` s') && (a `eq` a')
7062
@@ -82,7 +74,9 @@ asSigned a = Signed Pos a
8274-- | Represents a base16, utf8 encoded bytestring
8375newtype HexString = HexString String
8476
85- derive newtype instance showHexString :: Show HexString
77+ instance showHexString :: Show HexString where
78+ show (HexString s) = " 0x" <> s
79+
8680derive newtype instance hexStringEq :: Eq HexString
8781derive newtype instance hexStringOrd :: Ord HexString
8882derive newtype instance semigpStringEq :: Semigroup HexString
0 commit comments