You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/05/02 21:45:21 UTC

[jira] [Assigned] (THRIFT-2401) Haskell tutorial compiles

     [ https://issues.apache.org/jira/browse/THRIFT-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier reassigned THRIFT-2401:
-----------------------------------

    Assignee: Roger Meier

> Haskell tutorial compiles
> -------------------------
>
>                 Key: THRIFT-2401
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2401
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Haskell - Compiler, Haskell - Library, Tutorial
>         Environment: Ubuntu
> The Glorious Glasgow Haskell Compilation System, version 7.6.3
>            Reporter: John Chee
>            Assignee: Roger Meier
>         Attachments: haskell_tutorial_compiles.patch
>
>
> This patch fixes compilation on the Haskell tutorial.
> Running: https://gist.github.com/cheecheeo/9521607
> Before this patch results in:
> {code}
> ...
> 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
> {code}
> After this patch results in:
> {code}
> ...
> 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
> {code}
> Also, runnning the Haskell server and client produces expected output:
> {code}
> + 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
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)