Commit fff02548 authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari

Move Control.Monad.IO.Class to base from transformers

See Trac #10773

Remove Control.Monad.IO.Class from `transformers`. Updates
`transformers` submodule.

See Trac #10773

Test Plan: ./validate

Reviewers: ekmett, hvr, bgamari, austin

Reviewed By: hvr, bgamari, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1147

GHC Trac Issues: #10773
parent 603a369d
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.IO.Class
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon Graduate Institute of Science and Technology, 2001
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : R.Paterson@city.ac.uk
-- Stability : experimental
-- Portability : portable
--
-- Class of monads based on @IO@.
-----------------------------------------------------------------------------
module Control.Monad.IO.Class (
MonadIO(..)
) where
-- | Monads in which 'IO' computations may be embedded.
-- Any monad built by applying a sequence of monad transformers to the
-- 'IO' monad will be an instance of this class.
--
-- Instances should satisfy the following laws, which state that 'liftIO'
-- is a transformer of monads:
--
-- * @'liftIO' . 'return' = 'return'@
--
-- * @'liftIO' (m >>= f) = 'liftIO' m >>= ('liftIO' . f)@
class (Monad m) => MonadIO m where
-- | Lift a computation from the 'IO' monad.
liftIO :: IO a -> m a
instance MonadIO IO where
liftIO = id
......@@ -115,6 +115,7 @@ Library
Control.Monad
Control.Monad.Fix
Control.Monad.Instances
Control.Monad.IO.Class
Control.Monad.ST
Control.Monad.ST.Lazy
Control.Monad.ST.Lazy.Safe
......
......@@ -56,6 +56,9 @@
* Made `PatternMatchFail`, `RecSelError`, `RecConError`, `RecUpdError`,
`NoMethodError`, and `AssertionFailed` newtypes (#10738)
* New module `Control.Monad.IO.Class` (previously provided by `transformers`
package). (#10773)
* The `Generic` instance for `Proxy` is now poly-kinded (#10775)
* add `Data.List.NonEmpty` and `Data.Semigroup` (to become
......
Subproject commit 078c7daf36ea1fa1ecb63b04dbe667a443e13044
Subproject commit 0c7207e9702afb5344cc33892eb6da9126a85cf3
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