- 15 May, 2015 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 13 May, 2015 1 commit
-
-
Austin Seipp authored
This caused print007 to fail, so I guess I botched this more than I thought. This is a combination of reverting: "Fix build breakage from 9736c042", commit f35d621d. "compiler: make sure we reject -O + HscInterpreted", commit 9736c042.
-
- 11 May, 2015 1 commit
-
-
Austin Seipp authored
When using GHCi, we explicitly reject optimization, because the compilers optimization passes can introduce unboxed tuples, which the interpreter is not able to handle. But this goes the other way too: using GHCi on optimized code may cause the optimizer to float out breakpoints that the interpreter introduces. This manifests itself in weird ways, particularly if you as an API client use custom DynFlags to introduce optimization in combination with HscInterpreted. It turns out we weren't checking for consistent DynFlag settings when doing `setSessionDynFlags`, as #10052 showed. While the main driver handled it in `DynFlags` via `parseDynamicFlags`, we didn't check this elsewhere. This does a little refactoring to split out some of the common code, and immunizes the various `DynFlags` utilities in the `GHC` module from this particular bug. We should probably be checking other general invariants too. This fixes #10052, and adds some notes about the behavior in `GHC` and `FloatOut` As a bonus, expose `warningMsg` from `ErrUtils` as a helper since it didn't exist (somehow). Signed-off-by:
Austin Seipp <austin@well-typed.com> Reviewed By: edsko Differential Revision: https://phabricator.haskell.org/D727 GHC Trac Issues: #10052
-
- 07 Apr, 2015 1 commit
-
-
Edward Z. Yang authored
Summary: A common pattern when programming with signatures is to combine multiple signatures together (signature linking). We achieve this by making it not-an-error to have multiple, distinct interface files for the same module name, as long as they have the same backing implementation. When a user imports a module name, they get ALL matching signatures dumped into their scope. On the way, I refactored the module finder code, which now distinguishes between exact finds (when you had a 'Module') and regular finds (when you had a 'ModuleName'). I also refactored the package finder code to use a Monoid instance on LookupResult to collect together various results. ToDo: At the moment, if a signature is declared in the local package, it completely overrides any remote signatures. Eventually, we'll want to also pull in the remote signatures (or even override the local signature, if the full implementation is available.) There are bunch of ToDos in the code for what to do once this is done. ToDo: At the moment, whenever a module name lookup occurs in GHCi and we would have seen a signature, we instead continue and return the Module for the backing implementation. This is correct for most cases, but there might be some situations where we want something a little more fine-grained (e.g. :browse should only list identifiers which are available through the in-scope signatures, and not ALL of them.) Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, hvr, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D790 GHC Trac Issues: #9252
-
- 19 Mar, 2015 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 23 Feb, 2015 2 commits
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
thomie authored
Test Plan: deriving/should_run/T10104 Reviewers: austin, jstolarek Reviewed By: austin, jstolarek Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D672 GHC Trac Issues: #10104
-
- 06 Feb, 2015 1 commit
-
-
Simon Peyton Jones authored
It cause the entire testsuite/test/mdo directory to be ignored. We already ignore *.o files. Maybe there are some other suffixes we need to add, but ignoring *o isn't good!
-
- 03 Jan, 2015 1 commit
-
-
Edward Z. Yang authored
Summary: Where we track timestamps of object files, also track timestamps for interface files. When -fno-code -fwrite-interface is enabled, use the interface file timestamp as an extra check to see if the files are up-to-date. We had to apply this logic to one-shot and make modes. This fix would be good to merge into 7.10; it makes using -fno-code -fwrite-interface for flywheel type checking usable. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate and new test cases Reviewers: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D596 GHC Trac Issues: #9243
-
- 27 Nov, 2014 1 commit
-
-
Edward Z. Yang authored
Depends on D485 Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D487
-
- 19 Nov, 2014 1 commit
-
-
Herbert Valerio Riedel authored
`integer-gmp2` uses the new 64bit-based IEEE deconstructing primop introduced in b62bd5ec. However, the returned values differ for exceptional IEEE values: Previous (expected) semantics: > decodeFloat (-1/0) (-4503599627370496,972) > decodeFloat (1/0) (4503599627370496,972) > decodeFloat (0/0) (-6755399441055744,972) Currently (broken) semantics: > decodeFloat (-1/0 :: Double) (-9223372036854775808,-53) > decodeFloat (1/0 :: Double) (-9223372036854775808,-53) > decodeFloat (0/0 :: Double) (-9223372036854775808,-53) This patch reverts to the old expected semantics. I plan to revisit the implementation during GHC 7.11 development. This should address #9810 Reviewed By: austin, ekmett, luite Differential Revision: https://phabricator.haskell.org/D486
-
- 13 Nov, 2014 1 commit
-
-
cactus authored
generate a worker function of type Void# -> T#, and redirect the wrapper (via a compulsory unfolding) to the worker. Fixes #9732.
-
- 08 Nov, 2014 1 commit
-
-
cactus authored
This requires ensuring the continuations have arguments by adding a dummy Void# argument when needed. This is so that matching on a pattern synonym is lazy even when the result is unboxed, e.g. pattern P = () f P = 0# In this case, without dummy arguments, the generated matcher's type would be $mP :: forall (r :: ?). () -> r -> r -> r which is called in `f` at type `() -> Int# -> Int# -> Int#`, so it would be strict, in particular, in the failure continuation of `patError`. We work around this by making sure both continuations have arguments: $mP :: forall (r :: ?). () -> (Void# -> r) -> (Void# -> r) -> r Of course, if `P` (and thus, the success continuation) has any arguments, we are only adding the extra dummy argument to the failure continuation.
-
- 02 Nov, 2014 1 commit
-
-
Joachim Breitner authored
to allow the programer to explictitly set the oneShot flag. This helps with #7994 and will be used in left folds. Also see https://ghc.haskell.org/trac/ghc/wiki/OneShot This commit touches libraries/base/GHC/Event/Manager.hs (which used to have a local definition of the name oneShot) to avoid a shadowing error. Differential Revision: https://phabricator.haskell.org/D392
-
- 30 Oct, 2014 1 commit
-
-
gintas authored
Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D404
-
- 24 Oct, 2014 1 commit
-
-
Edward Z. Yang authored
Summary: Module signatures, like hs-boot files, are Haskell modules which omit value definitions and contain only signatures. This patchset implements one particular aspect of module signature, namely compiling them against a concrete implementation. It works like this: when we compile an hsig file, we must be told (via the -sig-of flag) what module this signature is implementing. The signature is compiled into an interface file which reexports precisely the entities mentioned in the signature file. We also verify that the interface is compatible with the implementation. This feature is useful in a few situations: 1. Like explicit import lists, signatures can be used to reduce sensitivity to upstream changes. However, a signature can be defined once and then reused by many modules. 2. Signatures can be used to quickly check if a new upstream version is compatible, by typechecking just the signatures and not the actual modules. 3. A signature can be used to mediate separate modular development, where the signature is used as a placeholder for functionality which is loaded in later. (This is only half useful at the moment, since typechecking against signatures without implementations is not implemented in this patchset.) Unlike hs-boot files, hsig files impose no performance overhead. This patchset punts on the type class instances (and type families) problem: instances simply leak from the implementation to the signature. You can explicitly specify what instances you expect to have, and those will be checked, but you may get more instances than you asked for. Our eventual plan is to allow hiding instances, but to consider all transitively reachable instances when considering overlap and soundness. ToDo: signature merging: when a module is provided by multiple signatures for the same base implementation, we should not consider this ambiguous. ToDo: at the moment, signatures do not constitute use-sites, so if you write a signature for a deprecated function, you won't get a warning when you compile the signature. Future work: The ability to feed in shaping information so that we can take advantage of more type equalities than might be immediately evident. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate and new tests Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, ezyang, carter, goldfire Differential Revision: https://phabricator.haskell.org/D130 GHC Trac Issues: #9252
-
- 21 Oct, 2014 1 commit
-
-
gintas authored
Test Plan: git status after a test run Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, ezyang, simonmar Differential Revision: https://phabricator.haskell.org/D333 GHC Trac Issues: #9679
-
- 15 Sep, 2014 1 commit
-
-
Edward Z. Yang authored
It was annoying to test GHCi directly, so I added a ghc-api unit test of the function instead. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 01 Sep, 2014 1 commit
-
-
thomie authored
Summary: Just skipping over a BOM, but leaving it in the Stringbuffer, is not sufficient. The Lexer calls prevChar when a regular expression starts with '^' (which is a shorthand for '\n^'). It would never match on the first line, since instead of '\n', prevChar would still return '\xfeff'. Test Plan: validate Reviewers: austin, ezyang Reviewed By: austin, ezyang Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D176 GHC Trac Issues: #6016
-
- 22 Aug, 2014 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 14 Aug, 2014 1 commit
-
-
Herbert Valerio Riedel authored
This implements the new primops clz#, clz32#, clz64#, ctz#, ctz32#, ctz64# which provide efficient implementations of the popular count-leading-zero and count-trailing-zero respectively (see testcase for a pure Haskell reference implementation). On x86, NCG as well as LLVM generates code based on the BSF/BSR instructions (which need extra logic to make the 0-case well-defined). Test Plan: validate and succesful tests on i686 and amd64 Reviewers: rwbarton, simonmar, ezyang, austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D144 GHC Trac Issues: #9340
-
- 11 Aug, 2014 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 09 Aug, 2014 2 commits
- 05 Aug, 2014 1 commit
-
-
Edward Z. Yang authored
This patch set makes us no longer assume that a package key is a human readable string, leaving Cabal free to "do whatever it wants" to allocate keys; we'll look up the PackageId in the database to display to the user. This also means we have a new level of qualifier decisions to make at the package level, and rewriting some Safe Haskell error reporting code to DTRT. Additionally, we adjust the build system to use a new ghc-cabal output Make variable PACKAGE_KEY to determine library names and other things, rather than concatenating PACKAGE/VERSION as before. Adds a new `-this-package-key` flag to subsume the old, erroneously named `-package-name` flag, and `-package-key` to select packages by package key. RFC: The md5 hashes are pretty tough on the eye, as far as the file system is concerned :( ToDo: safePkg01 test had its output updated, but the fix is not really right: the rest of the dependencies are truncated due to the fact the we're only grepping a single line, but ghc-pkg is wrapping its output. ToDo: In a later commit, update all submodules to stop using -package-name and use -this-package-key. For now, we don't do it to avoid submodule explosion. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D80
-
- 01 Aug, 2014 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 31 Jul, 2014 1 commit
-
-
rwbarton authored
-
- 29 Jul, 2014 1 commit
-
-
cactus authored
-
- 28 Jul, 2014 1 commit
-
-
Jost Berthold authored
Summary: For now, BlockedOnMVar and BlockedOnMVarRead are not distinguished. Making the distinction would mean to change an exported datatype (API change). Code for this change is included but commented out. The patch adds a test for the threadstatus, which retrieves status BlockedOnMVar for two threads blocked on writing and reading an MVar. Test Plan: ran validate, including the new test Reviewers: simonmar, austin, ezyang Reviewed By: austin, ezyang Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D83
-
- 26 Jul, 2014 1 commit
-
-
Edward Z. Yang authored
The general approach is to add a new field to the package database, reexported-modules, which considered by the module finder as possible module declarations. Unlike declaring stub module files, multiple reexports of the same physical package at the same name do not result in an ambiguous import. Has submodule updates for Cabal and haddock. NB: When a reexport renames a module, that renaming is *not* accessible from inside the package. This is not so much a deliberate design choice as for implementation expediency (reexport resolution happens only when a package is in the package database.) TODO: Error handling when there are duplicate reexports/etc is not very well tested. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: compiler/main/HscTypes.lhs testsuite/.gitignore utils/haddock
-
- 21 Jul, 2014 1 commit
-
-
Edward Z. Yang authored
Summary: Previously, the full database stack was used for ghc-pkg to modify packages, which meant that commands like 'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'. Since package modification is a "read and write" operation, we should use the flag db stack (which is currently used for reads) to determine which database to update. There is also a new flag --user-package-db, which lets you explicitly set the user database (as seen by --user). This was mostly added to aid in testing, but could be useful for end users as well. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D84
-
- 07 Jul, 2014 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 01 Jul, 2014 1 commit
-
-
rwbarton authored
Summary: Check for integer overflow in allocate() (#9172) Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D36
-
- 28 Jun, 2014 1 commit
-
-
Herbert Valerio Riedel authored
It's a bit confusing to have .gitignore files spread all over the filesystem. This commit tries to consolidate those into one .gitignore file per component. Moreover, we try to describe files to be ignored which happen to have a common identifying pattern by glob patterns. Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
- 27 Jun, 2014 1 commit
-
-
Herbert Valerio Riedel authored
Haskell2010 supports - base-10 (prefix-less), - base-8 (via `0[oO]`-prefix), and - base-16 (via `0[xX]`-prefix) integer literals. This commit adds syntax support for base-2 integer literals via the new `0[bB]` prefix. The use of a `0b` prefix for indicating binary literals is known from popular programming languages such as C++14, Perl, Python, Ruby, and Java. This syntax extension is disabled by default and can be enabled via the new `{-# LANGUAGE BinaryLiterals #-}` pragma and/or the new `-XBinaryLiterals` This new extensions requires to upgrade the `ExtsBitmap` type from `Word` to `Word64` as this adds a 33th flag which is not guaranteed to fit into a `Word`. Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org> Differential Revision: https://phabricator.haskell.org/D22
-
- 26 Mar, 2014 1 commit
-
-
tibbe authored
This adds -fmax-inline-memcpy-insns and -fmax-inline-memset-insns. These flags control when we inline calls to memcpy/memset with statically known arguments. The flag naming style is taken from GCC and the same limit is used by both GCC and LLVM.
-
- 14 Jan, 2014 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 13 Jan, 2014 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 12 Jan, 2014 2 commits
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-