diff --git a/CHANGELOG.md b/CHANGELOG.md index c3909a2..201d816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ +- V 0.3.0: Added more programming languages: Java, Julia, C#, Ruby, Processing - V 0.2.0: Some small changes to NASSA.yml field checks, some general refactoring and added checks if files/dirs referenced in the .yml file actually exist - V 0.1.0: First prototype for a representative selection of variables in NASSA.yml files \ No newline at end of file diff --git a/nassa.cabal b/nassa.cabal index b0c2a9d..5356fbb 100644 --- a/nassa.cabal +++ b/nassa.cabal @@ -1,5 +1,5 @@ name: nassa -version: 0.2.0 +version: 0.3.0 synopsis: A package to validate NASSA modules description: NASSA maintains a library of agent-based-modelling algorithms in individual code modules. Each module is defined by a NASSA.yml file. nassa-hs validates these .yml files. license: MIT diff --git a/src/NASSA/Types.hs b/src/NASSA/Types.hs index c494890..9cae4f7 100644 --- a/src/NASSA/Types.hs +++ b/src/NASSA/Types.hs @@ -138,19 +138,34 @@ data ProgrammingLanguage = LanguageR | LanguagePython | LanguageNetLogo + | LanguageJava + | LanguageJulia + | LanguageCsharp + | LanguageRuby + | LanguageProcessing deriving (Eq) instance Show ProgrammingLanguage where show LanguageR = "R" show LanguagePython = "Python" show LanguageNetLogo = "NetLogo" + show LanguageJava = "Java" + show LanguageJulia = "Julia" + show LanguageCsharp = "C#" + show LanguageRuby = "Ruby" + show LanguageProcessing = "Processing" instance FromJSON ProgrammingLanguage where parseJSON = withText "programmingLanguage" $ \case - "R" -> pure LanguageR - "Python" -> pure LanguagePython - "NetLogo" -> pure LanguageNetLogo - other -> fail $ "unknown Language: " ++ show other + "R" -> pure LanguageR + "Python" -> pure LanguagePython + "NetLogo" -> pure LanguageNetLogo + "Java" -> pure LanguageJava + "Julia" -> pure LanguageJulia + "C#" -> pure LanguageCsharp + "Ruby" -> pure LanguageRuby + "Processing" -> pure LanguageProcessing + other -> fail $ "unknown Language: " ++ show other data InOrOutput = InOrOutput { _inOrOutputName :: String