Skip to content

Instantly share code, notes, and snippets.

@klapaucius
Created August 15, 2012 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klapaucius/3357481 to your computer and use it in GitHub Desktop.
Save klapaucius/3357481 to your computer and use it in GitHub Desktop.
Typeable
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