Ben,

While working on #220 (constructors with unboxed fields) I've found
that in src/DDC/Core/ToSea.hs the type returned by getOpTypeOfVar
is not always correct.

    C.XPrim (C.MCall (C.PrimCallTail vSuper)) _tXXX : args
     -> do  args'       <- mapM toSeaX args
            Just tSuper <- getOpTypeOfVar vSuper
            return      $ E.XPrim (E.MApp E.PAppTailCall)
                                (E.XVar (E.NSuper vSuper) (toSeaSuperT tSuper) 
: args')

Specifically for functions that take unboxed parameters, the type
will be TObj instead. Funnily enough, the type provided by the
ignored _tXXX parameter is actually correct.

To get around my immediate problem, I can simply drop the usage
of getOpTypeOfVar and use _tXXX instead. That means getOpTypeOfVar
can die because this is the only use of it.

However, it seems to me that we should correct this so that the
types in the Core globs are correct before I remove getOpTypeOfVar.

Does this make sense?

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

-- 
Disciple-Cafe mailing list
http://groups.google.com/group/disciple-cafe

Reply via email to