Opened 19 months ago

Last modified 13 months ago

#15356 new bug

Template Haskell should turn off RebindableSyntax in quotes

Reported by: goldfire Owned by:
Priority: normal Milestone: 8.10.1
Component: Template Haskell Version: 8.4.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


If I say

{-# LANGUAGE RebindableSyntax, TemplateHaskellQuotes #-}

module Bug ( quote ) where

quote = [| if 5>3 then 'x' else 'y' |]

GHC complains that ifThenElse and fromInteger are not in scope. If I then bring these into scope somehow, then the resulting quote does not use them.

I think it's correct that the resulting quote doesn't use the rebindable syntax -- a quote should just stand for a convenient way or writing the TH AST. But then we shouldn't complain about missing rebindable syntax bits inside of a quote.

Change History (2)

comment:1 Changed 18 months ago by bgamari


These won't be fixed for in GHC 8.6.

comment:2 Changed 13 months ago by osa1


Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.