Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,396
    • Issues 4,396
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 378
    • Merge Requests 378
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #8678

Closed
Open
Opened Jan 18, 2014 by Gabor Greif@ggreif💬Developer

Deriving `Functor` complains about existential type

When deriving a functor with !DataKinds enabled

{-# LANGUAGE DataKinds, DeriveFunctor, FlexibleInstances, GADTs, KindSignatures, StandaloneDeriving #-}

data {- kind -} Nat = Z | S Nat

data NonStandard :: Nat -> * -> * where
  Standard :: a -> NonStandard (S n) a
  Non :: NonStandard n a -> a -> NonStandard (S n) a

deriving instance Show a => Show (NonStandard n a)
deriving instance Functor (NonStandard n)

I get following error message

NonStandard.hs:10:1:
    Can't make a derived instance of ‛Functor (NonStandard n)’:
      Constructor ‛Standard’ must not have existential arguments
    In the stand-alone deriving instance for ‛Functor (NonStandard n)’

But the Standard constructor is not at all existential in the last type argument!

Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 09, 2019 by Gabor Greif
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#8678