module MuCheck.Operators where
import MuCheck.MuOp
import Language.Haskell.Exts (Name(Symbol), Exp(Var), QName(UnQual), Name(Ident))
allOps = concat [comparators, predNums, binAriths, arithLists]
comparators = Symbol <$> ["<", ">", "<=", ">=", "/=", "=="]
predNums = Var . UnQual . Ident <$> ["pred", "id", "succ"]
binAriths = Symbol <$> ["+", "-", "*", "/"]
arithLists = Var . UnQual . Ident <$> ["sum", "product", "maximum", "minimum", "head", "last"]
infixr 0 <$>
f <$> ops = [o1 ==> o2 | o1 <- ops', o2 <- ops', o1 /= o2]
where ops' = map f ops