From c7d396732bd45e409478bd4df1d0ca95d6f39356 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 24 Feb 2018 22:48:36 +0100 Subject: [PATCH] Explicitly declare the API contract of `mtl` to be "safe" This avoids relying on the fragile "safe-inferred" status and thus gives `mtl` a more explicit SafeHaskell API contract. C.f. https://github.com/haskell/pvp/issues/22 --- mtl.cabal | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mtl.cabal b/mtl.cabal index 2670a81..7f11397 100644 --- a/mtl.cabal +++ b/mtl.cabal @@ -66,6 +66,11 @@ Library FlexibleInstances UndecidableInstances + -- This is a SafeHaskell safeguard (pun intended) to explicitly declare the API contract of `mtl` + -- GHC versions before 7.4 were hopelessly broken or incapable of SafeHaskell + if impl(ghc >= 7.4) + default-extensions: Safe + ghc-options: -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations if impl(ghc >= 8.0)