1234567891011121314151617181920(* A more advanced example of how to explore the structure of terms of
type constr is given in the coq-dpdgraph plugin. *)letsimple_body_access~opaque_accessgref=letopenNames.GlobRefinmatchgrefwith|VarRef_->failwith"variables are not covered in this example"|IndRef_->failwith"inductive types are not covered in this example"|ConstructRef_->failwith"constructors are not covered in this example"|ConstRefcst->letcb=Environ.lookup_constantcst(Global.env())in(* most commands should not use body_of_constant_body and opaque accessors,
but for printing it's ok *)matchGlobal.body_of_constant_bodyopaque_accesscbwith|Some(e,_,_)->EConstr.of_constre|None->failwith"This term has no value"