[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] OCAML trouble
Hi gurus, I am trying to construct a dnspacket; and I just can't seem to get the typing right for this detail record. The record structure looks like this inside dnspacket.ml: type detail = { qr: qr; opcode: opcode; aa: bool; tc: bool; rd: bool; ra: bool; rcode: rcode; } So I am trying to construct one in my code like this: module DP = Dnspacket ... let d:DP.detail = {qr = `Query; opcode = `Query; aa = false; tc = false; rd = false; ra = true; rccode = `NoError;} in print_endline (detail_to_string d); Which produces this error after the mir-unix-direct build: Error: Unbound record field label qr Now earlier I did an experiment to make sure qr had the right type, but printing our the qr_to_bool of q which worked fine. Somehow though however I massage it to produce the record I get an error. Can you help me Obi Wan? Eireann
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |