web: declare a bunch of language pragmas
Makes the code more declarative, and makes building without cabal easier.
This commit is contained in:
		
							parent
							
								
									154699ce1f
								
							
						
					
					
						commit
						b0d71e3ccc
					
				| @ -1,4 +1,5 @@ | |||||||
| {-# OPTIONS_GHC -fno-warn-orphans #-} | {-# OPTIONS_GHC -fno-warn-orphans #-} | ||||||
|  | {-# LANGUAGE CPP, OverloadedStrings, TemplateHaskell #-} | ||||||
| module Application | module Application | ||||||
|     ( makeApplication |     ( makeApplication | ||||||
|     , getApplicationDev |     , getApplicationDev | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| {-# LANGUAGE TypeFamilies #-} | {-# LANGUAGE CPP, MultiParamTypeClasses, OverloadedStrings, RecordWildCards, QuasiQuotes, TemplateHaskell, TypeFamilies #-} | ||||||
| {- | {- | ||||||
| 
 | 
 | ||||||
| Define the web application's foundation, in the usual Yesod style. | Define the web application's foundation, in the usual Yesod style. | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| {-# LANGUAGE FlexibleContexts #-} | {-# LANGUAGE FlexibleContexts, OverloadedStrings, QuasiQuotes, RecordWildCards #-} | ||||||
| -- | Add form data & handler. (The layout and js are defined in | -- | Add form data & handler. (The layout and js are defined in | ||||||
| -- Foundation so that the add form can be in the default layout for | -- Foundation so that the add form can be in the default layout for | ||||||
| -- all views.) | -- all views.) | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE CPP, OverloadedStrings, QuasiQuotes, RecordWildCards #-} | ||||||
| -- | Common page components and rendering helpers. | -- | Common page components and rendering helpers. | ||||||
| -- For global page layout, see Application.hs. | -- For global page layout, see Application.hs. | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE OverloadedStrings, QuasiQuotes, RecordWildCards #-} | ||||||
| -- | /journal handlers. | -- | /journal handlers. | ||||||
| 
 | 
 | ||||||
| module Handler.JournalR where | module Handler.JournalR where | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE OverloadedStrings, QuasiQuotes, RecordWildCards #-} | ||||||
| -- | /register handlers. | -- | /register handlers. | ||||||
| 
 | 
 | ||||||
| module Handler.RegisterR where | module Handler.RegisterR where | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE OverloadedStrings, QuasiQuotes, RecordWildCards #-} | ||||||
| -- | /sidebar | -- | /sidebar | ||||||
| 
 | 
 | ||||||
| module Handler.SidebarR where | module Handler.SidebarR where | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE OverloadedStrings #-} | ||||||
| {-| | {-| | ||||||
| 
 | 
 | ||||||
| hledger-web - a hledger add-on providing a web interface. | hledger-web - a hledger add-on providing a web interface. | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE CPP #-} | ||||||
| module Hledger.Web.Options | module Hledger.Web.Options | ||||||
| where | where | ||||||
| import Prelude | import Prelude | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE CPP #-} | ||||||
| module Import | module Import | ||||||
|     ( module Import |     ( module Import | ||||||
|     ) where |     ) where | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE OverloadedStrings, QuasiQuotes #-} | ||||||
| -- | 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 | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE CPP #-} | ||||||
| module Settings.Development where | module Settings.Development where | ||||||
| 
 | 
 | ||||||
| import Prelude | import Prelude | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | {-# LANGUAGE TemplateHaskell #-} | ||||||
| module Settings.StaticFiles where | module Settings.StaticFiles where | ||||||
| 
 | 
 | ||||||
| import Prelude (IO, putStrLn, (++), (>>), return) | import Prelude (IO, putStrLn, (++), (>>), return) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user