minor cleanup

This commit is contained in:
Gregor Kleen 2018-09-28 14:12:13 +02:00
parent a803905570
commit a6be152981

View File

@ -1,5 +1,4 @@
{-# LANGUAGE NoImplicitPrelude
, ExplicitForAll
, RecordWildCards
, TemplateHaskell
, FlexibleContexts
@ -13,6 +12,7 @@ module Auth.Dummy
) where
import Import.NoFoundation
import Database.Persist.Sql (SqlBackendCanRead)
import Utils.Form
@ -23,7 +23,7 @@ data DummyMessage = MsgDummyIdent
dummyForm :: ( RenderMessage site FormMessage
, RenderMessage site DummyMessage
, YesodPersist site
, YesodPersistBackend site ~ SqlBackend
, SqlBackendCanRead (YesodPersistBackend site)
, Button site SubmitButton
, Show (ButtonCssClass site)
) => AForm (HandlerT site IO) Text
@ -33,10 +33,9 @@ dummyForm = areq userField (fslpI MsgDummyIdent "plugin:ident") Nothing
userField = textField `addDatalist` liftHandlerT (runDB userList)
userList = map (\(Entity _ User{..}) -> userPlugin <> ":" <> userIdent) <$> selectList [] [Asc UserPlugin, Asc UserIdent]
dummyLogin :: forall site.
( YesodAuth site
dummyLogin :: ( YesodAuth site
, YesodPersist site
, YesodPersistBackend site ~ SqlBackend
, SqlBackendCanRead (YesodPersistBackend site)
, RenderMessage site FormMessage
, RenderMessage site DummyMessage
, Button site SubmitButton