diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-09-28 15:30:13 +0530 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-10-25 17:16:35 -0400 |
commit | cb01e002505639abf5ef182a890c7c501e5978cf (patch) | |
tree | 79d15480755c202077e4d02441a9c06108ebc619 /utils | |
parent | 3d0111f276b60d8545fad04bbe158662c160d151 (diff) | |
download | haskell-cb01e002505639abf5ef182a890c7c501e5978cf.tar.gz |
Use 'NonEmpty' for the fields in an 'HsProjection' (#20389)
(cherry picked from commit 63d4b83e14cdca01dc18b1b02b2ffb026d1df405)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-exact/ExactPrint.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs index 637ffe3b4a..067c50ae81 100644 --- a/utils/check-exact/ExactPrint.hs +++ b/utils/check-exact/ExactPrint.hs @@ -38,6 +38,7 @@ import Data.Data ( Data ) import Data.Foldable import Data.Typeable import Data.List ( partition, sort, sortBy) +import Data.List.NonEmpty ( NonEmpty ) import Data.Maybe ( isJust ) import Data.Void @@ -370,6 +371,10 @@ instance (ExactPrint a) => ExactPrint [a] where getAnnotationEntry = const NoEntryVal exact ls = mapM_ markAnnotated ls +instance (ExactPrint a) => ExactPrint (NonEmpty a) where + getAnnotationEntry = const NoEntryVal + exact ls = mapM_ markAnnotated ls + instance (ExactPrint a) => ExactPrint (Maybe a) where getAnnotationEntry = const NoEntryVal exact Nothing = return () |