diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-13 10:44:20 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-13 10:47:37 +0200 |
commit | b10a7a412738e16d332917b22ee1037383b81eb7 (patch) | |
tree | 493ecea4298099e9deae4b5ffd50963e0d45231e /libraries/base/Text | |
parent | 9d713150d87de07e132c1211eec956e0ae69aa7f (diff) | |
download | haskell-b10a7a412738e16d332917b22ee1037383b81eb7.tar.gz |
base: Drop obsolete/redundant `__GLASGOW_HASKELL__` checks
Since 527bcc41630918977c7 we require GHC >=7.6 for bootstrapping anyway.
This also allows to avoid the CPP-processing overhead for these two modules.
Diffstat (limited to 'libraries/base/Text')
-rw-r--r-- | libraries/base/Text/Printf.hs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/libraries/base/Text/Printf.hs b/libraries/base/Text/Printf.hs index ec68edb64b..a92a1a48ab 100644 --- a/libraries/base/Text/Printf.hs +++ b/libraries/base/Text/Printf.hs @@ -1,8 +1,5 @@ -{-# LANGUAGE Safe #-} -{-# LANGUAGE CPP #-} -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 700 {-# LANGUAGE GADTs #-} -#endif +{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | @@ -292,8 +289,6 @@ instance (IsChar c) => PrintfType [c] where -- type system won't readily let us say that without -- bringing the GADTs. So we go conditional for these defs. -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 700 - instance (a ~ ()) => PrintfType (IO a) where spr fmts args = putStr $ map fromChar $ uprintf fmts $ reverse args @@ -302,21 +297,6 @@ instance (a ~ ()) => HPrintfType (IO a) where hspr hdl fmts args = do hPutStr hdl (uprintf fmts (reverse args)) -#else - -instance PrintfType (IO a) where - spr fmts args = do - putStr $ map fromChar $ uprintf fmts $ reverse args - return (error "PrintfType (IO a): result should not be used.") - -instance HPrintfType (IO a) where - hspr hdl fmts args = do - hPutStr hdl (uprintf fmts (reverse args)) - return (error "HPrintfType (IO a): result should not be used.") - -#endif - - instance (PrintfArg a, PrintfType r) => PrintfType (a -> r) where spr fmts args = \ a -> spr fmts ((parseFormat a, formatArg a) : args) |