hsass-0.2.0: Integrating Sass into Haskell applications.

Safe HaskellNone
LanguageHaskell2010

Text.Sass.Compilation

Contents

Description

Compilation of sass source or sass files.

Synopsis

Compilation

compileFile Source

Arguments

:: SassResult a 
=> FilePath

Path to the file.

-> SassOptions

Compilation options.

-> IO (Either SassError a)

Error or output string.

Compiles a file using specified options.

compileString Source

Arguments

:: SassResult a 
=> String

String to compile.

-> SassOptions

Compilation options.

-> IO (Either SassError a)

Error or output string.

Compiles raw Sass content using specified options.

Results

data SassExtendedResult Source

Represents extended result - compiled string with a list of includes and a source map.

Subject to name change in future versions.

type StringResult = IO (Either SassError String) Source

Result of compilation - Either SassError or a compiled string.

Subject to name change in future versions.

type ExtendedResult = IO (Either SassError SassExtendedResult) Source

Result of compilation - Either SassError or extended results - a compiled string with a list of included files and a source map.

Subject to name change in future versions.

resultIncludes :: SassExtendedResult -> IO [String] Source

Loads a list of files that have been included during compilation.

resultSourcemap :: SassExtendedResult -> IO (Maybe String) Source

Loads a source map if it was generated by libsass.

Error reporting

data SassError Source

Represents compilation error.

errorStatus :: SassError -> Int Source

Compilation satus code.

errorJson :: SassError -> IO String Source

Loads information about an error as JSON.

errorText :: SassError -> IO String Source

Loads an error text.

errorMessage :: SassError -> IO String Source

Loads a user-friendly error message.

errorFile :: SassError -> IO String Source

Loads a filename where problem occured.

errorSource :: SassError -> IO String Source

Loads an error source.

errorLine :: SassError -> IO Int Source

Loads a line in the file where problem occured.

errorColumn :: SassError -> IO Int Source

Loads a line in the file where problem occured.