Hi,
On 26.05.2009, at 21:24, Lauri Alanko wrote:
Mercury also has type classes and other Haskellisms, so if you're
interested in "doing Prolog the Haskell way", you should definitely
have a look at it.
I have to admit that I am not very familiar with Mercury. But if you
are looking for "doing Prolog the Haskell way" <advertise>you can also
have a look at Curry</advertise>. Curry is a lazy functional logic
programming language that has a Haskell like syntax (http://www.curry-language.org/
). Besides standard functional features it provides non-determinism
and narrowing. In contrast to Haskell overlapping rules in function
definitions induce non-determinism. For example the following
"function" non-deterministically inserts an element at each position
of a list.
insert :: a -> [a] -> [a]
insert x xs = x : xs
insert x (y:ys) = y : insert x ys
From the side-effects point of view Curry is very boring as it does
not provide type classes but there is one monad namely the IO monad
for doing side effects.
Cheers, Jan
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe