Ticket #751 (closed defect: fixed)

Opened 3 years ago

Last modified 18 months ago

Cabal confused about DeriveFunctor

Reported by: osaunders Owned by:
Priority: normal Milestone: Cabal-1.10
Component: Cabal library Version: 1.8.0.6
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: 6.12.3 Platform:

Attachments

extra_deriving.dpatch Download (111.1 KB) - added by guest 3 years ago.
patch to add DeriveFunctor?, DeriveFoldable?, and DeriveTypeable? extensions

Change History

Changed 3 years ago by guest

patch to add DeriveFunctor?, DeriveFoldable?, and DeriveTypeable? extensions

follow-up: ↓ 3   Changed 3 years ago by guest

I attached a patch to add DeriveFunctor?, DeriveFoldable?, and DeriveTraversable?, but I don't know if I did everything necessary to add the extensions. In particular, the notes in Language.Haskell.Extension.hs say that new extensions should be added to the lists in Distribution.Simple.X.languageExtensions, but (at least for GHC) that seems to be generated dynamically.

  Changed 3 years ago by guest

In the comment for the attached file, s/DeriveTypeable/DeriveTraversable/ . It's correct in the patch.

in reply to: ↑ 1   Changed 3 years ago by duncan

Replying to guest:

I attached a patch to add DeriveFunctor??, DeriveFoldable??, and DeriveTraversable??, but I don't know if I did everything necessary to add the extensions.

Thanks for the patch, I will ask the GHC devs to look at it, as they are responsible for registering new extensions that GHC implements.

In particular, the notes in Language.Haskell.Extension.hs say that new extensions should be added to the lists in Distribution.Simple.X.languageExtensions, but (at least for GHC) that seems to be generated dynamically.

Right. For newer GHC versions they are generated dynamically. The same is not yet true of other compilers, but I think at the moment only GHC implements these extensions.

  Changed 2 years ago by duncan

  • status changed from new to closed
  • platform Mac OS deleted
  • component changed from cabal-install tool to Cabal library
  • resolution set to fixed
  • milestone set to Cabal-1.10

Fixed.

Tue Oct 26 23:04:09 BST 2010  Ian Lynagh <igloo@earth.li>
  * Add some more extensions that GHC knows about

  Changed 18 months ago by elga

Note: See TracTickets for help on using tickets.