Skip to content
Snippets Groups Projects
Verified Commit af4b360a authored by jan.hamal.dvorak's avatar jan.hamal.dvorak
Browse files

Drop the Web. module prefix

parent 068b4f7c
Branches
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ where ...@@ -26,7 +26,7 @@ where
import Network.Wai import Network.Wai
import Network.Wai.Handler.Warp import Network.Wai.Handler.Warp
import Network.Wai.Middleware.RequestLogger import Network.Wai.Middleware.RequestLogger
import Web.Hikaru import Hikaru
-- Action ------------------------------------------------------------------ -- Action ------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
-- --
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
-- --
-- hash: 137f697c69bc978fa0edf845d6ab4d71c1759e216cdb95f6b6c3f45c212ad639 -- hash: ec8f75c55cd1cdb48ba2e77fa77a1586494297b85c9582601ebecf2c5e230fdb
name: hikaru name: hikaru
version: 0.1.0.0 version: 0.1.0.0
...@@ -32,20 +32,20 @@ source-repository head ...@@ -32,20 +32,20 @@ source-repository head
library library
exposed-modules: exposed-modules:
Web.Hikaru Hikaru
Web.Hikaru.Action Hikaru.Action
Web.Hikaru.Dispatch Hikaru.Dispatch
Web.Hikaru.Form Hikaru.Form
Web.Hikaru.Link Hikaru.Link
Web.Hikaru.Localize Hikaru.Localize
Web.Hikaru.Media Hikaru.Media
Web.Hikaru.Route Hikaru.Route
Web.Hikaru.Types Hikaru.Types
other-modules: other-modules:
Paths_hikaru Paths_hikaru
hs-source-dirs: hs-source-dirs:
lib lib
default-extensions: BlockArguments DeriveGeneric FlexibleInstances GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NamedFieldPuns NoImplicitPrelude OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving default-extensions: BlockArguments DeriveGeneric FlexibleInstances GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NamedFieldPuns NoImplicitPrelude OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving DataKinds
ghc-options: -Wall -Wcompat ghc-options: -Wall -Wcompat
build-depends: build-depends:
aeson >=1.4 && <1.5 aeson >=1.4 && <1.5
......
{-| {-|
Module : Web.Hikaru Module : Hikaru
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -10,27 +10,27 @@ Portability : non-portable (ghc) ...@@ -10,27 +10,27 @@ Portability : non-portable (ghc)
This module re-exports other modules in the package. This module re-exports other modules in the package.
-} -}
module Web.Hikaru module Hikaru
( (
-- * Exported Modules -- * Exported Modules
module Web.Hikaru.Action module Hikaru.Action
, module Web.Hikaru.Dispatch , module Hikaru.Dispatch
, module Web.Hikaru.Form , module Hikaru.Form
, module Web.Hikaru.Link , module Hikaru.Link
, module Web.Hikaru.Localize , module Hikaru.Localize
, module Web.Hikaru.Media , module Hikaru.Media
, module Web.Hikaru.Route , module Hikaru.Route
, module Web.Hikaru.Types , module Hikaru.Types
) )
where where
import Web.Hikaru.Action import Hikaru.Action
import Web.Hikaru.Dispatch import Hikaru.Dispatch
import Web.Hikaru.Form import Hikaru.Form
import Web.Hikaru.Link import Hikaru.Link
import Web.Hikaru.Localize import Hikaru.Localize
import Web.Hikaru.Media import Hikaru.Media
import Web.Hikaru.Route import Hikaru.Route
import Web.Hikaru.Types import Hikaru.Types
-- vim:set ft=haskell sw=2 ts=2 et: -- vim:set ft=haskell sw=2 ts=2 et:
{-| {-|
Module : Web.Hikaru.Action Module : Hikaru.Action
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -11,7 +11,7 @@ This module provides a monad for reacting to user requests by ...@@ -11,7 +11,7 @@ This module provides a monad for reacting to user requests by
building responses. building responses.
-} -}
module Web.Hikaru.Action module Hikaru.Action
( MonadAction(..) ( MonadAction(..)
-- ** Inspecting Request -- ** Inspecting Request
...@@ -116,8 +116,8 @@ where ...@@ -116,8 +116,8 @@ where
import Network.Wai.Internal (getRequestBodyChunk) import Network.Wai.Internal (getRequestBodyChunk)
import Network.Wai.Parse import Network.Wai.Parse
import Web.Cookie import Web.Cookie
import Web.Hikaru.Media import Hikaru.Media
import Web.Hikaru.Types import Hikaru.Types
-- | -- |
...@@ -1007,7 +1007,7 @@ where ...@@ -1007,7 +1007,7 @@ where
-- when localizing the result of the action. -- when localizing the result of the action.
-- --
-- Languages must be set using the 'setLanguages' function or through -- Languages must be set using the 'setLanguages' function or through
-- the localization tools found in the "Web.Hikaru.Locale" module. -- the localization tools found in the "Hikaru.Locale" module.
-- --
getLanguages :: (MonadAction m) => m [Text] getLanguages :: (MonadAction m) => m [Text]
getLanguages = getActionField aeLanguages getLanguages = getActionField aeLanguages
......
{-| {-|
Module : Web.Hikaru.Dispatch Module : Hikaru.Dispatch
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -10,7 +10,7 @@ Portability : non-portable (ghc) ...@@ -10,7 +10,7 @@ Portability : non-portable (ghc)
This module provides monad-based request dispatching. This module provides monad-based request dispatching.
-} -}
module Web.Hikaru.Dispatch module Hikaru.Dispatch
( dispatch ( dispatch
-- ** Routes -- ** Routes
...@@ -41,8 +41,8 @@ where ...@@ -41,8 +41,8 @@ where
import Data.Text (Text) import Data.Text (Text)
import Network.HTTP.Types.Header import Network.HTTP.Types.Header
import Network.Wai import Network.Wai
import Web.Hikaru.Route import Hikaru.Route
import Web.Hikaru.Types import Hikaru.Types
-- | -- |
...@@ -199,7 +199,7 @@ where ...@@ -199,7 +199,7 @@ where
-- @ -- @
-- app :: Application -- app :: Application
-- app = 'dispatch' runAction $ do -- app = 'dispatch' runAction $ do
-- 'wrapRoutes' ('Web.Hikaru.Action.defaultHeader' hCacheControl "no-cache" >>) -- 'wrapRoutes' ('Hikaru.Action.defaultHeader' hCacheControl "no-cache" >>)
-- --
-- 'route' $ getRootR \<$ 'get' -- 'route' $ getRootR \<$ 'get'
-- 'route' $ getHelloR \<$ 'get' <* 'seg' "hello" \<*\> 'arg' -- 'route' $ getHelloR \<$ 'get' <* 'seg' "hello" \<*\> 'arg'
......
{-| {-|
Module : Web.Hikaru.Form Module : Hikaru.Form
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -10,7 +10,7 @@ Portability : non-portable (ghc) ...@@ -10,7 +10,7 @@ Portability : non-portable (ghc)
This module provides tools to simplify form building and parsing. This module provides tools to simplify form building and parsing.
-} -}
module Web.Hikaru.Form module Hikaru.Form
( Form ( Form
, FormHandler , FormHandler
, handleForm , handleForm
...@@ -28,8 +28,8 @@ where ...@@ -28,8 +28,8 @@ where
import Data.ByteString.Builder (toLazyByteString) import Data.ByteString.Builder (toLazyByteString)
import Data.Text (Text) import Data.Text (Text)
import Lucid import Lucid
import Web.Hikaru.Action import Hikaru.Action
import Web.Hikaru.Types import Hikaru.Types
-- | -- |
......
{-| {-|
Module : Web.Hikaru.Link Module : Hikaru.Link
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -10,7 +10,7 @@ Portability : non-portable (ghc) ...@@ -10,7 +10,7 @@ Portability : non-portable (ghc)
This module provides various ways to build local links. This module provides various ways to build local links.
-} -}
module Web.Hikaru.Link module Hikaru.Link
( makeLink ( makeLink
, deriveLink , deriveLink
...@@ -28,7 +28,7 @@ where ...@@ -28,7 +28,7 @@ where
import Data.Text (Text) import Data.Text (Text)
import Lucid import Lucid
import Network.HTTP.Types.URI import Network.HTTP.Types.URI
import Web.Hikaru.Action import Hikaru.Action
-- | -- |
......
{-| {-|
Module : Web.Hikaru.Localize Module : Hikaru.Localize
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -39,10 +39,10 @@ instance Localized SampleMessages where ...@@ -39,10 +39,10 @@ instance Localized SampleMessages where
Next, create a preferred language list for every action: Next, create a preferred language list for every action:
@ @
'Web.Hikaru.Dispatch.dispatch' runAction $ do 'Hikaru.Dispatch.dispatch' runAction $ do
'Web.Hikaru.Dispatch.wrapActions' ('selectLanguages' \"lang\" \"lang\" >>) 'Hikaru.Dispatch.wrapActions' ('selectLanguages' \"lang\" \"lang\" >>)
'Web.Hikaru.Dispatch.route' ... 'Hikaru.Dispatch.route' ...
@ @
Finally, you can use your catalog when rendering pages: Finally, you can use your catalog when rendering pages:
...@@ -57,7 +57,7 @@ getSampleR flag = do ...@@ -57,7 +57,7 @@ getSampleR flag = do
@ @
-} -}
module Web.Hikaru.Localize module Hikaru.Localize
( Locale ( Locale
, Localized(..) , Localized(..)
, lc_ , lc_
...@@ -69,8 +69,8 @@ where ...@@ -69,8 +69,8 @@ where
import Data.String.Conversions import Data.String.Conversions
import Data.Text (Text) import Data.Text (Text)
import Lucid import Lucid
import Web.Hikaru.Action import Hikaru.Action
import Web.Hikaru.Media import Hikaru.Media
-- | -- |
......
{-| {-|
Module : Web.Hikaru.Media Module : Hikaru.Media
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -12,7 +12,7 @@ in the headers such as @Accept@, @Accept-Charset@, @Accept-Encoding@ and ...@@ -12,7 +12,7 @@ in the headers such as @Accept@, @Accept-Charset@, @Accept-Encoding@ and
@Accept-Language@. @Accept-Language@.
-} -}
module Web.Hikaru.Media module Hikaru.Media
( Media(..) ( Media(..)
-- * Parsing -- * Parsing
......
{-| {-|
Module : Web.Hikaru.Route Module : Hikaru.Route
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -11,7 +11,7 @@ This module provides path matching with parameter extraction ...@@ -11,7 +11,7 @@ This module provides path matching with parameter extraction
as well as content negotiation through path quality scoring. as well as content negotiation through path quality scoring.
-} -}
module Web.Hikaru.Route module Hikaru.Route
( (
-- * Route Selection -- * Route Selection
selectRoute selectRoute
...@@ -63,8 +63,8 @@ where ...@@ -63,8 +63,8 @@ where
import Network.HTTP.Types.Header import Network.HTTP.Types.Header
import Network.HTTP.Types.Method (Method) import Network.HTTP.Types.Method (Method)
import Network.Wai import Network.Wai
import Web.Hikaru.Media import Hikaru.Media
import Web.Hikaru.Types import Hikaru.Types
-- | -- |
......
{-| {-|
Module : Web.Hikaru.Types Module : Hikaru.Types
Copyright : Jan Hamal Dvořák Copyright : Jan Hamal Dvořák
License : AGPL-3 License : AGPL-3
...@@ -10,7 +10,7 @@ Portability : non-portable (ghc) ...@@ -10,7 +10,7 @@ Portability : non-portable (ghc)
This module provides types common for multiple other modules. This module provides types common for multiple other modules.
-} -}
module Web.Hikaru.Types module Hikaru.Types
( FromParam(..) ( FromParam(..)
, ToParam(..) , ToParam(..)
, RequestError(..) , RequestError(..)
...@@ -182,7 +182,7 @@ where ...@@ -182,7 +182,7 @@ where
-- | -- |
-- Errors used both by "Web.Hikaru.Action" and "Web.Hikaru.Route" -- Errors used both by "Hikaru.Action" and "Hikaru.Route"
-- to report problems with the requests sent by the user. -- to report problems with the requests sent by the user.
-- --
-- Order by the severity from the least to the most severe. -- Order by the severity from the least to the most severe.
......
...@@ -36,6 +36,7 @@ default-extensions: ...@@ -36,6 +36,7 @@ default-extensions:
- RecordWildCards - RecordWildCards
- ScopedTypeVariables - ScopedTypeVariables
- StandaloneDeriving - StandaloneDeriving
- DataKinds
dependencies: dependencies:
- aeson >= 1.4 && <1.5 - aeson >= 1.4 && <1.5
...@@ -61,14 +62,14 @@ library: ...@@ -61,14 +62,14 @@ library:
dependencies: [] dependencies: []
exposed-modules: exposed-modules:
- Web.Hikaru - Hikaru
- Web.Hikaru.Action - Hikaru.Action
- Web.Hikaru.Dispatch - Hikaru.Dispatch
- Web.Hikaru.Form - Hikaru.Form
- Web.Hikaru.Link - Hikaru.Link
- Web.Hikaru.Localize - Hikaru.Localize
- Web.Hikaru.Media - Hikaru.Media
- Web.Hikaru.Route - Hikaru.Route
- Web.Hikaru.Types - Hikaru.Types
# EOF # EOF
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment