{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a . Bar { value :: a } -- value' :: Foo -> a -- value' (Bar x) = x {-| Couldn't match expected type ‘a’ with actual type ‘a1’ ‘a1’ is a rigid type variable bound by a pattern with constructor: Bar :: forall a. a -> Foo |-}