Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backward compatibility with v1.7.1/2 for the IO Monad #2125

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Category/Applicative.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Applicative` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Applicative where

open import Effect.Applicative public

{-# WARNING_ON_IMPORT
"Category.Applicative was deprecated in v2.0.
Use Effect.Applicative instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Applicative/Indexed.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Applicative.Indexed` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Applicative.Indexed where

open import Effect.Applicative.Indexed public

{-# WARNING_ON_IMPORT
"Category.Applicative.Indexed was deprecated in v2.0.
Use Effect.Applicative.Indexed instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Applicative/Predicate.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Applicative.Predicate` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Applicative.Predicate where

open import Effect.Applicative.Predicate public

{-# WARNING_ON_IMPORT
"Category.Applicative.Predicate was deprecated in v2.0.
Use Effect.Applicative.Predicate instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Comonad.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Comonad` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Comonad where

open import Effect.Comonad public

{-# WARNING_ON_IMPORT
"Category.Comonad was deprecated in v2.0.
Use Effect.Comonad instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Functor.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Functor` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Functor where

open import Effect.Functor public

{-# WARNING_ON_IMPORT
"Category.Functor was deprecated in v2.0.
Use Effect.Functor instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Functor/Indexed.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Functor.Indexed` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Functor.Indexed where

open import Effect.Functor.Indexed public

{-# WARNING_ON_IMPORT
"Category.Functor.Indexed was deprecated in v2.0.
Use Effect.Functor.Indexed instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Functor/Predicate.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Functor.Predicate` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Functor.Predicate where

open import Effect.Functor.Predicate public

{-# WARNING_ON_IMPORT
"Category.Functor.Predicate was deprecated in v2.0.
Use Effect.Functor.Predicate instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad where

open import Effect.Monad public

{-# WARNING_ON_IMPORT
"Category.Monad was deprecated in v2.0.
Use Effect.Monad instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Continuation.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Continuation` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Continuation where

open import Effect.Monad.Continuation public

{-# WARNING_ON_IMPORT
"Category.Monad.Continuation was deprecated in v2.0.
Use Effect.Monad.Continuation instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Indexed.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Indexed` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Indexed where

open import Effect.Monad.Indexed public

{-# WARNING_ON_IMPORT
"Category.Monad.Indexed was deprecated in v2.0.
Use Effect.Monad.Indexed instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Partiality.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Partiality` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Partiality where

open import Effect.Monad.Partiality public

{-# WARNING_ON_IMPORT
"Category.Monad.Partiality was deprecated in v2.0.
Use Effect.Monad.Partiality instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Partiality/All.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Partiality.All` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Partiality.All where

open import Effect.Monad.Partiality.All public

{-# WARNING_ON_IMPORT
"Category.Monad.Partiality.All was deprecated in v2.0.
Use Effect.Monad.Partiality.All instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Partiality/Instances.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Partiality.Instances` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Partiality.Instances where

open import Effect.Monad.Partiality.Instances public

{-# WARNING_ON_IMPORT
"Category.Monad.Partiality.Instances was deprecated in v2.0.
Use Effect.Monad.Partiality.Instances instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Predicate.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Predicate` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Predicate where

open import Effect.Monad.Predicate public

{-# WARNING_ON_IMPORT
"Category.Monad.Predicate was deprecated in v2.0.
Use Effect.Monad.Predicate instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/Reader.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.Reader` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.Reader where

open import Effect.Monad.Reader public

{-# WARNING_ON_IMPORT
"Category.Monad.Reader was deprecated in v2.0.
Use Effect.Monad.Reader instead."
#-}
17 changes: 17 additions & 0 deletions src/Category/Monad/State.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- `Effect.Monad.State` instead.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Category.Monad.State where

open import Effect.Monad.State public

{-# WARNING_ON_IMPORT
"Category.Monad.State was deprecated in v2.0.
Use Effect.Monad.State instead."
#-}
15 changes: 15 additions & 0 deletions src/IO/Primitive.agda
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@ postulate
{-# COMPILE GHC _>>=_ = \_ _ _ _ -> (>>=) #-}
{-# COMPILE UHC pure = \_ _ x -> UHC.Agda.Builtins.primReturn x #-}
{-# COMPILE UHC _>>=_ = \_ _ _ _ x y -> UHC.Agda.Builtins.primBind x y #-}

------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.

-- Version 2.0

return : ∀ {a} {A : Set a} → A → IO A
return = pure
{-# WARNING_ON_USAGE return
"Warning: return was deprecated in v2.0.
Please use pure instead."
#-}
Loading