-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some long deprecated functions (#1046)
They were marked {-# DEPRECATED #-} for 0.5.8.1 (2016). Later, they were replaced with definitions that produce type errors in 0.6.0.1 (2018).
- Loading branch information
Showing
15 changed files
with
18 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,6 @@ | |
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__) | ||
{-# LANGUAGE Safe #-} | ||
#endif | ||
#ifdef __GLASGOW_HASKELL__ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE FlexibleContexts #-} | ||
{-# LANGUAGE MonoLocalBinds #-} | ||
#endif | ||
|
||
#include "containers.h" | ||
|
||
|
@@ -19,25 +14,20 @@ | |
-- Maintainer : [email protected] | ||
-- Portability : portable | ||
-- | ||
-- An efficient implementation of maps from integer keys to values | ||
-- (dictionaries). | ||
-- The @'IntMap' v@ type represents a finite map (sometimes called a dictionary) | ||
-- from key of type @Int@ to values of type @v@. | ||
-- | ||
-- This module re-exports the value lazy "Data.IntMap.Lazy" API, plus | ||
-- several deprecated value strict functions. Please note that these functions | ||
-- have different strictness properties than those in "Data.IntMap.Strict": | ||
-- they only evaluate the result of the combining function. For example, the | ||
-- default value to 'insertWith'' is only evaluated if the combining function | ||
-- is called and uses it. | ||
-- This module re-exports the value lazy "Data.IntMap.Lazy" API. | ||
-- | ||
-- These modules are intended to be imported qualified, to avoid name | ||
-- This module is intended to be imported qualified, to avoid name | ||
-- clashes with Prelude functions, e.g. | ||
-- | ||
-- > import Data.IntMap (IntMap) | ||
-- > import qualified Data.IntMap as IntMap | ||
-- | ||
-- The implementation is based on /big-endian patricia trees/. This data | ||
-- structure performs especially well on binary operations like 'union' | ||
-- and 'intersection'. However, my benchmarks show that it is also | ||
-- and 'intersection'. Additionally, benchmarks show that it is also | ||
-- (much) faster on insertions and deletions when compared to a generic | ||
-- size-balanced map implementation (see "Data.Map"). | ||
-- | ||
|
@@ -80,42 +70,6 @@ | |
|
||
module Data.IntMap | ||
( module Data.IntMap.Lazy | ||
#ifdef __GLASGOW_HASKELL__ | ||
-- For GHC, we disable these, pending removal. For anything else, | ||
-- we just don't define them at all. | ||
, insertWith' | ||
, insertWithKey' | ||
, fold | ||
, foldWithKey | ||
#endif | ||
) where | ||
|
||
import Data.IntMap.Lazy | ||
|
||
#ifdef __GLASGOW_HASKELL__ | ||
import Utils.Containers.Internal.TypeError | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.IntMap.Strict.insertWith' | ||
insertWith' :: Whoops "Data.IntMap.insertWith' is gone. Use Data.IntMap.Strict.insertWith." | ||
=> (a -> a -> a) -> Key -> a -> IntMap a -> IntMap a | ||
insertWith' _ _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.IntMap.Strict.insertWithKey'. | ||
insertWithKey' :: Whoops "Data.IntMap.insertWithKey' is gone. Use Data.IntMap.Strict.insertWithKey." | ||
=> (Key -> a -> a -> a) -> Key -> a -> IntMap a -> IntMap a | ||
insertWithKey' _ _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.IntMap.Lazy.foldr'. | ||
fold :: Whoops "Data.IntMap.fold' is gone. Use Data.IntMap.foldr or Prelude.foldr." | ||
=> (a -> b -> b) -> b -> IntMap a -> b | ||
fold _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'foldrWithKey'. | ||
foldWithKey :: Whoops "Data.IntMap.foldWithKey is gone. Use foldrWithKey." | ||
=> (Key -> a -> b -> b) -> b -> IntMap a -> b | ||
foldWithKey _ _ _ = undefined | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,6 @@ | |
{-# LANGUAGE Safe #-} | ||
#endif | ||
|
||
#ifdef __GLASGOW_HASKELL__ | ||
{-# LANGUAGE DataKinds, FlexibleContexts, MonoLocalBinds #-} | ||
#endif | ||
|
||
#include "containers.h" | ||
|
||
----------------------------------------------------------------------------- | ||
|
@@ -18,17 +14,13 @@ | |
-- Maintainer : [email protected] | ||
-- Portability : portable | ||
-- | ||
-- /Note:/ You should use "Data.Map.Strict" instead of this module if: | ||
-- | ||
-- * You will eventually need all the values stored. | ||
-- The @'Map' k v@ type represents a finite map (sometimes called a dictionary) | ||
-- from keys of type @k@ to values of type @v@. A 'Map' is strict in its keys but lazy | ||
-- in its values. | ||
-- | ||
-- * The stored values don't represent large virtual data structures | ||
-- to be lazily computed. | ||
-- This module re-exports the value lazy "Data.Map.Lazy" API. | ||
-- | ||
-- An efficient implementation of ordered maps from keys to values | ||
-- (dictionaries). | ||
-- | ||
-- These modules are intended to be imported qualified, to avoid name | ||
-- This module is intended to be imported qualified, to avoid name | ||
-- clashes with Prelude functions, e.g. | ||
-- | ||
-- > import qualified Data.Map as Map | ||
|
@@ -70,48 +62,6 @@ | |
|
||
module Data.Map | ||
( module Data.Map.Lazy | ||
#ifdef __GLASGOW_HASKELL__ | ||
, insertWith' | ||
, insertWithKey' | ||
, insertLookupWithKey' | ||
, fold | ||
, foldWithKey | ||
#endif | ||
) where | ||
|
||
import Data.Map.Lazy | ||
|
||
#ifdef __GLASGOW_HASKELL__ | ||
import Utils.Containers.Internal.TypeError | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.Map.Strict.insertWith'. | ||
insertWith' :: Whoops "Data.Map.insertWith' is gone. Use Data.Map.Strict.insertWith." | ||
=> (a -> a -> a) -> k -> a -> Map k a -> Map k a | ||
insertWith' _ _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.Map.Strict.insertWithKey'. | ||
insertWithKey' :: Whoops "Data.Map.insertWithKey' is gone. Use Data.Map.Strict.insertWithKey." | ||
=> (k -> a -> a -> a) -> k -> a -> Map k a -> Map k a | ||
insertWithKey' _ _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.Map.Strict.insertLookupWithKey'. | ||
insertLookupWithKey' :: Whoops "Data.Map.insertLookupWithKey' is gone. Use Data.Map.Strict.insertLookupWithKey." | ||
=> (k -> a -> a -> a) -> k -> a -> Map k a | ||
-> (Maybe a, Map k a) | ||
insertLookupWithKey' _ _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'Data.Map.Strict.foldr'. | ||
fold :: Whoops "Data.Map.fold is gone. Use foldr." | ||
=> (a -> b -> b) -> b -> Map k a -> b | ||
fold _ _ _ = undefined | ||
|
||
-- | This function is being removed and is no longer usable. | ||
-- Use 'foldrWithKey'. | ||
foldWithKey :: Whoops "Data.Map.foldWithKey is gone. Use foldrWithKey." | ||
=> (k -> a -> b -> b) -> b -> Map k a -> b | ||
foldWithKey _ _ _ = undefined | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters