Ticket #5235 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Template Haskell rejects list comprehensions

Reported by: roldugin Owned by:
Priority: normal Milestone:
Component: Template Haskell Version: 7.1
Keywords: Cc: igloo@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Template Haskell stopped accepting list comprehensions in the GHC head.

$ ghc-stage2 --interactive -fth
Prelude> :m +Language.Haskell.TH
Prelude Language.Haskell.TH> runQ [| [x | x <- [1,2,3]] |]

<interactive>:0:9:
   Exotic statement not (yet) handled by Template Haskell [x]

Change History

Changed 2 years ago by simonpj

  • status changed from new to closed
  • resolution set to fixed

Thanks. This was a glitch following the monad-comoprehension changes. Fixed by

commit ba33ff9b0ae36ebeeda2eb5a37758984779fc11d
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jun 10 19:52:53 2011 +0100

    Make DsMeta catch up with LastStmt (fix Trac #5235)
    
    The new monad comprehension stuff introduce LastStmt,
    and DsMeta must convert that to TH syntax

>---------------------------------------------------------------

 compiler/deSugar/DsMeta.hs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Note: See TracTickets for help on using tickets.