From 9e77d34a6a79a8bb1334a62dbb4400bfd63ce233 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Sun, 26 Dec 2010 00:28:46 -0800 Subject: [PATCH] Relax match for GFormMonad IsForm instance --- Yesod/Form/Core.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Yesod/Form/Core.hs b/Yesod/Form/Core.hs index be5fcbe0..623a5ad7 100644 --- a/Yesod/Form/Core.hs +++ b/Yesod/Form/Core.hs @@ -202,10 +202,10 @@ instance IsForm (FormField s m a) where toForm x = GForm $ do (a, b, c) <- x return (a, [b], c) -instance IsForm (GFormMonad s m (FormResult a, FieldInfo s m)) where - type FormSub (GFormMonad s m (FormResult a, FieldInfo s m)) = s - type FormMaster (GFormMonad s m (FormResult a, FieldInfo s m)) = m - type FormType (GFormMonad s m (FormResult a, FieldInfo s m)) = a +instance (FormResult ~ formResult) => IsForm (GFormMonad s m (formResult a, FieldInfo s m)) where + type FormSub (GFormMonad s m (formResult a, FieldInfo s m)) = s + type FormMaster (GFormMonad s m (formResult a, FieldInfo s m)) = m + type FormType (GFormMonad s m (formResult a, FieldInfo s m)) = a toForm x = do (res, fi, enctype) <- lift x tell enctype