Commit d32a0c81 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #7276 (part 2)

parent e65d702c
:set -XTemplateHaskell -fdefer-type-errors
import Language.Haskell.TH
let x = [d|a = ()|] :: Q Exp
:t $x
<interactive>:4:9: Warning:
Couldn't match type `[Dec]' with `Exp'
Expected type: Q Exp
Actual type: DecsQ
In the Template Haskell quotation [d| a = () |]
In the expression: [d| a = () |] :: Q Exp
In an equation for `x': x = [d| a = () |] :: Q Exp
<interactive>:1:1:
Exception when trying to run compile-time code:
<interactive>:4:9:
Couldn't match type `[Dec]' with `Exp'
Expected type: Q Exp
Actual type: DecsQ
In the Template Haskell quotation [d| a = () |]
In the expression: [d| a = () |] :: Q Exp
In an equation for `x': x = [d| a = () |] :: Q Exp
(deferred type error)
Code: x
In the expression: $x
......@@ -253,3 +253,4 @@ test('T7064',
test('T7092', extra_clean(['T7092a.hi','T7092a.o']),
multimod_compile, ['T7092','-v0'])
test('T7276', normal, compile_fail, ['-v0'])
test('T7276a', combined_output, ghci_script, ['T7276a.script'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment