Skip to content

Commit

Permalink
Fix -Wincomplete-uni-patterns warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki committed Nov 8, 2023
1 parent ca17859 commit 70e58a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ data Amount =

-- | SomeDiscrete values always use scale of 1
unitScale :: Money.Scale
unitScale = let (Just s) = Money.scaleFromRational 1 in s
unitScale = case Money.scaleFromRational 1 of
Just s -> s
Nothing -> error "Money.scaleFromRational impossible"

instance ToJSON Money.SomeDiscrete where
toJSON sd =
Expand Down

0 comments on commit 70e58a7

Please sign in to comment.