Skip to content

Commit

Permalink
remove unnecessary SingI constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
drsk committed Sep 5, 2024
1 parent e76a385 commit f765a13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions haskell-src/Concordium/Types/Accounts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,14 @@ instance forall av. (IsAccountVersion av) => Serialize (BakerInfoEx av) where
put BakerInfoExV1{..} = do
put _bieBakerInfo
put _bieBakerPoolInfo
put _bieAccountIsSuspended
mapM_ put _bieAccountIsSuspended
get = case delegationSupport @av of
SAVDelegationNotSupported -> BakerInfoExV0 <$> get
SAVDelegationSupported -> do
_bieBakerInfo <- get
_bieBakerPoolInfo <- get
_bieAccountIsSuspended <- get
_bieAccountIsSuspended <-
conditionallyA (sSupportsValidatorSuspension (accountVersion @av)) get
return BakerInfoExV1{..}

instance HasBakerInfo (BakerInfoEx av) where
Expand Down
2 changes: 1 addition & 1 deletion haskell-src/Concordium/Types/ProtocolVersion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ demoteProtocolVersion = fromSing

-- | Constraint on a type level 'AccountVersion' that can be used to get a corresponding
-- 'SAccountVersion' (see 'accountVersion'). (An alias for 'SingI'.)
type IsAccountVersion (av :: AccountVersion) = (SingI av, SingI (SupportsValidatorSuspension av))
type IsAccountVersion (av :: AccountVersion) = SingI av

-- | Constraint on a type level 'ChainParametersVersion' that can be used to get a corresponding
-- 'SChainParametersVersion' (see 'chainParametersVersion'). (An alias for 'SingI'.)
Expand Down

0 comments on commit f765a13

Please sign in to comment.