Skip to content
Back to skills

Language Extensions

ASecurity

Haskell language extension and language edition (GHC2024/GHC2021) selection policy. Use when configuring or reviewing Haskell language extensions, cabal default-extensions, or default-language.

  • 3 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 27, 2026
data-ai

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add ncaq/konoka --skill language-extensions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Language Extensions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Language Extensions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ncaq-language-extensions/badge)](https://www.skillsdirectory.com/skills/ncaq-language-extensions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: language-extensions
description: Haskell language extension and language edition (GHC2024/GHC2021) selection policy. Use when configuring or reviewing Haskell language extensions, cabal default-extensions, or default-language.
user-invocable: false
---

# 言語拡張の選択方針

Haskellの言語拡張と、
言語拡張のセットである言語バージョンの選択方針について説明します。

## 基本の方針

Haskellの言語バージョンは使える場合は`GHC2024`を使用します。

使えない場合は`GHC2021`を使用します。

`GHC2024`で有効になっていなくても、
比較的安全で有用な言語拡張は有効にします。

## GHC2021に含まれている拡張

- `BangPatterns`
- `BinaryLiterals`
- `ConstrainedClassMethods`
- `ConstraintKinds`
- `DeriveDataTypeable`
- `DeriveFoldable`
- `DeriveFunctor`
- `DeriveGeneric`
- `DeriveLift`
- `DeriveTraversable`
- `DoAndIfThenElse`
- `EmptyCase`
- `EmptyDataDecls`
- `EmptyDataDeriving`
- `ExistentialQuantification`
- `ExplicitForAll`
- `FieldSelectors`
- `FlexibleContexts`
- `FlexibleInstances`
- `ForeignFunctionInterface`
- `GADTSyntax`
- `GeneralisedNewtypeDeriving`
- `HexFloatLiterals`
- `ImplicitPrelude`
- `ImplicitStagePersistence`
- `ImportQualifiedPost`
- `InstanceSigs`
- `KindSignatures`
- `MonomorphismRestriction`
- `MultiParamTypeClasses`
- `NamedFieldPuns`
- `NamedWildCards`
- `NoExplicitNamespaces`
- `NumericUnderscores`
- `PatternGuards`
- `PolyKinds`
- `PostfixOperators`
- `RankNTypes`
- `RelaxedPolyRec`
- `ScopedTypeVariables`
- `StandaloneDeriving`
- `StandaloneKindSignatures`
- `StarIsType`
- `TraditionalRecordSyntax`
- `TupleSections`
- `TypeApplications`
- `TypeOperators`
- `TypeSynonymInstances`

## GHC2024に含まれている拡張

上の`GHC2021`に加えて、
以下の拡張が`GHC2024`に含まれています。

- `DataKinds`
- `DerivingStrategies`
- `DisambiguateRecordFields`
- `ExplicitNamespaces`
- `GADTs`
- `LambdaCase`
- `RoleAnnotations`

## cabalファイルの設定例

典型的なcabalファイルでの言語バージョンと言語拡張の設定は以下のようになります。

```cabal
default-language: GHC2024
default-extensions:
  ApplicativeDo
  BlockArguments
  CPP
  DefaultSignatures
  DerivingVia
  DuplicateRecordFields
  FunctionalDependencies
  LexicalNegation
  LinearTypes
  MonadComprehensions
  MultiWayIf
  NegativeLiterals
  NoFieldSelectors
  NoImplicitPrelude
  OverloadedLabels
  OverloadedRecordDot
  OverloadedStrings
  ParallelListComp
  PatternSynonyms
  QualifiedDo
  QuantifiedConstraints
  QuasiQuotes
  RecordWildCards
  RecursiveDo
  StrictData
  TemplateHaskell
  TypeData
  TypeFamilies
  TypeFamilyDependencies
  ViewPatterns
```

## 個別の言語拡張ごとの採否方針

各言語拡張を、

- デフォルトで有効にする
- 必要なときだけモジュール単位で有効にする
- 禁止する

かの個別の方針と理由は[reference.md](./reference.md)を参照してください。

Files in this skill

  • SKILL.md3 KB
  • reference.md19.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.