[Haskell-beginners] problem with type

miro miroslav.karpis at gmail.com
Sun Jun 17 02:39:51 CEST 2012


Am a bit stuck here,... please, what is wrong with this?

checkNode :: String -> [String] -> Bool
checkNode s nodes =
    [s == node | node <- nodes ]


src/me.hs:3:4:
     Couldn't match expected type `Bool' with actual type `[t0]'
[1 of 1] Compiling Main             ( src/me.hs, interpreted )
     In the expression: [s == node | node <- nodes]
Failed, modules loaded: none.
     In an equation for `checkNode':
         checkNode s nodes = [s == node | node <- nodes]

thanks,
Miro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120617/08a1e052/attachment-0001.htm>


More information about the Beginners mailing list