Permalink
Browse files

Removed unnecessary (Monad m, Monoid xml) constraints from plug and p…

…lug'. Not sure why they were there in the first place, or why we wanted them gone. Seems better to make it more general.
  • Loading branch information...
1 parent e57a23d commit fe49c3588039ffbfadb7f3730cfc910ea0b5b300 @stepcut stepcut committed Dec 30, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 Text/Formlets.hs
View
4 Text/Formlets.hs
@@ -155,11 +155,11 @@ xml :: Monad m => xml -> Form xml m ()
xml x = Form $ \env -> pure (return (return $ FR.Success ()), x, UrlEncoded)
-- | Transform the XML component
-plug :: (Monad m, Monoid xml) => (xml -> xml1) -> Form xml m a -> Form xml1 m a
+plug :: (xml -> xml1) -> Form xml m a -> Form xml1 m a
f `plug` (Form m) = Form $ \env -> pure plugin <*> m env
where plugin (c, x, t) = (c, f x, t)
-plug' :: (Monad m, Monoid xml1) => (xml1 -> xml2) -> Formlet xml1 m a -> Formlet xml2 m a
+plug' :: (xml1 -> xml2) -> Formlet xml1 m a -> Formlet xml2 m a
plug' transformer formlet value = plug transformer (formlet value)
-- | This generates a single (or more) forms for a, and a parser function for a list of a's.

0 comments on commit fe49c35

Please sign in to comment.