Commit f932b799 authored by Austin Seipp's avatar Austin Seipp
Browse files

Create Data.Coerce (#8745)



Data.Coerce is a Trustworthy module which safely exports both
`Coercible` and `coerce` for use by users, as it can now be considered
safe under role checking.

See the ticket for details.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 83bd2f5f
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Coerce
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : provisional
-- Portability : portable
--
-- Safe coercions between data types.
--
-----------------------------------------------------------------------------
module Data.Coerce
( -- * Safe coercions
coerce, Coercible,
) where
import GHC.Prim (coerce, Coercible)
......@@ -46,7 +46,7 @@ module GHC.Exts
lazy, inline,
-- * Safe coercions
GHC.Prim.coerce, GHC.Prim.Coercible,
Data.Coerce.coerce, Data.Coerce.Coercible,
-- * Transform comprehensions
Down(..), groupWith, sortWith, the,
......@@ -70,12 +70,12 @@ module GHC.Exts
import Prelude
import GHC.Prim hiding (coerce, Coercible)
import qualified GHC.Prim
import GHC.Base hiding (coerce, Coercible)
import GHC.Base hiding (coerce, Coercible) -- implicitly comes from GHC.Prim
import GHC.Word
import GHC.Int
import GHC.Ptr
import GHC.Stack
import qualified Data.Coerce
import Data.String
import Data.List
import Data.Data
......
......@@ -118,6 +118,7 @@ Library
Data.Bits
Data.Bool
Data.Char
Data.Coerce
Data.Complex
Data.Data
Data.Dynamic
......
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