私は書き直そうとしていました:
return $ renderHtml $ mconcat $ intersperse " " $ catMaybes links
これは、次のように問題なく機能します。
return $ renderHtml $ mconcat $ unwords $ catMaybes links
しかし、それは戻ってきています:
Couldn't match type ‘Char’
with ‘blaze-markup-0.7.0.2:Text.Blaze.Internal.MarkupM ()’
Expected type: H.Html
Actual type: Char
In the second argument of ‘($)’, namely
‘mconcat $ unwords $ catMaybes links’
In the second argument of ‘($)’, namely
‘renderHtml $ mconcat $ unwords $ catMaybes links’
In a stmt of a 'do' block:
return $ renderHtml $ mconcat $ unwords $ catMaybes links
私は Haskell に関してはまだ最高ではありませんが、私は考えintersperse " "
ましunwords
た。
編集:最終的には、使用方法を見つけたいと思いますunwords
...エラーが発生する理由と、それを回避する方法を理解することが目標です! =)