module Data.Logic.Types.Harrison.Prop
( Prop(..)
) where
import Data.Generics (Data, Typeable)
import Data.Logic.Classes.Pretty
import Data.Logic.Classes.Propositional (showPropositional)
import Data.Logic.Types.Harrison.Formulas.Propositional (Formula(..))
import Prelude hiding (negate)
import Text.PrettyPrint (text)
newtype Prop = P {pname :: String} deriving (Read, Data, Typeable, Eq, Ord)
instance Show Prop where
show x = "P " ++ show (pname x)
instance Pretty Prop where
pretty = text . pname
instance HasFixity String where
fixity = const botFixity
instance HasFixity Prop where
fixity = const botFixity
instance Show (Formula Prop) where
show = showPropositional show
instance Show (Formula String) where
show = showPropositional show