mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-02 08:12:49 +03:00
persistable-record: generalized show.
This commit is contained in:
parent
ea0131510b
commit
3a9fab8c70
@ -72,8 +72,8 @@ wf `pap` prw = ProductConst $ unPC wf <*> unPC prw
|
||||
runPersistableRecordWidth :: PersistableRecordWidth a -> Int
|
||||
runPersistableRecordWidth = getSum . getConst . unPC
|
||||
|
||||
instance Show (PersistableRecordWidth a) where
|
||||
show = ("PRW " ++) . show . runPersistableRecordWidth
|
||||
instance Show a => Show (ProductConst a b) where
|
||||
show = ("PC " ++) . show . getConst . unPC
|
||||
|
||||
-- | Unsafely generate 'PersistableRecordWidth' proof object from specified width of Haskell type 'a'.
|
||||
unsafePersistableRecordWidth :: Int -- ^ Specify width of Haskell type 'a'
|
||||
|
Loading…
Reference in New Issue
Block a user