mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
diff -ru orig/Test/Tasty/Options.hs new/Test/Tasty/Options.hs
|
|
--- orig/Test/Tasty/Options.hs 2013-10-14 09:05:01.591238893 +0300
|
|
+++ new/Test/Tasty/Options.hs 2013-10-14 09:05:01.000000000 +0300
|
|
@@ -1,3 +1,4 @@
|
|
+{-# LANGUAGE CPP #-}
|
|
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable,
|
|
ExistentialQuantification, GADTs,
|
|
OverlappingInstances, FlexibleInstances, UndecidableInstances,
|
|
@@ -27,6 +28,9 @@
|
|
import Data.Monoid
|
|
|
|
import Options.Applicative
|
|
+#if MIN_VERSION_optparse_applicative(0,6,0)
|
|
+import Options.Applicative.Types
|
|
+#endif
|
|
|
|
-- | An option is a data type that inhabits the `IsOption` type class.
|
|
class Typeable v => IsOption v where
|
|
@@ -60,7 +64,11 @@
|
|
name = untag (optionName :: Tagged v String)
|
|
helpString = untag (optionHelp :: Tagged v String)
|
|
parse =
|
|
+#if MIN_VERSION_optparse_applicative(0,6,0)
|
|
+ ReadM . maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .
|
|
+#else
|
|
maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .
|
|
+#endif
|
|
parseValue
|
|
|
|
|
|
diff -ru orig/Test/Tasty/UI.hs new/Test/Tasty/UI.hs
|
|
--- orig/Test/Tasty/UI.hs 2013-10-14 09:05:01.591238893 +0300
|
|
+++ new/Test/Tasty/UI.hs 2013-10-14 09:05:01.000000000 +0300
|
|
@@ -98,6 +98,9 @@
|
|
|
|
hSetBuffering stdout NoBuffering
|
|
|
|
+ -- Do not retain the reference to the tree more than necessary
|
|
+ _ <- evaluate alignment
|
|
+
|
|
st <-
|
|
flip execStateT initialState $ getApp $ fst $
|
|
foldTestTree
|