Commit b10a7a41 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

base: Drop obsolete/redundant `__GLASGOW_HASKELL__` checks

Since 527bcc41 we require GHC >=7.6 for bootstrapping anyway.
This also allows to avoid the CPP-processing overhead for these two modules.
parent 9d713150
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706
{-# LANGUAGE PolyKinds, GADTs #-}
#endif
-----------------------------------------------------------------------------
-- |
......
{-# 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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment