- getSrcSpanM `thenM` \ loc ->
- (case find_bind (idName sel_id) meth_name meth_binds of
- Just user_bind -> returnM user_bind
- Nothing ->
- mkDefMethRhs origin clas inst_tys sel_id loc dm_info `thenM` \ rhs ->
- -- Not infix decl
- returnM (noLoc $ mkFunBind (noLoc meth_name) [mkSimpleMatch [] rhs])
- ) `thenM` \ meth_bind ->
+ loc <- getSrcSpanM
+ meth_bind
+ <- case find_bind (idName sel_id) meth_name meth_binds of
+ Just user_bind -> return user_bind
+ Nothing -> do
+ rhs <- mkDefMethRhs origin clas inst_tys sel_id loc dm_info
+ -- Not infix decl
+ return (noLoc $ mkFunBind (noLoc meth_name) [mkSimpleMatch [] rhs])