pub fn go<I>(module: I,
                 interner: &mut Interner)
                 -> (HashMap<Id, P<FunDef>>, HashMap<Id, P<TypeDef>>)
        where I: IntoIterator<Item = Def>
    {
        let current_tmp = interner.intern("");
        let mut runner = K {
            count: 0,
            env: HashMap::new(),
            global: HashMap::new(),
            typedefs: HashMap::new(),
            current: current_tmp,
            direct: HashMap::new(),
            interner,
        };
        let defs: Vec<_> = module.into_iter()
            .map(|def| {
                     runner.direct.insert(def.ident, def.ident);
                     def
                 })
            .collect();
        {
            let b = &mut runner;

            for def in defs {
                b.convert_def(def);
            }
        }

        let K { global, typedefs, .. } = runner;
        (global, typedefs)
    }
/// Do transformation on a syntax module,
/// generate core term representation
Do transformation on a syntax module,
generate core term representation
Do transformation on a syntax module generate core term representation
pub fn go<I>(module: I,
                 interner: &mut Interner)
                 -> (HashMap<Id, P<FunDef>>, HashMap<Id, P<TypeDef>>)
        where I: IntoIterator<Item = Def>
    {
        let current_tmp = interner.intern("");
        let mut runner = K {
            count: 0,
            env: HashMap::new(),
            global: HashMap::new(),
            typedefs: HashMap::new(),
            current: current_tmp,
            direct: HashMap::new(),
            interner,
        };
        let defs: Vec<_> = module.into_iter()
            .map(|def| {
                     runner.direct.insert(def.ident, def.ident);
                     def
                 })
            .collect();
        {
            let b = &mut runner;
            for def in defs {
                b.convert_def(def);
            }
        }
        let K { global, typedefs, .. } = runner;
        (global, typedefs)
    }
pub fn go < I > ( module : I , interner : & mut Interner ) -> ( HashMap < Id , P < FunDef > > , HashMap < Id , P < TypeDef > > ) where I : IntoIterator < Item = Def > { let current_tmp = interner . intern ( " " ) ; let mut runner = K { count : 0 , env : HashMap :: new ( ) , global : HashMap :: new ( ) , typedefs : HashMap :: new ( ) , current : current_tmp , direct : HashMap :: new ( ) , interner , } ; let defs : Vec < _ > = module . into_iter ( ) . map ( | def | { runner . direct . insert ( def . ident , def . ident ) ; def } ) . collect ( ) ; { let b = & mut runner ; for def in defs { b . convert_def ( def ) ; } } let K { global , typedefs , .. } = runner ; ( global , typedefs ) }
Do transformation on a syntax module,
generate core term representation
Do transformation on a syntax module generate core term representation
module
I
interner
&mut Interner
module
I
interner
&mut Interner