convertObj :: ObjType -> M -> Obj
convertObj t (M bindings r) =
  let binder = Open (map convertHypothesis bindings)
  in case t of
     TermTy _    -> ObjTerm    . binder . convertTerm      $ M [] r
     PropTy _    -> ObjProp    . binder . convertProp      $ M [] r
     RefTy _     -> ObjRef     . binder . convertRef       $ M [] r
     SequentTy _ -> ObjSequent . binder . convertSequent   $ M [] r
     ProofTy _   -> ObjProof   . binder . convertProofTerm $ M [] r
convertObj :: ObjType -> M -> Obj
convertObj t (M bindings r) =
  let binder = Open (map convertHypothesis bindings)
  in case t of
     TermTy _    -> ObjTerm    . binder . convertTerm      $ M [] r
     PropTy _    -> ObjProp    . binder . convertProp      $ M [] r
     RefTy _     -> ObjRef     . binder . convertRef       $ M [] r
     SequentTy _ -> ObjSequent . binder . convertSequent   $ M [] r
     ProofTy _   -> ObjProof   . binder . convertProofTerm $ M [] r
convertObj t (M bindings r) =
  let binder = Open (map convertHypothesis bindings)
  in case t of
     TermTy _    -> ObjTerm    . binder . convertTerm      $ M [] r
     PropTy _    -> ObjProp    . binder . convertProp      $ M [] r
     RefTy _     -> ObjRef     . binder . convertRef       $ M [] r
     SequentTy _ -> ObjSequent . binder . convertSequent   $ M [] r
     ProofTy _   -> ObjProof   . binder . convertProofTerm $ M [] r