mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
9 lines
244 B
Idris
9 lines
244 B
Idris
|
module TestException
|
||
|
|
||
|
import Control.App
|
||
|
|
||
|
throwBoth : Has [Exception String, Exception Int] es => App es ()
|
||
|
|
||
|
throwOne : Has [Exception Int] es => App es Int
|
||
|
throwOne {es} = handle {err = String} {e = es} throwBoth (\r => pure 1) (\e => pure 3)
|