mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-23 11:43:08 +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)
|