diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2016-10-01 17:58:27 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-10-01 20:01:29 -0400 |
commit | f547b444fdaf1c86abede42bf4c4b1037f50f588 (patch) | |
tree | 639e077bb18d8d7072bd5f146732384fac1b427d /libraries/base/System | |
parent | b0d53a839da0149e0142da036b6ebf5a01b3216f (diff) | |
download | haskell-f547b444fdaf1c86abede42bf4c4b1037f50f588.tar.gz |
Eliminate some unsafeCoerce#s with deriving strategies
Currently, `Foreign.C.Types`, `Foreign.Ptr`, and `System.Posix.Types`
define `Read` and `Show` instances for the newtypes in those modules by
using `unsafeCoerce#`. We can clean up this hack by using the `newtype`
deriving strategy.
Reviewers: hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2556
Diffstat (limited to 'libraries/base/System')
-rw-r--r-- | libraries/base/System/Posix/Types.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libraries/base/System/Posix/Types.hs b/libraries/base/System/Posix/Types.hs index 52fce87ca0..67c38aa55b 100644 --- a/libraries/base/System/Posix/Types.hs +++ b/libraries/base/System/Posix/Types.hs @@ -1,10 +1,10 @@ -{-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP - , NoImplicitPrelude - , MagicHash - , GeneralizedNewtypeDeriving - #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DerivingStrategies #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | |