moduleDDC.Type.Bind(getBindType)whereimportDDC.Type.Exp-- | Lookup the type of a bound thing from the binder stack.-- The binder stack contains the binders of all the `TForall`s we've-- entered under so far.getBindType::Eqn=>[Bindn]->Boundn->Maybe(Int,Typen)getBindTypebs'u'=go0u'bs'wheregonu(BNamen1t:bs)|UNamen2<-u,n1==n2=Just(n,t)|otherwise=go(n+1)ubsgon(UIxi)(BAnont:bs)|i<0=Nothing|i==0=Just(n,t)|otherwise=go(n+1)(UIx(i-1))bsgonu(BAnon_:bs)|otherwise=go(n+1)ubsgonu(BNone_:bs)=go(n+1)ubsgo__[]=Nothing