selfifyTypeDefn dtPath (DataDefn bnd) = let
  (_, constrDefs) = UU.unsafeUnbind bnd
  cs = map (\(ConstructorDef c _) -> c) constrDefs
  in map mkSubst cs
  where
    mkSubst :: ValConName -> (ValConName, ValueConstructor)
    mkSubst short =
      let fld = U.name2String short
      in (short, VCGlobal (Right $ InferredValConPath dtPath fld))
selfifyTypeDefn dtPath (DataDefn bnd) = let
  (_, constrDefs) = UU.unsafeUnbind bnd
  cs = map (\(ConstructorDef c _) -> c) constrDefs
  in map mkSubst cs
  where
    mkSubst :: ValConName -> (ValConName, ValueConstructor)
    mkSubst short =
      let fld = U.name2String short
      in (short, VCGlobal (Right $ InferredValConPath dtPath fld))
selfifyTypeDefn dtPath (DataDefn bnd) = let
  (_, constrDefs) = UU.unsafeUnbind bnd
  cs = map (\(ConstructorDef c _) -> c) constrDefs
  in map mkSubst cs
  where
    mkSubst :: ValConName -> (ValConName, ValueConstructor)
    mkSubst short =
      let fld = U.name2String short
      in (short, VCGlobal (Right $ InferredValConPath dtPath fld))