[Assorted-commits] SF.net SVN: assorted: [313] sandbox/trunk/src/hs/Exceptions2.hs
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-04 08:22:50
|
Revision: 313 http://assorted.svn.sourceforge.net/assorted/?rev=313&view=rev Author: yangzhang Date: 2008-02-04 00:22:56 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added exceptions2 Added Paths: ----------- sandbox/trunk/src/hs/Exceptions2.hs Added: sandbox/trunk/src/hs/Exceptions2.hs =================================================================== --- sandbox/trunk/src/hs/Exceptions2.hs (rev 0) +++ sandbox/trunk/src/hs/Exceptions2.hs 2008-02-04 08:22:56 UTC (rev 313) @@ -0,0 +1,15 @@ +{-# LANGUAGE DeriveDataTypeable, PatternSignatures #-} + +import Data.Generics +import Control.Exception + +data E = E1 deriving (Typeable,Show) + +main = do +-- handle print $ throwDyn E1 + (throwDyn E1 >> return ()) `catchDyn` (\(e :: E) -> print e) + +{- + $ runhaskell A.hs + E +-} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |