8b563c8055
Pict is a language in the ML tradition, formed by adding a layer of convenient syntactic sugar and a static type system to a tiny core. The current release includes a Pict-to-C compiler, reference manual, language tutorial, numerous libraries, and example programs. The core language - an asynchronous variant of Milner, Parrow, and Walker's pi-calculus - has been used as a theoretical foundation for a broad class of concurrent computations. The goal in Pict is to identify high-level idioms that arise naturally when these primitives are used to build working programs - idioms such as basic data structures, protocols for returning results, higher-order programming, selective communication, and concurrent objects. The type system integrates a number of features found in recent work on theoretical foundations for typed object-oriented languages: higher-order polymorphism, simple recursive types, subtyping, and a powerful partial type inference algorithm.
42 lines
1.3 KiB
Text
42 lines
1.3 KiB
Text
$NetBSD: patch-ye,v 1.1.1.1 2009/10/28 06:13:40 dholland Exp $
|
|
|
|
Fix integer types for modern ocaml.
|
|
|
|
--- Pict/inter.ml.orig 2009-10-27 20:34:18.000000000 -0400
|
|
+++ Pict/inter.ml 2009-10-27 20:42:04.000000000 -0400
|
|
@@ -65,7 +65,7 @@ type proc =
|
|
| SKIP
|
|
|
|
and atom =
|
|
- INT of int
|
|
+ INT of int32
|
|
| CHAR of char
|
|
| BOOL of bool
|
|
| ADDR of Var.var
|
|
@@ -170,7 +170,7 @@ and printBoxProc bi p =
|
|
Format.open_hvbox 0; printProc bi p; Format.close_box()
|
|
|
|
and printAtom = function
|
|
- INT(i) -> Format.print_int i
|
|
+ INT(i) -> Format.print_string (Int32.to_string i)
|
|
| CHAR(c) ->
|
|
Format.print_string "'"; Format.print_char c; Format.print_string "'"
|
|
| COERCION(co,a) ->
|
|
@@ -217,7 +217,7 @@ and printCCode ci sl l =
|
|
in
|
|
Format.open_hbox();
|
|
Format.print_string "(ccode ";
|
|
- Format.print_int ci.Ccode.alloc; Format.print_string " ";
|
|
+ Format.print_int (Int32.to_int ci.Ccode.alloc); Format.print_string " ";
|
|
printCi ci; print sl l; Format.print_string ")";
|
|
Format.close_box()
|
|
|
|
@@ -228,7 +228,7 @@ and printCCall ci s l =
|
|
in
|
|
Format.open_hbox();
|
|
Format.print_string "(ccode ";
|
|
- Format.print_int ci.Ccode.alloc; Format.print_string " ";
|
|
+ Format.print_int (Int32.to_int ci.Ccode.alloc); Format.print_string " ";
|
|
printCi ci; Format.print_string s; Format.print_string " ";
|
|
print false l; Format.print_string ")";
|
|
Format.close_box()
|