on master help sign in
fix to compile with text-2.1.2
commitfb0317dcf1f06898018855bb0718667d7c37d8fc authorodr <dima.typeable.io> dateSun 12 Jan 2025, 16:11 (2 years ago) parenta597f9b
2 files changed+15−3
cabal.project+11 src/Data/Id.hs+4−3
cabal.projectnew file+11
@@ -0,0 +1,11 @@
1+packages:
2+ .
3+
4+-- To compile with js-backend use this:
5+source-repository-package
6+ type: git
7+ location: https://github.com/typeable/uuid.git
8+ tag: 49f50ae517de0e4d5dfbf783edc61e71cfd54d6b
9+ subdir:
10+ uuid
11+ uuid-types
src/Data/Id.hs+4−3
@@ -34,6 +34,7 @@ import Database.PostgreSQL.Simple.ToField as PG (ToField)
3434#endif
3535#endif
3636import GHC.TypeLits
37+import Prelude as P
3738import Test.QuickCheck
3839import Text.ParserCombinators.ReadP
3940import Web.HttpApiData
@@ -70,7 +71,7 @@ randomId = coerce <$> UUID.V4.nextRandom
7071{-# INLINE randomId #-}
7172
7273instance KnownSymbol s => Show (Id s) where
73− show (Id v) = "Id-" <> symbolVal (Proxy @s) <> "-" <> show v
74+ show (Id v) = "Id-" <> symbolVal (Proxy @s) <> "-" <> P.show v
7475
7576instance KnownSymbol s => Read (Id s) where
7677 readsPrec _ = readP_to_S $ do
@@ -164,7 +165,7 @@ mkIntId = coerce
164165{-# INLINE mkIntId #-}
165166
166167instance KnownSymbol s => Show (IntId s) where
167− show (IntId v) = "IntId-" <> symbolVal (Proxy @s) <> "-" <> show v
168+ show (IntId v) = "IntId-" <> symbolVal (Proxy @s) <> "-" <> P.show v
168169
169170instance KnownSymbol s => Read (IntId s) where
170171 readsPrec _ = readP_to_S $ do
@@ -213,7 +214,7 @@ mkName = coerce
213214{-# INLINE mkName #-}
214215
215216instance KnownSymbol s => Show (Name s) where
216− show (Name v) = "Name-" <> symbolVal (Proxy @s) <> "-" <> show v
217+ show (Name v) = "Name-" <> symbolVal (Proxy @s) <> "-" <> P.show v
217218
218219instance KnownSymbol s => Read (Name s) where
219220 readsPrec _ = readP_to_S $ do