From 05304865cc7d3458ad5c629590344262b458b75c Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 24 Jan 2024 18:16:29 +0800 Subject: [PATCH] Fix AltShow Maybe instance --- tests/filepath-equivalent-tests/TestEquiv.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/filepath-equivalent-tests/TestEquiv.hs b/tests/filepath-equivalent-tests/TestEquiv.hs index 1e36bfb4..4405ea40 100644 --- a/tests/filepath-equivalent-tests/TestEquiv.hs +++ b/tests/filepath-equivalent-tests/TestEquiv.hs @@ -37,6 +37,10 @@ instance {-# OVERLAPPABLE #-} Show a => AltShow a where instance {-# OVERLAPS #-} AltShow String where altShow = id +instance {-# OVERLAPPABLE #-} AltShow a => AltShow (Maybe a) where + altShow Nothing = "" + altShow (Just a) = altShow a + newtype WindowsFilePaths = WindowsFilePaths { unWindowsFilePaths :: [WindowsFilePath] } deriving (Show, Eq, Ord, Generic)