GHC拡張一覧
from GHC拡張
Safe Haskell ExtensionsやHaskell Language Standard Extensionsも含む
GHC v9.0.1で見ている
「消えた?」みたいなコメントはこれに対して言っている
できればもっと細かく分類したいmrsekut.icon
hackage
v9.0.1
docs
分類もある
詳しい
versionがいくつの話をしているのかわからん
記法の拡張
AlternativeLayoutRule
AlternativeLayoutRuleTransitional
Arrows
Arrow記法を有効にする
BlockArguments
DoAndIfThenElse
DoRec
非推奨
EmptyCase
EmptyDataDecls
GADTSyntax
LambdaCase
MonadFailDesugaring
MonoLocalBinds
MultiWayIf
NamedWildCards
NondecreasingIndentation
PartialTypeSignatures
QuasiQuotes
StaticPointers
UnicodeSyntax
XmlSyntax
演算子の拡張
PostfixOperators
TupleSections
\ n -> (n, 0)を(,0)と書ける
Pattern matchを柔軟に
ViewPatterns
PatternSynonyms
MultiWayIf
NPlusKPatterns
PatternGuards
PatternSignatures
非推奨
RegularPatterns
消えた?
リテラル
BinaryLiterals
HexFloatLiterals
NegativeLiterals
NumericUnderscores
NumDecimals
OverloadedStrings
正格評価
BangPatterns
Strict
StrictData
Deriving
AutoDeriveTypeable
DeriveDataTypeable
Typeable型クラスとData型クラスのinstanceの自動導出
DeriveFoldable
DeriveGeneric
deriving Generic って書ける
DeriveLift
DeriveTraversable
EmptyDataDeriving
GeneralizedNewtypeDeriving
DeriveAnyClass
GeneralizedNewtypeDeriving
新しめ
DerivingVia
新しめ
DeriveFunctor
Functorのinstanceの自動導出
DerivingStrategies
StandaloneDeriving
https://qiita.com/hyone/items/a47b905936e55147fe59
Do
ApplicativeDo
Applicative Styleをdoを使って書く
RecursiveDo
QualifiedDo
内包表記
ParallelListComp
https://kowainik.github.io/posts/arrows-zoo#comprehension
TransformListComp
https://kowainik.github.io/posts/arrows-zoo#comprehension
MonadComprehensions
型クラス
ConstrainedClassMethods
DatatypeContexts
DefaultSignatures
FlexibleContexts
FlexibleInstances
FunctionalDependencies
IncoherentInstances
InstanceSigs
MultiParamTypeClasses
multi-parameter type classを定義できる
NullaryTypeClasses
OverlappingInstances
TypeSynonymInstances
ここで出てきた
type Hoge = ..のような型シノニムに対して、型クラスのインスタンスを作れる
UndecidableInstances
決定不能性を指摘するエラーを無視する
これ分類、型クラスで合ってるのか #??
UndecidableSuperClasses
量化
ExistentialQuantification
ExplicitForAll
kind
ConstraintKinds
DataKinds
データ型をkindへ昇格する
KindSignatures
kind注釈をつけられる
PolyKinds
高階多相型ができる
Rank2Types
PolymorphicComponents
RankNTypes
TypeInType
型族
ExplicitNamespaces
TypeApplications
TypeFamilies
TypeFamilyDependencies
TypeOperators
型演算子を使用可能にする
Recordのパターンマッチの略記
NamedFieldPuns
f {x1, x2} = x1 + x2と書ける
RecordWildCards
f {..} = x1 + x2と書ける
Record
DisambiguateRecordFields
DuplicateRecordFields
ExtensibleRecords
消えた?
OverloadedLabels
TraditionalRecordSyntax
RecordDotSyntax
hoge.xでアクセスできる
NoFieldSelectors
fieldをgetterにするのを無効にする
Unbox
MagicHash
UnboxedSums
UnboxedTuples
Template Haskell
TemplateHaskell
Template Haskellを有効にする
TemplateHaskellQuotes
FFI
CApiFFI
ForeignFunctionInterface
InterruptibleFFI
JavaScriptFFI
UnliftedFFITypes
Safe Haskell Extensions
Safe
Trustworthy
Unsafe
未分類
AllowAmbiguousTypes
GADTs
ImplicitParams
ImpredicativeTypes
LiberalTypeSynonyms
MonomorphismRestriction
RebindableSyntax
IxMonadでdo式使いたい時に使う
RelaxedPolyRec
ScopedTypeVariables
CPP
ExtendedDefaultRules
GHCForeignImportPrim
ImplicitPrelude
OverloadedLists
PackageImports
import "package-one-0.1.0.1" Data.Module.Xみたいなimport文が書ける
ParallelArrays
RestrictedTypeSynonyms
消えた?
RoleAnnotations
LexicalNegation
新しい
RelaxedLayout
新しい
UnliftedNewtypes
新しい
ViewPatterns
新しい
StandaloneKindSignatures
LinearTypes
GHC-9.0.1で入った
線形型
CUSKs
新しい
ImportQualifiedPost
新しい
MonoPatBinds
新しい
RecordPuns
新しい
NoStarIsType
QuantifiedConstraints
新しい
OverloadedRecordDot
新しい
UnliftedDataTypes
削除された
Generics
NewQualifiedOperators
PArr
SafeImports
GHC言語拡張の一覧 - Qiita
ちょい古い
全部に1行説明がある
https://myuon.github.io/posts/ghc-exts/
1行説明
9.1. Language options — Glasgow Haskell Compiler 8.10.1 User's Guide
https://haskell.jp/blog/posts/2018/about-ghc-exts-1.html
https://wiki.haskell.org/Implementations
https://github.com/shiatsumat/wiwinwlh-jp/blob/master/mds/言語拡張.md
http://rf0444.hatenablog.jp/entry/20120513/1336883141
分類
https://www.haskell.org/cabal/release/latest/doc/API/Cabal/Language-Haskell-Extension.html
https://ocharles.org.uk/pages/2014-12-01-24-days-of-ghc-extensions.html
#一覧