Scaffolding: define extensions in cabal file
This commit is contained in:
parent
39692f8379
commit
22bf832cbb
@ -1,13 +1,10 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Application
|
||||
( with~sitearg~
|
||||
, withDevelAppPort
|
||||
) where
|
||||
|
||||
import Foundation
|
||||
import Import
|
||||
import Settings
|
||||
import Yesod.Static
|
||||
import Yesod.Auth
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
|
||||
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Foundation
|
||||
( ~sitearg~ (..)
|
||||
, ~sitearg~Route (..)
|
||||
@ -17,6 +14,7 @@ module Foundation
|
||||
, AuthRoute (..)
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Yesod
|
||||
import Yesod.Static (Static, base64md5, StaticRoute(..))
|
||||
import Settings.StaticFiles
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings, NoImplicitPrelude #-}
|
||||
module Handler.Root where
|
||||
|
||||
import Import
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, GADTs #-}
|
||||
module Model where
|
||||
|
||||
import Prelude
|
||||
import Yesod
|
||||
import Data.Text (Text)
|
||||
~modelImports~
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
-- | Settings are centralized, as much as possible, into this file. This
|
||||
-- includes database connection settings, static file locations, etc.
|
||||
-- In addition, you can configure a number of different aspects of Yesod
|
||||
@ -13,6 +10,7 @@ module Settings
|
||||
, staticDir
|
||||
) where
|
||||
|
||||
import Prelude (FilePath, String)
|
||||
import Text.Shakespeare.Text (st)
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Database.Persist.~importPersist~ (~configPersist~)
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies #-}
|
||||
module Settings.StaticFiles where
|
||||
|
||||
import Yesod.Static (staticFiles, StaticRoute (StaticRoute))
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import Yesod.Default.Config (fromArgs)
|
||||
import Yesod.Default.Main (defaultMain)
|
||||
import Application (with~sitearg~)
|
||||
import Prelude (IO)
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMain fromArgs with~sitearg~
|
||||
|
||||
@ -36,6 +36,17 @@ library
|
||||
|
||||
ghc-options: -Wall -threaded -O0
|
||||
|
||||
extensions: TemplateHaskell
|
||||
QuasiQuotes
|
||||
OverloadedStrings
|
||||
NoImplicitPrelude
|
||||
CPP
|
||||
OverloadedStrings
|
||||
MultiParamTypeClasses
|
||||
TypeFamilies
|
||||
GADTs
|
||||
GeneralizedNewtypeDeriving
|
||||
|
||||
executable ~project~
|
||||
if flag(devel)
|
||||
Buildable: False
|
||||
@ -48,6 +59,17 @@ executable ~project~
|
||||
|
||||
main-is: main.hs
|
||||
|
||||
extensions: TemplateHaskell
|
||||
QuasiQuotes
|
||||
OverloadedStrings
|
||||
NoImplicitPrelude
|
||||
CPP
|
||||
OverloadedStrings
|
||||
MultiParamTypeClasses
|
||||
TypeFamilies
|
||||
GADTs
|
||||
GeneralizedNewtypeDeriving
|
||||
|
||||
build-depends: base >= 4 && < 5
|
||||
, yesod >= 0.9 && < 0.10
|
||||
, yesod-core >= 0.9.3 && < 0.10
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Application
|
||||
( with~sitearg~
|
||||
, withDevelAppPort
|
||||
) where
|
||||
|
||||
import Foundation
|
||||
import Import
|
||||
import Settings
|
||||
import Yesod.Static
|
||||
import Yesod.Default.Config
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
|
||||
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-}
|
||||
module Foundation
|
||||
( ~sitearg~ (..)
|
||||
, ~sitearg~Route (..)
|
||||
@ -14,6 +12,7 @@ module Foundation
|
||||
, liftIO
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Yesod.Core
|
||||
import Yesod.Default.Config
|
||||
import Yesod.Default.Util (addStaticContentExternal)
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
-- | Settings are centralized, as much as possible, into this file. This
|
||||
-- includes database connection settings, static file locations, etc.
|
||||
-- In addition, you can configure a number of different aspects of Yesod
|
||||
@ -12,6 +9,7 @@ module Settings
|
||||
, staticDir
|
||||
) where
|
||||
|
||||
import Prelude (FilePath, String)
|
||||
import Text.Shakespeare.Text (st)
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Yesod.Default.Config
|
||||
|
||||
@ -34,6 +34,15 @@ library
|
||||
|
||||
ghc-options: -Wall -threaded -O0
|
||||
|
||||
extensions: TemplateHaskell
|
||||
QuasiQuotes
|
||||
OverloadedStrings
|
||||
NoImplicitPrelude
|
||||
CPP
|
||||
OverloadedStrings
|
||||
MultiParamTypeClasses
|
||||
TypeFamilies
|
||||
|
||||
executable ~project~
|
||||
if flag(devel)
|
||||
Buildable: False
|
||||
@ -46,6 +55,15 @@ executable ~project~
|
||||
|
||||
main-is: main.hs
|
||||
|
||||
extensions: TemplateHaskell
|
||||
QuasiQuotes
|
||||
OverloadedStrings
|
||||
NoImplicitPrelude
|
||||
CPP
|
||||
OverloadedStrings
|
||||
MultiParamTypeClasses
|
||||
TypeFamilies
|
||||
|
||||
build-depends: base >= 4 && < 5
|
||||
, yesod-core >= 0.9.3 && < 0.10
|
||||
, yesod-static >= 0.3.1 && < 0.4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user