summaryrefslogtreecommitdiff
path: root/libraries/template-haskell
Commit message (Collapse)AuthorAgeFilesLines
* Implement -XStaticValues.wip/static-pointersFacundo Domínguez2014-12-024-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains contributions from Alexander Vershilov and Mathieu Boespflug. As proposed in [1], this extension introduces a new syntactic form `static e`, where `e :: a` can be any closed expression. The static form produces a value of type `StaticPtr a`, which works as a reference that programs can "dereference" to get the value of `e` back. References are like `Ptr`s, except that they are stable across invocations of a program. In essence the extension collects the arguments of the static form into a global static pointer table. The expressions can be looked up by a fingerprint computed from the package, the module and a fresh name given to the expression. For more details we refer to the users guide section contained in the patch. The extension is a contribution to the Cloud Haskell ecosystem (distributed-process and related), and thus has the potential to foster Haskell as a programming language for distributed systems. The immediate improvement brought by the extension is the elimination of remote tables from Cloud Haskell applications. Such applications contain table fragments spread throughout multiple modules and packages. Eliminating these fragments saves the programmer the burden required to construct and assemble the global remote table, a verbose and error-prone process, even with the help of Template Haskell, that moreover pollutes the export lists of all modules. [1] Jeff Epstein, Andrew P. Black, and Simon Peyton-Jones. Towards Haskell in the cloud. SIGPLAN Not., 46(12):118–129, September 2011. ISSN 0362-1340.
* Fix #9064 by adding support for generic default signatures to TH.Richard Eisenberg2014-11-124-1/+11
|
* Fix #8100, by adding StandaloneDerivD to TH's Dec type.Richard Eisenberg2014-11-124-1/+12
|
* Derive Generic for TH types (#9527)Richard Eisenberg2014-11-121-41/+42
|
* Remove unboxed Int# fields from NameFlavour (#9527)Richard Eisenberg2014-11-122-98/+19
|
* Untabify template-haskell.Richard Eisenberg2014-11-125-51/+51
|
* Fix #9738, by handling {-# ANN ... #-} in DsMeta.Richard Eisenberg2014-11-011-0/+11
|
* Add support for LINE pragma in template-haskellEric Mertens2014-10-074-0/+7
| | | | | | | | | | | | | | | | | | Summary: Provide a way to generate {-# LINE #-} pragmas when generating Decs in Template Haskell. This allows more meaningful line numbers to be reported in compile-time errors for dynamically generated code. Test Plan: Run test suite Reviewers: austin, hvr Reviewed By: austin Subscribers: hvr, simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D299
* `M-x delete-trailing-whitespace` & `M-x untabify`Herbert Valerio Riedel2014-09-241-72/+72
|
* Move `Maybe`-typedef into GHC.BaseHerbert Valerio Riedel2014-09-161-2/+2
| | | | | | | This is preparatory work for reintroducing SPECIALISEs that were lost in d94de87252d0fe2ae97341d186b03a2fbe136b04 Differential Revision: https://phabricator.haskell.org/D214
* Bump `base` version to 4.8.0.0 for realHerbert Valerio Riedel2014-09-092-2/+9
| | | | | | | | | | | | | | | | This commit updates several submodules in order to bump the upper bounds on `base` of most boot packages Moreover, this updates some of the test-suite cases which have version numbers hardcoded within. However, I'm not sure if this commit didn't introduce the following two test-failures ghc-api T8628 [bad stdout] (normal) ghc-api T8639_api [bad stdout] (normal) This needs investigation
* Make Applicative a superclass of MonadAustin Seipp2014-09-092-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This includes pretty much all the changes needed to make `Applicative` a superclass of `Monad` finally. There's mostly reshuffling in the interests of avoid orphans and boot files, but luckily we can resolve all of them, pretty much. The only catch was that Alternative/MonadPlus also had to go into Prelude to avoid this. As a result, we must update the hsc2hs and haddock submodules. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Build things, they might not explode horribly. Reviewers: hvr, simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D13
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Simplify .gitignore filesHerbert Valerio Riedel2014-06-281-2/+16
| | | | | | | | | 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>
* Whitespace onlyGabor Greif2014-06-281-61/+61
|
* Typos in commentsGabor Greif2014-06-191-1/+1
|
* Refine deprecation warnings in template-haskell.Richard Eisenberg2014-06-111-2/+2
|
* Add .gitignore for autogenerated test files.Edward Z. Yang2014-05-291-0/+2
| | | | | | | | I used this shell command to automatically generate the lists: for i in `git ls-files -o --exclude-standard --directory`; do echo "`basename $i`" >> "`dirname "$i"`/.gitignore"; done Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Provide deprecated backward compatible implementation to 'equalP'Gabor Greif2014-05-192-1/+10
|
* Re-add 'classP' with a compatible implementation and a deprecation noticeGabor Greif2014-05-192-1/+8
|
* Drop `template-haskell`'s build-dep on `containers`Herbert Valerio Riedel2014-04-253-3/+113
| | | | | | | | | | | | | | | | | | | This is an attempt to address https://github.com/haskell/cabal/issues/1811 by replicating the less than 100 lines of code actually used from the containers package into an internal non-exposed `template-haskell` module. Moreover, `template-haskell` does not expose the `Map` type, so this change should have no visible effect on the public API. It may turn out that `Data.Map` is not necessary and that even a simple list-based associative list (`Prelude.lookup`) may suffice. However, in order to avoid any regressions, this commit takes the safe route and just clones `Data.Map` for now. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update Cabal source-repository entries (re #8545)Herbert Valerio Riedel2014-04-191-6/+2
| | | | | | | | This adapts the source-repository entries to match the new situation of base.git, ghc-prim.git, integer-gmp.git, integer-simple.git, and template-haskell.git being folded into ghc.git Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Bump to 2.10.0.0Herbert Valerio Riedel2014-03-231-3/+3
| | | | | | Due to backward-incompat changes in 57b662c (re #7021) Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add documentation to why Pred has become a type synonym.Richard Eisenberg2014-02-091-0/+3
|
* Change type of equalityT to be more parallel with others.Richard Eisenberg2014-02-091-7/+2
|
* Make Pred a type synonym of Type (issue #7021)YoEight2014-02-094-49/+37
| | | | | | In order to make any type as a Predicate in Template Haskell, as allowed by ConstraintKinds Signed-off-by: Richard Eisenberg <eir@cis.upenn.edu>
* Deprecate TH.global (Trac #8656)Simon Peyton Jones2014-01-091-0/+2
|
* Improve mkName, so that it correctly parses the name ^..Simon Peyton Jones2013-12-301-4/+20
| | | | This fixes Trac #8633; thanks to aavogt for a first draft.
* Kill trailing whitespacesJan Stolarek2013-12-281-18/+18
|
* Use type synonymJan Stolarek2013-12-281-1/+1
|
* Use addDependentFile in quoteFile.Austin Seipp2013-11-031-1/+2
| | | | | | | We'd expect recompilation if these files change. Authored-by: Adam Vogt <vogt.adam@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Allow module reification (#1480)Austin Seipp2013-11-014-4/+38
| | | | | Authored-by: Gergely Risko <gergely@risko.hu> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Refactor & modernize `.cabal` to `cabal-version>=1.10`Herbert Valerio Riedel2013-10-241-23/+47
| | | | | | | | | | | | Updates the `description` include a link to the Haskell wiki and list potantially used extensions in `other-extensions`. This also sets proper `build-depends` which effectively tie `template-haskell` to GHC 7.7/7.8 and thus should help keep `cabal-install` from attempting to compile the `template-haskell` package with older/newer GHCs. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Declare all language extensions via `{-# LANGUAGE #-}`Herbert Valerio Riedel2013-10-242-2/+2
| | | | | | Only a few were missing in the `{-# LANGUAGE #-}` annotations. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Make TExp's argument have nominal role (Trac #8459)Simon Peyton Jones2013-10-221-1/+15
|
* Add reifyAnnotations (#8397)Austin Seipp2013-10-112-3/+20
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add Template Haskell state.Geoffrey Mainland2013-10-041-0/+16
| | | | | | The Quasi monad can now carry state, and this state can be shared amongst quasiquoters/splices/etc. State is stored in a finite map of Dynamic values and is indexed by TypeReps.
* Add support for top-level finalizersGeoffrey Mainland2013-10-041-0/+9
|
* Correctly pretty-print let and do expressions.Geoffrey Mainland2013-10-041-3/+13
|
* Add the TExpQ type alias.Geoffrey Mainland2013-10-041-0/+1
|
* Make a TExp a wrap a TH.Exp instead of a TH.ExpQ.Geoffrey Mainland2013-10-041-1/+9
| | | | | | | | We also provide two new helper functions: unTypeQ :: Q (TExp a) -> Q Exp unsafeTExpCoerce :: Q Exp -> Q (TExp a)
* Add a method to the Quasi type class that adds new top-level declarations.Geoffrey Mainland2013-10-041-0/+9
|
* Add TExp data type.Geoffrey Mainland2013-10-042-0/+11
|
* Add TH support for annotations (#8340)Austin Seipp2013-10-014-2/+19
| | | | | Authored-by: Gergely Risko <gergely@risko.hu> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Follow changes in comparison primops (see #6135)Jan Stolarek2013-09-181-9/+8
|
* Trailing whitespacesJan Stolarek2013-09-181-71/+71
|
* Support new role annotation syntax.Richard Eisenberg2013-09-174-24/+42
| | | | | | | This reverts the change to TyVarBndr (which now has only two constructors, PlainTV and KindedTV) and adds a new Dec, RoleAnnotD. There is also an updated definition for the type Role, to allow for wildcard annotations.
* Update Git repo URL in `.cabal` fileHerbert Valerio Riedel2013-09-111-1/+1
|
* Fix AMP warningsDavid Luposchainsky2013-09-081-1/+9
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Improve pretty printing for Template Haskell operatorsSimon Peyton Jones2013-08-291-4/+21
| | | | | | Fixes Trac #8187, #8188. Thanks to Yoshikuni Jujo for pointing this out and doing the first draft.