Ignore:
Timestamp:
Sep 21, 2010, 1:51:59 PM (10 years ago)
Author:
mulligan
Message:

Move to polymorphic variants everywhere (scary...)

File:
1 edited

Legend:

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

    r92 r97  
    1414
    1515let byte7_of_byte b =
    16   let bits = to_bits b in
    17     match bits with
    18       [false;b1;b2;b3;b4;b5;b6;b7] -> mk_byte7 b1 b2 b3 (mk_nibble b4 b5 b6 b7)
     16  let n1,n2 = from_byte b in
     17    match from_nibble n1 with
     18      (false,b1,b2,b3) -> mk_byte7 b1 b2 b3 n2
    1919    | _ -> raise Byte7_conversion
    2020
     
    6161;;
    6262
    63 let byte_of_byte7 ([b1;b2;b3]::n) =
    64         [false;b1;b2;b3]::n
     63let byte_of_byte7 =
     64 function
     65    ([b1;b2;b3]::n) -> [false;b1;b2;b3]::n
     66  | _ -> assert false
    6567;;
Note: See TracChangeset for help on using the changeset viewer.