Opened 13 years ago

Closed 16 months ago

#1262 closed feature request (fixed)

RecursiveDo in Template Haskell

Reported by: philip.weaver@… Owned by: mgsloan
Priority: normal Milestone:
Component: Template Haskell Version: 6.6
Keywords: Cc: MartijnVanSteenbergen, massysett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: th/TH_recursiveDo
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1979
Wiki Page:

Description

I really want mdo support in Template Haskell! Thanks!

Change History (16)

comment:1 Changed 13 years ago by igloo

Milestone: 6.8

comment:2 Changed 12 years ago by simonmar

Milestone: 6.8 branch_|_

No immediate plans to do this.

comment:3 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 10 years ago by MartijnVanSteenbergen

Cc: MartijnVanSteenbergen added

comment:6 Changed 10 years ago by simonpj

See also #2798, where we propose to deprecate mdo in favour of a more modular rec.

Simon

comment:7 Changed 7 years ago by morabbin

Type of failure: None/Unknown

Since #2798 was accepted, this out to be closed (if TH supports DoRec) or renamed, if folks still want it.

comment:8 Changed 7 years ago by igloo

Summary: mdo in Template HaskellRecursiveDo in Template Haskell
Prelude> :set -XRecursiveDo -XTemplateHaskell
Prelude> :m + Language.Haskell.TH
Prelude Language.Haskell.TH> do x <- runQ [| do rec { x <- return y; y <- return x }; return () |]; putStrLn (pprint x)

<interactive>:4:17:
    Exotic statement not (yet) handled by Template Haskell
      [rec { x <- return y;
             y <- return x },
       return ()]

comment:9 Changed 7 years ago by simonpj

We just need someone to update the template-haskell library to support mdo, and add support to DsMeta and Convert.

Simon

comment:10 Changed 5 years ago by nomeata

Keywords: newcomer added

comment:11 Changed 4 years ago by massysett

Cc: massysett added

comment:12 Changed 4 years ago by thomie

Keywords: newcomer removed

No takers. Removing keyword to keep the newcomers list fresh. Please put it back if you disagree.

comment:13 Changed 4 years ago by thomie

Differential Rev(s): Phab:D1979
Owner: set to mgsloan
Test Case: th/TH_recursiveDo

comment:14 Changed 19 months ago by mgsloan

Status: newpatch

comment:15 Changed 16 months ago by Krzysztof Gogolewski <krz.gogolewski@…>

In 9c6b7493/ghc:

Add support for ImplicitParams and RecursiveDo in TH

Summary:
This adds TH support for the ImplicitParams and RecursiveDo extensions.

I'm submitting this as one review because I cannot cleanly make
the two commits independent.

Initially, my goal was just to add ImplicitParams support, and
I found that reasonably straightforward, so figured I might
as well use my newfound knowledge to address some other TH omissions.

Test Plan: Validate

Reviewers: goldfire, austin, bgamari, RyanGlScott

Reviewed By: RyanGlScott

Subscribers: carter, RyanGlScott, thomie

GHC Trac Issues: #1262

Differential Revision: https://phabricator.haskell.org/D1979

comment:16 Changed 16 months ago by monoidal

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.