This website requires JavaScript.
Explore
Help
Sign In
idris-lang
/
Idris2
Watch
1
Star
1
Fork
0
You've already forked Idris2
mirror of
https://github.com/idris-lang/Idris2.git
synced
2024-12-20 18:21:47 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
09466a96bb
Idris2
/
tests
/
base
/
control_app001
/
run
4 lines
55 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add testing utilities script
2023-08-29 13:47:42 +03:00
. ../../testutils.sh
More reliable exception handling in Control.App Convert `App.Control.Exception` interface to an alias to `HasErr`. Probably `Exception` interface need to be deprecated or removed. Note similar problem exists with `PrimIO` calling `PrimIO, Exception`, also need to be fixed. Fix this scenario: ``` 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) ``` With this commit it works, before this commit it failed with: ``` Error: While processing right hand side of throwOne. Can't find an implementation for Exception Int (String :: es). TestException.idr:8:48--8:57 | 8 | throwOne {es} = handle {err = String} {e = es} throwBoth (\r => pure 1) (\e => pure 3) | ^^^^^^^^^ ```
2021-02-02 22:42:03 +03:00
Add testing utilities script
2023-08-29 13:47:42 +03:00
idris2 TestException.idr < input
Reference in New Issue
Copy Permalink