- 18 Jun, 2011 5 commits
-
-
dterei authored
While we previously checked the safety of safe imported modules we didn't do this check transitively. This can be a problem when we depend on a trustworthy module in a package that is no longer trusted, so we should fail compilation. We already stored in an interface file the transitive list of packages a module depends on. Now we extend that list to include a flag saying if we depend on that package being trusted as well.
-
dterei authored
For instance decls we no longer store the SafeHaskell mode in this data structure but instead store it as a bool field in the overlap flag structure.
-
dterei authored
OverlappingInstances in Safe modules can only overlap instances defined in the same module.
-
dterei authored
-
dterei authored
-
- 03 Jun, 2011 1 commit
-
-
chak@cse.unsw.edu.au. authored
-
- 14 Sep, 2010 1 commit
-
-
simonpj@microsoft.com authored
and adjust imports accordingly
-
- 13 Sep, 2010 1 commit
-
-
simonpj@microsoft.com authored
This major patch implements the new OutsideIn constraint solving algorithm in the typecheker, following our JFP paper "Modular type inference with local assumptions". Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
-
- 20 Mar, 2010 1 commit
-
-
Ian Lynagh authored
-
- 21 Aug, 2009 1 commit
-
-
Thomas Schilling authored
Without this, concurrent updates to the EPS could introduce overlapping instances (even though they came from the same module).
-
- 14 Aug, 2009 1 commit
-
-
simonpj@microsoft.com authored
This patch tides up Ian's fix a little. In particular, if if you {-# SOURCE #-} import a module from a different package, you now get a much more civlised error message.
-
- 13 Aug, 2009 1 commit
-
-
Ian Lynagh authored
Suppose we import anotherPackage:M, which exports things from anotherPackage:Internal. Then GHC will want to read anotherPackage:Internal.hi. However, if we have also SOURCE-imported thisPackage:Internal then we don't want GHC to try to read anotherPackage:Internal.hi-boot instead. The mapping that tells us whether a module is SOURCE-imported uses just the module name for the key, so we have to check the package ID before looking it up. Fixes #3007.
-
- 07 Jul, 2009 1 commit
-
-
Ian Lynagh authored
-
- 01 Jul, 2009 1 commit
-
-
batterseapower authored
-
- 02 Jan, 2009 1 commit
-
-
simonpj@microsoft.com authored
This biggish patch addresses Trac #2670. The main effect is to make record selectors into ordinary functions, whose unfoldings appear in interface files, in contrast to their previous existence as magic "implicit Ids". This means that the usual machinery of optimisation, analysis, and inlining applies to them, which was failing before when the selector was somewhat complicated. (Which it can be when strictness annotations, unboxing annotations, and GADTs are involved.) The change involves the following points * Changes in Var.lhs to the representation of Var. Now a LocalId can have an IdDetails as well as a GlobalId. In particular, the information that an Id is a record selector is kept in the IdDetails. While compiling the current module, the record selector *must* be a LocalId, so that it participates properly in compilation (free variables etc). This led me to change the (hidden) representation of Var, so that there is now only one constructor for Id, not two. * The IdDetails is persisted into interface files, so that an importing module can see which Ids are records selectors. * In TcTyClDecls, we generate the record-selector bindings in renamed, but not typechecked form. In this way, we can get the typechecker to add all the types and so on, which is jolly helpful especially when GADTs or type families are involved. Just like derived instance declarations. This is the big new chunk of 180 lines of code (much of which is commentary). A call to the same function, mkAuxBinds, is needed in TcInstDcls for associated types. * The typechecker therefore has to pin the correct IdDetails on to the record selector, when it typechecks it. There was a neat way to do this, by adding a new sort of signature to HsBinds.Sig, namely IdSig. This contains an Id (with the correct Name, Type, and IdDetails); the type checker uses it as the binder for the final binding. This worked out rather easily. * Record selectors are no longer "implicit ids", which entails changes to IfaceSyn.ifaceDeclSubBndrs HscTypes.implicitTyThings TidyPgm.getImplicitBinds (These three functions must agree.) * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl comments) of very error prone code. Happy days. * A TyCon no longer contains the list of record selectors: algTcSelIds is gone The renamer is unaffected, including the way that import and export of record selectors is handled. Other small things * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data constructor had a wrapper. I've replaced that with an explicit flag in the interface file. More robust I hope. * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.
-
- 30 Oct, 2008 1 commit
-
-
simonpj@microsoft.com authored
This patch, written by Max Bolingbroke, does two things 1. It adds a new CoreM monad (defined in simplCore/CoreMonad), which is used as the top-level monad for all the Core-to-Core transformations (starting at SimplCore). It supports * I/O (for debug printing) * Unique supply * Statistics gathering * Access to the HscEnv, RuleBase, Annotations, Module The patch therefore refactors the top "skin" of every Core-to-Core pass, but does not change their functionality. 2. It adds a completely new facility to GHC: Core "annotations". The idea is that you can say {#- ANN foo (Just "Hello") #-} which adds the annotation (Just "Hello") to the top level function foo. These annotations can be looked up in any Core-to-Core pass, and are persisted into interface files. (Hence a Core-to-Core pass can also query the annotations of imported things.) Furthermore, a Core-to-Core pass can add new annotations (eg strictness info) of its own, which can be queried by importing modules. The design of the annotation system is somewhat in flux. It's designed to work with the (upcoming) dynamic plug-ins mechanism, but is meanwhile independently useful. Do not merge to 6.10!
-
- 03 Oct, 2008 1 commit
-
-
simonpj@microsoft.com authored
nameModule fails on an InternalName. These ASSERTS tell you which call failed.
-
- 05 Aug, 2008 1 commit
-
-
Simon Marlow authored
Now you can say import "network" Network.Socket and get Network.Socket from package "network", even if there are multiple Network.Socket modules in scope from different packages and/or the current package. This is not really intended for general use, it's mainly so that we can build backwards-compatible versions of packages, where we need to be able to do module GHC.Base (module New.GHC.Base) where import "base" GHC.Base as New.GHC.Base
-
- 20 Jul, 2008 2 commits
-
-
Thomas Schilling authored
-
Ian Lynagh authored
-
- 28 May, 2008 1 commit
-
-
Simon Marlow authored
This is a much more robust way to do recompilation checking. The idea is to create a fingerprint of the ABI of an interface, and track dependencies by recording the fingerprints of ABIs that a module depends on. If any of those ABIs have changed, then we need to recompile. In bug #1372 we weren't recording dependencies on package modules, this patch fixes that by recording fingerprints of package modules that we depend on. Within a package there is still fine-grained recompilation avoidance as before. We currently use MD5 for fingerprints, being a good compromise between efficiency and security. We're not worried about attackers, but we are worried about accidental collisions. All the MD5 sums do make interface files a bit bigger, but compile times on the whole are about the same as before. Recompilation avoidance should be a bit more accurate than in 6.8.2 due to fixing #1959, especially when using -O.
-
- 04 May, 2008 1 commit
-
-
Ian Lynagh authored
-
- 12 Apr, 2008 1 commit
-
-
Ian Lynagh authored
-
- 29 Mar, 2008 2 commits
-
-
Ian Lynagh authored
Modules that need it import it themselves instead.
-
Ian Lynagh authored
-
- 17 Mar, 2008 3 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
-
Ian Lynagh authored
Very little parameter passing is needed without it, so there was no real benefit to it.
-
- 07 Feb, 2008 1 commit
-
-
Ian Lynagh authored
These fix these failures: break008(ghci) break009(ghci) break026(ghci) ghci.prog009(ghci) ghci025(ghci) print007(ghci) prog001(ghci) prog002(ghci) prog003(ghci) at least some of which have this symptom: Exception: expectJust prune
-
- 05 Feb, 2008 1 commit
-
-
simonpj@microsoft.com authored
-
- 17 Jan, 2008 1 commit
-
-
twanvl authored
-
- 10 Oct, 2007 1 commit
-
-
Dan Licata authored
This patch implements three new features: * view patterns (syntax: expression -> pat in a pattern) * working versions of record wildcards and record puns See the manual for detailed descriptions. Other minor observable changes: * There is a check prohibiting local fixity declarations when the variable being fixed is not defined in the same let * The warn-unused-binds option now reports warnings for do and mdo stmts Implementation notes: * The pattern renamer is now in its own module, RnPat, and the implementation is now in a CPS style so that the correct context is delivered to pattern expressions. * These features required a fairly major upheaval to the renamer. Whereas the old version used to collect up all the bindings from a let (or top-level, or recursive do statement, ...) and put them into scope before renaming anything, the new version does the collection as it renames. This allows us to do the right thing with record wildcard patterns (which need to be expanded to see what names should be collected), and it allows us to implement the desired semantics for view patterns in lets. This change had a bunch of domino effects brought on by fiddling with the top-level renaming. * Prior to this patch, there was a tricky bug in mkRecordSelId in HEAD, which did not maintain the invariant necessary for loadDecl. See note [Tricky iface loop] for details.
-
- 08 Oct, 2007 1 commit
-
-
Simon Marlow authored
-
- 10 Sep, 2007 1 commit
-
-
Simon Marlow authored
This fixes the long-standing bug that prevents some code with mutally-recursive modules from being compiled with --make and -O, including GHC itself. See the comments for details. There are some additional cleanups that were forced/enabled by this patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any useful information, since a Name already contains its defining Module. In fact when re-typechecking an interface file we were wrongly replacing the interesting SrcSpans in the Names with boring importedSrcSpans, which meant that location information could degrade after reloading modules. Also, recreating all these Names was a waste of space/time.
-
- 04 Sep, 2007 1 commit
-
-
Ian Lynagh authored
-
- 03 Sep, 2007 1 commit
-
-
Ian Lynagh authored
Older GHCs can't parse OPTIONS_GHC. This also changes the URL referenced for the -w options from WorkingConventions#Warnings to CodingStyle#Warnings for the compiler modules.
-
- 01 Sep, 2007 1 commit
-
-
Ian Lynagh authored
-
- 17 Jul, 2007 1 commit
-
-
andy@galois.com authored
Now, if a single module *anywhere* on the module tree is built with -fhpc, the binary will enable reading/writing of <bin>.tix. Previously, you needed to compile Main to allow coverage to operate. This changes the file format for .hi files; you will need to recompile every library.
-
- 16 Jul, 2007 1 commit
-
-
rl@cse.unsw.edu.au authored
For the most part, this patch simply renames functions which had been used for closure conversion and hence have CC in their name. It also changes the OccNames generated by vectorisation.
-
- 06 Jun, 2007 1 commit
-
-
simonpj@microsoft.com authored
The renamer used to be responsible for making sure that all interfaces with instance decls (other than orphans) were loaded. But TH makes that impossible, so the typechecker does it, via checkWiredInTyCon. This patch simply removes redundant additions to the free-variable set in the renamer, which were there, I believe, solely to ensure that the instances came in. Removing them should change nothing, but it's a useful clean up.
-