From 70e58a713ca3b795e2861baca8e346ae64e185b0 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Wed, 8 Nov 2023 10:49:45 +0100 Subject: [PATCH] Fix -Wincomplete-uni-patterns warning --- blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs b/blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs index 85cd1c8..d3ace3a 100644 --- a/blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs +++ b/blockfrost-api/src/Blockfrost/Types/Shared/Amount.hs @@ -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 =