blob: e8522fe9ee0efd7ffa3d983fe9b4c2542a0147e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE AllowAmbiguousTypes, TypeFamilies, TypeOperators #-}
import Data.Kind
import Data.Typeable
unsafeCoerce :: a -> b
unsafeCoerce x = case eqT :: Maybe (Type :~: Constraint) of
Nothing -> error "No more bug!"
Just r -> error "Bug!"
main :: IO ()
main = let x :: Int
x = 42
in print (unsafeCoerce x :: Double)
|