匹配以下代码模式的方法是什么...
do
x <- createModel a b
case x of
Left e -> throwM $ ValidationErrors e
Right y -> ...
...并建议以下替换:
withThrow $ createModel a b
我尝试了以下方法,但它不起作用:
hint: {lhs: "do {x <- createModel v w; case x of Left e -> throwM $ ValidationErrors e}", rhs: "withThrow $ createModel v w"}