Package org.openquark.cal.services

Examples of org.openquark.cal.services.WorkspaceManager.makeModule()


        // Get the workspace manager and the logger.
        WorkspaceManager workspaceManager = leccCALServices.getWorkspaceManager();
        CompilerMessageLogger logger = new MessageLogger();
       
        // Compile the module.
        workspaceManager.makeModule(sourceDef, logger);
       
        // Remove the module.
        leccCALServices.getWorkspaceManager().removeModule(tempModuleName, new Status("Remove module status."));
       
        // Check that we got an error message of the expected type.
View Full Code Here


        SourceModel.ModuleDefn moduleDefnWithoutImports = SourceModel.ModuleDefn.make(moduleName, new SourceModel.Import[0], topLevelSourceElements);
        SourceModel.ModuleDefn moduleDefn = SourceModelUtilities.ImportAugmenter.augmentWithImports(moduleDefnWithoutImports);

        // Compile the module.
        SourceModelModuleSource moduleSource = new SourceModelModuleSource(moduleDefn);
        workspaceManager.makeModule(moduleSource, logger);

        // Remove the module.
        leccCALServices.getWorkspaceManager().removeModule(DEFAULT_TEST_MODULE_NAME, new Status("Remove module status."));

        return logger;
View Full Code Here

           
            "data Foo = Foo " + Prelude + ".Int;";

        // Compile the module.
        ModuleSourceDefinition moduleSourceDef = new StringModuleSourceDefinition(moduleName, moduleCode);
        workspaceManager.makeModule(moduleSourceDef, logger);

        // Remove the module.
        leccCALServices.getWorkspaceManager().removeModule(DEFAULT_TEST_MODULE_NAME, new Status("Remove module status."));
       
        // Check that we got an error message of the expected type.
View Full Code Here

                Assert.fail("Parsing of module definition failed: " + logger.getCompilerMessages());
            }
           
            WorkspaceManager workspaceManager = privateCopyLeccServices.getWorkspaceManager();
           
            workspaceManager.makeModule(new SourceModelModuleSource(moduleDefn), logger);
            if (logger.getNErrors() > 0) {
                Assert.fail("Compilation of test module (before adding instances) failed: " + logger.getCompilerMessages());
            }
           
            String[] typeNames = new String[] {
View Full Code Here

            if (SHOW_DEBUGGING_OUTPUT) {
                System.out.println("Module with compact instance implementations:");
                System.out.println(compactImplModuleDefn);
            }
           
            workspaceManager.makeModule(new SourceModelModuleSource(compactImplModuleDefn), logger);
            if (logger.getNErrors() > 0) {
                Assert.fail("Compilation of compact instance implementations failed: " + logger.getCompilerMessages());
            }
           
            CALServicesTestUtilities.runNamedFunction(QualifiedName.make(moduleName, "testAllCompact"), privateCopyLeccServices);
View Full Code Here

            if (SHOW_DEBUGGING_OUTPUT) {
                System.out.println("Module with efficient instance implementations:");
                System.out.println(efficientImplModuleDefn);
            }
           
            workspaceManager.makeModule(new SourceModelModuleSource(efficientImplModuleDefn), logger);
            if (logger.getNErrors() > 0) {
                Assert.fail("Compilation of efficient instance implementations failed: " + logger.getCompilerMessages());
            }

            CALServicesTestUtilities.runNamedFunction(QualifiedName.make(moduleName, "testAllEfficient"), privateCopyLeccServices);
View Full Code Here

        // Get the workspace manager and the logger.
        WorkspaceManager workspaceManager = calServices.getWorkspaceManager();
        CompilerMessageLogger logger = new MessageLogger();

        // Compile the module.
        workspaceManager.makeModule(sourceDef, logger);

        // Remove the module.
        calServices.getWorkspaceManager().removeModule(moduleName, new Status("Remove module status."));

        return logger;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.