You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Zejun Wu (JIRA)" <ji...@apache.org> on 2014/05/24 10:35:01 UTC

[jira] [Commented] (THRIFT-2543) Generated enum type in haskell should be qualified

    [ https://issues.apache.org/jira/browse/THRIFT-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008073#comment-14008073 ] 

Zejun Wu commented on THRIFT-2543:
----------------------------------

Compile following thrift files
{code:title=a.thrift|borderStyle=solid}
enum X {
  A = 1,
  B = 2,
  C = 4,
  D = 8
}
{code}

{code:title=b.thrift|borderStyle=solid}
include "a.thrift"

struct B {
  1: a.X x;
  2: i32 y;
}
{code}

In generated haskell file, we find
{code:title=B_Types.hs|borderStyle=solid}
import qualified A_Types

data B = B{f_B_x :: Maybe X,f_B_y :: Maybe Int32} deriving (Show,Eq,Typeable)
{code}

It should be
{code:title=B_Types.hs|borderStyle=solid}
import qualified A_Types

data B = B{f_B_x :: Maybe A_Types.X,f_B_y :: Maybe Int32} deriving (Show,Eq,Typeable)
{code}

> Generated enum type in haskell should be qualified
> --------------------------------------------------
>
>                 Key: THRIFT-2543
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2543
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.9.1, 1.2
>            Reporter: Zejun Wu
>




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