rest-core-0.27.0.1: src/Rest/Info.hs
-- | Module facilitating informative inspection of datatypes.
{-# LANGUAGE
FlexibleInstances
, TypeSynonymInstances
#-}
module Rest.Info where
import Data.Text (Text)
import Data.Typeable
-- | Type class representing information about the read/show function on a data
-- type.
class Typeable a => Info a where
describe :: proxy a -> String
example :: proxy a -> String
example _ = ""
instance Info String where
describe _ = "string"
instance Info Text where
describe _ = "string"
instance Info Int where
describe _ = "integer"
instance Info Integer where
describe _ = "integer"