Safe Haskell | None |
---|---|
Language | Haskell2010 |
Compilation of sass source or sass files.
- compileFile :: SassResult a => FilePath -> SassOptions -> IO (Either SassError a)
- compileString :: SassResult a => String -> SassOptions -> IO (Either SassError a)
- data SassExtendedResult
- type StringResult = IO (Either SassError String)
- type ExtendedResult = IO (Either SassError SassExtendedResult)
- resultString :: SassExtendedResult -> String
- resultIncludes :: SassExtendedResult -> IO [String]
- resultSourcemap :: SassExtendedResult -> IO (Maybe String)
- data SassError
- errorStatus :: SassError -> Int
- errorJson :: SassError -> IO String
- errorText :: SassError -> IO String
- errorMessage :: SassError -> IO String
- errorFile :: SassError -> IO String
- errorSource :: SassError -> IO String
- errorLine :: SassError -> IO Int
- errorColumn :: SassError -> IO Int
Compilation
:: SassResult a | |
=> FilePath | Path to the file. |
-> SassOptions | Compilation options. |
-> IO (Either SassError a) | Error or output string. |
Compiles a file using specified options.
:: 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 ExtendedResult = IO (Either SassError SassExtendedResult) Source
resultString :: SassExtendedResult -> String Source
Compiled string.
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
errorStatus :: SassError -> Int Source
Compilation satus code.
errorMessage :: SassError -> IO String Source
Loads a user-friendly error message.
errorSource :: SassError -> IO String Source
Loads an error source.
errorColumn :: SassError -> IO Int Source
Loads a line in the file where problem occured.