<div dir="ltr">Why does Haskell so often seem to treat [] as a general null.<div><br></div><div>For example I know 0 : 1 : [] gives [0, 1].</div><div><br></div><div>But shouldn't it produce a type fault in a consistent world?</div><div><br></div><div>Int:Int:List isn't properly a list.  It mixes types.</div><div><br></div><div>I expect something like:</div><div><br></div><div>Let GSN mean general_scalar_null.</div><div><br></div><div>1 : 2 : GSN  -- works</div><div><br></div><div>1 : 2 : []  -- type fault, cannot mix int and empty list in the same list.</div><div><br></div><div>And why does [] == [] : []</div><div>instead of [[], []] == [] : []</div><div><br></div><div>What sorts of nullity are there in core Haskell?</div><div><br></div><div>Trent.</div><div><br></div></div>