summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T11232.hs
blob: 5b98d3988c881c043d34637be013278d1b7628ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module T11232 where

import Control.Monad
import Data.Data

mkMp :: ( MonadPlus m
        , Typeable a
        , Typeable b
        )
     => (b -> m b)
     -> a
     -> m a
mkMp ext = unM (maybe (M (const mzero)) id (gcast (M ext)))

newtype M m x = M { unM :: x -> m x }