2 export = [possibleUnsafeSclValueByName, unsafeSclValueByName, sclModuleNames]
5 include "SCL/ReflectionJava"
7 importJava "org.simantics.scl.compiler.module.repository.ModuleRepository" where
9 unsafeSclValueByName_ :: ModuleRepository -> String -> <Proc> a
11 @JavaName getSourceRepository
12 moduleSourceRepositoryOf :: ModuleRepository -> ModuleSourceRepository
14 importJava "org.simantics.scl.compiler.source.repository.ModuleSourceRepository" where
15 data ModuleSourceRepository
17 @JavaName getModuleNames
18 sclModuleNames_ :: ModuleSourceRepository -> [String]
20 unsafeSclValueByName :: String -> <Proc> a
21 unsafeSclValueByName = unsafeSclValueByName_ MODULE_REPOSITORY
23 possibleUnsafeSclValueByName :: String -> <Proc> Maybe a
24 possibleUnsafeSclValueByName name = Just (unsafeSclValueByName name) `catch` \(_ :: Exception) -> Nothing
26 sclModuleNames :: <Proc> [String]
27 sclModuleNames = sclModuleNames_ (moduleSourceRepositoryOf MODULE_REPOSITORY)