Last change
on this file since 70 was
63,
checked in by mulligan, 10 years ago
|
More work on bits, bytes, nibbles, and added modules for byte7s and
words.
|
File size:
854 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 | |
---|
9 | module type BYTE7 = |
---|
10 | sig |
---|
11 | type bit |
---|
12 | type nibble |
---|
13 | type byte7 |
---|
14 | end;; |
---|
15 | |
---|
16 | module Byte7(Bit: BIT, |
---|
17 | Nibble: NIBBLE) |
---|
18 | with type bit = Bit.bit |
---|
19 | and type nibble = Nibble.nibble = |
---|
20 | struct |
---|
21 | type bit = Bit.bit |
---|
22 | type nibble = Nibble.nibble |
---|
23 | type byte7 = (bit * bit * bit * nibble) |
---|
24 | end;; |
---|
Note: See
TracBrowser
for help on using the repository browser.