It is not possible in Haskell, moreover it seems to be too alien to Haskell. Nevertheless, is there an extension which would allow to write a function that returns the type of its argument?