[commit: ghc] master: TH: Add Trustworthy language pragma (7b317ef)
git at git.haskell.org
git at git.haskell.org
Sun Jan 8 00:17:25 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/7b317effd59f56bc8450ea8efbb1ef5954f09e5d/ghc
>---------------------------------------------------------------
commit 7b317effd59f56bc8450ea8efbb1ef5954f09e5d
Author: Erik de Castro Lopo <erik.decastrolopo at ambiata.com>
Date: Sun Jan 8 08:34:30 2017 +1100
TH: Add Trustworthy language pragma
Test Plan: validate
Reviewers: goldfire, bgamari, austin, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, simonpj, thomie, goldfire
Differential Revision: https://phabricator.haskell.org/D2546
GHC Trac Issues: #12511
>---------------------------------------------------------------
7b317effd59f56bc8450ea8efbb1ef5954f09e5d
libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 3 ++-
testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs | 2 --
testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr | 7 ++++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 9de531a..92e48ad 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP, DeriveDataTypeable,
DeriveGeneric, FlexibleInstances, DefaultSignatures,
- RankNTypes, RoleAnnotations, ScopedTypeVariables #-}
+ RankNTypes, RoleAnnotations, ScopedTypeVariables,
+ Trustworthy #-}
{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs
index 5f1e51c..ba5766b 100644
--- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs
+++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.hs
@@ -10,5 +10,3 @@ $(mkSimpleClass ''A)
main = do
let b = c :: A
putStrLn $ "I have a value of A :: " ++ show b
-
-
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
index b23875b..55aa3a5 100644
--- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
+++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
@@ -6,7 +6,8 @@ SafeLang12_B.hs:2:14: warning:
-XTemplateHaskell is not allowed in Safe Haskell; ignoring -XTemplateHaskell
[1 of 3] Compiling SafeLang12_A ( SafeLang12_A.hs, SafeLang12_A.o )
[2 of 3] Compiling SafeLang12_B ( SafeLang12_B.hs, SafeLang12_B.o )
+[3 of 3] Compiling Main ( SafeLang12.hs, SafeLang12.o )
-SafeLang12_B.hs:5:1: error:
- Language.Haskell.TH: Can't be safely imported!
- The module itself isn't safe.
+SafeLang12.hs:8:1: error:
+ parse error on input ‘$’
+ Perhaps you intended to use TemplateHaskell
More information about the ghc-commits
mailing list