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

Improve type mappings

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Labels:
      None
    • Environment:

      Darwin – 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
      The Glorious Glasgow Haskell Compilation System, version 6.12.3

    • Patch Info:
      Patch Available

      Description

      The current haskell type mappings are awkward and error prone to work with:

      binary -> String
      string -> String
      byte -> Int
      i16 -> Int
      i32 -> Int
      i64 -> Int

      This patch updates the mappings to the canonical types of the correct length in Haskell:

      binary -> Data.ByteString.Lazy.ByteString
      string -> String
      byte -> Data.Word.Word8
      i16 -> Data.Int.Int16
      i32 -> Data.Int.Int32
      i64 -> Data.Int.Int64

      THIS BREAKS EXISTING CODE. It is, however, very arguably broken already.

      For convenience of patching, this patch is a superset of THRIFT-743.

      Thoughts?

        Attachments

        1. thrift-improved-haskell-type-mappings.patch
          19 kB
          Christian Lavoie
        2. v2-thrift-improved-haskell-bindings.patch
          13 kB
          Christian Lavoie

          Activity

            People

            • Assignee:
              clavoie Christian Lavoie
              Reporter:
              clavoie Christian Lavoie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: