Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message index: implement GHC-16437 #504

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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,9 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}

module Deriving_gadt where

data T a b where
Mk :: Int -> b -> T Int b

deriving instance Functor (T a)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Deriving_gadt where

data T a b where
Mk :: Int -> b -> T Int b
deriving (Functor)
3 changes: 3 additions & 0 deletions message-index/messages/GHC-16437/deriving_gadt/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Attempt at using deriving clause with GADT.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

module Higher_rank where

-- unfortunately we just need a rank 1 type
data Bad = MkBad a deriving Eq
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE RankNTypes #-}

module Higher_rank where

data Bad = MkBad (forall a. a) deriving Eq
3 changes: 3 additions & 0 deletions message-index/messages/GHC-16437/higher_rank/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Use of higher-rank types with a derving clause.
---
11 changes: 11 additions & 0 deletions message-index/messages/GHC-16437/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Bad Constructor used with deriving clause
summary: The deriving mechanism expects constructors of a particular form. When the constructors do not comport to this form, this error is thrown.
severity: error
introduced: 9.6.1
---

• Can't make a derived instance of ‘Functor (T a)’:
Constructor ‘Mk’ is a GADT
• In the data declaration for ‘T’
Suggested fix: Use a standalone deriving declaration instead
Loading