moduleData.Logic.Classes.Negate(Negatable(..),negated,(.~.),(¬),negative,positive)where-- |The class of formulas that can be negated. There are some types-- that can be negated but do not support the other Boolean Logic-- operators, such as the 'Literal' class.classNegatableformulawhere-- | Negate a formula in a naive fashion, the operators below-- prevent double negation.negatePrivate::formula->formula-- | Test whether a formula is negated or normalfoldNegation::(formula->r)-- ^ called for normal formulas->(formula->r)-- ^ called for negated formulas->formula->r-- | Is this formula negated at the top level?negated::Negatableformula=>formula->Boolnegated=foldNegation(constFalse)(not.negated)-- | Negate the formula, avoiding double negation(.~.)::Negatableformula=>formula->formula(.~.)=foldNegationnegatePrivateid(¬)::Negatableformula=>formula->formula(¬)=(.~.)infix5.~.,¬-- ------------------------------------------------------------------------- -- Some operations on literals. (These names are used in Harrison's code.)-- ------------------------------------------------------------------------- negative::Negatableformula=>formula->Boolnegative=negatedpositive::Negatableformula=>formula->Boolpositive=not.negative