Opened 17 months ago

Last modified 12 months ago

#7492 new feature request

Generic1 deriving: Can we replace Rec1 f with f :.: Par1?

Reported by: spl Owned by: dreixel
Priority: normal Milestone: 7.8.3
Component: Compiler Version: 7.7
Keywords: Cc: leather@…,
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:


It seems like Rec1 f is isomorphic to f :.: Par1. Is it possible and beneficial to replace the former with the latter and deprecate/remove Rec1?

  1. Currently, a parameter type is found in Par1 or Rec1. By removing Rec1, there would be only one place for parameters. This simplifies generic functions.
  2. It is in the interest of reducing redundancy in the representation, something that appears to be consistent with the design of the representation types (e.g. using the same type for multiple meanings).

Change History (3)

comment:1 Changed 17 months ago by simonpj

  • Cc changed from to,
  • Difficulty set to Unknown
  • Owner set to dreixel

comment:2 Changed 17 months ago by dreixel

You raise an interesting point, thanks. I think replacing Rec1 f with f :.: Par1 would be possible. But I'm not too keen on making a change to the representation right now, as I think there might be more fundamental changes coming up anyway (e.g. making use of DataKinds). But I'm leaving this open so that we don't forget the idea.

comment:3 Changed 12 months ago by igloo

  • Milestone set to 7.8.1
Note: See TracTickets for help on using tickets.