| 152 | } |
| 153 | |
| 154 | Module * Program::addModule ( const string & name ) { |
| 155 | if ( auto lm = library.findModule(name) ) { |
| 156 | return lm; |
| 157 | } |
| 158 | if ( auto pm = Module::require(name) ) { |
| 159 | library.addModule(pm); |
| 160 | return pm; |
| 161 | } |
| 162 | return nullptr; |
| 163 | } |
| 164 | |
| 165 | bool Program::addAlias ( const TypeDeclPtr & at ) { |
| 166 | return thisModule->addAlias(at, true); |