purescript-0.11.4: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Ide.Util

Description

Generally useful functions

Synopsis

Documentation

encodeT :: ToJSON a => a -> Text Source #

ideReadTextFile :: (MonadIO m, MonadError IdeError m) => FilePath -> m Text Source #

This function is to be used over ideReadFile when the result is not just passed on to the PureScript parser, but also needs to be treated as lines of text. Because ideReadFile reads the file as ByteString in BinaryMode rather than TextMode line endings get mangled on Windows otherwise. This is irrelevant for parsing, because the Lexer strips these additional r's.