Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2003-01-13 13:19:25 by simonpj] · 67398e1b
    Simon Peyton Jones authored
    ------------------------------------
    	Type signature for derived con2tag
    	------------------------------------
    
    		MERGE TO STABLE
    
    The derived con2tag didn't have a type signature, so we got
    
    	con2tagFoo :: a -> Int#
    	con2tagFoo = \x -> getTag x
    
    The getTag generates a case expression, so we get a polymorphic
    case.  The polymorphic case simply does not work in *interpreted*
    GHC 5.02.3 and as a result neither does con2tag.  Alas.
    
    This commit fixes the problem, by giving a type signature for
    con2TagFoo.  But note that getTag in interpreted GHC 5.02 will continue
    to fail if used in a polymorphic context.  This problem does not arise
    in the HEAD (eval/apply) so I'm going to leave it as a wont-fix bug.
    67398e1b