diff backendutils.rhope @ 42:aabda74c7a88

Fields can now be defined to have naked primitive types
author Mike Pavone <pavone@retrodev.com>
date Tue, 13 Oct 2009 00:07:34 -0400
parents 7f05bbe82f24
children a24eb366195c
line wrap: on
line diff
--- a/backendutils.rhope	Sat Oct 10 16:40:50 2009 -0400
+++ b/backendutils.rhope	Tue Oct 13 00:07:34 2009 -0400
@@ -178,7 +178,7 @@
 	out <- [[[Build["Type Instance"]]Name <<[name]]Params <<[()]]Variant <<["Boxed"]
 }
 
-Set Variant[type,variant:out,invalid]
+Set Variant@Type Instance[type,variant:out,invalid]
 {
 	[("Boxed","Naked","Pointer","Raw Pointer")]Find[variant]
 	{
@@ -187,3 +187,15 @@
 		invalid <- type
 	}
 }
+
+=@Type Instance[type,compare:out]
+{
+	If[[Type Of[compare]] = ["String"]]
+	{
+		out <- [[type]Name >>] = [compare]
+	}{
+		//TODO: Compare parameters
+		,out <- If[[[type]Name >>] = [[compare]Name >>]]
+		{ out <- [[type]Variant >>] = [[compare]Variant >>] }
+	}
+}