Skip to content

Commit e9cd6bd

Browse files
author
blinky
committed
revert show instance
1 parent 848e664 commit e9cd6bd

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Network/Ethereum/Core/HexString.purs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import Network.Ethereum.Core.BigNumber (BigNumber, toString, hexadecimal)
4545
import Node.Encoding (Encoding(Hex, UTF8, ASCII))
4646
import Partial.Unsafe (unsafePartial)
4747
import 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.
5958
data 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-
6860
instance 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
8375
newtype HexString = HexString String
8476

85-
derive newtype instance showHexString :: Show HexString
77+
instance showHexString :: Show HexString where
78+
show (HexString s) = "0x" <> s
79+
8680
derive newtype instance hexStringEq :: Eq HexString
8781
derive newtype instance hexStringOrd :: Ord HexString
8882
derive newtype instance semigpStringEq :: Semigroup HexString

0 commit comments

Comments
 (0)