Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,826
    • Issues 4,826
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 440
    • Merge requests 440
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10020

Closed
Open
Created Jan 26, 2015 by Ryan Scott@RyanGlScottMaintainer

GHC 7.10 rejects nullary type class with associated data

In GHC 7.8.4, the following code is legal:

{-# LANGUAGE NullaryTypeClasses, TypeFamilies #-}
module NullaryData where

class NullaryClass where
    data NullaryData

In GHC 7.10, NullaryTypeClasses was deprecated in favor of MultiParamTypeClasses. However, running this code on GHC 7.10-rc1:

{-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-}
module NullaryData where

class NullaryClass where
    data NullaryData

results in this error:

NullaryData.hs:4:1:
    The associated type ‘NullaryData’
    mentions none of the type or kind variables of the class ‘NullaryClass’
    In the class declaration for ‘NullaryClass’

It's probably related to this earlier bugfix.

Trac metadata
Trac field Value
Version 7.10.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking