haskell / haskell/error-messages

Suggest language extension for unlifted data family

Open
#535 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

When defining an unlifted datatype or newtype, GHC helpfully tells me `Suggested fix: Perhaps you intended to use UnliftedNewtypes` or `UnliftedDatatypes`. But this does not happen with data families, as can be tested by comparing the errors for `A`, `B`, `C`, `D`:

```haskell
{-# LANGUAGE TypeFamilies, MagicHash, DataKinds #-}
module NT where

import GHC.Exts

{-
newtype A = MkA Int#

type B :: UnliftedType
data B = MkB
-}

data family C :: TYPE IntRep
newtype instance C = MkC Int#

data family D :: UnliftedType
data instance D = MkD
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.