No slash command · from haskell-tasuke
Do not discard a function's final value with return (), pure (), or void; adjust the type to return the value and let the caller discard it when unneeded. Use when writing or reviewing Haskell functions that return unit or discard results.
Ships in haskell-tasuke. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
関数の最後で、
return ()pure ()voidなどを使って値を捨てないでください。
特に理由がないならば関数が値を返すように型の方を合わせてください。
その時その関数の返り値が別に必要ない場合でも、 呼び出し側で捨てれば多くは問題ない話です。 呼び出し側で捨てる手間は非常に少ないです。
必要になった場合に使える余地を残しておいたほうが後々必要になった時に大きく書き換えなくて済みます。
関数の最後がwriteFileのような、
MonadIO m => m ()のようにユニットを返す関数であれば、
自然とそのまま返り値をMonadIO m => m ()にして問題ありません。
ちょっとした補助関数を最後に呼び出して、 それの返り値を返してしまうと、 関数全体の挙動が誤解されてしまうような場合のみ、 最後の値を捨てることを検討してください。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ncaq/konoka --plugin haskell-tasuke19 skills in this plugin
/bracketUse bracket or with-style functions to guarantee resource cleanup even on exceptions instead of separate do blocks. Use when writing or reviewing Haskell code that acquires and releases resources./bump-cabal-index-stateUpdate Cabal project index-state to the latest timestamp. Use when it needs to bump the cabal index-state./cabal-commandUse cabal with --disable-optimization for development builds and tests, and add --enable-tests to avoid rebuilds. Use when running or suggesting cabal build or test commands in Haskell development.