Skip to content

Commit

Permalink
Merge pull request #133 from Concordium/call-fallback-entrypoint
Browse files Browse the repository at this point in the history
Adds Show implementation for ReceiveName and InitName.
  • Loading branch information
rimbi authored Mar 11, 2022
2 parents 96a2c70 + c70c554 commit e662833
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions haskell-src/Concordium/Wasm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,12 @@ instance HashableTo H.Hash (WasmModuleV V1) where

-- |Name of an init method inside a module.
newtype InitName = InitName { initName :: Text }
deriving(Eq, Show, Ord)
deriving(Eq, Ord)
deriving(AE.ToJSON) via Text

instance Show InitName where
show InitName{..} = show initName

-- |Check whether the given text is a valid init name.
-- This is the case if
--
Expand Down Expand Up @@ -333,9 +336,12 @@ instance Serialize InitName where

-- |Name of a receive method inside a module.
newtype ReceiveName = ReceiveName { receiveName :: Text }
deriving (Eq, Show, Ord)
deriving (Eq, Ord)
deriving(AE.ToJSON) via Text

instance Show ReceiveName where
show ReceiveName{..} = show receiveName

-- |Check whether the given text is a valid receive name.
-- This is the case if
--
Expand Down

0 comments on commit e662833

Please sign in to comment.