relude-0.5.0: Custom prelude from Kowainik

Copyright(c) 2018-2019 Kowainik
LicenseMIT
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellSafe
LanguageHaskell2010

Relude.Extra.Type

Description

Contains useful functions to work with Types.

Synopsis

Documentation

typeName :: forall a. Typeable a => Text Source #

Gets a string representation of a type.

NOTE: This must be used with TypeApplications language extension.

>>> typeName @()
"()"
>>> typeName @Int
"Int"
>>> typeName @String
"[Char]"
>>> typeName @(Maybe Int)
"Maybe Int"