moduleAgda.Syntax.Abstract.ViewswhereimportAgda.Syntax.PositionimportAgda.Syntax.CommonimportAgda.Syntax.AbstractimportAgda.Syntax.InfodataAppView=ApplicationHead[NamedArgExpr]|NonApplicationExpr-- ^ TODO: if we allow beta-redexes (which we currently do) there could be one here.dataHead=HeadVarName|HeadDefQName|HeadCon[QName]appView::Expr->AppViewappViewe=caseeofVarx->Application(HeadVarx)[]Defx->Application(HeadDefx)[]Con(AmbQx)->Application(HeadConx)[]Appie1arg->applyi(appViewe1)argScopedExpr_e->appViewe_->NonApplicationewhereapplyivarg=casevofApplicationhdes->Applicationhd$es++[arg]NonApplicatione->NonApplication(Appiearg)headToExpr::Head->ExprheadToExpr(HeadVarx)=VarxheadToExpr(HeadDeff)=DeffheadToExpr(HeadConcs)=Con(AmbQcs)unAppView::AppView->ExprunAppView(NonApplicatione)=eunAppView(Applicationhes)=foldl(App(ExprRangenoRange))(headToExprh)esinstanceHasRangeHeadwheregetRange(HeadVarx)=getRangexgetRange(HeadDefx)=getRangexgetRange(HeadConx)=getRangex