You can use or in lists, but
Prelude> :t or or :: [Bool] -> Bool
which is not the one you need in this place, this is a function that checks if there is any item in the True list. There you need
(||) :: Bool -> Bool -> Bool
And if you want to use a function with a name consisting of the letters infix, you need to wrap it in reverse cycles, as you did with mod , but since or takes only one argument, you cannot use this function infix.
The correct version of your list will be
giveList = [ x | x <- [1 .. 10], x `mod` 5 == 0 || x `mod` 3 == 0]
source share