From e55c65556a96840526b63269e40b4f0de63ef8d3 Mon Sep 17 00:00:00 2001 From: gameboo Date: Tue, 28 Sep 2021 00:56:59 +0100 Subject: [PATCH] Comment about orphan instance for CapMem --- CHERICC_Fat.bsv | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHERICC_Fat.bsv b/CHERICC_Fat.bsv index c627217..4cb7dea 100644 --- a/CHERICC_Fat.bsv +++ b/CHERICC_Fat.bsv @@ -945,7 +945,13 @@ function MetaInfo getMetaInfo (CapFat cap); , baseCorrection : baseCorrection }; endfunction -typedef Bit#(TAdd#(1, CapW)) CapMem; +// XXX TODO +// to avoid an orphan instance here, we should make CapMem a "newtype", +// basically: +// typedef struct { +// Bit #(TAdd #(1, CapW)) cap; +// } CapMem; +typedef Bit #(TAdd #(1, CapW)) CapMem; typedef CapFat CapReg;