From: sewardj Date: Tue, 11 Jan 2000 14:09:17 +0000 (+0000) Subject: [project @ 2000-01-11 14:09:17 by sewardj] X-Git-Tag: Approximately_9120_patches~5320 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1e53309d0676ea4ab0191387a79a980e4a8fd9a4;p=ghc-hetmet.git [project @ 2000-01-11 14:09:17 by sewardj] startGHCInstance: allocate a name() entry for the instance builder fn, and store the name in the instance's .builder field. Without this, it's impossible to generate any code which uses an instance builder :-( --- diff --git a/ghc/interpreter/interface.c b/ghc/interpreter/interface.c index 26ba51d..0650996 100644 --- a/ghc/interpreter/interface.c +++ b/ghc/interpreter/interface.c @@ -7,8 +7,8 @@ * Hugs version 1.4, December 1997 * * $RCSfile: interface.c,v $ - * $Revision: 1.23 $ - * $Date: 2000/01/07 16:56:47 $ + * $Revision: 1.24 $ + * $Date: 2000/01/11 14:09:17 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -1304,10 +1304,6 @@ void startGHCValue ( Int line, VarId vid, Type ty ) } n = newName(v,NIL); - /* convert a leading run of DICTAPs into Hugs' internal Qualtype form, viz: - { C1 a } -> { C2 b } -> T into - ap(QUALTYPE, ( [(C1,a),(C2,b)], T )) - */ ty = dictapsToQualtype(ty); tvs = ifTyvarsIn(ty); @@ -1886,17 +1882,15 @@ VarId var; { /* VarId */ inst(in).c = cl; } -#if 0 - Is this still needed? { - Name b = newName(inventText(),NIL); + Name b = newName( /*inventText()*/ textOf(var),NIL); name(b).line = line; - name(b).arity = length(ctxt); /* unused? */ + name(b).arity = length(spec); /* unused? */ /* and surely wrong */ name(b).number = DFUNNAME; inst(in).builder = b; - bindNameToClosure(b, lookupGHCClosure(inst(in).mod,var)); + /* bindNameToClosure(b, lookupGHCClosure(inst(in).mod,var)); */ } -#endif + return in; }