Use 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.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cabal Command?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ncaq-cabal-command)
---
name: cabal-command
description: Use 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.
user-invocable: false
---
# cabalコマンド
開発中のビルドの確認とテストの実行には、以下のコマンドを使ってください。
```console
cabal build --disable-optimization --enable-tests
cabal test --disable-optimization --enable-tests
```
最適化時の挙動を確認する場合とリリースする場合を除き、
`--disable-optimization`を付けて最適化を無効にします。
Haskellはビルドに時間がかかる言語なので、ビルド時間を短縮するためです。
`build`にも基本的に`--enable-tests`を付けます。
`build`はテストをビルドするだけで実行しませんが、
付けておかないと、テストを実行するときにフラグが変わって再ビルドが行われるためです。