├── .gitignore
├── .idea
├── .name
├── ant.xml
├── artifacts
│ └── haskell_jps_plugin_jar.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── kotlinc.xml
├── libraries
│ ├── KotlinJavaRuntime.xml
│ ├── commons_compress.xml
│ ├── haskell_jps_plugin.xml
│ ├── httpclient_4_3_6.xml
│ ├── json_simple_1_1_1.xml
│ └── pty4j_0_3.xml
├── misc.xml
├── modules.xml
├── runConfigurations
│ ├── Remote_debug.xml
│ ├── haskell.xml
│ └── haskell__compile_debug_.xml
├── scopes
│ └── scope_settings.xml
├── uiDesigner.xml
└── vcs.xml
├── LICENSE
├── README.md
├── build.xml
├── data
├── cabalParserTests
│ ├── Benchmark.cabal
│ ├── Benchmark.txt
│ ├── Bool.cabal
│ ├── Bool.txt
│ ├── ComplexCondition.cabal
│ ├── ComplexCondition.txt
│ ├── ComplexVersionConstraint.cabal
│ ├── ComplexVersionConstraint.txt
│ ├── EolComment.cabal
│ ├── EolComment.txt
│ ├── Executable.cabal
│ ├── Executable.txt
│ ├── Flag.cabal
│ ├── Flag.txt
│ ├── FreeForm.cabal
│ ├── FreeForm.txt
│ ├── FreeLine.cabal
│ ├── FreeLine.txt
│ ├── FullVersionConstraint.cabal
│ ├── FullVersionConstraint.txt
│ ├── Identifier.cabal
│ ├── Identifier.txt
│ ├── IfElseSection.cabal
│ ├── IfElseSection.txt
│ ├── InvalidField.cabal
│ ├── InvalidField.txt
│ ├── Library.cabal
│ ├── Library.txt
│ ├── ListInList.cabal
│ ├── ListInList.txt
│ ├── RepoSource.cabal
│ ├── RepoSource.txt
│ ├── SimpleBuildInfo.cabal
│ ├── SimpleBuildInfo.txt
│ ├── SimpleCondition.cabal
│ ├── SimpleCondition.txt
│ ├── SimpleOptionalCommaList.cabal
│ ├── SimpleOptionalCommaList.txt
│ ├── SimpleTopLevel.cabal
│ ├── SimpleTopLevel.txt
│ ├── SimpleVersion.cabal
│ ├── SimpleVersion.txt
│ ├── TestSuite.cabal
│ ├── TestSuite.txt
│ ├── Token.cabal
│ ├── Token.txt
│ ├── VersionConstraint.cabal
│ └── VersionConstraint.txt
├── cppTests
│ ├── CppIf.hs
│ └── CppIf.txt
├── haskellParserTests
│ ├── ALotIndents.hs
│ ├── ALotIndents.txt
│ ├── Backtracking.hs
│ ├── Backtracking.txt
│ ├── DataType.hs
│ ├── DataType.txt
│ ├── DoNotation.hs
│ ├── DoNotation.txt
│ ├── FBind.hs
│ ├── FBind.txt
│ ├── GADT.hs
│ ├── GADT.txt
│ ├── GCD.hs
│ ├── GCD.txt
│ ├── HelloWorld.hs
│ ├── HelloWorld.txt
│ ├── Imports.hs
│ ├── Imports.txt
│ ├── ImportsWithData.hs
│ ├── ImportsWithData.txt
│ ├── Instance.hs
│ ├── Instance.txt
│ ├── Maximum.hs
│ ├── Maximum.txt
│ ├── NoModuleKeyword.hs
│ ├── NoModuleKeyword.txt
│ ├── Numbers.hs
│ └── Numbers.txt
├── indentTests
│ ├── Braces.hs
│ ├── Braces.txt
│ ├── BracesIndent.hs
│ ├── BracesIndent.txt
│ ├── CaseInList.hs
│ ├── CaseInList.txt
│ ├── ClosingBrace.hs
│ ├── ClosingBrace.txt
│ ├── HelloWorld.hs
│ ├── HelloWorld.txt
│ ├── IndentInBraces.hs
│ ├── IndentInBraces.txt
│ ├── IndentInBracesAgain.hs
│ ├── IndentInBracesAgain.txt
│ ├── IndentInParenthesis.hs
│ ├── IndentInParenthesis.txt
│ ├── LetIn.hs
│ ├── LetIn.txt
│ ├── LetInSameIndent.hs
│ ├── LetInSameIndent.txt
│ ├── OpenBraceThenClose.hs
│ ├── OpenBraceThenClose.txt
│ ├── SimpleIndent.hs
│ ├── SimpleIndent.txt
│ ├── Tabs.hs
│ ├── Tabs.txt
│ ├── TwoClosingBraces.hs
│ └── TwoClosingBraces.txt
└── recoveryTests
│ ├── Recovery.hs
│ └── Recovery.txt
├── generator
├── generator.iml
└── src
│ └── org
│ └── jetbrains
│ └── generator
│ ├── Generator.flex
│ ├── GrammarLexer.java
│ ├── GrammarParser.kt
│ ├── Main.kt
│ ├── ParserException.kt
│ ├── ParserGenerator.kt
│ ├── TextGenerator.kt
│ ├── Token.kt
│ ├── TokenType.java
│ └── grammar
│ ├── AbstractRule.kt
│ ├── FakeRule.kt
│ ├── Grammar.kt
│ ├── Rule.kt
│ ├── RuleRef.kt
│ ├── TokenDescription.kt
│ └── Variant.kt
├── haskell-idea.iml
├── jps-plugin
├── jps-plugin.iml
└── src
│ ├── META-INF
│ └── services
│ │ ├── org.jetbrains.jps.incremental.BuilderService
│ │ └── org.jetbrains.jps.model.serialization.JpsModelSerializerExtension
│ └── org
│ └── jetbrains
│ └── jps
│ └── cabal
│ ├── CabalBuilder.java
│ ├── CabalBuilderService.java
│ ├── CabalJspInterface.java
│ ├── JpsHaskellModuleType.java
│ ├── ProcessWrapper.java
│ └── model
│ ├── HaskellSdkType.java
│ ├── JpsHaskellModelSerializerExtension.java
│ ├── JpsHaskellModulePropertiesSerializer.java
│ └── JpsHaskellSdkProperties.java
├── lib
├── commons-compress-1.8.jar
├── httpclient-4.3.6.jar
├── jflex-1.5.1.jar
├── json-simple-1.1.1.jar
├── os
│ ├── linux
│ │ ├── x86
│ │ │ └── libpty.so
│ │ └── x86_64
│ │ │ └── libpty.so
│ └── macosx
│ │ ├── x86
│ │ └── libpty.dylib
│ │ └── x86_64
│ │ └── libpty.dylib
└── pty4j-0.3.jar
├── plugin
├── META-INF
│ └── plugin.xml
├── gen
│ └── org
│ │ └── jetbrains
│ │ └── grammar
│ │ ├── HaskellLexerTokens.java
│ │ ├── HaskellParser.java
│ │ └── HaskellTokens.kt
├── haskell-plugin.iml
├── haskell.grm
├── resources
│ ├── colorSchemes
│ │ ├── CassiusDefault.xml
│ │ ├── HamletDefault.xml
│ │ ├── HaskellDefault.xml
│ │ ├── HaskellDracula.xml
│ │ ├── JuliusDefault.xml
│ │ └── LuciusDefault.xml
│ └── org
│ │ └── jetbrains
│ │ └── haskell
│ │ └── icons
│ │ ├── application.png
│ │ ├── cabal.png
│ │ ├── cabal13.png
│ │ ├── haskell.png
│ │ ├── haskell13.png
│ │ ├── haskell16.png
│ │ ├── haskell24.png
│ │ ├── repl.png
│ │ ├── update.png
│ │ ├── update@2x.png
│ │ └── yesod16.png
├── src
│ └── org
│ │ └── jetbrains
│ │ ├── cabal
│ │ ├── CabalApplicationComponent.kt
│ │ ├── CabalConfig.kt
│ │ ├── CabalFile.kt
│ │ ├── CabalFileType.java
│ │ ├── CabalInterface.kt
│ │ ├── CabalLanguage.java
│ │ ├── CabalManager.kt
│ │ ├── completion
│ │ │ └── CabalCompletionContributor.kt
│ │ ├── export
│ │ │ ├── CabalModuleBuilder.kt
│ │ │ ├── CabalProjectImportBuilder.kt
│ │ │ ├── CabalProjectImportProvider.kt
│ │ │ ├── CabalProjectResolver.kt
│ │ │ ├── CabalProjectSettingsControl.kt
│ │ │ ├── CabalTaskManager.kt
│ │ │ ├── ImportFromCabalControl.kt
│ │ │ └── SimpleCabalStep.kt
│ │ ├── highlight
│ │ │ ├── CabalAnnotator.kt
│ │ │ ├── CabalColorsAndFontsPage.kt
│ │ │ ├── CabalHighlighter.kt
│ │ │ ├── CabalHighlighterFactory.kt
│ │ │ └── ErrorMessage.kt
│ │ ├── parser
│ │ │ ├── Cabal.flex
│ │ │ ├── CabalCompositeElementType.kt
│ │ │ ├── CabalConstructs.kt
│ │ │ ├── CabalLexer.kt
│ │ │ ├── CabalParser.kt
│ │ │ ├── CabalParserDefinition.kt
│ │ │ ├── CabalTokelTypes.kt
│ │ │ └── _CabalLexer.java
│ │ ├── psi
│ │ │ ├── Benchmark.kt
│ │ │ ├── BenchmarkType.kt
│ │ │ ├── BoolField.kt
│ │ │ ├── BuildDependsField.kt
│ │ │ ├── BuildSection.kt
│ │ │ ├── BuildToolsField.kt
│ │ │ ├── BuildType.kt
│ │ │ ├── BuildTypeField.kt
│ │ │ ├── BuildableField.kt
│ │ │ ├── CSourcesField.kt
│ │ │ ├── CabalVersionField.kt
│ │ │ ├── Checkable.kt
│ │ │ ├── CompilerId.kt
│ │ │ ├── ComplexVersionConstraint.kt
│ │ │ ├── ConditionPart.kt
│ │ │ ├── DataDirField.kt
│ │ │ ├── DataFilesField.kt
│ │ │ ├── EMail.kt
│ │ │ ├── ElseCondition.kt
│ │ │ ├── Executable.kt
│ │ │ ├── ExposedField.kt
│ │ │ ├── ExposedModulesField.kt
│ │ │ ├── ExtensionsField.kt
│ │ │ ├── ExtraLibDirsField.kt
│ │ │ ├── ExtraSourceField.kt
│ │ │ ├── ExtraTmpField.kt
│ │ │ ├── Field.kt
│ │ │ ├── FieldContainer.kt
│ │ │ ├── Flag.kt
│ │ │ ├── FreeForm.kt
│ │ │ ├── FullCondition.kt
│ │ │ ├── FullVersionConstraint.kt
│ │ │ ├── HsSourceDirsField.kt
│ │ │ ├── Identifier.kt
│ │ │ ├── IfCondition.kt
│ │ │ ├── IncludeDirsField.kt
│ │ │ ├── IncludesField.kt
│ │ │ ├── InstallIncludesField.kt
│ │ │ ├── InvalidConditionPart.kt
│ │ │ ├── InvalidField.kt
│ │ │ ├── InvalidValue.kt
│ │ │ ├── Language.kt
│ │ │ ├── Library.kt
│ │ │ ├── LicenseField.kt
│ │ │ ├── LicenseFilesField.kt
│ │ │ ├── MainFileField.kt
│ │ │ ├── MultiValueField.kt
│ │ │ ├── Name.kt
│ │ │ ├── NameField.kt
│ │ │ ├── Option.kt
│ │ │ ├── OtherModulesField.kt
│ │ │ ├── Path.kt
│ │ │ ├── PathsField.kt
│ │ │ ├── PkgConfigDependsField.kt
│ │ │ ├── PropertyField.kt
│ │ │ ├── PropertyKey.kt
│ │ │ ├── PropertyValue.kt
│ │ │ ├── RangedValue.kt
│ │ │ ├── RepoKind.kt
│ │ │ ├── RepoLocationField.kt
│ │ │ ├── RepoModuleField.kt
│ │ │ ├── RepoSubdirField.kt
│ │ │ ├── RepoTagField.kt
│ │ │ ├── RepoType.kt
│ │ │ ├── Section.kt
│ │ │ ├── SectionType.kt
│ │ │ ├── SimpleCondition.kt
│ │ │ ├── SingleValueField.kt
│ │ │ ├── SourceRepo.kt
│ │ │ ├── TestModuleField.kt
│ │ │ ├── TestSuite.kt
│ │ │ ├── TestSuiteType.kt
│ │ │ ├── TestedWithField.kt
│ │ │ ├── Token.kt
│ │ │ ├── TypeField.kt
│ │ │ ├── Url.kt
│ │ │ ├── VersionConstraint.kt
│ │ │ ├── VersionField.kt
│ │ │ └── VersionValue.kt
│ │ ├── references
│ │ │ └── FilePsiReference.kt
│ │ ├── settings
│ │ │ ├── CabalLocalSettings.java
│ │ │ ├── CabalProjectSettings.kt
│ │ │ ├── CabalSettings.kt
│ │ │ ├── CabalSettingsListener.kt
│ │ │ └── CabalSettingsListenerImpl.java
│ │ ├── tool
│ │ │ ├── CabalMessageView.java
│ │ │ └── CabalToolWindowFactory.kt
│ │ └── util
│ │ │ └── CabalConstants.kt
│ │ ├── grammar
│ │ ├── BaseHaskellParser.kt
│ │ ├── Main.kt
│ │ ├── analysis
│ │ │ └── Main.kt
│ │ ├── bigTest
│ │ │ └── BigParserTest.kt
│ │ └── dumb
│ │ │ ├── LLState.kt
│ │ │ ├── LazyLLParser.kt
│ │ │ ├── ResultTree.kt
│ │ │ ├── Rule.kt
│ │ │ ├── Term.kt
│ │ │ └── Variant.kt
│ │ ├── haskell
│ │ ├── HaskellLanguage.kt
│ │ ├── HaskellProjectComponent.kt
│ │ ├── HaskellViewProvider.kt
│ │ ├── actions
│ │ │ ├── NewHaskellFileAction.java
│ │ │ └── ShowTypeAction.kt
│ │ ├── comment
│ │ │ └── HaskellCommenter.java
│ │ ├── completion
│ │ │ └── HaskellCompletionContributor.kt
│ │ ├── config
│ │ │ ├── HaskellConfigurable.kt
│ │ │ └── HaskellSettings.java
│ │ ├── debugger
│ │ │ ├── DebugConsoleExecutor.kt
│ │ │ ├── DebugProcessStateUpdater.kt
│ │ │ ├── HaskellDebugProcess.kt
│ │ │ ├── HaskellDebuggerEditorsProvider.kt
│ │ │ ├── HaskellProgramRunner.kt
│ │ │ ├── actions
│ │ │ │ └── SwitchableAction.kt
│ │ │ ├── breakpoints
│ │ │ │ ├── HaskellBreakpointHandlerFactory.kt
│ │ │ │ ├── HaskellExceptionBreakpointHandler.kt
│ │ │ │ ├── HaskellExceptionBreakpointProperties.kt
│ │ │ │ ├── HaskellExceptionBreakpointPropertiesPanel.kt
│ │ │ │ ├── HaskellExceptionBreakpointType.kt
│ │ │ │ ├── HaskellLineBreakpointDescription.kt
│ │ │ │ ├── HaskellLineBreakpointHandler.kt
│ │ │ │ ├── HaskellLineBreakpointType.kt
│ │ │ │ └── SelectBreakPropertiesPanel.kt
│ │ │ ├── config
│ │ │ │ ├── DebuggerConfigurable.kt
│ │ │ │ └── HaskellDebugSettings.kt
│ │ │ ├── frames
│ │ │ │ ├── ForceEvaluationAction.kt
│ │ │ │ ├── HsDebugValue.kt
│ │ │ │ ├── HsDebuggerEvaluator.kt
│ │ │ │ ├── HsExecutionStack.kt
│ │ │ │ ├── HsHistoryFrame.kt
│ │ │ │ ├── HsStackFrame.kt
│ │ │ │ ├── HsSuspendContext.kt
│ │ │ │ ├── HsTopStackFrame.kt
│ │ │ │ └── ProgramThreadInfo.kt
│ │ │ ├── highlighting
│ │ │ │ ├── HsDebugSessionListener.kt
│ │ │ │ └── HsExecutionPointHighlighter.kt
│ │ │ ├── history
│ │ │ │ ├── FramesPanel.java
│ │ │ │ ├── HistoryManager.kt
│ │ │ │ └── HistoryTab.kt
│ │ │ ├── parser
│ │ │ │ ├── GHCiParser.kt
│ │ │ │ ├── JSONConverter.kt
│ │ │ │ └── ParsedDataTypes.kt
│ │ │ ├── procdebuggers
│ │ │ │ ├── GHCiDebugger.kt
│ │ │ │ ├── ProcessDebugger.kt
│ │ │ │ ├── QueueDebugger.kt
│ │ │ │ ├── RemoteDebugger.kt
│ │ │ │ ├── SimpleDebuggerImpl.kt
│ │ │ │ └── utils
│ │ │ │ │ ├── CommandQueue.kt
│ │ │ │ │ ├── DebugRespondent.kt
│ │ │ │ │ ├── DefaultRespondent.kt
│ │ │ │ │ ├── InputReadinessChecker.kt
│ │ │ │ │ └── RemoteDebugStreamHandler.kt
│ │ │ ├── prochandlers
│ │ │ │ ├── GHCiProcessHandler.kt
│ │ │ │ ├── HaskellDebugProcessHandler.kt
│ │ │ │ └── RemoteProcessHandler.kt
│ │ │ ├── protocol
│ │ │ │ ├── AbstractCommand.kt
│ │ │ │ ├── BackCommand.kt
│ │ │ │ ├── BreakpointListCommand.kt
│ │ │ │ ├── CommandCallback.kt
│ │ │ │ ├── EvalCommand.kt
│ │ │ │ ├── ExpressionTypeCommand.kt
│ │ │ │ ├── FlowCommand.kt
│ │ │ │ ├── ForceCommand.kt
│ │ │ │ ├── ForwardCommand.kt
│ │ │ │ ├── HiddenCommand.kt
│ │ │ │ ├── HistoryCommand.kt
│ │ │ │ ├── PrintCommand.kt
│ │ │ │ ├── RealTimeCommand.kt
│ │ │ │ ├── RemoveBreakpointCommand.kt
│ │ │ │ ├── ResumeCommand.kt
│ │ │ │ ├── SetBreakpointCommand.kt
│ │ │ │ ├── ShowExpressionCommand.kt
│ │ │ │ ├── StepCommand.kt
│ │ │ │ ├── StepIntoCommand.kt
│ │ │ │ ├── StepOverCommand.kt
│ │ │ │ ├── SyncCommand.kt
│ │ │ │ └── TraceCommand.kt
│ │ │ ├── repl
│ │ │ │ └── DebugConsoleFactory.kt
│ │ │ └── utils
│ │ │ │ ├── HaskellUtils.kt
│ │ │ │ ├── SyncObject.kt
│ │ │ │ └── UIUtils.kt
│ │ ├── doc
│ │ │ └── HaskellQuickDocumentationProvider.kt
│ │ ├── external
│ │ │ ├── BuildWrapper.kt
│ │ │ ├── ErrorMessage.kt
│ │ │ ├── GhcMod.kt
│ │ │ ├── GhcModi.kt
│ │ │ ├── HaskellExternalAnnotator.kt
│ │ │ ├── ScionBrowser.kt
│ │ │ ├── ghcfs
│ │ │ │ ├── RamFile.kt
│ │ │ │ └── RamVirtualFileSystem.kt
│ │ │ └── tool
│ │ │ │ ├── GhcModConsole.kt
│ │ │ │ └── GhcModToolWindowFactory.kt
│ │ ├── fileType
│ │ │ ├── HaskellFile.kt
│ │ │ ├── HaskellFileType.kt
│ │ │ ├── HaskellFileTypeFactory.kt
│ │ │ ├── HaskellFileViewProviderFactory.kt
│ │ │ └── HiFileType.kt
│ │ ├── findUsages
│ │ │ ├── HaskellFindUsagesProvider.kt
│ │ │ └── HaskellWordsScanner.kt
│ │ ├── highlight
│ │ │ ├── HaskellAnnotator.kt
│ │ │ ├── HaskellBraceMatcher.kt
│ │ │ ├── HaskellColorsAndFontsPage.kt
│ │ │ ├── HaskellHighlighter.kt
│ │ │ └── HaskellHighlighterFactory.java
│ │ ├── icons
│ │ │ └── HaskellIcons.kt
│ │ ├── module
│ │ │ ├── CabalPackagesContainer.java
│ │ │ ├── HaskellModuleBuilder.kt
│ │ │ ├── HaskellModuleConfigEditor.kt
│ │ │ ├── HaskellModuleType.kt
│ │ │ └── OutputEditor.kt
│ │ ├── parser
│ │ │ ├── HaskellCompositeElementType.kt
│ │ │ ├── HaskellParserDefinition.kt
│ │ │ ├── HaskellTokenType.kt
│ │ │ ├── LexerState.kt
│ │ │ ├── cpp
│ │ │ │ └── CPPTokens.java
│ │ │ ├── lexer
│ │ │ │ ├── Haskell.flex
│ │ │ │ ├── HaskellLexer.kt
│ │ │ │ └── _HaskellLexer.java
│ │ │ ├── rules
│ │ │ │ └── BaseParser.kt
│ │ │ └── token
│ │ │ │ └── HaskellLexerTokens.kt
│ │ ├── psi
│ │ │ ├── Application.kt
│ │ │ ├── ApplicationType.kt
│ │ │ ├── BindStatement.kt
│ │ │ ├── CaseAlternative.kt
│ │ │ ├── CaseExpression.kt
│ │ │ ├── ClassDeclaration.kt
│ │ │ ├── ConstructorDeclaration.kt
│ │ │ ├── Context.kt
│ │ │ ├── DataDeclaration.kt
│ │ │ ├── Declaration.kt
│ │ │ ├── DoExpression.kt
│ │ │ ├── Expression.kt
│ │ │ ├── ExpressionStatement.kt
│ │ │ ├── FieldDeclaration.kt
│ │ │ ├── FieldUpdate.kt
│ │ │ ├── ForeignDeclaration.kt
│ │ │ ├── FunctionType.kt
│ │ │ ├── Guard.kt
│ │ │ ├── HaskellType.kt
│ │ │ ├── Import.kt
│ │ │ ├── ImportAsPart.kt
│ │ │ ├── InstanceDeclaration.kt
│ │ │ ├── LambdaExpression.kt
│ │ │ ├── LetExpression.kt
│ │ │ ├── LetStatement.kt
│ │ │ ├── ListType.kt
│ │ │ ├── Module.kt
│ │ │ ├── ModuleExports.kt
│ │ │ ├── ModuleName.kt
│ │ │ ├── OperatorExpression.kt
│ │ │ ├── ParenthesisExpression.kt
│ │ │ ├── Pattern.kt
│ │ │ ├── QCon.kt
│ │ │ ├── QNameExpression.kt
│ │ │ ├── QVar.kt
│ │ │ ├── QVarSym.kt
│ │ │ ├── RightHandSide.kt
│ │ │ ├── SignatureDeclaration.kt
│ │ │ ├── SomeId.kt
│ │ │ ├── Statement.kt
│ │ │ ├── StringLiteral.kt
│ │ │ ├── TupleType.kt
│ │ │ ├── TypeSynonym.kt
│ │ │ ├── TypeVariable.kt
│ │ │ ├── UnguardedRHS.kt
│ │ │ ├── UnparsedToken.kt
│ │ │ ├── ValueDefinition.kt
│ │ │ ├── VariableOperation.kt
│ │ │ ├── WhereBindings.kt
│ │ │ ├── reference
│ │ │ │ ├── ConstructorReference.kt
│ │ │ │ ├── ModuleReference.kt
│ │ │ │ ├── SomeIdReference.kt
│ │ │ │ ├── TypeReference.kt
│ │ │ │ └── ValueReference.kt
│ │ │ └── util
│ │ │ │ └── HaskellElementFactory.kt
│ │ ├── repl
│ │ │ ├── HaskellConsole.java
│ │ │ ├── HaskellConsoleExecuteActionHandler.java
│ │ │ ├── HaskellConsoleHighlightingUtil.java
│ │ │ ├── HaskellConsoleProcessHandler.java
│ │ │ ├── HaskellConsoleRunner.java
│ │ │ └── actions
│ │ │ │ ├── HaskellConsoleActionBase.java
│ │ │ │ ├── LoadHaskellFileInConsoleAction.java
│ │ │ │ └── RunHaskellConsoleAction.java
│ │ ├── run
│ │ │ ├── ModuleComboBoxRenderer.java
│ │ │ └── haskell
│ │ │ │ ├── CabalRunConfiguration.java
│ │ │ │ ├── CabalRunConfigurationProducer.kt
│ │ │ │ ├── ConfigurationEditor.kt
│ │ │ │ ├── HaskellCommandLineState.kt
│ │ │ │ ├── HaskellRunConfigurationType.kt
│ │ │ │ └── ProgramParamsPanel.kt
│ │ ├── scope
│ │ │ ├── ExpressionScope.kt
│ │ │ ├── GlobalScope.kt
│ │ │ ├── ImportScope.kt
│ │ │ └── ModuleScope.kt
│ │ ├── sdk
│ │ │ ├── HaskellSdkAdditionalData.kt
│ │ │ ├── HaskellSdkConfigurable.kt
│ │ │ ├── HaskellSdkConfigurableForm.kt
│ │ │ └── HaskellSdkType.kt
│ │ ├── util
│ │ │ ├── DefaultListModelWrapper.java
│ │ │ ├── FileUtil.kt
│ │ │ ├── GHCUtil.java
│ │ │ ├── GHCVersion.kt
│ │ │ ├── JComboBoxWrapper.java
│ │ │ ├── LineColPosition.java
│ │ │ ├── OSUtil.kt
│ │ │ ├── ProcessRunner.kt
│ │ │ └── UiUtil.kt
│ │ └── vfs
│ │ │ ├── CabalVirtualFileSystem.kt
│ │ │ ├── TarGzArchive.kt
│ │ │ └── TarGzFile.kt
│ │ └── yesod
│ │ ├── cassius
│ │ ├── CassiusFile.java
│ │ ├── CassiusFileType.java
│ │ ├── CassiusLanguage.java
│ │ └── parser
│ │ │ ├── Cassius.flex
│ │ │ ├── CassiusCompositeElementType.java
│ │ │ ├── CassiusLexer.java
│ │ │ ├── CassiusParser.java
│ │ │ ├── CassiusParserDefinition.java
│ │ │ ├── CassiusToken.java
│ │ │ ├── CassiusTokenTypes.java
│ │ │ └── _CassiusLexer.java
│ │ ├── hamlet
│ │ ├── HamletFile.kt
│ │ ├── HamletFileType.kt
│ │ ├── HamletLanguage.kt
│ │ ├── completion
│ │ │ └── HamletCompletionContributor.kt
│ │ ├── highlight
│ │ │ ├── HamletAnnotator.kt
│ │ │ └── HamletColors.kt
│ │ ├── parser
│ │ │ ├── Hamlet.flex
│ │ │ ├── HamletCompositeElementType.kt
│ │ │ ├── HamletLexer.kt
│ │ │ ├── HamletParser.kt
│ │ │ ├── HamletParserDefinition.kt
│ │ │ ├── HamletToken.kt
│ │ │ ├── HamletTokenTypes.kt
│ │ │ └── _HamletLexer.java
│ │ └── psi
│ │ │ ├── Attribute.kt
│ │ │ ├── AttributeValue.kt
│ │ │ ├── ColonIdentifier.kt
│ │ │ ├── Comment.kt
│ │ │ ├── Doctype.kt
│ │ │ ├── DotIdentifier.kt
│ │ │ ├── Escape.kt
│ │ │ ├── Identifier.kt
│ │ │ ├── Interpolation.kt
│ │ │ ├── Operator.kt
│ │ │ ├── SharpIdentifier.kt
│ │ │ ├── String.kt
│ │ │ └── Tag.kt
│ │ ├── julius
│ │ ├── JuliusFile.kt
│ │ ├── JuliusFileType.kt
│ │ ├── JuliusLanguage.kt
│ │ ├── completion
│ │ │ └── JuliusCompletionContributor.kt
│ │ ├── highlight
│ │ │ ├── JuliusAnnotator.kt
│ │ │ └── JuliusColors.kt
│ │ ├── parser
│ │ │ ├── Julius.flex
│ │ │ ├── JuliusCompositeElementType.kt
│ │ │ ├── JuliusLexer.kt
│ │ │ ├── JuliusParser.kt
│ │ │ ├── JuliusParserDefinition.kt
│ │ │ ├── JuliusToken.kt
│ │ │ ├── JuliusTokenTypes.kt
│ │ │ └── _JuliusLexer.java
│ │ └── psi
│ │ │ ├── Comment.kt
│ │ │ ├── DotIdentifier.kt
│ │ │ ├── Interpolation.kt
│ │ │ ├── Keyword.kt
│ │ │ ├── Number.kt
│ │ │ └── String.kt
│ │ └── lucius
│ │ ├── LuciusFile.kt
│ │ ├── LuciusFileType.kt
│ │ ├── LuciusLanguage.kt
│ │ ├── completion
│ │ └── LuciusCompletionContributor.kt
│ │ ├── highlight
│ │ ├── LuciusAnnotator.kt
│ │ └── LuciusColors.kt
│ │ ├── parser
│ │ ├── Lucius.flex
│ │ ├── LuciusCompositeElementType.kt
│ │ ├── LuciusLexer.kt
│ │ ├── LuciusParser.kt
│ │ ├── LuciusParserDefinition.kt
│ │ ├── LuciusToken.kt
│ │ ├── LuciusTokenTypes.kt
│ │ └── _LuciusLexer.java
│ │ └── psi
│ │ ├── AtRule.kt
│ │ ├── Attribute.kt
│ │ ├── CCIdentifier.kt
│ │ ├── ColonIdentifier.kt
│ │ ├── Comment.kt
│ │ ├── DotIdentifier.kt
│ │ ├── Function.kt
│ │ ├── Hyperlink.kt
│ │ ├── Interpolation.kt
│ │ ├── Number.kt
│ │ ├── SharpIdentifier.kt
│ │ └── String.kt
├── test
│ └── org
│ │ └── jetbrains
│ │ ├── cabal
│ │ └── parser
│ │ │ └── CabalParsingTest.java
│ │ └── haskell
│ │ ├── debugger
│ │ ├── parser
│ │ │ └── GHCiParserTests.kt
│ │ └── procdebuggers
│ │ │ ├── DebuggerTest.kt
│ │ │ ├── GHCiDebuggerTest.kt
│ │ │ └── RemoteDebuggerTest.kt
│ │ ├── lexer
│ │ └── HaskellLexerTest.java
│ │ └── parser
│ │ ├── CPPTest.java
│ │ ├── HaskellTest.java
│ │ ├── IndentTest.java
│ │ └── RecoveryTest.java
└── testresources
│ ├── TestMain.hs
│ └── unittest.properties
└── tools
└── idea-flex.skeleton
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/workspace.xml
2 | lib/kotlin-runtime-sources.jar
3 | lib/haskell-jps-plugin.jar
4 | haskell-ide-api/dist
5 | haskell-ide-api/.idea/workspace.xml
6 | build/*
7 | out/*
8 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | haskell-idea-plugin
--------------------------------------------------------------------------------
/.idea/ant.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/artifacts/haskell_jps_plugin_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/lib/
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/libraries/KotlinJavaRuntime.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/commons_compress.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/haskell_jps_plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/httpclient_4_3_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/json_simple_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/pty4j_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Remote_debug.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/haskell.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/haskell__compile_debug_.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/data/cabalParserTests/Benchmark.cabal:
--------------------------------------------------------------------------------
1 | benchmark
2 | benchmark still /!!/ name
3 | type: a
4 |
5 |
6 | benchmark name
7 | main-is: a
8 | if true
9 | other-languages: adrs
--------------------------------------------------------------------------------
/data/cabalParserTests/Bool.cabal:
--------------------------------------------------------------------------------
1 | library
2 | exposed: TrUe
3 | exposed: False
4 | exposed: false
--------------------------------------------------------------------------------
/data/cabalParserTests/Bool.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Library(LIBRARY)
3 | SectionType(SECTION_TYPE)
4 | PsiElement(id)('library')
5 | PsiElement(NEW_LINE_INDENT)('\n ')
6 | ExposedField(EXPOSED)
7 | PropertyKey(PROPERTY_KEY)
8 | PsiElement(id)('exposed')
9 | PsiElement(:)(':')
10 | PsiWhiteSpace(' ')
11 | PsiElement(id)('TrUe')
12 | PsiElement(NEW_LINE_INDENT)('\n ')
13 | ExposedField(EXPOSED)
14 | PropertyKey(PROPERTY_KEY)
15 | PsiElement(id)('exposed')
16 | PsiElement(:)(':')
17 | PsiWhiteSpace(' ')
18 | PsiElement(id)('False')
19 | PsiElement(NEW_LINE_INDENT)('\n ')
20 | ExposedField(EXPOSED)
21 | PropertyKey(PROPERTY_KEY)
22 | PsiElement(id)('exposed')
23 | PsiElement(:)(':')
24 | PsiWhiteSpace(' ')
25 | PsiElement(id)('false')
--------------------------------------------------------------------------------
/data/cabalParserTests/ComplexCondition.cabal:
--------------------------------------------------------------------------------
1 | library
2 | if true&&true || true
3 | if (true && true) || true
4 | if !true
5 | if (((true)))
6 | if (((missing_brackets) || some
7 | if inva ||
8 | id
--------------------------------------------------------------------------------
/data/cabalParserTests/ComplexVersionConstraint.cabal:
--------------------------------------------------------------------------------
1 | tested-with: id >= 2 && < 1.3
2 | tested-with: id >= 2
3 | || < 1.3
4 | tested-with: id == 2.* &&
5 | <=1.3.4||
6 | ==1
7 | tested-with: id >=1.2||==1||==1.*&&>3
--------------------------------------------------------------------------------
/data/cabalParserTests/EolComment.cabal:
--------------------------------------------------------------------------------
1 | name: a
2 | -- between_fields
3 | tested-with:
4 | -- before_value
5 | a,
6 | --inside_list
7 | --some
8 | a
9 | --inside_list
10 | a
11 | executable a
12 | --after sect name
13 | other-languages: a
14 | --comm
15 | ,a
16 |
17 | --comm
18 | main-is: a
19 |
20 |
--------------------------------------------------------------------------------
/data/cabalParserTests/Executable.cabal:
--------------------------------------------------------------------------------
1 | executable name
2 | main-is: a
3 | if true
4 | other-languages: adrs
--------------------------------------------------------------------------------
/data/cabalParserTests/Executable.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Executable(EXECUTABLE)
3 | SectionType(SECTION_TYPE)
4 | PsiElement(id)('executable')
5 | PsiWhiteSpace(' ')
6 | Name(NAME)
7 | PsiElement(id)('name')
8 | PsiElement(NEW_LINE_INDENT)('\n ')
9 | MainFileField(MAIN_FILE)
10 | PropertyKey(PROPERTY_KEY)
11 | PsiElement(id)('main-is')
12 | PsiElement(:)(':')
13 | PsiWhiteSpace(' ')
14 | Path(PATH)
15 | PsiElement(id)('a')
16 | PsiElement(NEW_LINE_INDENT)('\n ')
17 | IfCondition(IF_CONDITION)
18 | SectionType(SECTION_TYPE)
19 | PsiElement(id)('if')
20 | PsiWhiteSpace(' ')
21 | FullCondition(FULL_CONDITION)
22 | ConditionPart(CONDITION_PART)
23 | SimpleCondition(SIMPLE_CONDITION)
24 | PsiElement(id)('true')
25 | PsiElement(NEW_LINE_INDENT)('\n ')
26 | MultiValueField(MULTI_VAL)
27 | PropertyKey(PROPERTY_KEY)
28 | PsiElement(id)('other-languages')
29 | PsiElement(:)(':')
30 | PsiWhiteSpace(' ')
31 | Language(LANGUAGE)
32 | PsiElement(id)('adrs')
--------------------------------------------------------------------------------
/data/cabalParserTests/Flag.cabal:
--------------------------------------------------------------------------------
1 | flag some
2 | description: free
3 | default: true
4 | manual: true
--------------------------------------------------------------------------------
/data/cabalParserTests/Flag.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Flag(FLAG)
3 | SectionType(SECTION_TYPE)
4 | PsiElement(id)('flag')
5 | PsiWhiteSpace(' ')
6 | Name(NAME)
7 | PsiElement(id)('some')
8 | PsiElement(NEW_LINE_INDENT)('\n ')
9 | SingleValueField(SINGLE_VAL)
10 | PropertyKey(PROPERTY_KEY)
11 | PsiElement(id)('description')
12 | PsiElement(:)(':')
13 | PsiWhiteSpace(' ')
14 | FreeForm(FREE_FORM)
15 | PsiElement(id)('free')
16 | PsiElement(NEW_LINE_INDENT)('\n ')
17 | BoolField(BOOL_FIELD)
18 | PropertyKey(PROPERTY_KEY)
19 | PsiElement(id)('default')
20 | PsiElement(:)(':')
21 | PsiWhiteSpace(' ')
22 | PsiElement(id)('true')
23 | PsiElement(NEW_LINE_INDENT)('\n ')
24 | BoolField(BOOL_FIELD)
25 | PropertyKey(PROPERTY_KEY)
26 | PsiElement(id)('manual')
27 | PsiElement(:)(':')
28 | PsiWhiteSpace(' ')
29 | PsiElement(id)('true')
--------------------------------------------------------------------------------
/data/cabalParserTests/FreeForm.cabal:
--------------------------------------------------------------------------------
1 | stability: this is a free 1 . 345
2 | form its so
3 | free you !! cannot believe
4 | it
5 | i even ^ : can
6 |
7 |
8 | use special ;_* >= == = characters other-extensions:
9 | here
10 | author: is so brillian and bold (in many ways)
11 | i cannot & ? believe it
--------------------------------------------------------------------------------
/data/cabalParserTests/FreeLine.cabal:
--------------------------------------------------------------------------------
1 | maintainer: this /&&? ultimateli free line -- +==+=+==
2 | maintainer: this is
3 | not
4 |
--------------------------------------------------------------------------------
/data/cabalParserTests/FullVersionConstraint.cabal:
--------------------------------------------------------------------------------
1 | tested-with: id > 2||<=2
2 | tested-with: id
--------------------------------------------------------------------------------
/data/cabalParserTests/FullVersionConstraint.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | TestedWithField(TESTED_WITH)
3 | PropertyKey(PROPERTY_KEY)
4 | PsiElement(id)('tested-with')
5 | PsiElement(:)(':')
6 | PsiWhiteSpace(' ')
7 | FullVersionConstraint(FULL_CONSTRAINT)
8 | CompilerId(COMPILER)
9 | PsiElement(id)('id')
10 | PsiWhiteSpace(' ')
11 | ComplexVersionConstraint(COMPLEX_CONSTRAINT)
12 | VersionConstraint(VERSION_CONSTRAINT)
13 | PsiElement(COMPARATOR)('>')
14 | PsiWhiteSpace(' ')
15 | PsiElement(number)('2')
16 | PsiElement(LOGIC)('||')
17 | VersionConstraint(VERSION_CONSTRAINT)
18 | PsiElement(COMPARATOR)('<=')
19 | PsiElement(number)('2')
20 | PsiElement(NEW_LINE_INDENT)('\n')
21 | TestedWithField(TESTED_WITH)
22 | PropertyKey(PROPERTY_KEY)
23 | PsiElement(id)('tested-with')
24 | PsiElement(:)(':')
25 | PsiWhiteSpace(' ')
26 | FullVersionConstraint(FULL_CONSTRAINT)
27 | CompilerId(COMPILER)
28 | PsiElement(id)('id')
--------------------------------------------------------------------------------
/data/cabalParserTests/Identifier.cabal:
--------------------------------------------------------------------------------
1 | build-type: valid_identi-fier123
2 | build-type: invalid/one
--------------------------------------------------------------------------------
/data/cabalParserTests/Identifier.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | BuildTypeField(BUILD_TYPE)
3 | PropertyKey(PROPERTY_KEY)
4 | PsiElement(id)('build-type')
5 | PsiElement(:)(':')
6 | PsiWhiteSpace(' ')
7 | BuildType(BUILD_TYPE)
8 | PsiElement(id)('valid_identi-fier123')
9 | PsiElement(NEW_LINE_INDENT)('\n')
10 | BuildTypeField(BUILD_TYPE)
11 | PropertyKey(PROPERTY_KEY)
12 | PsiElement(id)('build-type')
13 | PsiElement(:)(':')
14 | PsiWhiteSpace(' ')
15 | BuildType(BUILD_TYPE)
16 | PsiElement(id)('invalid')
17 | InvalidValue(INVALID_VALUE)
18 | PsiElement(/)('/')
19 | PsiElement(id)('one')
--------------------------------------------------------------------------------
/data/cabalParserTests/IfElseSection.cabal:
--------------------------------------------------------------------------------
1 | library
2 | if true
3 | other-modules: d
4 |
5 |
6 | else
7 | other-modules: d
8 |
9 | if true
10 | other-modules: d
11 |
12 | if os(invalid)
13 | other-modules: d
14 | else
15 | other-modules: d
16 |
17 |
18 | if os(invalid)
19 | other-modules: d
20 | else
21 | other-modules: d
22 |
23 |
24 | if true
25 | if true
26 | if true
27 | other-modules: d
28 | else
29 | other-modules: d
30 |
31 | else
32 | other-modules: d
--------------------------------------------------------------------------------
/data/cabalParserTests/InvalidField.cabal:
--------------------------------------------------------------------------------
1 | invalid: some
2 | value
3 | invalid ptish-ptish
4 |
5 | library
6 | other-languages: some
7 | invalid: some
8 | invalid
--------------------------------------------------------------------------------
/data/cabalParserTests/Library.cabal:
--------------------------------------------------------------------------------
1 | library
2 | exposed: true
3 | exposed-modules: some
4 | if true
5 | other-languages: some
--------------------------------------------------------------------------------
/data/cabalParserTests/ListInList.cabal:
--------------------------------------------------------------------------------
1 | tested-with: a <= 2 && == 1 b == 3 || ==1.2.* c == 1 && == 3
2 |
3 | library
4 | build-depends: list <= 5 && == 7, some >= 15 && == 1, other <=100
--------------------------------------------------------------------------------
/data/cabalParserTests/RepoSource.cabal:
--------------------------------------------------------------------------------
1 | source-repository this
2 | type: some
3 | source-repository head
4 | location: where
5 | source-repository this head
6 | tag: what
7 | source-repository
8 | branch: the_hell
9 | module: are_you
10 | subdir: doing_here
--------------------------------------------------------------------------------
/data/cabalParserTests/SimpleCondition.cabal:
--------------------------------------------------------------------------------
1 | library
2 | if invalid()
3 | if os ( name )
4 | if impl (c >= 1)
5 | if flag( smth )
6 | if true
7 | if false
--------------------------------------------------------------------------------
/data/cabalParserTests/SimpleOptionalCommaList.cabal:
--------------------------------------------------------------------------------
1 | library
2 | other-modules: one
3 | extra-libraries: a, a, a
4 | extra-libraries: a a a a
5 | extra-libraries: a, a, a a
6 | cpp-options: a
7 | ,
8 | a
9 | ,
10 | a
11 | a
--------------------------------------------------------------------------------
/data/cabalParserTests/SimpleTopLevel.cabal:
--------------------------------------------------------------------------------
1 | name: Simple
2 | version: 1.0
3 | Build-Type: Simple
4 | cabal-version: >= 1.2
5 |
6 | package-url: //some_url.com/folder/
7 | homepage: //www.vk.com
8 | license: identifier
9 | license-file: filename
10 |
11 | copyright: freeform
12 | author: freeform
13 | maintainer: address
14 | stability: freeform
15 |
16 | bug-reports: URL
17 | synopsis: freeform
18 | description: freeform
19 | category: freeform
20 |
21 | tested-with: compilerlist
22 | data-files: filenamelist
23 | data-dir: directory
24 | extra-source-files: filenamelist
25 | extra-tmp-files: filenamelist
--------------------------------------------------------------------------------
/data/cabalParserTests/SimpleVersion.cabal:
--------------------------------------------------------------------------------
1 | version: 3.1.3
2 | version: 12
3 | version: 4.3-from-2014.3.2133-till-hell.3.1
4 |
--------------------------------------------------------------------------------
/data/cabalParserTests/SimpleVersion.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | VersionField(VERSION_PROPERTY)
3 | PropertyKey(PROPERTY_KEY)
4 | PsiElement(id)('version')
5 | PsiElement(:)(':')
6 | PsiWhiteSpace(' ')
7 | VersionValue(VERSION_VALUE)
8 | PsiElement(id)('3.1.3')
9 | PsiElement(NEW_LINE_INDENT)('\n')
10 | VersionField(VERSION_PROPERTY)
11 | PropertyKey(PROPERTY_KEY)
12 | PsiElement(id)('version')
13 | PsiElement(:)(':')
14 | PsiWhiteSpace(' ')
15 | VersionValue(VERSION_VALUE)
16 | PsiElement(number)('12')
17 | PsiElement(NEW_LINE_INDENT)('\n')
18 | VersionField(VERSION_PROPERTY)
19 | PropertyKey(PROPERTY_KEY)
20 | PsiElement(id)('version')
21 | PsiElement(:)(':')
22 | PsiWhiteSpace(' ')
23 | VersionValue(VERSION_VALUE)
24 | PsiElement(id)('4.3-from-2014.3.2133-till-hell.3.1')
--------------------------------------------------------------------------------
/data/cabalParserTests/TestSuite.cabal:
--------------------------------------------------------------------------------
1 | test-suite name
2 | test-module: i_want
3 | main-is: an
4 | type: ice-cream
5 | if true
6 | ghc-options: "i'll have it"
--------------------------------------------------------------------------------
/data/cabalParserTests/Token.cabal:
--------------------------------------------------------------------------------
1 | license-file: val\\.!id" token\" "@><>=
2 | homepage: inval id
3 | package-url: another
4 | invalid
5 | license-file: simple
--------------------------------------------------------------------------------
/data/cabalParserTests/VersionConstraint.cabal:
--------------------------------------------------------------------------------
1 | cabal-version: == 4.3.*
2 | cabal-version: == 4.3
3 | cabal-version: > 2.6-while-dancing.6
4 | cabal-version: <2
5 | cabal-version: >= 4.2
6 | cabal-version: <=4
7 | cabal-version: <=
8 | 4-invalid
--------------------------------------------------------------------------------
/data/cppTests/CppIf.hs:
--------------------------------------------------------------------------------
1 | module Main where
2 |
3 | #if MIN_VERSION_tagged(0,2,0)
4 | import Data.Proxy
5 | #endif
6 |
7 | main = putStrLn "Hello world!!!"
--------------------------------------------------------------------------------
/data/haskellParserTests/ALotIndents.hs:
--------------------------------------------------------------------------------
1 | module ALotIndents where
2 |
3 | handleArguments = do
4 | mapM_ handle' args where
5 | handle' x = do
6 | let arg = x
7 | case arg of
8 | Main m -> x
9 |
10 |
--------------------------------------------------------------------------------
/data/haskellParserTests/Backtracking.hs:
--------------------------------------------------------------------------------
1 | module Backtracking where
2 |
3 | fun = do (\x -> do renderWithDrawable)
4 |
--------------------------------------------------------------------------------
/data/haskellParserTests/DataType.hs:
--------------------------------------------------------------------------------
1 | module Shape where
2 |
3 | data Shape = Circle Float Float Float | Rectangle Float Float Float Float deriving (Show)
4 |
--------------------------------------------------------------------------------
/data/haskellParserTests/DoNotation.hs:
--------------------------------------------------------------------------------
1 | module DoNotation where
2 |
3 | listOfTuples :: [(Int,Char)]
4 | listOfTuples = do
5 | let nums = [1, 2]
6 | n <- nums
7 | ch <- ['a','b']
8 | return (n,ch)
--------------------------------------------------------------------------------
/data/haskellParserTests/FBind.hs:
--------------------------------------------------------------------------------
1 | module FBind where
2 |
3 | function = value { field1 = Val1
4 | , field2 = Val2
5 | , field3 = Val2
6 | }
--------------------------------------------------------------------------------
/data/haskellParserTests/GADT.hs:
--------------------------------------------------------------------------------
1 | module GADT where
2 |
3 | data Term a where
4 | Lit :: Int -> Term Int
5 | Succ :: Term Int -> Term Int
6 | IsZero :: Term Int -> Term Bool
7 | If :: Term Bool -> Term a -> Term a -> Term a
8 | Pair :: Term a -> Term b -> Term (a,b)
9 |
--------------------------------------------------------------------------------
/data/haskellParserTests/GCD.hs:
--------------------------------------------------------------------------------
1 | module HelloWorld where
2 |
3 | gcd' :: Int -> Int -> Int
4 | gcd' a b
5 | | b == 0 = a
6 | | otherwise = gcd' b (a `mod` b)
--------------------------------------------------------------------------------
/data/haskellParserTests/HelloWorld.hs:
--------------------------------------------------------------------------------
1 | module HelloWorld where
2 |
3 | main :: IO ()
4 | main = putStrLn "Hello world!!!"
5 |
6 |
--------------------------------------------------------------------------------
/data/haskellParserTests/Imports.hs:
--------------------------------------------------------------------------------
1 | module Imports (
2 | Block(..), parseDocstring, renderDocstring, emptyDocstring, nullDocstring, noDocs,
3 | ) where
4 |
5 | import qualified Cheapskate as C
6 | import Cheapskate.Html (renderDoc)
7 | import SomeModule (OutputAnnotation(..), TextFormatting(..), Name, Term, Err)
8 | import Data.Traversable (Traversable)
--------------------------------------------------------------------------------
/data/haskellParserTests/ImportsWithData.hs:
--------------------------------------------------------------------------------
1 | module Main where
2 |
3 | import System.IO
4 |
5 | data Data = First | Second deriving (Show, Eq)
6 |
7 |
--------------------------------------------------------------------------------
/data/haskellParserTests/Instance.hs:
--------------------------------------------------------------------------------
1 | module Instance where
2 |
3 | data TrafficLight = Red | Yellow | Green
4 |
5 | class Eq a where
6 | (==) :: a -> a -> Bool
7 | (/=) :: a -> a -> Bool
8 | x == y = not (x /= y)
9 | x /= y = not (x == y)
10 |
11 | instance Eq TrafficLight where
12 | Red == Red = True
13 | Green == Green = True
14 | Yellow == Yellow = True
15 | _ == _ = False
--------------------------------------------------------------------------------
/data/haskellParserTests/Maximum.hs:
--------------------------------------------------------------------------------
1 | module Maximum where
2 |
3 | maximum' :: (Ord a) => [a] -> a
4 | maximum' [] = error "maximum of empty list"
5 | maximum' [x] = x
6 | maximum' (x:xs)
7 | | x > maxTail = x
8 | | otherwise = maxTail
9 | where maxTail = maximum' xs
10 |
11 |
--------------------------------------------------------------------------------
/data/haskellParserTests/NoModuleKeyword.hs:
--------------------------------------------------------------------------------
1 |
2 | x :: Int
3 | x = 0
--------------------------------------------------------------------------------
/data/haskellParserTests/NoModuleKeyword.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Module(Module)
3 | SignatureDeclaration(SignatureDeclaration)
4 | QNameExpression(QNameExpression)
5 | QVar(QVar)
6 | PsiElement(VARID)('x')
7 | PsiWhiteSpace(' ')
8 | PsiElement(::)('::')
9 | PsiWhiteSpace(' ')
10 | TypeVariable(TypeVariable)
11 | PsiElement(CONID)('Int')
12 | PsiWhiteSpace('\n')
13 | ValueDefinition(ValueDefinition)
14 | QNameExpression(QNameExpression)
15 | QVar(QVar)
16 | PsiElement(VARID)('x')
17 | PsiWhiteSpace(' ')
18 | RightHandSide(RightHandSide)
19 | PsiElement(=)('=')
20 | PsiWhiteSpace(' ')
21 | PsiElement(INTEGER)('0')
--------------------------------------------------------------------------------
/data/haskellParserTests/Numbers.hs:
--------------------------------------------------------------------------------
1 | module Numbers where
2 |
3 | x = -5
--------------------------------------------------------------------------------
/data/haskellParserTests/Numbers.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Module(Module)
3 | PsiElement(module)('module')
4 | PsiWhiteSpace(' ')
5 | ModuleName(ModuleName)
6 | PsiElement(CONID)('Numbers')
7 | PsiWhiteSpace(' ')
8 | PsiElement(where)('where')
9 | PsiWhiteSpace('\n')
10 | PsiWhiteSpace('\n')
11 | ValueDefinition(ValueDefinition)
12 | QNameExpression(QNameExpression)
13 | QVar(QVar)
14 | PsiElement(VARID)('x')
15 | PsiWhiteSpace(' ')
16 | RightHandSide(RightHandSide)
17 | PsiElement(=)('=')
18 | PsiWhiteSpace(' ')
19 | PsiElement(-)('-')
20 | PsiElement(INTEGER)('5')
--------------------------------------------------------------------------------
/data/indentTests/Braces.hs:
--------------------------------------------------------------------------------
1 | module Braces where
2 |
3 | main = do { a; b }
--------------------------------------------------------------------------------
/data/indentTests/BracesIndent.hs:
--------------------------------------------------------------------------------
1 | module Indent where
2 |
3 | init = Constructor {
4 | fieldName = Nothing
5 | }
--------------------------------------------------------------------------------
/data/indentTests/CaseInList.hs:
--------------------------------------------------------------------------------
1 | module WhereCase where
2 |
3 | list = [ br | br <- breaks_,
4 | case x of Var1 -> True; _ -> False ]
5 |
6 |
--------------------------------------------------------------------------------
/data/indentTests/ClosingBrace.hs:
--------------------------------------------------------------------------------
1 | module Main where
2 |
3 | main = do putStrLn "a"
4 |
5 | a = "ad"
--------------------------------------------------------------------------------
/data/indentTests/HelloWorld.hs:
--------------------------------------------------------------------------------
1 | module Main where
2 |
3 | main = do putStrLn "Hello World!!!"
4 | t = 0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/data/indentTests/IndentInBraces.hs:
--------------------------------------------------------------------------------
1 | module IndentInBraces where
2 |
3 | ctxt_lookup :: Name -> Field (Ctxt a) (Maybe a)
4 | ctxt_lookup n = Field
5 | { fget = lookupCtxtExact n
6 | , fset = \newVal -> case newVal of
7 | Just x -> addDef n x
8 | Nothing -> deleteDefExact n
9 | }
10 |
11 | maybe_default dflt = Field (fromMaybe dflt) (const . Just)
12 |
--------------------------------------------------------------------------------
/data/indentTests/IndentInBracesAgain.hs:
--------------------------------------------------------------------------------
1 | module IndentInBracesAgain where
2 |
3 | f = r{ render = do make
4 | return f }
--------------------------------------------------------------------------------
/data/indentTests/IndentInParenthesis.hs:
--------------------------------------------------------------------------------
1 | module Parenthesis where
2 |
3 |
4 | main = startDebugger (do
5 | modulePath <- do
6 | case (mainFile st) of
7 | Just path -> return path
8 | Nothing -> error "Main module not specified"
9 | setupContext modulePath "Main"
10 | )
11 |
--------------------------------------------------------------------------------
/data/indentTests/LetIn.hs:
--------------------------------------------------------------------------------
1 | module LetIn where
2 |
3 | main = let t = 0 in t
4 |
--------------------------------------------------------------------------------
/data/indentTests/LetInSameIndent.hs:
--------------------------------------------------------------------------------
1 | module Test where
2 |
3 | t = let as = findAllUsedArgs t args in
4 | length as == length (nub as) &&
5 | termsize n t < 10
6 |
--------------------------------------------------------------------------------
/data/indentTests/OpenBraceThenClose.hs:
--------------------------------------------------------------------------------
1 | module OpenBraceThenClose where
2 |
3 | import Language.CSPM.AST
4 |
5 | instance Pretty Pattern where
6 | pPrint = case pattern of
7 | IntPat -> n
8 | where
9 | nestedDotPat = case unLabel of
10 | DotPat {} -> p
11 | x -> x
--------------------------------------------------------------------------------
/data/indentTests/SimpleIndent.hs:
--------------------------------------------------------------------------------
1 | module SimpleIndent where
2 |
3 | main = undefined
--------------------------------------------------------------------------------
/data/indentTests/SimpleIndent.txt:
--------------------------------------------------------------------------------
1 | FILE
2 | Module(Module)
3 | PsiElement(module)('module')
4 | PsiWhiteSpace(' ')
5 | ModuleName(ModuleName)
6 | PsiElement(CONID)('SimpleIndent')
7 | PsiWhiteSpace(' ')
8 | PsiElement(where)('where')
9 | PsiWhiteSpace('\n')
10 | PsiWhiteSpace('\n')
11 | ValueDefinition(ValueDefinition)
12 | QNameExpression(QNameExpression)
13 | QVar(QVar)
14 | PsiElement(VARID)('main')
15 | PsiWhiteSpace(' ')
16 | RightHandSide(RightHandSide)
17 | PsiElement(=)('=')
18 | PsiWhiteSpace(' ')
19 | QNameExpression(QNameExpression)
20 | QVar(QVar)
21 | PsiElement(VARID)('undefined')
--------------------------------------------------------------------------------
/data/indentTests/Tabs.hs:
--------------------------------------------------------------------------------
1 | module TabProblem where
2 |
3 | main = do
4 | let faceGroup = MMDGroup
5 | ()
6 |
--------------------------------------------------------------------------------
/data/indentTests/TwoClosingBraces.hs:
--------------------------------------------------------------------------------
1 | module Main where
2 |
3 | main = do
4 | case runResult of
5 | A -> a
6 | B -> b
7 | where
8 | function :: A -> B
--------------------------------------------------------------------------------
/data/recoveryTests/Recovery.hs:
--------------------------------------------------------------------------------
1 | module Recovery where
2 |
3 | test = (test "text"
4 |
5 | -- Must recover here
6 | main = putStrLn "Hello world!!!"
7 |
--------------------------------------------------------------------------------
/generator/generator.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/ParserException.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class ParserException(token : Token?, text : String) : RuntimeException(text)
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/TextGenerator.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 |
7 |
8 | class TextGenerator {
9 | val data : StringBuilder = StringBuilder()
10 |
11 | var indent : Int = 0
12 |
13 |
14 | fun line() {
15 | data.append("\n")
16 | }
17 |
18 | fun line(text : String) {
19 | for (k in 1..indent) {
20 | data.append(" ")
21 | }
22 | data.append(text).append("\n")
23 | }
24 |
25 | fun indent(body : TextGenerator.() -> Unit) {
26 | indent++
27 | this.body()
28 | indent--
29 | }
30 |
31 | override fun toString() : String{
32 | return data.toString()
33 | }
34 | }
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/Token.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class Token(
7 | val type : TokenType,
8 | val text : String
9 | )
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/TokenType.java:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator;
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | public enum TokenType {
7 | OBRACE,
8 | CBRACE,
9 | STRING,
10 | ID,
11 | BAD_CHARACTER,
12 | SEMICOLON,
13 | COLON,
14 | VBAR,
15 | EQUAL,
16 | BLOCK_COMMENT,
17 | EOL_COMMENT
18 | }
19 |
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/AbstractRule.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | open class AbstractRule(val name : String)
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/FakeRule.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class FakeRule(name : String) : AbstractRule(name)
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/Grammar.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class Grammar(
7 | val tokens : List,
8 | val rules : List
9 | )
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/Rule.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class Rule(name : String, val variants : List) : AbstractRule(name) {
7 | override fun toString(): String {
8 | val result = StringBuilder()
9 | result.append(name).append(" : ")
10 | for (variant in variants) {
11 | if (variant != variants[0]) {
12 | result.append(" | ")
13 | }
14 | result.append(variant)
15 | }
16 | return result.toString()
17 | }
18 | }
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/RuleRef.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class RuleRef(val text : String, val isName : Boolean) {
7 | override fun toString(): String {
8 | return if (isName) text else "'" + text + "'"
9 | }
10 |
11 | override fun hashCode(): Int {
12 | return text.hashCode() + isName.hashCode()
13 | }
14 |
15 | override fun equals(other: Any?): Boolean {
16 | if (other !is RuleRef) {
17 | return false
18 | }
19 | return text == other.text && isName == other.isName
20 | }
21 | }
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/TokenDescription.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | /**
4 | * Created by atsky on 11/7/14.
5 | */
6 | class TokenDescription(val text : String,
7 | val name : String,
8 | val useText : Boolean)
--------------------------------------------------------------------------------
/generator/src/org/jetbrains/generator/grammar/Variant.kt:
--------------------------------------------------------------------------------
1 | package org.jetbrains.generator.grammar
2 |
3 | import java.util.TreeSet
4 |
5 | /**
6 | * Created by atsky on 11/7/14.
7 | */
8 | abstract class Variant {
9 | abstract fun fillElements(elementSet: TreeSet)
10 |
11 | }
12 |
13 | class FinalVariant(val elementName: String?) : Variant() {
14 | override fun fillElements(elementSet: TreeSet) {
15 | if (elementName != null) {
16 | elementSet.add(elementName)
17 | }
18 | }
19 |
20 | }
21 |
22 | class NonFinalVariant(val atom: RuleRef, val next : List) : Variant() {
23 |
24 | override fun toString(): String {
25 | val result = StringBuilder()
26 | /*
27 | for (ref in atoms) {
28 | if (ref != atoms[0]) {
29 | result.append(" ")
30 | }
31 | result.append(ref)
32 | }
33 | */
34 | return result.toString()
35 | }
36 |
37 | override fun fillElements(elementSet: TreeSet) {
38 | for (n in next) {
39 | n.fillElements(elementSet)
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/jps-plugin/jps-plugin.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/jps-plugin/src/META-INF/services/org.jetbrains.jps.incremental.BuilderService:
--------------------------------------------------------------------------------
1 | org.jetbrains.jps.cabal.CabalBuilderService
--------------------------------------------------------------------------------
/jps-plugin/src/META-INF/services/org.jetbrains.jps.model.serialization.JpsModelSerializerExtension:
--------------------------------------------------------------------------------
1 | org.jetbrains.jps.cabal.model.JpsHaskellModelSerializerExtension
--------------------------------------------------------------------------------
/jps-plugin/src/org/jetbrains/jps/cabal/ProcessWrapper.java:
--------------------------------------------------------------------------------
1 | package org.jetbrains.jps.cabal;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.util.Arrays;
6 | import java.util.List;
7 |
8 | public class ProcessWrapper {
9 | private String myWorkingDirectory;
10 |
11 | ProcessWrapper(String workingDirectory) {
12 | myWorkingDirectory = workingDirectory;
13 | }
14 |
15 |
16 | public Process getProcess(List cmd) throws IOException {
17 | ProcessBuilder processBuilder = new ProcessBuilder(cmd);
18 | if (myWorkingDirectory != null) {
19 | processBuilder.directory(new File(myWorkingDirectory));
20 | }
21 |
22 | processBuilder.redirectErrorStream(true);
23 | return processBuilder.start();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/jps-plugin/src/org/jetbrains/jps/cabal/model/JpsHaskellModulePropertiesSerializer.java:
--------------------------------------------------------------------------------
1 | package org.jetbrains.jps.cabal.model;
2 |
3 | import org.jdom.Element;
4 | import org.jetbrains.jps.cabal.JpsHaskellModuleType;
5 | import org.jetbrains.jps.model.JpsSimpleElement;
6 | import org.jetbrains.jps.model.impl.JpsSimpleElementImpl;
7 | import org.jetbrains.jps.model.serialization.module.JpsModulePropertiesSerializer;
8 |
9 | /**
10 | * @author atsky
11 | * @since 14/05/15.
12 | */
13 | public class JpsHaskellModulePropertiesSerializer extends JpsModulePropertiesSerializer> {
14 |
15 | public JpsHaskellModulePropertiesSerializer() {
16 | super(JpsHaskellModuleType.INSTANCE, "HASKELL_MODULE", "Haskell.ModuleBuildProperties");
17 | }
18 |
19 | @Override
20 | public JpsSimpleElement> loadProperties(Element componentElement) {
21 | return new JpsSimpleElementImpl