source: Deliverables/D4.1/Byte7.ml @ 84

Last change on this file since 84 was 84, checked in by mulligan, 10 years ago

Lots of work on tidying up code.

File size: 994 bytes
Line 
1(*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*)
2(* FILENAME:    Byte7.ml                                                     *)
3(* DESCRIPTION: An ADT implementing non-standard 7 bit bytes, and common     *)
4(*              operations on them.                                          *)
5(* CREATED:     13/09/2010, Dominic Mulligan                                 *)
6(* BUGS:                                                                     *)
7(*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*)
8
9open Bit;;
10open Nibble;;
11
12module type BYTE7 =
13sig
14  type bit
15  type nibble
16  type byte7
17end;;
18
19module Byte7Functor(Bit: BIT)
20                   (Nibble: NIBBLE
21                      with type bit = Bit.bit) : BYTE7
22  with type bit    = Bit.bit
23  and  type nibble = Nibble.nibble =
24struct
25  type bit = Bit.bit
26  type nibble = Nibble.nibble
27  type byte7 = (bit * bit * bit * nibble)
28end;;
29
30module Byte7 = Byte7Functor (Bit) (Nibble);;
Note: See TracBrowser for help on using the repository browser.