skylighting-core-0.12: syntax highlighting library
Safe HaskellNone
LanguageHaskell2010

Skylighting.Loader

Description

This module provides routines to load syntax definitions from disk files.

Synopsis

Documentation

loadSyntaxFromFile :: FilePath -> IO (Either String Syntax) Source #

Loads a syntax definition from the specified file path. The file path must refer to a file containing an XML Kate syntax definition.

loadSyntaxesFromDir :: FilePath -> IO (Either String SyntaxMap) Source #

Loads all syntax definitions from the specified directory by looking for files with an ".xml" extension. This function assumes such files are Kate XML syntax definitions, so XML files with unexpected contents will cause a parsing error returned as a Left.