So, theoretically, you can use it for anything.
However, Haskell is more apt at certain things, and sucks at other things (as do all languages). Generally, anything that requires the extensive use of IO, Haskell sucks at, because of the nature of the language. You feel "unclean" doing IO, almost as if you're insulting the Gods of programming. What Haskell is great for generally involves mathematical or logical work. For example, parsing is something that Haskell is ideal for.
That being said, I've created various and sundry applications in Haskell, most notably a network server, several smallish CGI scripts, a GTK2 graphing application (I had nothing to do...) and a bunch of other shit.
Just look at the solution to one of i's riddles in Haskell (it's not exactly an answer, since it's O(n+c) time because of the splitAt and O(no idea) space. But it IS elegant as hell) :
[] /\/\/ ys = ys
(x:xs) /\/\/ ys = x : (ys /\/\/ xs)
interweave xs = let (ys,zs) = splitAt (length xs `div` 2) in ys /\/\/ zs
Note that this is totally different from the C solution, if only in syntax and clearness. Plus, it took me about thirty seconds to write.
So, anyway, yeah. If you're gonna try to implement any C algorithms in Haskell, I'd suggest you stick to the really academic stuff, like sorting or somesuch, because, usually, a "good" solution in C would be a "horrible" solution in Haskell.
As far as oCaml is concerned, I haven't done enough with it to properly comment about it. Sorry.
SIG HEIL!
[ Parent ]