            <> "        flashMessages <- IHP.Controller.Session.getAndClearFlashMessages\n"
            <> "        let viewContext = ViewContext {\n"
            <> "                requestContext = ?requestContext,\n"
            <> "                -- user = currentUserOrNothing,\n"
            <> "                flashMessages,\n"
            <> "                controllerContext = ?controllerContext,\n"
            <> "                layout = let ?viewContext = viewContext in defaultLayout\n"
            <> "            }\n"
            <> "        pure viewContext\n"

        viewLayoutHs =
            "module " <> applicationName <> ".View.Layout (defaultLayout, Html) where\n"
            <> "\n"