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