From e4712f4ffd5bc0ffb54520cda3e956a792aaa315 Mon Sep 17 00:00:00 2001 From: olafklinke <84761329+olafklinke@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:02:01 +0200 Subject: [PATCH] add COMPLETE pragma for CellDouble view pattern --- src/Codec/Xlsx/Types/Common.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Codec/Xlsx/Types/Common.hs b/src/Codec/Xlsx/Types/Common.hs index 04f2a54..68f84cd 100644 --- a/src/Codec/Xlsx/Types/Common.hs +++ b/src/Codec/Xlsx/Types/Common.hs @@ -420,6 +420,7 @@ data CellValue | CellRich [RichTextRun] | CellError ErrorType deriving (Eq, Ord, Show, Generic) +{-# COMPLETE CellText, CellDecimal, CellBool, CellRich, CellError #-} viewCellDouble :: CellValue -> Maybe Double viewCellDouble (CellDecimal s) = Just (toRealFloat s) @@ -428,6 +429,7 @@ viewCellDouble _ = Nothing -- view pattern, since 'CellDecimal' has replaced the old constructor. pattern CellDouble :: Double -> CellValue pattern CellDouble b <- (viewCellDouble -> Just b) +{-# COMPLETE CellText, CellDouble, CellBool, CellRich, CellError #-} instance NFData CellValue