Theoretically my function should be able to return True or False if a set of clauses has the empty list ([]), I actually defined the next data type:
data Literal = V String | NotV String deriving Eq
type Clause = [Literal]
type Interpretacion = [( String , Bool ) ]
type State = ( Interpretation , [ Clause ])
And for the function i did this:
conflict :: State -> Bool
| [] `elem` xs = True
| otherwise = False
But i really think that this is not going to be enough, my next work is do another function that determines if the model search has been successful, (this happens when the clause set is empty), I think that I have to use the above function using the same (State -> Bool) but if the first function is not working the second can't work either.
My big question is: What do you think I need to do?. Any comment will be of great help to me, I'm a little lost. My work is about the transition rules from DPLL algorithm, once i have i'm going to share in Github to new programmers.
I think I've seen the same problem on another site when implementing the DPLL algorithm, maybe you could try using a function like this:
And for the next function you could implement a helper function that checks the first function and another that returns the result of it, like this:
I think the point you're trying to get to with the first function is that when you compile you can have something like this: