Skip to content
Snippets Groups Projects
Commit 69bbe2db authored by Ross Paterson's avatar Ross Paterson
Browse files

use fmap instead of importing Applicative

Importing Applicative into this module causes the instances in
Control.Monad.Instances to leak into the Haskell 98 module System,
which would break Haskell 98 programs that define these instances.
parent 2d4921e8
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,6 @@ import Data.IORef
#endif
#endif
import Control.Applicative
import System.IO ( Handle )
import System.Exit ( ExitCode )
import Control.Concurrent
......@@ -396,7 +395,7 @@ mbFd fun _std (UseHandle hdl) = withHandle_ fun hdl $ return . haFD
mbFd _ _std CreatePipe = return (-1)
mbPipe :: StdStream -> Ptr FD -> IOMode -> IO (Maybe Handle)
mbPipe CreatePipe pfd mode = Just <$> pfdToHandle pfd mode
mbPipe CreatePipe pfd mode = fmap Just (pfdToHandle pfd mode)
mbPipe _std _pfd _mode = return Nothing
pfdToHandle :: Ptr FD -> IOMode -> IO Handle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment