Created
August 15, 2012 07:59
-
-
Save klapaucius/3357481 to your computer and use it in GitHub Desktop.
Typeable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
Prelude> import Control.Exception | |
Prelude Control.Exception> import Data.Typeable | |
Prelude Control.Exception Data.Typeable> | |
newtype Foo = Foo (() -> IO ()) | |
Prelude Control.Exception Data.Typeable> :set -XSafe | |
Prelude Control.Exception Data.Typeable> | |
instance Typeable Foo where | |
typeOf _ = typeOf (undefined :: ErrorCall) | |
<interactive>:15:10: | |
Can't create hand written instances of Typeable in Safe Haskell! Can only derive them | |
Prelude Control.Exception Data.Typeable> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment