genvalidity-hspec-0.2.0.5: src/Test/Validity/Utils.hs
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Validity.Utils
( (<==>)
, (===>)
, nameOf
) where
import Data.Data
(===>) :: Bool -> Bool -> Bool
(===>) a b = not a || b
(<==>) :: Bool -> Bool -> Bool
(<==>) a b = a ===> b && b ===> a
nameOf :: Typeable a => Proxy a -> String
nameOf proxy =
let (_, [ty]) = splitTyConApp $ typeOf proxy
in show ty