h$  Safe-Inferred5Ohls-eval-plugin-runParser (string "aa" <|> string "bb") "bb" Right "bb"(runParser (some (string "aa")) "aaaaaa"Right ["aa","aa","aa"]hls-eval-plugin runParser (some $ char 'a') "aa" Right "aa"hls-eval-pluginrunParser tillEnd "abc\ndef"Right "abc\ndef"   Safe-InferredA hls-eval-plugin;langOptions ":set -XBinaryLiterals -XOverloadedStrings ",Right ["BinaryLiterals","OverloadedStrings"]langOptions ":set"Right []langOptions ""Left "No match" None58: hls-eval-plugin!A thing with a location attached. hls-eval-pluginDiscard location information. hls-eval-pluginSplit setup and normal sections ! "#$ %&'( )None L*hls-eval-plugin Text, without prefix "(--)? >>>"+hls-eval-plugin"Text, without prefix "(--)? prop>",hls-eval-pluginText inside a comment-hls-eval-pluginLine of code (outside comments).hls-eval-pluginOpen of comment/hls-eval-pluginClose of multi-line comment0hls-eval-pluginParse source code and return a list of located Tokens >>> import Ide.Plugin.Eval.Types (unLoc) >>> tks src = map unLoc . tokensFrom  $ readFile srctks "test/testdata/eval/T1.hs"[CodeLine,CodeLine,CodeLine,CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = SingleLine},Statement " unwords example",CodeLine,CodeLine],tks "test/testdata/eval/TLanguageOptions.hs" [BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = SingleLine},TextLine "Support for language options",CodeLine,CodeLine,CodeLine,CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = SingleLine},TextLine "Language options set in the module source (ScopedTypeVariables)",TextLine "also apply to tests so this works fine",Statement " f = (\\(c::Char) -> [c])",CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = MultiLine},TextLine "Multiple options can be set with a single `:set`",TextLine "",Statement " :set -XMultiParamTypeClasses -XFlexibleInstances",Statement " class Z a b c",BlockClose,CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = MultiLine},TextLine "",TextLine "",TextLine "Options apply only in the section where they are defined (unless they are in the setup section), so this will fail:",TextLine "",Statement " class L a b c",BlockClose,CodeLine,CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = MultiLine},TextLine "",TextLine "Options apply to all tests in the same section after their declaration.",TextLine "",TextLine "Not set yet:",TextLine "",Statement " class D",TextLine "",TextLine "Now it works:",TextLine "",Statement ":set -XMultiParamTypeClasses",Statement " class C",TextLine "",TextLine "It still works",TextLine "",Statement " class F",BlockClose,CodeLine,BlockOpen {blockName = Nothing, blockLanguage = Plain, blockFormat = MultiLine},TextLine "Wrong option names are reported.",Statement " :set -XWrong",BlockClose]1*.+,-/23456789:;<0None#$& =>None ?hls-eval-pluginA one-line Haskell statement@hls-eval-pluginReturn the ranges of the expression and result parts of the given testAhls-eval-pluginThe document range where a test is defined testRange :: Loc Test -> Range testRange = fst . testRanges:The document range where the result of the test is definedBhls-eval-plugin reverse (reverse l) == l+++ OK, passed 100 tests.\(l::[Bool]) -> reverse l == l** Failed! Falsified (after 6 tests and 2 shrinks): [True,False] ?@AFGBCDENone_Hhls-eval-pluginLog using hie logger, reports source position of logging statement IJHKLMNOP None2Qhls-eval-plugin'Returns true if string is an expression%isExprTst e df = return (isExpr df e)run $ isExprTst "3"Truerun $ isExprTst "(x+y)"True#run $ isExprTst "import Data.Maybe"Falserun $ isExprTst "three=3"FalseRhls-eval-plugin0True if specified package is present in DynFlags- >>> hasPackageTst pkg = run $ df -> return (hasPackage df pkg) >>> hasPackageTst pkg = run $ _ -> addPackages [pkg] >>= return . either Left (df -> Right (hasPackage df pkg))hasPackageTst "base" Right TruehasPackageTst "ghc" Right TruehasPackageTst "extra"Left ": cannot satisfy -package extra\n (use -v for more information)"hasPackageTst "QuickCheck"Left ": cannot satisfy -package QuickCheck\n (use -v for more information)"Shls-eval-pluginExpose a list of packages. >>> addPackagesTest pkgs = run (_ -> (packageFlags  $)  $ addPackages pkgs)addPackagesTest []Right []'addPackagesTest ["base","base","array"]Right [-package base{package base True ([])},-package array{package array True ([])}]addPackagesTest ["Cabal"]/Right [-package Cabal{package Cabal True ([])}]addPackagesTest ["QuickCheck"]Left ": cannot satisfy -package QuickCheck\n (use -v for more information)"#addPackagesTest ["base","notThere"]Left ": cannot satisfy -package notThere\n (use -v for more information)"\(x::Int) -> x + x == 2 * x+++ OK, passed 100 tests.Thls-eval-plugin Add import to evaluation context)run $ \_ -> addImport "import Data.Maybe""Could not find module @Data.Maybe@Use -v (or `:set -v` in ghci) to see a list of the files searched for.run $ \df -> addPackages ["base"] >> addImport "import Data.Maybe"[import Data.Maybe]run $ \df -> addPackages ["base"] >> addImport "import qualified Data.Maybe as M""[import qualified Data.Maybe as M]Uhls-eval-pluginAdd extension to interactive evaluation session >>> import GHC.LanguageExtensions.Type(Extension(..)) >>> run $ _ -> addExtension DeriveGeneric ()QRSVTUW None  #$%8:>?xXhls-eval-pluginCode Lens provider NOTE: Invoked every time the document is modified, not just when the document is saved.XYNone#hls-eval-pluginPlugin descriptor    !"#$%%&'()*+,-./0123456789:;<=>?@ABCDEFG3HIJKLMNOPQRSTUVWX Y Z [ \ ] ^ _ ` a.hls-eval-plugin-0.1.0.0-34e2ytcJ59iCTuYbrfs8wqIde.Plugin.EvalIde.Plugin.Eval.Parse.ParserIde.Plugin.Eval.Parse.OptionIde.Plugin.Eval.TypesIde.Plugin.Eval.Parse.TokenIde.Plugin.Eval.Parse.SectionIde.Plugin.Eval.CodeIde.Plugin.Eval.UtilIde.Plugin.Eval.GHCIde.Plugin.Eval.CodeLens descriptorstringchartillEndParser letterChar alphaNumCharspacesatisfy runParser langOptionsLocatedunLoc splitSectionsLanguagePlainHaddockFormat SingleLine MultiLineTestPropertyExample testOutput testLinestestlineSectionsectionLanguage sectionFormat sectionTests sectionNameTxtLoclocationlocatedlocatelocate0hasTestshasPropertyTest isProperty StatementPropLineTextLineCodeLine BlockOpen BlockClose tokensFromToken blockFormat blockLanguage blockNameTokenS isStatement isTextLine isPropLine isCodeLine isBlockOpen isBlockClose unsafeContent validSections allSections testRanges resultRangeevalExprevalExtensions evalSetup propSetup testCheck asStatementslogWithasStimed isLiterate handleMaybe handleMaybeMresponse response' gStrictTryisExpr hasPackage addPackages addImport addExtension modifyFlags showDynFlagscodeLens evalCommand