Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE TupleSections #-}

module IllegalTupleSection where

foo = (1,)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{-# LANGUAGE Haskell2010 #-}
-- TupleSections not enabled

module IllegalTupleSection where

foo = (1,)

15 changes: 15 additions & 0 deletions message-index/messages/GHC-59155/example1/index.md
Original file line number Diff line number Diff line change
@@ -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,)
| ^^^^
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE TupleSections #-}

module IllegalUnboxedTupleSection where

foo = (# 1, #)

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE UnboxedTuples #-}
-- TupleSections not enabled

module IllegalUnboxedTupleSection where

foo = (# 1, #)

15 changes: 15 additions & 0 deletions message-index/messages/GHC-59155/example2/index.md
Original file line number Diff line number Diff line change
@@ -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, #)
| ^^^^^^^^
```
16 changes: 16 additions & 0 deletions message-index/messages/GHC-59155/index.md
Original file line number Diff line number Diff line change
@@ -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.