Nice/src/mlsub/typing NullnessKind.java,1.5,1.6 MonotypeVar.java,1.19,1.20

Daniel Bonniot <[email protected]> Fri, 27 May 2005 13:59:50 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/mlsub/typing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27419/src/mlsub/typing

Modified Files:
	NullnessKind.java MonotypeVar.java 
Log Message:
Give the raw variable associated to a type variable with persistent nullness
kind the same name as the original variable.


Index: MonotypeVar.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/mlsub/typing/MonotypeVar.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** MonotypeVar.java	25 May 2005 23:22:57 -0000	1.19
--- MonotypeVar.java	27 May 2005 13:59:47 -0000	1.20
***************
*** 164,168 ****
        {
          kind = k;
!         equivalent = NullnessKind.instance.persistentFreshMonotype();
        }
    }
--- 164,168 ----
        {
          kind = k;
!         equivalent = NullnessKind.instance.persistentFreshMonotype(this);
        }
    }

Index: NullnessKind.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/mlsub/typing/NullnessKind.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NullnessKind.java	25 May 2005 23:22:57 -0000	1.5
--- NullnessKind.java	27 May 2005 13:59:47 -0000	1.6
***************
*** 50,58 ****
      return new MonotypeConstructor(tc, new Monotype[]{ raw });
    }
!   
!   public Monotype persistentFreshMonotype()
    {
      TypeConstructor tc = new TypeConstructor(instance);
!     Monotype raw = new MonotypeVar();
  
      return new MonotypeConstructor(tc, new Monotype[]{ raw });
--- 50,66 ----
      return new MonotypeConstructor(tc, new Monotype[]{ raw });
    }
! 
!   /**
!      @param base The type variable we create this fresh constructed
!                  monotype for.
!   */
!   public Monotype persistentFreshMonotype(MonotypeVar base)
    {
      TypeConstructor tc = new TypeConstructor(instance);
! 
!     /* It's important to give the raw variable the same name as the base one,
!        so that for the syntactic type <T> ... !T we don't end up printing !t9.
!     */
!     Monotype raw = new MonotypeVar(base.getName());
  
      return new MonotypeConstructor(tc, new Monotype[]{ raw });



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005