on master help sign in
fix to compile with text-2.1.2
fb0317dodr
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)
34#endif
34#endif
35#endif
35#endif
36import GHC.TypeLits
36import GHC.TypeLits
37+import Prelude as P
37import Test.QuickCheck
38import Test.QuickCheck
38import Text.ParserCombinators.ReadP
39import Text.ParserCombinators.ReadP
39import Web.HttpApiData
40import Web.HttpApiData
@@ -70,7 +71,7 @@ randomId = coerce <$> UUID.V4.nextRandom
70{-# INLINE randomId #-}
71{-# INLINE randomId #-}
71
72
72instance KnownSymbol s => Show (Id s) where
73instance 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
74
75
75instance KnownSymbol s => Read (Id s) where
76instance KnownSymbol s => Read (Id s) where
76 readsPrec _ = readP_to_S $ do
77 readsPrec _ = readP_to_S $ do
@@ -164,7 +165,7 @@ mkIntId = coerce
164{-# INLINE mkIntId #-}
165{-# INLINE mkIntId #-}
165
166
166instance KnownSymbol s => Show (IntId s) where
167instance 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
168
169
169instance KnownSymbol s => Read (IntId s) where
170instance KnownSymbol s => Read (IntId s) where
170 readsPrec _ = readP_to_S $ do
171 readsPrec _ = readP_to_S $ do
@@ -213,7 +214,7 @@ mkName = coerce
213{-# INLINE mkName #-}
214{-# INLINE mkName #-}
214
215
215instance KnownSymbol s => Show (Name s) where
216instance 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
217
218
218instance KnownSymbol s => Read (Name s) where
219instance KnownSymbol s => Read (Name s) where
219 readsPrec _ = readP_to_S $ do
220 readsPrec _ = readP_to_S $ do