Skip to content
GitLab
Projects Groups Snippets
  • /
  • 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 5,250
    • Issues 5,250
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 576
    • Merge requests 576
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3057
Closed
Open
Issue created Mar 01, 2009 by waern@trac-waern

Standalone deriving of Functor does not work for HsDoc

I tried to use the new DerivingFunctor extension to derive Functor for the HsDoc type from the ghc package:

{-# StandaloneDeriving, DerivingFunctor #-}

import HsDoc

deriving instance Functor HsDoc

But I got this error message:

david@david-laptop:~/dev/test$ /home/david/ghc-head/bin/ghc --make Test.hs -package ghc
[1 of 1] Compiling Test             ( Test.hs, Test.o )

Test.hs:9:0:
    Couldn't match expected type `b' against inferred type `a'
      `b' is a rigid type variable bound by
          the type signature for `fmap' at <no location info>
      `a' is a rigid type variable bound by
          the type signature for `fmap' at <no location info>
      Expected type: HsDoc b
      Inferred type: HsDoc a
    In the first argument of `DocAppend', namely `a1'
    In the expression: DocAppend a1 a2
Trac metadata
Trac field Value
Version 6.11
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