summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-11-27 15:29:44 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-12 21:28:47 -0500
commit9129210f7e9937c1065330295f06524661575839 (patch)
tree8eee18f92d23eb2fe39adecda1d547fa8d9fa7cb /testsuite/tests/ghci
parent49f83a0de12a7c02f4a6e99d26eaa362a373afa5 (diff)
downloadhaskell-9129210f7e9937c1065330295f06524661575839.tar.gz
Overloaded Quotation Brackets (#246)
This patch implements overloaded quotation brackets which generalise the desugaring of all quotation forms in terms of a new minimal interface. The main change is that a quotation, for example, [e| 5 |], will now have type `Quote m => m Exp` rather than `Q Exp`. The `Quote` typeclass contains a single method for generating new names which is used when desugaring binding structures. The return type of functions from the `Lift` type class, `lift` and `liftTyped` have been restricted to `forall m . Quote m => m Exp` rather than returning a result in a Q monad. More details about the feature can be read in the GHC proposal. https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0246-overloaded-bracket.rst
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/T16670/TH.hs1
-rw-r--r--testsuite/tests/ghci/scripts/T8831.hs2
2 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/T16670/TH.hs b/testsuite/tests/ghci/T16670/TH.hs
index f288c784f0..36f705e2bd 100644
--- a/testsuite/tests/ghci/T16670/TH.hs
+++ b/testsuite/tests/ghci/T16670/TH.hs
@@ -1,3 +1,4 @@
{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NoMonomorphismRestriction #-}
module TH where
th = [|909|]
diff --git a/testsuite/tests/ghci/scripts/T8831.hs b/testsuite/tests/ghci/scripts/T8831.hs
index b0a3cc5bdf..4bf9f6d870 100644
--- a/testsuite/tests/ghci/scripts/T8831.hs
+++ b/testsuite/tests/ghci/scripts/T8831.hs
@@ -1,3 +1,3 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, NoMonomorphismRestriction #-}
module T8831 where
foo = [| 3 |]