Skip to content

Commit

Permalink
Explicitly declare the API contract of mtl to be "safe"
Browse files Browse the repository at this point in the history
This avoids relying on the fragile "safe-inferred" status
and thus gives `mtl` a more explicit SafeHaskell API contract.

C.f. haskell/pvp#22
  • Loading branch information
hvr committed Feb 24, 2018
1 parent 05046b3 commit c7d3967
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mtl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7d3967

Please sign in to comment.