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
|
Rev | Line | |
---|
[63] | 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 | |
---|
[84] | 9 | open Bit;; |
---|
| 10 | open Nibble;; |
---|
| 11 | |
---|
[63] | 12 | module type BYTE7 = |
---|
| 13 | sig |
---|
| 14 | type bit |
---|
| 15 | type nibble |
---|
| 16 | type byte7 |
---|
| 17 | end;; |
---|
| 18 | |
---|
[84] | 19 | module Byte7Functor(Bit: BIT) |
---|
| 20 | (Nibble: NIBBLE |
---|
| 21 | with type bit = Bit.bit) : BYTE7 |
---|
[63] | 22 | with type bit = Bit.bit |
---|
| 23 | and type nibble = Nibble.nibble = |
---|
| 24 | struct |
---|
| 25 | type bit = Bit.bit |
---|
| 26 | type nibble = Nibble.nibble |
---|
| 27 | type byte7 = (bit * bit * bit * nibble) |
---|
| 28 | end;; |
---|
[84] | 29 | |
---|
| 30 | module Byte7 = Byte7Functor (Bit) (Nibble);; |
---|
Note: See
TracBrowser
for help on using the repository browser.