Struct pomelo_hir::hir::Dec
source · Expand description
HIR declaration node.
Fields§
§kind: DecKind
§ast_id: AstId<Dec>
Implementations§
source§impl Dec
impl Dec
pub fn bound_vids<A: FileArena>(&self, arena: &A) -> Vec<LongVId>
pub fn bound_tycons<A: FileArena>(&self, arena: &A) -> Vec<LongTyCon>
pub fn kind(&self) -> &DecKind
pub fn missing(&self) -> bool
pub fn seq(&self) -> Option<&[Idx<Dec>]>
pub fn val(&self) -> Option<(&[TyVar], &[ValBind])>
pub fn ty(&self) -> Option<&[TypBind]>
pub fn datatype(&self) -> Option<&[DataBind]>
pub fn replication(&self) -> Option<(&TyCon, &(LongTyCon, DefLoc))>
pub fn abstype(&self) -> Option<(&[DataBind], Idx<Dec>)>
pub fn exception(&self) -> Option<&ExBind>
pub fn local(&self) -> Option<(Idx<Dec>, Idx<Dec>)>
pub fn open(&self) -> Option<&[LongStrId]>
pub fn fixity(&self) -> Option<(&Fixity, &[(VId, DefLoc)])>
source§impl Dec
impl Dec
fn _make_seq(
ctx: &mut LoweringCtxt,
parent: NodeParent,
kinds: Vec<DecKind>
) -> DecKind
fn lower_val(ctx: &mut LoweringCtxt, dec: &ValDec, index: Idx<Dec>) -> DecKind
fn lower_fun(ctx: &mut LoweringCtxt, dec: &FunDec, index: Idx<Dec>) -> DecKind
fn lower_type(ctx: &mut LoweringCtxt, dec: &TypeDec) -> DecKind
fn lower_datatype(ctx: &mut LoweringCtxt, dec: &DatatypeDec) -> DecKind
fn lower_replication(ctx: &mut LoweringCtxt, dec: &DatatypeRepDec) -> DecKind
fn lower_abstype(ctx: &mut LoweringCtxt, dec: &AbstypeDec) -> DecKind
fn lower_exception(_ctx: &mut LoweringCtxt, _dec: &ExceptionDec) -> DecKind
fn lower_local(ctx: &mut LoweringCtxt, dec: &LocalDec) -> DecKind
sourcefn lower_open(ctx: &mut LoweringCtxt, dec: &OpenDec) -> DecKind
fn lower_open(ctx: &mut LoweringCtxt, dec: &OpenDec) -> DecKind
TODO: this might need fixing, it doesn’t do anything semantically yet…
Maybe we should panic here instead?