{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RequiredTypeArguments #-} module Main where import Data.Int class Bits a where bitSize :: forall b -> b ~ a => Int instance Bits Int64 where bitSize _ = 64 main :: IO () main = print (bitSize Int64)