diff options
author | Erik de Castro Lopo <erik.decastrolopo@ambiata.com> | 2017-01-08 08:34:30 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-01-08 08:34:30 +1100 |
commit | 7b317effd59f56bc8450ea8efbb1ef5954f09e5d (patch) | |
tree | ea338905bc014b14ae7fd7cd8d0510122839677a | |
parent | c1ed9557ad4e40caa72b27693527e02887ddd896 (diff) | |
download | haskell-7b317effd59f56bc8450ea8efbb1ef5954f09e5d.tar.gz |
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
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 9de531ab9e..92e48adb2a 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 5f1e51c956..ba5766b064 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 b23875bf1d..55aa3a5a6c 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 |