X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fscl%2FSCL%2FModuleRepository.scl;h=e8d37789b00be77a32ef8cc6306fd6ab8fa6cb16;hp=7d035d8cf6e380c66e3a16d228a237e34ecd2c7b;hb=947cdc62f1d9a353726d29693c339edd1d0cacf6;hpb=9ea5cf59a4d87c3db3a486e86d7b54efffd5516d diff --git a/bundles/org.simantics.scl.compiler/scl/SCL/ModuleRepository.scl b/bundles/org.simantics.scl.compiler/scl/SCL/ModuleRepository.scl index 7d035d8cf..e8d37789b 100644 --- a/bundles/org.simantics.scl.compiler/scl/SCL/ModuleRepository.scl +++ b/bundles/org.simantics.scl.compiler/scl/SCL/ModuleRepository.scl @@ -1,6 +1,6 @@ module { export = [possibleUnsafeSclValueByName, unsafeSclValueByName, sclModuleNames, moduleByName, - documentationOfSCLValue, sclValueRef] + documentationOfSCLValue, sclValueRef, possibleModuleSourceText] } include "./CurrentModuleRepository" @@ -35,6 +35,9 @@ importJava "org.simantics.scl.compiler.source.repository.ModuleSourceRepository" @JavaName getModuleNames sclModuleNames_ :: ModuleSourceRepository -> [String] + + @JavaName getPossibleSourceText + possibleModuleSourceText_ :: ModuleSourceRepository -> String -> Maybe String importJava "org.simantics.scl.compiler.errors.Failable" where data Failable a @@ -56,4 +59,7 @@ sclModuleNames = sclModuleNames_ (moduleSourceRepositoryOf MODULE_REPOSITORY) moduleByName :: String -> Maybe Module moduleByName name = getResult failable where - failable = moduleByName_ MODULE_REPOSITORY name \ No newline at end of file + failable = moduleByName_ MODULE_REPOSITORY name + +possibleModuleSourceText :: String -> Maybe String +possibleModuleSourceText name = possibleModuleSourceText_ (moduleSourceRepositoryOf MODULE_REPOSITORY) name \ No newline at end of file