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

Haskell tutorial compiles

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.2
    • Labels:
      None
    • Environment:

      Ubuntu
      The Glorious Glasgow Haskell Compilation System, version 7.6.3

      Description

      This patch fixes compilation on the Haskell tutorial.

      Running: https://gist.github.com/cheecheeo/9521607

      Before this patch results in:

      ...
      Building ThriftTutorial-0.1.0...
      Preprocessing executable 'HaskellServer' for ThriftTutorial-0.1.0...
      
      on the commandline: Warning:
          -fglasgow-exts is deprecated: Use individual extensions instead
      
      ../gen-hs/Shared_Types.hs:33:8:
          Could not find module `Thrift.Types'
          It is a member of the hidden package `thrift-1.0.0'.
          Perhaps you need to add `thrift' to the build-depends in your .cabal file.
          Use -v to see a list of the files searched for.
      Failed to install ThriftTutorial-0.1.0
      cabal: Error: some packages failed to install:
      ThriftTutorial-0.1.0 failed during the building phase. The exception was:
      ExitFailure 1
      

      After this patch results in:

      ...
      on the commandline: Warning:
          -fglasgow-exts is deprecated: Use individual extensions instead
      Linking dist/dist-sandbox-ca46c903/build/HaskellClient/HaskellClient ...
      Installing executable(s) in /home/jchee/packages/thrift/.cabal-sandbox/bin
      Installed ThriftTutorial-0.1.0
      + popd
      ~/packages/thrift/tutorial ~/packages/thrift
      + popd
      ~/packages/thrift
      

      Also, runnning the Haskell server and client produces expected output:

      + pushd .cabal-sandbox/bin
      ~/packages/thrift/.cabal-sandbox/bin ~/packages/thrift
      + trap 'kill -9 19091' EXIT
      + ./HaskellServer
      + ./HaskellClient
      "Starting the server..."
      "ping()"
      "ping()"
      add(1,1)
      1+1=2
      calculate(1, Work {f_Work_num1 = Just 15, f_Work_num2 = Just 10, f_Work_op = Just SUBTRACT, f_Work_comment = Nothing})
      15-10=5
      Check log: 5
      + popd
      ~/packages/thrift
      + kill -9 19091
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                roger Roger Meier
                Reporter:
                cheecheeo John Chee
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: