Skip to content

Commit

Permalink
Update shelley-ma/impl/src/Cardano/Ledger/Mary/Translation.hs
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Winant <thomas@well-typed.com>
  • Loading branch information
Jared Corduan and mrBliss authored Nov 25, 2020
1 parent 3b73ac7 commit a9f6fef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shelley-ma/impl/src/Cardano/Ledger/Mary/Translation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ translateValue :: Era era => Coin -> Value era
translateValue = Val.inject

translateCompactValue :: Era era => CompactForm Coin -> CompactForm (Value era)
translateCompactValue = assume . toCompact . translateValue . fromCompact
translateCompactValue =
fromMaybe (error msg) . toCompact . translateValue . fromCompact
where
assume Nothing = error "impossible error: compact coin is out of range"
assume (Just x) = x
msg = "impossible error: compact coin is out of range"

0 comments on commit a9f6fef

Please sign in to comment.