Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4005

Better Haskell Support for Union Types in Thrift

    XMLWordPrintableJSON

Details

    Description

      Thrift's Haskell implementation presently expresses union types as product types. While this is sufficient for functionality, and may mirror the way Thrift works under the hood, it requires the programmer to write unnecessary runtime checks and matches to find the filled field, and verify there is precisely one.

      I propose augmenting the existing Haskell Thrift system with union Haskell types for union Thrift types, and augmenting the interface definitions so the user can define a service in terms of either the legacy product types or the new union types.

      Attachments

        Activity

          People

            Unassigned Unassigned
            isheff Isaac Sheff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified