Re: [Haskell-cafe] "Casting" newtype to base type?

2013-07-06 Thread Ozgur Akgun
Hi Vlatko. On 2 July 2013 16:03, Vlatko Basic wrote: > Is there a nicer way to extract the 'IO String' from 'IOS', > without 'case' or without pattern matching the whole 'P'? > You might enjoy the newtype package. http://hackage.haskell.org/package/newtype Hope this helps, Ozgur.

Re: [Haskell-cafe] ANNOUNCE: Ajhc Haskell Compiler 0.8.0.7 Release

2013-07-06 Thread Kiwamu Okabe
Hi Adrian. On Sat, Jul 6, 2013 at 2:40 PM, Adrian May wrote: > Is this a practical way to write Android and iPhone code? I don't mean > console programs, I mean realistic smartphone apps. Umm... Is your question "Is Ajhc's goal that build the compiler for Android"? If so, the answer is No. The A

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-06 Thread Nikita Karetnikov
> Here you go: > import Control.Exception > import Data.Typeable > syncExceptions :: SomeException -> Maybe SomeException > syncExceptions e > | Just _ <- cast e :: Maybe AsyncException = Nothing > | otherwise = Just e Thanks, but it doesn't work as expected: *Main> syncExceptio

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-06 Thread Roman Cheplyaka
* Nikita Karetnikov [2013-07-06 20:12:58+0400] > > Here you go: > > > import Control.Exception > > import Data.Typeable > > > syncExceptions :: SomeException -> Maybe SomeException > > syncExceptions e > > | Just _ <- cast e :: Maybe AsyncException = Nothing > > | otherwise = Jus