I notice that the these two definitions are no where to be found in the most official resource of Haskell documentation:
(:) :: a -> [a] -> [a]
data [] a = [] | a : []
I checked Hoogle and there are no entries for data []
or (:)
. Are these two not supposed to be "normal" function and data type?
Edit: In the Haskell 2010 Language Report, they say that
-- The (:) operator is built-in syntax, and cannot legally be given
-- a fixity declaration; but its fixity is given by:
-- infixr 5 :
But why? Is there a particular reason for this function to be singled out?