Quick actions

cmd+k|ctrl+k

Navigation

Languages

typeName

Snippet info

Language

Haskell

Visibility

public

Author

homam

Created

2018-12-24T07:44:51Z

Updated

2018-12-24T07:44:51Z

{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, ScopedTypeVariables #-}

import Data.Typeable

typeName :: forall a. Typeable a => String
typeName = show . typeRep $ Proxy @a

type T = Maybe Int

main = putStrLn $ typeName @T
INFO