1 2 3 4 5 6 7
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-} module Foo where $([d| f :: forall a. a->a f x = x::a |])