[Haskell-cafe] Subsequence near solved hopefully

Peter Stranney peterstranney at yahoo.co.uk
Sun Oct 17 10:16:51 EDT 2004

Sorry for annoying you all, i'm just very eager to move on with this and solve it. so far i have;
equalChar :: Char -> Char -> Bool
equalChar x n
   | x == n = True
   | otherwise = False
equalString :: String -> String -> Bool
equalString [] [] = True
equalString [] (c':s') = False
equalString(c:s) [] = False
equalString(c:s)(c':s') = equalChar c c'^ equalString s s'
this function is to see if one string is equal to another.
but when i compile this i get the error;
- Instance of Integral Bool required for definition of equalString

does anyone know why i am getting this error and what i will need to do to transform the function above so that it checks is a list a subsequence of another list

Peter Stranney

Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-cafe/attachments/20041017/3eecb37c/attachment.htm

More information about the Haskell-Cafe mailing list