Ignore:
Timestamp:
Sep 23, 2010, 3:16:27 PM (9 years ago)
Author:
mulligan
Message:

Fixed weird type errors in ASMInterpret.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/physical.ml

    r101 r120  
     1open BitVectors;;
     2
    13exception Byte7_conversion
    24
    3 module Byte7Map =
    4   Map.Make (struct type t = byte7 let compare = Pervasives.compare end)
    5 module WordMap =
    6   Map.Make (struct type t = word let compare = Pervasives.compare end)
     5module type Map =
     6 sig
     7  type key
     8  type map
     9   val empty : map
     10   val find : key -> map -> byte
     11   val add : key -> byte -> map -> map
     12 end
     13;;
     14
     15module Byte7Map : Map with type key = byte7 =
     16struct
     17  include Map.Make (struct type t = byte7 let compare = Pervasives.compare end)
     18  type map = byte t
     19  let find k m =
     20    try
     21      find k m
     22    with Not_found -> zero `Eight
     23end;;
     24
     25module WordMap : Map with type key = word =
     26struct
     27  include Map.Make (struct type t = word let compare = Pervasives.compare end)
     28  type map = byte t
     29  let find k m =
     30    try
     31      find k m
     32    with Not_found -> zero `Eight
     33end;;
    734
    835let int_of_bit =
Note: See TracChangeset for help on using the changeset viewer.