Apparently the answer is to `:set FlexibleContexts` in GHCi in addition to enabling the language extension in a source file. I was unaware it wasn't enabled by default on interpreting the source.
I recently discovered that class and instance declarations in Haskell are Horn clauses. So I encoded the arithmetic operations from the first chapter of Art of Prolog into Haskell, in the standar
fac(0,s(0)).I don't understand, however, to make Haskell instantiate values for variables in a proof. I.e., I don't understand what the Haskell equivalent of
fac(s(N),F) :- fac(N,X), mult(s(N),X,F).
class Fac x y | x -> y
instance Fac Z (S Z)
instance (Fac n x, Mult (S n) x f) => Fac (S n) f
?- fac(X,Y)would be for some value of X.