Implementing nub (distinct)
For the "official" answer, you can go straight to the GHC source for nub:

nub                     :: (Eq a) =&gt; [a] -&gt; [a]
nub l                   = nub' l []
  where
    nub' [] _           = []
    nub' (x:xs) ls
        | x `elem` ls   = nub' xs ls
        | otherwise     = x : nub' xs (x:ls)


Some of the differences that stand out are:


Use a where clause to scope your helper function, and name it with a "prime" symbol.  In your case, I guess the helper would be nub''.  The helper's type can then be automatically inferred.
Use pattern matching instead of if-then-else.
Your contains helper is just the elem builtin.  They chose to write x `elem` ls instead of elem x ls, probably to read more smoothly.
It's more natural / efficient to prepend than to append elements to a list.  Instead of building acc as the result as a list of wanted elements, they build ls as the list of elements to exclude in future encounters.