diff --git a/message-index/messages/GHC-59155/example1/after/IllegalTupleSection.hs b/message-index/messages/GHC-59155/example1/after/IllegalTupleSection.hs new file mode 100644 index 00000000..58ced694 --- /dev/null +++ b/message-index/messages/GHC-59155/example1/after/IllegalTupleSection.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE TupleSections #-} + +module IllegalTupleSection where + +foo = (1,) diff --git a/message-index/messages/GHC-59155/example1/before/IllegalTupleSection.hs b/message-index/messages/GHC-59155/example1/before/IllegalTupleSection.hs new file mode 100644 index 00000000..68529cdb --- /dev/null +++ b/message-index/messages/GHC-59155/example1/before/IllegalTupleSection.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE Haskell2010 #-} +-- TupleSections not enabled + +module IllegalTupleSection where + +foo = (1,) + diff --git a/message-index/messages/GHC-59155/example1/index.md b/message-index/messages/GHC-59155/example1/index.md new file mode 100644 index 00000000..24c52a4d --- /dev/null +++ b/message-index/messages/GHC-59155/example1/index.md @@ -0,0 +1,15 @@ +--- +title: Illegal tuple section +--- + +## Error message + +``` +IllegalTupleSection.hs:6:7: error: [GHC-59155] + Illegal tuple section + Suggested fix: + Perhaps you intended to use the ‘TupleSections’ extension + | +6 | foo = (1,) + | ^^^^ +``` diff --git a/message-index/messages/GHC-59155/example2/after/IllegalUnboxedTupleSection.hs b/message-index/messages/GHC-59155/example2/after/IllegalUnboxedTupleSection.hs new file mode 100644 index 00000000..3d3f614c --- /dev/null +++ b/message-index/messages/GHC-59155/example2/after/IllegalUnboxedTupleSection.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE UnboxedTuples #-} +{-# LANGUAGE TupleSections #-} + +module IllegalUnboxedTupleSection where + +foo = (# 1, #) + diff --git a/message-index/messages/GHC-59155/example2/before/IllegalUnboxedTupleSection.hs b/message-index/messages/GHC-59155/example2/before/IllegalUnboxedTupleSection.hs new file mode 100644 index 00000000..797a861f --- /dev/null +++ b/message-index/messages/GHC-59155/example2/before/IllegalUnboxedTupleSection.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE UnboxedTuples #-} +-- TupleSections not enabled + +module IllegalUnboxedTupleSection where + +foo = (# 1, #) + diff --git a/message-index/messages/GHC-59155/example2/index.md b/message-index/messages/GHC-59155/example2/index.md new file mode 100644 index 00000000..37ba7709 --- /dev/null +++ b/message-index/messages/GHC-59155/example2/index.md @@ -0,0 +1,15 @@ +--- +title: Illegal unboxed tuple section +--- + +## Error message + +``` +IllegalTupleSection.hs:7:7: error: [GHC-59155] + Illegal tuple section + Suggested fix: + Perhaps you intended to use the ‘TupleSections’ extension + | +7 | foo = (# 1, #) + | ^^^^^^^^ +``` diff --git a/message-index/messages/GHC-59155/index.md b/message-index/messages/GHC-59155/index.md new file mode 100644 index 00000000..5cc914f1 --- /dev/null +++ b/message-index/messages/GHC-59155/index.md @@ -0,0 +1,16 @@ +--- +title: Illegal tuple section +summary: A tuple section is used, but the TupleSections extension is not enabled +severity: error +introduced: 9.6.1 +--- + +One of the components in a tuple is missing, but the `TupleSections` GHC extension has not been enabled. Perhaps this is a typo? If not, and the use of the tuple section syntax is intentional, please enable the extension, for example by adding the following line: + +``` +{-# LANGUAGE TupleSections #-} +``` + +at the top of your file. + +Please refer to the [`TupleSections` section](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/tuple_sections.html?highlight=tuplesection#extension-TupleSections) page of the GHC user guide to learn more about tuple sections.