packages feed

informative 0.1.0.5 → 0.1.0.7

raw patch · 4 files changed

+24/−23 lines, 4 filesdep +time-locale-compatdep −old-localedep ~basedep ~persistentdep ~persistent-postgresqlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: time-locale-compat

Dependencies removed: old-locale

Dependency ranges changed: base, persistent, persistent-postgresql, text, time, yesod, yesod-auth, yesod-core, yesod-form

API changes (from Hackage documentation)

- Web.Informative: data WikipageGeneric backend
- Web.Informative: data WikirelGeneric backend
- Web.Informative: data WikisectionGeneric backend
- Web.Informative: data WikisuggGeneric backend
- Web.Informative: instance (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlPersistT) => YesodSubDispatch Informative (HandlerT master IO)
- Web.Informative: instance PersistEntity (WikipageGeneric backend)
- Web.Informative: instance PersistEntity (WikirelGeneric backend)
- Web.Informative: instance PersistEntity (WikisectionGeneric backend)
- Web.Informative: instance PersistEntity (WikisuggGeneric backend)
- Web.Informative: instance PersistField (WikipageGeneric backend)
- Web.Informative: instance PersistField (WikirelGeneric backend)
- Web.Informative: instance PersistField (WikisectionGeneric backend)
- Web.Informative: instance PersistField (WikisuggGeneric backend)
- Web.Informative: instance PersistFieldSql (WikipageGeneric backend)
- Web.Informative: instance PersistFieldSql (WikirelGeneric backend)
- Web.Informative: instance PersistFieldSql (WikisectionGeneric backend)
- Web.Informative: instance PersistFieldSql (WikisuggGeneric backend)
- Web.Informative: sdContent :: SectionData -> Textarea
- Web.Informative: sdFirstLine :: SectionData -> Int
- Web.Informative: sdFormat :: SectionData -> TextFormat
- Web.Informative: sdKind :: SectionData -> TextKind
- Web.Informative: sdLang :: SectionData -> Text
- Web.Informative: type Wikipage = WikipageGeneric SqlBackend
- Web.Informative: type Wikirel = WikirelGeneric SqlBackend
- Web.Informative: type Wikisection = WikisectionGeneric SqlBackend
- Web.Informative: type Wikisugg = WikisuggGeneric SqlBackend
- Web.Informative: wikipageEditor :: WikipageGeneric backend -> !Text
- Web.Informative: wikipageSegment :: WikipageGeneric backend -> !Text
- Web.Informative: wikipageTimestamp :: WikipageGeneric backend -> !UTCTime
- Web.Informative: wikipageTitle :: WikipageGeneric backend -> !Text
- Web.Informative: wikirelIndex :: WikirelGeneric backend -> !Int
- Web.Informative: wikirelPage :: WikirelGeneric backend -> !(KeyBackend backend (WikipageGeneric backend))
- Web.Informative: wikirelSection :: WikirelGeneric backend -> !(KeyBackend backend (WikisectionGeneric backend))
- Web.Informative: wikisectionContent :: WikisectionGeneric backend -> !Text
- Web.Informative: wikisectionFormat :: WikisectionGeneric backend -> !TextFormat
- Web.Informative: wikisectionKind :: WikisectionGeneric backend -> !TextKind
- Web.Informative: wikisuggCaption :: WikisuggGeneric backend -> !Text
- Web.Informative: wikisuggIndex :: WikisuggGeneric backend -> !Int
- Web.Informative: wikisuggPage :: WikisuggGeneric backend -> !Text
- Web.Informative: wikisuggSegment :: WikisuggGeneric backend -> !Text
- Web.Informative.Data: getPrefix :: Informative -> Text
- Web.Informative.Data: getSegment :: Informative -> Text
- Web.Informative.Data: instance Bounded TextKind
- Web.Informative.Data: instance Enum TextKind
- Web.Informative.Data: instance Eq (Route Informative)
- Web.Informative.Data: instance Eq TextFormat
- Web.Informative.Data: instance Eq TextKind
- Web.Informative.Data: instance Ord TextFormat
- Web.Informative.Data: instance Ord TextKind
- Web.Informative.Data: instance ParseRoute Informative
- Web.Informative.Data: instance PersistField TextFormat
- Web.Informative.Data: instance PersistField TextKind
- Web.Informative.Data: instance PersistFieldSql TextFormat
- Web.Informative.Data: instance PersistFieldSql TextKind
- Web.Informative.Data: instance Read (Route Informative)
- Web.Informative.Data: instance Read TextFormat
- Web.Informative.Data: instance Read TextKind
- Web.Informative.Data: instance RenderRoute Informative
- Web.Informative.Data: instance RouteAttrs Informative
- Web.Informative.Data: instance Show (Route Informative)
- Web.Informative.Data: instance Show TextFormat
- Web.Informative.Data: instance Show TextKind
+ Web.Informative: [sdContent] :: SectionData -> Textarea
+ Web.Informative: [sdFirstLine] :: SectionData -> Int
+ Web.Informative: [sdFormat] :: SectionData -> TextFormat
+ Web.Informative: [sdKind] :: SectionData -> TextKind
+ Web.Informative: [sdLang] :: SectionData -> Text
+ Web.Informative: [wikipageEditor] :: Wikipage -> !Text
+ Web.Informative: [wikipageSegment] :: Wikipage -> !Text
+ Web.Informative: [wikipageTimestamp] :: Wikipage -> !UTCTime
+ Web.Informative: [wikipageTitle] :: Wikipage -> !Text
+ Web.Informative: [wikirelIndex] :: Wikirel -> !Int
+ Web.Informative: [wikirelPage] :: Wikirel -> !(Key Wikipage)
+ Web.Informative: [wikirelSection] :: Wikirel -> !(Key Wikisection)
+ Web.Informative: [wikisectionContent] :: Wikisection -> !Text
+ Web.Informative: [wikisectionFormat] :: Wikisection -> !TextFormat
+ Web.Informative: [wikisectionKind] :: Wikisection -> !TextKind
+ Web.Informative: [wikisuggCaption] :: Wikisugg -> !Text
+ Web.Informative: [wikisuggIndex] :: Wikisugg -> !Int
+ Web.Informative: [wikisuggPage] :: Wikisugg -> !Text
+ Web.Informative: [wikisuggSegment] :: Wikisugg -> !Text
+ Web.Informative: data Wikipage
+ Web.Informative: data Wikirel
+ Web.Informative: data Wikisection
+ Web.Informative: data Wikisugg
+ Web.Informative: instance (Web.Informative.YesodWikiAuth master, Yesod.Persist.Core.YesodPersist master, Yesod.Persist.Core.YesodPersistBackend master ~ Database.Persist.Sql.Types.SqlBackend) => Yesod.Core.Class.Dispatch.YesodSubDispatch Web.Informative.Data.Informative (Yesod.Core.Types.HandlerT master GHC.Types.IO)
+ Web.Informative: instance Data.Aeson.Types.Class.FromJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance Data.Aeson.Types.Class.FromJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance Data.Aeson.Types.Class.FromJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance Data.Aeson.Types.Class.FromJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance Data.Aeson.Types.Class.ToJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance Data.Aeson.Types.Class.ToJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance Data.Aeson.Types.Class.ToJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance Data.Aeson.Types.Class.ToJSON (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance Database.Persist.Class.PersistEntity.PersistEntity Web.Informative.Wikipage
+ Web.Informative: instance Database.Persist.Class.PersistEntity.PersistEntity Web.Informative.Wikirel
+ Web.Informative: instance Database.Persist.Class.PersistEntity.PersistEntity Web.Informative.Wikisection
+ Web.Informative: instance Database.Persist.Class.PersistEntity.PersistEntity Web.Informative.Wikisugg
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Wikipage
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Wikirel
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Wikisection
+ Web.Informative: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Wikisugg
+ Web.Informative: instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.Sql.Types.SqlBackend Web.Informative.Wikipage
+ Web.Informative: instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.Sql.Types.SqlBackend Web.Informative.Wikirel
+ Web.Informative: instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.Sql.Types.SqlBackend Web.Informative.Wikisection
+ Web.Informative: instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.Sql.Types.SqlBackend Web.Informative.Wikisugg
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Wikipage
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Wikirel
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Wikisection
+ Web.Informative: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Wikisugg
+ Web.Informative: instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative: instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikipage)
+ Web.Informative: instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikirel)
+ Web.Informative: instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisection)
+ Web.Informative: instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Web.Informative.Wikisugg)
+ Web.Informative.Data: [getPrefix] :: Informative -> Text
+ Web.Informative.Data: [getSegment] :: Informative -> Text
+ Web.Informative.Data: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance Database.Persist.Class.PersistField.PersistField Web.Informative.Data.TextKind
+ Web.Informative.Data: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance Database.Persist.Sql.Class.PersistFieldSql Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Classes.Eq (Yesod.Routes.Class.Route Web.Informative.Data.Informative)
+ Web.Informative.Data: instance GHC.Classes.Eq Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance GHC.Classes.Eq Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Classes.Ord Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance GHC.Classes.Ord Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Enum.Bounded Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Enum.Enum Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Read.Read (Yesod.Routes.Class.Route Web.Informative.Data.Informative)
+ Web.Informative.Data: instance GHC.Read.Read Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance GHC.Read.Read Web.Informative.Data.TextKind
+ Web.Informative.Data: instance GHC.Show.Show (Yesod.Routes.Class.Route Web.Informative.Data.Informative)
+ Web.Informative.Data: instance GHC.Show.Show Web.Informative.Data.TextFormat
+ Web.Informative.Data: instance GHC.Show.Show Web.Informative.Data.TextKind
+ Web.Informative.Data: instance Yesod.Routes.Class.ParseRoute Web.Informative.Data.Informative
+ Web.Informative.Data: instance Yesod.Routes.Class.RenderRoute Web.Informative.Data.Informative
+ Web.Informative.Data: instance Yesod.Routes.Class.RouteAttrs Web.Informative.Data.Informative
- Web.Informative: Wikipage :: !Text -> !Text -> !Text -> !UTCTime -> WikipageGeneric backend
+ Web.Informative: Wikipage :: !Text -> !Text -> !Text -> !UTCTime -> Wikipage
- Web.Informative: Wikirel :: !(KeyBackend backend (WikipageGeneric backend)) -> !(KeyBackend backend (WikisectionGeneric backend)) -> !Int -> WikirelGeneric backend
+ Web.Informative: Wikirel :: !(Key Wikipage) -> !(Key Wikisection) -> !Int -> Wikirel
- Web.Informative: Wikisection :: !Text -> !TextFormat -> !TextKind -> WikisectionGeneric backend
+ Web.Informative: Wikisection :: !Text -> !TextFormat -> !TextKind -> Wikisection
- Web.Informative: Wikisugg :: !Text -> !Text -> !Int -> !Text -> WikisuggGeneric backend
+ Web.Informative: Wikisugg :: !Text -> !Text -> !Int -> !Text -> Wikisugg
- Web.Informative: migrateWiki :: (MonadBaseControl IO m, MonadIO m, MonadLogger m) => Migration (SqlPersistT m)
+ Web.Informative: migrateWiki :: Migration
- Web.Informative: type WikiHandler a = forall master. (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlPersistT) => HandlerT Informative (HandlerT master IO) a
+ Web.Informative: type WikiHandler a = forall master. (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlBackend) => HandlerT Informative (HandlerT master IO) a
- Web.Informative: type WikipageId = KeyBackend SqlBackend Wikipage
+ Web.Informative: type WikipageId = Key Wikipage
- Web.Informative: type WikirelId = KeyBackend SqlBackend Wikirel
+ Web.Informative: type WikirelId = Key Wikirel
- Web.Informative: type WikisectionId = KeyBackend SqlBackend Wikisection
+ Web.Informative: type WikisectionId = Key Wikisection
- Web.Informative: type WikisuggId = KeyBackend SqlBackend Wikisugg
+ Web.Informative: type WikisuggId = Key Wikisugg

Files

Web/Informative.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TemplateHaskell, QuasiQuotes, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, RankNTypes, TypeFamilies, GADTs, GeneralizedNewtypeDeriving, OverloadedStrings, TupleSections #-}+{-# LANGUAGE TemplateHaskell, QuasiQuotes, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, RankNTypes, TypeFamilies, GADTs, GeneralizedNewtypeDeriving, OverloadedStrings, TupleSections, ViewPatterns #-}  module Web.Informative where @@ -10,9 +10,10 @@ import qualified Data.Text as T import Data.Time.Clock import Data.Time.Format+import Database.Persist import Database.Persist.Sql import GHC.Int-import System.Locale+import Data.Time.Locale.Compat import Text.Cassius import Text.CSV import Text.Hamlet@@ -25,7 +26,7 @@ import Yesod.Auth import Yesod.Form -type WikiHandler a = forall master. (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlPersistT) => HandlerT Informative (HandlerT master IO) a+type WikiHandler a = forall master. (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlBackend) => HandlerT Informative (HandlerT master IO) a  class (Yesod master, RenderMessage master FormMessage) => YesodWikiAuth master where   getAuthR :: HandlerT master IO (AuthRoute -> Route master)@@ -110,17 +111,17 @@   seg <- liftM getSegment getYesod   pref <- liftM getPrefix getYesod   (edits,sects',page,suggs) <- lift $ runDB $ do-    let pid = Key (PersistInt64 $ fromIntegral pageid) :: WikipageId+    let Right pid = keyFromValues [PersistInt64 $ fromIntegral pageid] :: Either T.Text WikipageId     wp <- get pid     (sects,page) <- case wp of       Nothing -> return ([(-1,Left $ convFmt LaTeX "\\section{404 Not Found} We're sorry, but that article doesn't exist in our database.", Error)],"none")       Just p -> do         rels <- selectList [WikirelPage ==. pid] [Asc WikirelIndex]-        sects <- forM rels $ \(Entity (Key (PersistInt64 rid)) r) -> liftM (rid,) $ get $ wikirelSection r+        sects <- forM rels $ \(Entity k r) -> let [PersistInt64 rid] = keyToValues k in liftM (rid,) $ get $ wikirelSection r         let s' = map (\(rid,Just  s) -> (rid,convSect (wikisectionKind s) (wikisectionFormat s) (wikisectionContent s), wikisectionKind s)) sects         return (s', wikipageTitle p)     hs <- selectList [WikipageTitle ==. page, WikipageSegment ==. seg] [Desc WikipageTimestamp, LimitTo 10]-    let es = map (\(Entity (Key (PersistInt64 pid)) p) -> (pid, wikipageEditor p, wikipageTimestamp p)) hs+    let es = map (\(Entity k p) -> (let [PersistInt64 pid] = keyToValues k in pid, wikipageEditor p, wikipageTimestamp p)) hs     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]     return (es,sects,page,suggs)   toParent <- getRouteToParent@@ -142,9 +143,9 @@       [] -> return ([], [(-1,Left $ convFmt LaTeX "\\section{404 Not Found} We're sorry, but that article doesn't exist in our database.", Error)],suggs)       hs@((Entity pid p):_) -> do         rels <- selectList [WikirelPage ==. pid] [Asc WikirelIndex]-        sects <- forM rels $ \(Entity (Key (PersistInt64 rid)) r) -> liftM (rid,) $ get $ wikirelSection r+        sects <- forM rels $ \(Entity k r) -> let [PersistInt64 rid] = keyToValues k in liftM (rid,) $ get $ wikirelSection r         let s' = map (\(rid,Just  s) -> (rid,convSect (wikisectionKind s) (wikisectionFormat s) (wikisectionContent s), wikisectionKind s)) sects-            es = map (\(Entity (Key (PersistInt64 pid)) p) -> (pid, wikipageEditor p, wikipageTimestamp p)) hs+            es = map (\(Entity k p) -> (let [PersistInt64 pid] = keyToValues k in pid, wikipageEditor p, wikipageTimestamp p)) hs         return (es, s',suggs)   toParent <- getRouteToParent   mayEdit <- lift $ isAuthorized (toParent $ ArticleR page) True@@ -179,7 +180,7 @@   pref <- liftM getPrefix getYesod   (msect, mprec, kind, fmt, suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]-    rel <- get (Key (PersistInt64 $ fromIntegral rid) :: WikirelId)+    rel <- let Right k = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId in get k     case rel of       Nothing -> return (Nothing, Nothing, Error, Plain, suggs, "none")       Just rel -> do@@ -204,7 +205,7 @@   pref <- liftM getPrefix getYesod   (suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]-    rel <- get (Key (PersistInt64 $ fromIntegral rid) :: WikirelId)+    rel <- let Right k = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId in get k     case rel of       Nothing -> return (suggs, "none")       Just rel -> do@@ -229,7 +230,7 @@   pref <- liftM getPrefix getYesod   (suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]-    rel <- get (Key (PersistInt64 $ fromIntegral rid) :: WikirelId)+    rel <- let Right k = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId in get k     case rel of       Nothing -> return (suggs, "none")       Just rel -> do@@ -271,7 +272,7 @@ postEditR rid = do   seg <- liftM getSegment getYesod   pref <- liftM getPrefix getYesod-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   (msect, mprec, kind, fmt, suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]     rel <- get rid'@@ -322,7 +323,7 @@ postInsertR rid = do   seg <- liftM getSegment getYesod   pref <- liftM getPrefix getYesod-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   (suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]     rel <- get rid'@@ -377,7 +378,7 @@ postPrependR rid = do   seg <- liftM getSegment getYesod   pref <- liftM getPrefix getYesod-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   (suggs, page) <- lift $ runDB $ do     suggs <- selectList [WikisuggSegment ==. seg] [Asc WikisuggIndex]     rel <- get rid'@@ -473,7 +474,7 @@   user <- lift getUserName   now <- liftIO getCurrentTime   toParent <- getRouteToParent-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   page <- lift $ runDB $ do     rel <- get rid'     case rel of@@ -501,7 +502,7 @@   user <- lift getUserName   now <- liftIO getCurrentTime   toParent <- getRouteToParent-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   page <- lift $ runDB $ do     rel <- get rid'     case rel of@@ -529,7 +530,7 @@   user <- lift getUserName   now <- liftIO getCurrentTime   toParent <- getRouteToParent-  let rid' = Key (PersistInt64 $ fromIntegral rid) :: WikirelId+  let Right rid' = keyFromValues [PersistInt64 $ fromIntegral rid] :: Either T.Text WikirelId   page <- lift $ runDB $ do     rel <- get rid'     case rel of@@ -546,5 +547,5 @@             return $ wikipageTitle page   lift $ redirect $ toParent $ ArticleR page -instance (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlPersistT) => YesodSubDispatch Informative (HandlerT master IO) where+instance (YesodWikiAuth master, YesodPersist master, YesodPersistBackend master ~ SqlBackend) => YesodSubDispatch Informative (HandlerT master IO) where   yesodSubDispatch = $(mkYesodSubDispatch resourcesInformative)
Web/Informative/Data.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TemplateHaskell, QuasiQuotes, TypeFamilies #-}+{-# LANGUAGE TemplateHaskell, QuasiQuotes, TypeFamilies, ViewPatterns, OverloadedStrings #-}  module Web.Informative.Data where 
informative-test.hs view
@@ -36,7 +36,7 @@   renderMessage _ _ = defaultFormMessage  instance YesodPersist Master where-  type YesodPersistBackend Master = SqlPersistT+  type YesodPersistBackend Master = SqlBackend   runDB action = do     pool <- liftM getWikiPool getYesod     runSqlPool action pool
informative.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.1.0.5+version:             0.1.0.7  -- A short (one-line) description of the package. synopsis:            A yesod subsite serving a wiki.@@ -59,7 +59,7 @@   -- other-extensions:          -- Other library packages from which modules are imported.-  build-depends:       base >=4.6 && <4.8, yesod >=1.2 && <1.3, text >=1.1 && <1.2, persistent-postgresql >=1.3 && <1.4, monad-logger >=0.3 && <0.4, persistent >=1.3 && <1.4, pandoc >=1.10, shakespeare >=2.0 && <2.1, time >=1.4 && <1.5, old-locale >= 1.0, csv >=0.1 && <0.2, yesod-auth >=1.3 && <1.4, http-conduit >=2.1 && <2.2, yesod-core >=1.2 && <1.3, yesod-form >=1.3 && <1.4, highlighting-kate >=0.5 && <0.6+  build-depends:       base >=4.6 && <4.9, yesod >=1.2 && <1.5, text >=1.1 && <1.4, persistent-postgresql >=2.1 && <2.2, monad-logger >=0.3 && <0.4, persistent >=2.1 && <2.2, pandoc >=1.10, shakespeare >=2.0 && <2.1, time >=1.4 && <1.6, csv >=0.1 && <0.2, yesod-auth >=1.3 && <1.5, http-conduit >=2.1 && <2.2, yesod-core >=1.2 && <1.5, yesod-form >=1.3 && <1.5, highlighting-kate >=0.5 && <0.6, time-locale-compat >= 0.1 && < 0.2      -- Directories containing source files.   -- hs-source-dirs:      @@ -68,6 +68,6 @@   default-language:    Haskell2010    executable informative-test-  build-depends:       base >=4.6 && <4.8, yesod >=1.2 && <1.3, text >=1.1 && <1.2, persistent-postgresql >=1.3 && <1.4, monad-logger >=0.3 && <0.4, persistent >=1.3 && <1.4, pandoc >=1.10, shakespeare >=2.0 && <2.1, time >=1.4 && <1.5, old-locale >= 1.0, csv >=0.1 && <0.2, yesod-auth >=1.3 && <1.4, http-conduit >=2.1 && <2.2, yesod-core >=1.2 && <1.3, yesod-form >=1.3 && <1.4, highlighting-kate >=0.5 && <0.6+  build-depends:       base >=4.6 && <4.9, yesod >=1.2 && <1.5, text >=1.1 && <1.4, persistent-postgresql >=2.1 && <2.2, monad-logger >=0.3 && <0.4, persistent >=2.1 && <2.2, pandoc >=1.10, shakespeare >=2.0 && <2.1, time >=1.4 && <1.6, csv >=0.1 && <0.2, yesod-auth >=1.3 && <1.5, http-conduit >=2.1 && <2.2, yesod-core >=1.2 && <1.5, yesod-form >=1.3 && <1.5, highlighting-kate >=0.5 && <0.6, time-locale-compat >= 0.1 && < 0.2   main-is:             informative-test.hs   default-language:    Haskell2010