In the Data.list is set:
“Set” operations
nub :: Eq a => [a] -> [a]
O(n^2). The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence’.) It is a special case of nubBy, which allows the programmer to supply their own equality test.
I can’t use this function directly. How do I use the function nub? Do I have to import something?
Whenever in doubt try hoogle. It will tell you in which package the function is present and what module you need to import etc. You can also search function by types.