Correct implicit functions for Unions and add them to the environment.
Better handling of list constructors.