From 7d1c5380ea4c59a45decdc09558a4b47781abdd5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 14 Mar 2017 00:04:45 +0900 Subject: [PATCH] SysCmd: older base does not export Foldable (ghc-7.8 and earlier) https://www.haskell.org/platform/contents.html --- src/SysCmd.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SysCmd.hs b/src/SysCmd.hs index a40c9f0..cda89a7 100644 --- a/src/SysCmd.hs +++ b/src/SysCmd.hs @@ -162,5 +162,9 @@ s +-+ t | last s == ' ' = s ++ t | head t == ' ' = s ++ t s +-+ t = s ++ " " ++ t +#if (defined(MIN_VERSION_base) && MIN_VERSION_base(4,8,2)) notNull :: Foldable t => t a -> Bool +#else +notNull :: [a] -> Bool +#endif notNull = not . null