Whilst compiling an item, it possible to save multiple snapshots of it, and not just the final result.
Modulehakyll-4.17.0.0Haskell2010
Hakyll.Core.Compiler.Internal
Internally used compiler module
- 6 types
- 13 values
- Packagehakyll-4.17.0.0
- Exports19
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceInternal.hs
Types
7 declarationsEnvironment in which a compiler runs
Constructors
CompilerReadcompilerConfig :: ConfigurationMain configuration
compilerUnderlying :: IdentifierUnderlying identifier
compilerProvider :: ProviderResource provider
compilerUniverse :: Set IdentifierList of all known identifiers
compilerRoutes :: RoutesSite routes
compilerStore :: StoreCompiler store
compilerLogger :: LoggerLogger
Constructors
Instances3Show, Semigroup, Monoid
Show CompilerWriteDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalSemigroup CompilerWriteDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalMonoid CompilerWriteDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.Internal
Distinguishes reasons in a CompilerError
Constructors
CompilationFailure (NonEmpty a)One or more exceptions occured during compilation
CompilationNoResult [a]Absence of any result, most notably in template contexts. May still have error messages.
Instances1Functor
Functor CompilerErrorsDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.Internal
An intermediate result of a compilation step
Constructors
A monad which lets you compile items and takes care of dependency tracking for you.
Constructors
CompilerunCompiler :: CompilerRead -> IO (CompilerResult a)
Instances7Monad, Functor, MonadFail, Applicative, Alternative, MonadMetadata, …
Monad CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalFunctor CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalMonadFail CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalApplicative CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalAlternative CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalTrying alternative compilers if the first fails, regardless whether through fail, throwError or noResult. Aggregates error messages if all fail.
MonadMetadata CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalAccess provided metadata from anywhere
MonadError [String] CompilerDefined in hakyll-4.17.0.0 · Hakyll.Core.Compiler.InternalCompilation may fail with multiple error messages. catchError handles errors from throwError, fail and noResult
Like unCompiler but treating IO exceptions as CompilerErrors
Core operations
4 declarationsPut the result back in a compiler
Put a CompilerWrite
Get the current environment
Run an IO computation without dependencies in a Compiler
Error operations
5 declarationsThrow errors in the Compiler.
If no messages are given, this is considered a CompilationNoResult error. Otherwise, it is treated as a proper compilation failure.
Put a CompilerError with multiple messages as CompilationNoResult
Allows you to recover from CompilerErrors. Uses the same parameter order as catchError so that it can be used infix.
c `compilerCatch` f = compilerTry c >>= either f returnAllows to distinguish CompilerErrors and branch on them with Either
compilerTry = (`compilerCatch` return . Left) . fmap RightUnwrap a CompilerErrors
Utilities
3 declarationsPass a list of messages with a heading to the debug logger