<commit_before>{-# LANGUAGE OverloadedStrings #-}

------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
  ( app
  ) where

------------------------------------------------------------------------------
import           Data.ByteString (ByteString)

import           Snap
import           Snap.Snaplet.Auth
import           Snap.Snaplet.Auth.Backends.SqliteSimple
import           Snap.Snaplet.Heist (heistInit)
import           Snap.Snaplet.Session.Backends.CookieSession
import           Snap.Snaplet.SqliteSimple
import           Snap.Util.FileServe

------------------------------------------------------------------------------
import           Application
import           Handler


------------------------------------------------------------------------------
-- | The application's routes.
routes :: [(ByteString, Handler App App ())]
routes = [("/"          , rootHandler)
         ,("/login"     , with auth loginHandler)
         ,("/register"  , with auth registerHandler)
         ,("/dashboard" , with auth dashboardHandler)
<commit_msg>removed unnecessary imports<commit_after>{-# LANGUAGE OverloadedStrings #-}

------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
  ( app
  ) where

------------------------------------------------------------------------------
import           Data.ByteString (ByteString)

import           Snap ( Handler, SnapletInit
                      , addRoutes, makeSnaplet, nestSnaplet, with)
import           Snap.Snaplet.Auth (addAuthSplices)
import           Snap.Snaplet.Auth.Backends.SqliteSimple (initSqliteAuth)
import           Snap.Snaplet.Heist (heistInit)
import           Snap.Snaplet.Session.Backends.CookieSession (initCookieSessionManager)
import           Snap.Snaplet.SqliteSimple (sqliteInit)
import           Snap.Util.FileServe (serveDirectory)

------------------------------------------------------------------------------
import           Application
import           Handler


------------------------------------------------------------------------------
-- | The application's routes.
routes :: [(ByteString, Handler App App ())]
routes = [("/"          , rootHandler)
         ,("/login"     , with auth loginHandler)
         ,("/register"  , with auth registerHandler)
         ,("/dashboard" , with auth dashboardHandler)

{'fraction_non_alphanumeric': 0.29509981851179673, 'fraction_numerical': 0.0, 'mean_word_length': 1.2297734627831716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3039919', 'n_tokens_mistral': 613, 'n_tokens_neox': 597, 'n_words': 175}