yesod/Yesod.hs
Michael Snoyman 522203f812 Removed Yesod.Form hierarchy
All of this code will be included in a separate yesod-form package to
allow for more flexibility in API changes, plus to make it more natural
to swap in other packages such as digestive-functors.
2010-12-16 22:05:56 +02:00

52 lines
1.2 KiB
Haskell

{-# LANGUAGE CPP #-}
-- | This module simply re-exports from other modules for your convenience.
module Yesod
( module Yesod.Request
, module Yesod.Content
, module Yesod.Yesod
, module Yesod.Handler
, module Yesod.Dispatch
, module Yesod.Hamlet
, module Yesod.Json
, module Yesod.Widget
, Application
, lift
, liftIO
, MonadPeelIO
, mempty
, showIntegral
, readIntegral
) where
#if TEST
import Yesod.Content hiding (testSuite)
import Yesod.Json hiding (testSuite)
import Yesod.Dispatch hiding (testSuite)
import Yesod.Yesod hiding (testSuite)
import Yesod.Handler hiding (runHandler, testSuite)
#else
import Yesod.Content
import Yesod.Json
import Yesod.Dispatch
import Yesod.Yesod
import Yesod.Handler hiding (runHandler)
#endif
import Yesod.Request
import Yesod.Widget
import Network.Wai (Application)
import Yesod.Hamlet
import Control.Monad.Trans.Class (lift)
import Control.Monad.IO.Class (liftIO)
import Data.Monoid (mempty)
import Control.Monad.IO.Peel (MonadPeelIO)
showIntegral :: Integral a => a -> String
showIntegral x = show (fromIntegral x :: Integer)
readIntegral :: Num a => String -> Maybe a
readIntegral s =
case reads s of
(i, _):_ -> Just $ fromInteger i
[] -> Nothing