[GHC] #1338: base package breakup
GHC
trac at galois.com
Tue Aug 25 17:20:55 EDT 2009
#1338: base package breakup
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: task | Status: new
Priority: normal | Milestone: 6.12 branch
Component: libraries/base | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by duncan):
Replying to [comment:29 mokus]:
> Would it be possible to implement at least as much of this splitting as
is needed to remove all "unsafe" operations from base? I would very much
like to be able to use packages as a 'unit of analysis' for a relatively
simple library I'm working on that attempts to maintain a package database
of "safe" packages (verified not to perform any "dangerous" IO outside the
IO type, for example).
I would suggest an approach using a combination of annotations and
analysis. Certainly a package that contains only pure functions and
depends only on other packages you've deemed to be ok, is itself ok. That
requires no annotation, just analysis. Your problem of course is packages
that either exports genuinely unsafe things or that uses unsafe things to
export safe abstractions. My suggestion here is to annotate the things
that are safe but use unsafe things internally. Of course you then need to
"believe" the annotations, so you would want a way to specify a list of
packages where you will trust the annotations to be correct. You don't
need to annotate things as unsafe since all primitives are considered
unsafe unless marked safe.
The point is you do not need to conflate the safe/unsafe distinction with
package boundaries.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1338#comment:33>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list