Safe Haskell | None |
---|---|
Language | Haskell2010 |
Generally useful functions
- identifierFromIdeDeclaration :: IdeDeclaration -> Text
- unwrapMatch :: Match a -> a
- unwrapPositioned :: Declaration -> Declaration
- unwrapPositionedRef :: DeclarationRef -> DeclarationRef
- completionFromMatch :: Match IdeDeclarationAnn -> Completion
- encodeT :: ToJSON a => a -> Text
- decodeT :: FromJSON a => Text -> Maybe a
- discardAnn :: IdeDeclarationAnn -> IdeDeclaration
- withEmptyAnn :: IdeDeclaration -> IdeDeclarationAnn
- valueOperatorAliasT :: Qualified (Either Ident (ProperName ConstructorName)) -> Text
- typeOperatorAliasT :: Qualified (ProperName TypeName) -> Text
- properNameT :: Iso' (ProperName a) Text
- identT :: Iso' Ident Text
- opNameT :: Iso' (OpName a) Text
- ideReadFile :: (MonadIO m, MonadError IdeError m) => FilePath -> m Text
- ideReadTextFile :: (MonadIO m, MonadError IdeError m) => FilePath -> m Text
- module Language.PureScript.Ide.Logging
Documentation
unwrapMatch :: Match a -> a Source #
typeOperatorAliasT :: Qualified (ProperName TypeName) -> Text Source #
properNameT :: Iso' (ProperName a) Text Source #
ideReadFile :: (MonadIO m, MonadError IdeError m) => FilePath -> m 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.