Stubs, needs work, does not compile

This commit is contained in:
SJost 2018-09-27 14:37:46 +02:00
parent 9bb7f3a904
commit 0a3b09f5ee
3 changed files with 6 additions and 27 deletions

View File

@ -1,13 +1,10 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
{- # LANGUAGE FlexibleInstances, FlexibleContexts #-}
{- # LANGUAGE OverloadedStrings #-}
module Import.NoFoundation module Import.NoFoundation
( module Import ( module Import
, addMessage, addMessageI , addMessage, addMessageI
) where ) where
import ClassyPrelude.Yesod as Import hiding (formatTime, derivePersistFieldJSON) -- , addMessage, addMessageI) import ClassyPrelude.Yesod as Import hiding (formatTime, derivePersistFieldJSON, addMessage, addMessageI)
-- import qualified ClassyPrelude.Yesod (addMessage, addMessageI)
import Model as Import import Model as Import
import Model.Types.JSON as Import import Model.Types.JSON as Import
import Model.Migration as Import import Model.Migration as Import
@ -29,26 +26,3 @@ import Text.Lucius as Import
import Text.Shakespeare.Text as Import hiding (text, stext) import Text.Shakespeare.Text as Import hiding (text, stext)
import Data.Universe as Import import Data.Universe as Import
{-
data MessageClass = Danger | Warning | Info
deriving (Eq,Ord,Enum,Bounded)
instance PathPiece MessageClass where
toPathPiece Danger = "danger"
toPathPiece Warning = "warning"
toPathPiece Info = "info"
-- fromPathPiece = finiteFromPathPiece -- not available here
fromPathPiece "danger" = Just Danger
fromPathPiece "warning" = Just Warning
fromPathPiece "info" = Just Info
fromPathPiece _ = Nothing
addMessage :: MonadHandler m => MessageClass-> Html -> m ()
addMessage mc = ClassyPrelude.Yesod.addMessage (toPathPiece mc)
addMessageI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => MessageClass -> msg -> m ()
addMessageI mc = ClassyPrelude.Yesod.addMessageI (toPathPiece mc)
-}

View File

@ -25,6 +25,8 @@ import Utils.DB as Utils
import Utils.TH as Utils import Utils.TH as Utils
import Utils.DateTime as Utils import Utils.DateTime as Utils
import Utils.PathPiece as Utils import Utils.PathPiece as Utils
import Utils.Message as Utils
import Text.Blaze (Markup, ToMarkup) import Text.Blaze (Markup, ToMarkup)

View File

@ -19,6 +19,9 @@ Utils.Form
Utils.PathPiece Utils.PathPiece
: (Template-Haskell)-Hilfsfunktionen für Formulierung von PathPiece-Instanzen : (Template-Haskell)-Hilfsfunktionen für Formulierung von PathPiece-Instanzen
Utils.Message
: redefines addMessage, addMessageI, defines MessageClass
Utils.Lens Utils.Lens
: Automatisch erzeugt Linsen für eigene und Yesod-Typen, `Control.Lens`-Export : Automatisch erzeugt Linsen für eigene und Yesod-Typen, `Control.Lens`-Export