| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.Sass.Functions.Internal
Contents
- wrapFunction :: SassFunctionType -> SassFunctionFnType
- makeNativeFunction :: SassFunction -> IO SassFunctionEntry
- clearNativeFunction :: SassFunctionEntry -> IO ()
- freeNativeFunction :: SassFunctionEntry -> IO ()
- makeNativeFunctionList :: [SassFunction] -> IO SassFunctionList
- clearNativeFunctionList :: SassFunctionList -> IO ()
- freeNativeFunctionList :: SassFunctionList -> IO ()
- wrapImporter :: SassImporterType -> SassImporterFnType
- makeNativeImport :: SassImport -> IO SassImportEntry
- freeNativeImport :: SassImportEntry -> IO ()
- makeNativeImportList :: [SassImport] -> IO SassImportList
- freeNativeImportList :: SassImportList -> IO ()
- makeNativeImporter :: SassImporter -> IO SassImporterEntry
- freeNativeImporter :: SassImporterEntry -> IO ()
- makeNativeImporterList :: [SassImporter] -> IO SassImporterList
- freeNativeImporterList :: SassImporterList -> IO ()
Functions
wrapFunction :: SassFunctionType -> SassFunctionFnType #
Wraps function of type SassFunctionType into function that may be passed
to native library.
makeNativeFunction :: SassFunction -> IO SassFunctionEntry #
Converts SassFunction into native representation.
Freeing native representation is not a pleasant process - libsass frees
the SassFunctionEntry, but does not free signature. Because of that,
special care must be taken in order to properly deallocate the object.
If you don't want to pass the resulting object to Sass_Options,
call both clearNativeFunction and then freeNativeFunction. Otherwise,
you should call clearNativeFunction BEFORE you deallocate context.
clearNativeFunction :: SassFunctionEntry -> IO () #
Releases the signature of a function entry.
freeNativeFunction :: SassFunctionEntry -> IO () #
Deallocates the object, but does not deallocate signature.
makeNativeFunctionList :: [SassFunction] -> IO SassFunctionList #
Converts list of SassFunctions into native representation.
There is analogous problem in relation to deallocation of the result as
with makeNativeFunction. See documentation above for explanation.
clearNativeFunctionList :: SassFunctionList -> IO () #
Releases signatures of entries in the list.
freeNativeFunctionList :: SassFunctionList -> IO () #
Frees the list and entries, without releasing signatures.
Imports and headers
wrapImporter :: SassImporterType -> SassImporterFnType #
Wraps function of type SassImporterType.
makeNativeImport :: SassImport -> IO SassImportEntry #
Converts SassImport into native representation.
freeNativeImport :: SassImportEntry -> IO () #
Frees native representation of SassImport.
makeNativeImportList :: [SassImport] -> IO SassImportList #
Converts list of SassImports into native representation.
freeNativeImportList :: SassImportList -> IO () #
Frees native representation of list of SassEntry, including entries.
makeNativeImporter :: SassImporter -> IO SassImporterEntry #
Converts SassImporter into native representation.
freeNativeImporter :: SassImporterEntry -> IO () #
Frees native representation of SassImporter.
makeNativeImporterList :: [SassImporter] -> IO SassImporterList #
Makes native representation of list of SassImporters.
freeNativeImporterList :: SassImporterList -> IO () #
Frees list of native representations of SassImporters.
Libsass does not provide function to free this kind of objects, but we provide it just in case.