# Pastebin f5DVk1QJ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} import Data.Proxy data Alice class C x where silly :: String instance C Alice where silly = "Silly Alice" data Foo a where Foo :: C a => Foo a f :: forall a . Foo a -> String f Foo = silly @a