- (case tcSplitTyConApp_maybe orig_res_ty of
- -- We must use tcSplit here so that we see the (IO t) in
- -- the type. [IO t is transparent to plain splitTyConApp.]
-
- Just (ioTyCon, [res_ty])
- -> ASSERT( ioTyCon `hasKey` ioTyConKey )
- -- The function already returns IO t
- returnDs (res_ty, True)
-
- other -> -- The function returns t
- returnDs (orig_res_ty, False)
- )
- `thenDs` \ (res_ty, -- t
+ (case tcSplitIOType_maybe orig_res_ty of
+ Just (ioTyCon, res_ty) -> returnDs (res_ty, True)
+ -- The function already returns IO t
+ Nothing -> returnDs (orig_res_ty, False)
+ -- The function returns t
+ ) `thenDs` \ (res_ty, -- t