diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/error.hs (renamed from examples/experiments/error.hs) | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/experiments/error.hs b/examples/error.hs index 16305dc..f13a48e 100644 --- a/examples/experiments/error.hs +++ b/examples/error.hs | |||
@@ -1,10 +1,11 @@ | |||
1 | import Numeric.GSL | 1 | import Numeric.GSL |
2 | import Numeric.LinearAlgebra | ||
2 | import Prelude hiding (catch) | 3 | import Prelude hiding (catch) |
3 | import Control.Exception | 4 | import Control.Exception |
4 | 5 | ||
5 | test x = catch | 6 | test x = catch |
6 | (print x) | 7 | (print x) |
7 | (\e -> putStrLn $ "captured ["++ show e++"]") | 8 | (\e -> putStrLn $ "captured ["++ show (e :: SomeException) ++"]") |
8 | 9 | ||
9 | main = do | 10 | main = do |
10 | setErrorHandlerOff | 11 | setErrorHandlerOff |
@@ -13,4 +14,7 @@ main = do | |||
13 | test $ 5 + (fst.exp_e) 1000 | 14 | test $ 5 + (fst.exp_e) 1000 |
14 | test $ bessel_zero_Jnu_e (-0.3) 2 | 15 | test $ bessel_zero_Jnu_e (-0.3) 2 |
15 | 16 | ||
17 | test $ (linearSolve 0 4 :: Matrix Double) | ||
18 | test $ (linearSolve 5 (sqrt (-1)) :: Matrix Double) | ||
19 | |||
16 | putStrLn "Bye" \ No newline at end of file | 20 | putStrLn "Bye" \ No newline at end of file |