From e1118c7676f2c8e265b52bedf1b18e59233abf12 Mon Sep 17 00:00:00 2001 From: Felipe Lessa Date: Mon, 3 Sep 2012 18:52:10 -0300 Subject: [PATCH] Better re-exports (and improved docs). --- src/Database/Esqueleto.hs | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs index b0a1b29..a1e856d 100644 --- a/src/Database/Esqueleto.hs +++ b/src/Database/Esqueleto.hs @@ -1,5 +1,19 @@ {-# LANGUAGE FlexibleContexts, FlexibleInstances, GADTs #-} - +-- | Main module of Esqueleto. This module replaces +-- @Database.Persist@, so instead of importing that module you +-- should just import this one: +-- +-- @ +-- import Database.Esqueleto +-- @ +-- +-- If you still have legacy code using @Database.Persist.Query@ +-- (which is exported by @Database.Persist@), you may import it +-- qualified: +-- +-- @ +-- import qualified Database.Persist.Query as OldQuery +-- @ module Database.Esqueleto ( -- * Esqueleto's Language Esqueleto(..) @@ -12,11 +26,18 @@ module Database.Esqueleto , selectSource -- * Re-exports + -- $reexports + , Single(..) , module Database.Persist.Store - , module Database.Persist.GenericSql ) where import Database.Esqueleto.Internal.Language import Database.Esqueleto.Internal.Sql import Database.Persist.Store -import Database.Persist.GenericSql +import Database.Persist.GenericSql (Single(..)) + +-- $reexports +-- +-- We re-export @Database.Persist.Store@ for convenience, since +-- Esqueleto currently does not provide a way of doing @insert@s +-- or @update@s.