summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile/T21654.hs
blob: 12b0c763f69b4dfea0931a0a83764b77f596ef02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE RecursiveDo #-}
{-# OPTIONS_GHC -Wunused-top-binds #-}

module T21654 ( patternToQ ) where

import Data.Functor.Identity

mergeNullViews :: () -> ()
mergeNullViews _ = ()

patternToQ :: ()
patternToQ = runIdentity $ combineSeq
  where
  combineSeq :: Identity ()
  combineSeq = mdo  -- changing this to 'do' fixes the problem
    q <- Identity ()
    return $ mergeNullViews q