ndmitchell / debug

Haskell library for debugging
BSD 3-Clause "New" or "Revised" License
122 stars 7 forks source link

Debug not compatible with mdo blocks? #62

Open georgewsinger opened 5 years ago

georgewsinger commented 5 years ago

I'm getting the following when trying to instrument an entire file:

/home/george/haskell-tinywl//tmp/ghc23679_0/ghc_1.hspp:708:64: error
:                                                                  
    mdo, monad comprehension and [: :] not (yet) handled by Template
 Haskell                                                           

I use mdo blocks throughout my module. I'm assuming this means Debug isn't compatible with these mdo blocks? If so, will changing all mdo blocks to rec statements make it work?

ndmitchell commented 5 years ago

Sounds like yes. We go via template haskell, so if template haskell doesn't support mdo blocks we don't stand a chance.

georgewsinger commented 5 years ago

Ok. Can confirm rec statements also do not work.

ndmitchell commented 5 years ago

I think if you want them to work, you should ask for GHC to support them in Template Haskell.