A trouble with hamlet quasiquoter

Greetings, I'm trying to write a custom Yesod field for displaying a list of words. I copied the code from textareaField and played with it. Unfortunately, I'm getting a rather strange error message from the compiler. What's I'm doing wrong? data GenTask = GenTask { gtWords :: [String], gtNumResults :: Int } blank :: (Monad m, RenderMessage master FormMessage) => (Text -> Either FormMessage a) -> [Text] -> m (Either (SomeMessage master) (Maybe a)) blank _ [] = return $ Right Nothing blank _ ("":_) = return $ Right Nothing blank f (x:_) = return $ either (Left . SomeMessage) (Right . Just) $ f x textListField = Field { fieldParse = blank $ Right . map T.unpack . T.words , fieldView = \theId name theClass val isReq -> addHamlet [hamlet|\
participants (1)
-
Dmitry Vyal