summaryrefslogtreecommitdiff
path: root/libraries/base/System
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-10-01 17:58:27 -0400
committerBen Gamari <ben@smart-cactus.org>2016-10-01 20:01:29 -0400
commitf547b444fdaf1c86abede42bf4c4b1037f50f588 (patch)
tree639e077bb18d8d7072bd5f146732384fac1b427d /libraries/base/System
parentb0d53a839da0149e0142da036b6ebf5a01b3216f (diff)
downloadhaskell-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.hs12
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 #-}
-----------------------------------------------------------------------------
-- |