mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
web: clean up language extensions a bit, make autoweb works again
This commit is contained in:
parent
e13ea5706d
commit
080eb866ec
32
Makefile
32
Makefile
@ -101,25 +101,27 @@ PATCHLEVEL:=$(shell git describe --long | awk -F - '{print $$2}')
|
|||||||
|
|
||||||
# build flags
|
# build flags
|
||||||
WARNINGS:=-W -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction
|
WARNINGS:=-W -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction
|
||||||
# Language extensions similar to the ones enabled by yesod in hledger-web.cabal,
|
|
||||||
# so that we can do full dev builds of hledger-web. Warning, they are not
|
# For ghc-only dev builds of hledger-web: enable the language
|
||||||
# exactly the same, in particular NoImplicitPrelude is not enabled since
|
# extensions specified in hledger-web.cabal, except for some which are
|
||||||
# hledger and hledger-lib won't build with that. So don't rely on the dev
|
# not compatible with hledger-lib and hledger, or little-used; those
|
||||||
# build to show all compilation warnings and errors, do a cabal build as well.
|
# are enabled with source file pragmas instead. Note: compilation
|
||||||
|
# warnings and errors might differ between ghc-only and cabal builds.
|
||||||
WEBLANGEXTS:=\
|
WEBLANGEXTS:=\
|
||||||
-XTemplateHaskell \
|
|
||||||
-XQuasiQuotes \
|
|
||||||
-XCPP \
|
-XCPP \
|
||||||
-XMultiParamTypeClasses \
|
-XMultiParamTypeClasses \
|
||||||
-XTypeFamilies \
|
|
||||||
-XGADTs \
|
|
||||||
-XGeneralizedNewtypeDeriving \
|
|
||||||
-XFlexibleContexts \
|
|
||||||
-XEmptyDataDecls \
|
|
||||||
-XOverloadedStrings \
|
-XOverloadedStrings \
|
||||||
-XRecordWildCards
|
-XQuasiQuotes \
|
||||||
# -XNoImplicitPrelude
|
-XRecordWildCards \
|
||||||
|
-XTemplateHaskell \
|
||||||
|
# -XNoImplicitPrelude \
|
||||||
|
# -XTypeFamilies \
|
||||||
|
# -XGADTs \
|
||||||
|
# -XGeneralizedNewtypeDeriving \
|
||||||
|
# -XFlexibleContexts \
|
||||||
|
# -XEmptyDataDecls \
|
||||||
# -XNoMonomorphismRestriction
|
# -XNoMonomorphismRestriction
|
||||||
|
|
||||||
PREFERMACUSRLIBFLAGS=-L/usr/lib
|
PREFERMACUSRLIBFLAGS=-L/usr/lib
|
||||||
GHCMEMFLAGS= #+RTS -M200m -RTS
|
GHCMEMFLAGS= #+RTS -M200m -RTS
|
||||||
CABALMACROSFLAGS=-optP-include -optPhledger/dist/build/autogen/cabal_macros.h
|
CABALMACROSFLAGS=-optP-include -optPhledger/dist/build/autogen/cabal_macros.h
|
||||||
@ -171,7 +173,7 @@ auto-%: sp
|
|||||||
$(AUTOBUILD) $(MAIN) -o bin/hledgerdev $(AUTOBUILDFLAGS) --run $*
|
$(AUTOBUILD) $(MAIN) -o bin/hledgerdev $(AUTOBUILDFLAGS) --run $*
|
||||||
|
|
||||||
autoweb: sp link-web-dirs
|
autoweb: sp link-web-dirs
|
||||||
$(AUTOBUILD) hledger-web/app/main.hs -o bin/hledger-webdev $(AUTOBUILDFLAGS) $(WEBLANGEXTS) --run -B --port 5001 --base-url http://localhost:5001 -f test.journal
|
$(AUTOBUILD) hledger-web/app/main.hs -o bin/hledger-webdev $(AUTOBUILDFLAGS) $(WEBLANGEXTS) --run -B --port 5001 --base-url http://localhost:5001 -f webtest.j
|
||||||
|
|
||||||
link-web-dirs: config messages static templates
|
link-web-dirs: config messages static templates
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
|
||||||
{-|
|
{-|
|
||||||
|
|
||||||
A reader for CSV data, using an extra rules file to help interpret the data.
|
A reader for CSV data, using an extra rules file to help interpret the data.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
{-
|
{-
|
||||||
|
|
||||||
Define the web application's foundation, in the usual Yesod style.
|
Define the web application's foundation, in the usual Yesod style.
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
{-# LANGUAGE TemplateHaskell, CPP #-}
|
|
||||||
{-|
|
|
||||||
|
|
||||||
-}
|
|
||||||
|
|
||||||
module Hledger.Web.Options
|
module Hledger.Web.Options
|
||||||
where
|
where
|
||||||
import Prelude
|
import Prelude
|
||||||
|
@ -72,19 +72,21 @@ library
|
|||||||
|
|
||||||
ghc-options: -Wall -fno-warn-unused-do-bind
|
ghc-options: -Wall -fno-warn-unused-do-bind
|
||||||
|
|
||||||
extensions: TemplateHaskell
|
extensions:
|
||||||
QuasiQuotes
|
|
||||||
OverloadedStrings
|
|
||||||
NoImplicitPrelude
|
|
||||||
CPP
|
CPP
|
||||||
MultiParamTypeClasses
|
MultiParamTypeClasses
|
||||||
TypeFamilies
|
NoImplicitPrelude
|
||||||
GADTs
|
OverloadedStrings
|
||||||
GeneralizedNewtypeDeriving
|
QuasiQuotes
|
||||||
FlexibleContexts
|
|
||||||
EmptyDataDecls
|
|
||||||
NoMonomorphismRestriction
|
|
||||||
RecordWildCards
|
RecordWildCards
|
||||||
|
TemplateHaskell
|
||||||
|
TypeFamilies
|
||||||
|
-- seem to not be needed at present:
|
||||||
|
-- GADTs
|
||||||
|
-- GeneralizedNewtypeDeriving
|
||||||
|
-- FlexibleContexts
|
||||||
|
-- EmptyDataDecls
|
||||||
|
-- NoMonomorphismRestriction
|
||||||
|
|
||||||
hs-source-dirs: . app
|
hs-source-dirs: . app
|
||||||
exposed-modules: Application
|
exposed-modules: Application
|
||||||
@ -167,15 +169,15 @@ executable hledger-web
|
|||||||
else
|
else
|
||||||
ghc-options: -O2
|
ghc-options: -O2
|
||||||
|
|
||||||
extensions: TemplateHaskell
|
extensions:
|
||||||
QuasiQuotes
|
|
||||||
OverloadedStrings
|
|
||||||
NoImplicitPrelude
|
|
||||||
CPP
|
CPP
|
||||||
OverloadedStrings
|
|
||||||
MultiParamTypeClasses
|
MultiParamTypeClasses
|
||||||
TypeFamilies
|
NoImplicitPrelude
|
||||||
|
OverloadedStrings
|
||||||
|
QuasiQuotes
|
||||||
RecordWildCards
|
RecordWildCards
|
||||||
|
TemplateHaskell
|
||||||
|
TypeFamilies
|
||||||
|
|
||||||
hs-source-dirs: . app
|
hs-source-dirs: . app
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
|
Loading…
Reference in New Issue
Block a user