データベースを正しくセットアップするために実行する必要がある、この多数の IConnection conn => conn -> IO () 関数があります。今、それはそれほど美しくはありませんが、私はHaskellの初心者であり、より良くすることはできません.
setup :: IConnection conn => conn -> IO ()
setup conn = do
setupUtterances conn
commit conn
setupSegments conn
commit conn
setupLevels conn
commit conn
setupLevelLevel conn
commit conn
setupTCLevelLevel conn
commit conn
setupPaths conn
commit conn
setupLabelTypes conn
commit conn
setupLegalLabels conn
commit conn
setupTracks conn
commit conn
setupVariables conn
commit conn
setupFeatures conn
commit conn
setupAssociations conn
commit conn
return ()
とにかく短くする?と遊んでいました
sequence $ map ($ conn) [func1, func2,...]
しかし、私はそれを機能させることができません。提案?