我正在处理SAT相关的工作,我想要同时使用“和”和“或”。
type AndClause = [Literal]
type OrClause = [Literal]
但是当我使用它们时遇到了问题:
instance Satisfiable AndClause where ...
instance Satisfiable OrClause where ...
我收到了“Duplicate instance declarations.”的错误信息。它们是类型,而不是数据或类型构造函数,所以我认为我不能使用newtype来完成我想要的操作。有没有解决方案?