patch for containers to use Safe Haskell #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Johan and Milan,
I've worked on a new feature for GHC 7.2 called Safe Haskell. I'd like
to update containers to use it as I'm trying to get all packages included
with GHC updated.
Safe Haskell is a new language extension I've been working on with
David Mazieres and the Simons for GHC 7.2.
http://hackage.haskell.org/trac/ghc/wiki/SafeHaskell
Basically it provides a language pragmas 'Safe' that restricts the
module being compiled to only be able to use a subset of the Haskell
language so that you can trust the type system is sound. (i.e no
unsafePerformIO). As part of the restriction, the module can only
import other modules that are considered safe. A module is considered
Safe if it is compiled with the 'Safe' language pragma or if its
compiled with the 'Trustworthy' pragma. The trustworthy pragma doesn't
restrict the features the module can use at all so its appropriate for
modules that may use unsafe features internally but only export an API
that can be used in a safe manner. When I speak about safety I'm
mostly referring to being able to trust the type system and module
boundaries. Trustworthy compiled modules can therefore import any
other module, they don't require imports to be safe.
I've attached a patch that updates containers to use Safe Haskell and
would love it if you could apply.
Cheers,
David