Commit 1966bbe2 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test for error recovery in TH

parent e5c968a6
module Main where
import Language.Haskell.TH
-- The recover successfully find that 'ola' is not in scope
-- and use '1' instead
y = $(recover (return (LitE (IntegerL 1)))
(reify (mkName ("ola")) >> return (LitE (IntegerL 2))))
main = print y
......@@ -54,3 +54,5 @@ test('TH_fail', normal, compile_fail, [''])
test('TH_dupdecl', normal, compile_fail, [''])
test('TH_exn', normal, compile_fail, [''])
test('TH_recover', normal, compile_and_run, [''])
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