{-# LANGUAGE CPP #-}
#if (__GLASGOW_HASKELL__ < 709)
{-# LANGUAGE OverlappingInstances #-}
{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-}
#endif
module Data.HList.Label5 where
import Data.Typeable
import Data.Char
import Data.HList.FakePrelude
instance {-# OVERLAPPABLE #-} Typeable (x :: *) => ShowLabel x
where
showLabel :: Label x -> String
showLabel Label x
_ = (\(Char
x:String
xs) -> Char -> Char
toLower Char
xChar -> String -> String
forall a. a -> [a] -> [a]
:String
xs)
(String -> String) -> (x -> String) -> x -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String
forall a. [a] -> [a]
reverse
(String -> String) -> (x -> String) -> x -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> String -> String
forall a. (a -> Bool) -> [a] -> [a]
takeWhile (Bool -> Bool
not (Bool -> Bool) -> (Char -> Bool) -> Char -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
(==) Char
'.')
(String -> String) -> (x -> String) -> x -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String
forall a. [a] -> [a]
reverse
(String -> String) -> (x -> String) -> x -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TypeRep -> String
forall a. Show a => a -> String
show
(TypeRep -> String) -> (x -> TypeRep) -> x -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. x -> TypeRep
forall a. Typeable a => a -> TypeRep
typeOf (x -> String) -> x -> String
forall a b. (a -> b) -> a -> b
$ (String -> x
forall a. HasCallStack => String -> a
error String
"Data.HList.Label5 has a strict typeOf" :: x)