You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "John Chee (JIRA)" <ji...@apache.org> on 2014/08/02 02:21:38 UTC
[jira] [Updated] (THRIFT-2152) Generated Haskell files does not
compile
[ https://issues.apache.org/jira/browse/THRIFT-2152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Chee updated THRIFT-2152:
------------------------------
Attachment: 0001-compiler-hs-fully-qualified-module-names-at-usage-si.patch
Before this change running {{make check}} in {{test/hs}} with the {{Include.thrift}} test would fail with:
{code}
gen-hs/Include_Types.hs:49:15:
Not in scope: ‘read_Bools’
Perhaps you meant one of these:
‘ThriftTest_Types.read_Bools’ (imported from ThriftTest_Types),
‘T.readBool’ (imported from Thrift),
‘ThriftTest_Types.read_Bonk’ (imported from ThriftTest_Types)
make: *** [check] Error 1
{code}
Now it succeeds with:
{code}
Includes work: IncludeTest {f_IncludeTest_bools = Just (Bools {f_Bools_im_true = Just True, f_Bools_im_false = Just False})}
{code}
See https://travis-ci.org/cheecheeo/thrift/jobs/31393619#L2612 for a successful travis run.
cc: [~roger.meier]
> Generated Haskell files does not compile
> ----------------------------------------
>
> Key: THRIFT-2152
> URL: https://issues.apache.org/jira/browse/THRIFT-2152
> Project: Thrift
> Issue Type: Bug
> Components: Haskell - Compiler
> Affects Versions: 0.9
> Environment: Fedora 19
> The Glorious Glasgow Haskell Compilation System, version 7.4.2
> Reporter: Blackbox Dev Team
> Attachments: 0001-compiler-hs-fully-qualified-module-names-at-usage-si.patch
>
>
> When compiling the following two files:
> {code:title=a.thrift}
> include "b.thrift"
> struct A {
> 1 : optional b.B elem
> }
> {code}
> and
> {code:title=b.thrift}
> struct B {
> 1: optional i32 i
> }
> {code}
> with:
> thrift --gen hs a.thrift
> thrift --gen hs b.thrift
> ghc gen-hs/A_Consts.hs gen-hs/A_Types.hs gen-hs/B_Consts.hs gen-hs/B_Types.h
> I get an error:
> {code}
> gen-hs/A_Types.hs:54:15:
> Not in scope: `read_B'
> Perhaps you meant one of these:
> `B_Types.read_B' (imported from B_Types), `read_A' (line 63)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)