File: typage.mli

package info (click to toggle)
ocaml-doc 3.09-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 10,428 kB
  • ctags: 4,963
  • sloc: ml: 9,244; makefile: 2,413; ansic: 122; sh: 49; asm: 17
file content (26 lines) | stat: -rw-r--r-- 1,454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*               Pierre Weis, projet Cristal, INRIA Rocquencourt       *)
(*                                                                     *)
(*  Copyright 2001 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  only by permission.                                                *)
(*                                                                     *)
(***********************************************************************)
open Syntaxe;;

type erreur_de_type =
   | Indfini of string      (* variable utilise mais non dfinie *)
   | Conflit of string * expr_type * expr_type (* conflit de types *)
   | Arit of string * int * int     (* mauvais nombre d'arguments *)
   | Tableau_attendu             (* [..] appliqu  un non-tableau *)
   | Tableau_interdit of string;;   (* tableau renvoy en rsultat *)

exception Erreur_typage of erreur_de_type;;

val type_programme: programme -> unit;;
val affiche_erreur: erreur_de_type -> unit;;
val type_op_unaire: string -> expr_type * expr_type;;
val type_op_binaire: string -> expr_type * expr_type * expr_type;;