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,266
    • Issues 4,266
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 394
    • Merge Requests 394
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Wiki
    • Records
  • volkov

Last edited by Tobias Dammers Mar 29, 2019
Page history New page

volkov

Anonymous Records with lenses

This page is to discuss adding support for Nikita Volkov's record design to GHC.

Links

  • The record package on Hackage: http://hackage.haskell.org/package/record
  • Homepage and tutorial: http://nikita-volkov.github.io/record/
  • Talk: http://www.techcast.com/events/bigtechday8/maffei-1005/
  • Mailing list: https://mail.haskell.org/pipermail/ghc-devs/2015-January/008049.html
  • Reddit discussion: http://www.reddit.com/r/haskell/comments/2svayz/i_think_ive_nailed_it_ive_solved_the_records/
  • More Reddit discussion: https://www.reddit.com/r/haskell/comments/3ck7gv/anonymous_records_in_haskell_nikita_volkov_on_his/
  • Notes on the interaction with OverloadedRecordFields

Drawbacks

The most important drawbacks of this design relative to other designs are:

  • Support of only a limited subset of Haskell syntax (presumably not an issue if built in to GHC)
  • Lack of support for strict and unpacked fields (a recent version provides entirely strict records, but not per-field strictness control otherwise the number of datatypes explodes)
  • Lack of support for polymorphic (Rank-N) fields
  • Fixed limit on the number of fields (24 in the current implementation, but the implementation can easily be updated to extend this range to an arbitrary amount)

Also, it is questionable whether any record extension should bake in a particular lens type.

Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Debugging
Commentary

Wiki

Title Index
Recent Changes