Skip to content

Commit 0530486

Browse files
committed
Fix AltShow Maybe instance
1 parent 67a45a4 commit 0530486

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/filepath-equivalent-tests/TestEquiv.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ instance {-# OVERLAPPABLE #-} Show a => AltShow a where
3737
instance {-# OVERLAPS #-} AltShow String where
3838
altShow = id
3939

40+
instance {-# OVERLAPPABLE #-} AltShow a => AltShow (Maybe a) where
41+
altShow Nothing = ""
42+
altShow (Just a) = altShow a
43+
4044

4145
newtype WindowsFilePaths = WindowsFilePaths { unWindowsFilePaths :: [WindowsFilePath] }
4246
deriving (Show, Eq, Ord, Generic)

0 commit comments

Comments
 (0)