### Simplify TH_unresolvedInfix2

parent c25980fe
 module TH_unresolvedInfix2 where module TH_unresolvedInfix2 where import TH_unresolvedInfix_Lib import Language.Haskell.TH import Language.Haskell.TH expr = \$( infixE Nothing plus (Just \$ n +? n) ) infixl 6 :+ data Tree = N | Tree :+ Tree | Tree :* Tree -- Should fail expr = \$( let plus = conE '(:+) n = conE 'N in infixE Nothing plus (Just \$ uInfixE n plus n) )
 TH_unresolvedInfix2.hs:6:11: TH_unresolvedInfix2.hs:12:11: The operator `:+' [infixl 6] of a section The operator `:+' [infixl 6] of a section must have lower precedence than that of the operand, must have lower precedence than that of the operand, namely `:+' [infixl 6] namely `:+' [infixl 6] in the section: `:+ N :+ N' in the section: `:+ N :+ N' In the result of the splice: In the result of the splice: \$(infixE Nothing plus (Just \$ n +? n)) \$(let To see what the splice expanded to, use -ddump-splices plus = conE ':+ In the expression: \$(infixE Nothing plus (Just \$ n +? n)) n = conE 'N In an equation for `expr': in infixE Nothing plus (Just \$ uInfixE n plus n)) expr = \$(infixE Nothing plus (Just \$ n +? n)) To see what the splice expanded to, use -ddump-splices In the expression: \$(let plus = conE ... n = conE ... in infixE Nothing plus (Just \$ uInfixE n plus n)) In an equation for `expr': expr = \$(let plus = ... .... in infixE Nothing plus (Just \$ uInfixE n plus n))
 ... @@ -189,6 +189,6 @@ test('TH_unresolvedInfix', ... @@ -189,6 +189,6 @@ test('TH_unresolvedInfix', multimod_compile_and_run, multimod_compile_and_run, ['TH_unresolvedInfix.hs', '-v0']) ['TH_unresolvedInfix.hs', '-v0']) test('TH_unresolvedInfix2', test('TH_unresolvedInfix2', extra_clean(['TH_unresolvedInfix_Lib.hi', 'TH_unresolvedInfix_Lib.o']), normal, multimod_compile_fail, compile_fail, ['TH_unresolvedInfix2.hs', '-v0']) ['-v0'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!