- 17 Feb, 2014 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 20 Jan, 2014 1 commit
-
-
Gergő Érdi authored
This patch implements Pattern Synonyms (enabled by -XPatternSynonyms), allowing y ou to assign names to a pattern and abstract over it. The rundown is this: * Named patterns are introduced by the new 'pattern' keyword, and can be either *unidirectional* or *bidirectional*. A unidirectional pattern is, in the simplest sense, simply an 'alias' for a pattern, where the LHS may mention variables to occur in the RHS. A bidirectional pattern synonym occurs when a pattern may also be used in expression context. * Unidirectional patterns are declared like thus: pattern P x <- x:_ The synonym 'P' may only occur in a pattern context: foo :: [Int] -> Maybe Int foo (P x) = Just x foo _ = Nothing * Bidirectional patterns are declared like thus: pattern P x y = [x, y] Here, P may not only occur as a pattern, but also as an expression when given values for 'x' and 'y', i.e. bar :: Int -> [Int] bar x = P x 10 * Patterns can't yet have their own type signatures; signatures are inferred. * Pattern synonyms may not be recursive, c.f. type synonyms. * Pattern synonyms are also exported/imported using the 'pattern' keyword in an import/export decl, i.e. module Foo (pattern Bar) where ... Note that pattern synonyms share the namespace of constructors, so this disambiguation is required as a there may also be a 'Bar' type in scope as well as the 'Bar' pattern. * The semantics of a pattern synonym differ slightly from a typical pattern: when using a synonym, the pattern itself is matched, followed by all the arguments. This means that the strictness differs slightly: pattern P x y <- [x, y] f (P True True) = True f _ = False g [True, True] = True g _ = False In the example, while `g (False:undefined)` evaluates to False, `f (False:undefined)` results in undefined as both `x` and `y` arguments are matched to `True`. For more information, see the wiki: https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms/Implementation Reviewed-by:
Simon Peyton Jones <simonpj@microsoft.com> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 14 Jan, 2014 1 commit
-
-
Austin Seipp authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 07 Jan, 2014 1 commit
-
-
John Lenz authored
When reading the program from standard input, runghc did not properly handle the --ghc-arg= escape for arguments to ghc which do not start with a dash, since arguments were processed twice and the first time the --ghc-arg= was stripped. Now arguments are only processed once. For backwards compatibility, a prefix of --ghc-arg=--ghc-arg= is allowed since this prefix will work on both old and new versions of ghc. This fixes #8601 Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 28 Nov, 2013 1 commit
-
-
Simon Marlow authored
-
- 15 Nov, 2013 1 commit
-
-
Simon Peyton Jones authored
-
- 27 Oct, 2013 2 commits
-
-
Herbert Valerio Riedel authored
This is a follow-up to 0620241a which addressed only the `Prim.hs` output; this commit adds the missing `LANGUAGE` pragmas for the generated `PrimopWrappers.hs` output as well. While at it, the redundant `CPP` pragma is removed from the generated `Prim.hs` file. Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
Herbert Valerio Riedel authored
Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
- 26 Oct, 2013 1 commit
-
-
Austin Seipp authored
This reverts commit 2f5db98e.
-
- 25 Oct, 2013 1 commit
-
-
Simon Marlow authored
-
- 17 Oct, 2013 1 commit
-
-
Joachim Breitner authored
This fixes #8452.
-
- 12 Oct, 2013 1 commit
-
-
Darin Morrison authored
Mac OS X 10.9 mkdir is apparently stricter than the Mac OS X 10.8 mkdir about which paths are considered valid arguments. For example, in a typical build on Mac OS X 10.9, the first of the following invocations of mkdirhier.sh will succeed but the second will fail: "inplace/bin/mkdirhier" utils/ghc-cabal/dist/build/tmp//. # WORKS "inplace/bin/mkdirhier" bootstrapping/. # FAILS Simply prefixing the path arguments with "./" causes both to succeed: "inplace/bin/mkdirhier" ./utils/ghc-cabal/dist/build/tmp//. # WORKS "inplace/bin/mkdirhier" ./bootstrapping/. # WORKS Testing indicates failure on paths satisfying all of these criteria: - path is suffixed with "/." - path is only 1 level deep (e.g., "foo/."; _not_ "foo/bar/.") - path is _not_ prefixed with "./" This workaround prefixes "./" to the path argument passed to mkdir. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 11 Oct, 2013 2 commits
-
-
Krzysztof Gogolewski authored
-
Herbert Valerio Riedel authored
Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
- 02 Oct, 2013 1 commit
-
-
leroux authored
This fixes the fingerprint script on windows, since we can't rely on using '#!/usr/bin/perl' Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 01 Oct, 2013 1 commit
-
-
Simon Marlow authored
-
- 23 Sep, 2013 6 commits
-
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
width and element type. SIMD primops are now polymorphic in vector size and element type, but only internally to the compiler. More specifically, utils/genprimopcode has been extended so that it "knows" about SIMD vectors. This allows us to, for example, write a single definition for the "add two vectors" primop in primops.txt.pp and have it instantiated at many vector types. This generates a primop in GHC.Prim for each vector type at which "add two vectors" is instantiated, but only one data constructor for the PrimOp data type, so the code generator is much, much simpler.
-
gmainlan@microsoft.com authored
GHC.PrimopWrappers is only used by GHCi, which cannot evaluate LLVM-only primops in any case.
-
- 18 Sep, 2013 1 commit
-
-
eir@cis.upenn.edu authored
This fixes bugs #8185, #8234, and #8246. The new syntax is explained in the comments to #8185, appears in the "Roles" subsection of the manual, and on the [wiki:Roles] wiki page. This change also removes the ability for a role annotation on type synonyms, as noted in #8234.
-
- 15 Sep, 2013 1 commit
-
-
bos authored
Our special ghc-cabal command needs to be told that we are building with dynamic library support when it does its copying. We do so by passing an extra parameter from ghc.mk.
-
- 13 Sep, 2013 1 commit
-
-
Joachim Breitner authored
In preparation for the primitive class Coercible
-
- 11 Sep, 2013 1 commit
-
-
Austin Seipp authored
Authored-by:
David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- 07 Sep, 2013 1 commit
-
-
It was sorted by version number so far. I also added a sort to the normal output (without --simple-output) since the source it comes from does not guarantee sortedness. Signed-off-by:
Austin Seipp <aseipp@pobox.com>
-
- 04 Sep, 2013 1 commit
-
-
chak@cse.unsw.edu.au. authored
* This partially fixes #8148. However, --with-ghc-4.8 will still not work given the rather dubious m4 macros and the failures in the test suite due to '-nodefaultlibs' still need to be fixed.
-
- 26 Aug, 2013 1 commit
-
-
Herbert Valerio Riedel authored
Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to some minor Cabal API changes, and `bin-package-db` is made aware of Cabal's recently added AGPL licence support.
-
- 23 Aug, 2013 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 22 Aug, 2013 1 commit
-
-
Gabor Greif authored
-
- 14 Aug, 2013 1 commit
-
-
Jan Stolarek authored
This patch modifies all comparison primops for Char#, Int#, Word#, Double#, Float# and Addr# to return Int# instead of Bool. A value of 1# represents True and 0# represents False. For a more detailed description of motivation for this change, discussion of implementation details and benchmarking results please visit the wiki page: http://hackage.haskell.org/trac/ghc/wiki/PrimBool There's also some cleanup: whitespace fixes in files that were extensively edited in this patch and constant folding rules for Integer div and mod operators (which for some reason have been left out up till now).
-
- 06 Aug, 2013 1 commit
-
-
gmainland authored
We were using SSE is some places and XMM in others. Better to keep a consistent naming scheme.
-
- 24 Jun, 2013 1 commit
-
-
gmainlan@microsoft.com authored
I was seeing many "WARNING: cache is out of date" errors during validation claiming that my package cache was out of date. This patch eliminates those errors by ensuring that when we rebuild the package cache, the modification time of the directory containing the package database is set to be the same as the modification time of the cache.
-
- 15 Jun, 2013 2 commits
-
-
-
The commit replaces mkWeakForeignEnv# with addCFinalizerToWeak#. This new primop mutates an existing Weak# object and adds a new C finalizer to it. This change removes an invariant in MarkWeak.c, namely that the relative order of Weak# objects in the list needs to be preserved across GC. This makes it easier to split the list into per-generation structures. The patch also removes a race condition between two threads calling finalizeWeak# on the same WEAK object at that same time.
-
- 13 Jun, 2013 1 commit
-
-
As spotted by Julian Gilbey and reported at http://bugs.debian.org/710305
-
- 30 May, 2013 1 commit
-
-
ian@well-typed.com authored
-
- 14 May, 2013 2 commits
-
-
ian@well-typed.com authored
There's now an internal -dll-split flag, which we use to tell GHC how the GHC package is split into 2 separate DLLs. This is used by Packages.isDllName to determine whether a call is within the same DLL, or whether it is a call to another DLL.
-
ian@well-typed.com authored
It now consistently takes directory and distDirectory as its first 2 arguments. Also, it only supports configuring 1 package at a time now (we weren't using the ability to configure more than one at once).
-