--- -- pathSegments _ss = Compiler $
--- -- MT.ReaderT $ \s ->
--- -- -- TODO: assert Set.member s ss
--- -- lift $
--- -- MT.modify' $ \st ->
--- -- st{compilerStatePath = compilerStatePath st </> Text.unpack (encodePathSegment s)}
---
--- {-
--- instance
--- TypeError (
--- 'Text "The instance (Capturable a Compiler)"
--- ':$$: 'Text "is disabled when compiling to a static Web site."
--- ':$$: 'Text "You can use (whenInterpreter @Compiler siteNotUsingCapturable siteUsingCapturable)"
--- ':$$: 'Text "to replace calls to any method of Capturable."
--- ) => Capturable a Compiler where
--- capturePathSegment = undefined
--- instance
--- TypeError (
--- 'Text "The instance (Capturable a (Reader model Compiler))"
--- ':$$: 'Text "is disabled when compiling to a static Web site."
--- ':$$: 'Text "You can use (whenInterpreter @(Reader model Compiler) siteNotUsingCapturable siteUsingCapturable)"
--- ':$$: 'Text "to replace calls to any method of Capturable."
--- ) => Capturable a (Reader model Compiler) where
--- capturePathSegment = undefined
--- -}
---
--- -- choosePathSegments _s = Compiler $ MT.ReaderT $ \s -> return $ Endo (List.reverse s <>)
--- {-
--- instance Capturable Compiler where
--- type CapturableConstraint Compiler =
--- capturePathSegment _n = Compiler $ MT.ReaderT $ \s ->
--- lift $ MT.modify' $ \st ->
--- st{compilerStatePath = compilerStatePath st </> Text.unpack (encodePathSegment s)}
--- -}
--- {-
--- instance Copyable Compiler where
--- copy path = Compiler $
--- lift $
--- MT.ReaderT $ \env -> do
--- lift $ do
--- doesPathExist (compilerEnvSource env </> path) >>= \case
--- True -> do
--- Sys.hPutStrLn Sys.stderr $
--- "staticCopy: "
--- <> show
--- ( (compilerEnvSource env </> path)
--- , (compilerEnvDest env </> path)
--- )
--- copyDirRecursively
--- path
--- (compilerEnvSource env </> path)
--- (compilerEnvDest env)
--- False -> do
--- Sys.hPutStrLn Sys.stderr $ "error: path does not exist: " <> (compilerEnvSource env </> path)
--- instance Encodable fmt a => Contentable fmt a Compiler where
--- content = Compiler $
--- MT.ReaderT $ \a -> MT.ReaderT $ \env -> do
--- st <- MT.get
--- let destPath = compilerEnvDest env </> compilerStatePath st
--- lift $ do
--- -- Sys.hPutStrLn Sys.stderr $ "mkdir: " <> show (Sys.takeDirectory destPath)
--- createDirectoryIfMissing True (Sys.takeDirectory destPath)
--- -- Sys.hPutStrLn Sys.stderr $ "write: " <> show destPath
--- BSL.writeFile destPath $ encode @fmt a
--- -}
--- --instance Endable Compiler where
--- -- end = Compiler $ return $ Endo id
---
--- --pathSegments _cs = Compiler $ MT.ReaderT $ \s -> return $ Endo (s :)
--- -- instance Fileable Compiler where
--- -- type FileableConstraint Compiler = Typeable
--- -- static = Compiler $ MT.ReaderT $ \_a ->
--- -- return $ Endo (\x -> x)
---
--- {-
--- -- * The 'Compiler' interpreter
---
--- -- | Create files according to the given model of type 'a'.
--- newtype Compiler a = Compiler
--- { unCompiler :: [Comp a]
--- }
--- deriving (Show, Functor)
---
--- instance Applicative Compiler where
--- pure = Compiler . pure . pure
--- Compiler f <*> Compiler x = Compiler $ (<*>) <$> f <*> x
---
--- -- instance Monad Compiler where
--- -- return = pure
--- -- Compiler x >>= f = Compiler (x >>=)
---