Дано: < /p>
import Lucid
import Lucid.Base
mainPage :: Html ()
mainPage = div_ (p_ "hello")
< /code>
Я получаю следующую ошибку времени компиляции: < /p>
/Users/kevinmeredith/Workspace/my-project/src/Lib.hs:9:18: error:
• Couldn't match type ‘HtmlT Data.Functor.Identity.Identity ()’
with ‘[Char]’
arising from a functional dependency between:
constraint ‘Term [Char] (HtmlT Data.Functor.Identity.Identity ())’
arising from a use of ‘p_’
instance ‘Term (HtmlT m a) (HtmlT m a)’ at
• In the first argument of ‘div_’, namely ‘(p_ "hello")’
In the expression: div_ (p_ "hello")
In an equation for ‘mainPage’: mainPage = div_ (p_ "hello")
< /code>
Как я могу исправить эту ошибку времени компиляции, пожалуйста? < /p>
Подробнее здесь: https://stackoverflow.com/questions/472 ... le-example