You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Isaac Sheff (JIRA)" <ji...@apache.org> on 2016/12/13 22:06:58 UTC

[jira] [Created] (THRIFT-4005) Better Haskell Support for Union Types in Thrift

Isaac Sheff created THRIFT-4005:
-----------------------------------

             Summary: Better Haskell Support for Union Types in Thrift
                 Key: THRIFT-4005
                 URL: https://issues.apache.org/jira/browse/THRIFT-4005
             Project: Thrift
          Issue Type: Improvement
          Components: Haskell - Compiler, Haskell - Library
    Affects Versions: 1.0
            Reporter: Isaac Sheff
            Priority: Minor
             Fix For: 1.0


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)