Skip to content

0.10 causes Couldn't match expected type Data.Text.Internal.Text' with actual type Data.ByteString.Builder.Internal.Builder' #293

Closed

Description

@mantkiew

I get the following error now in the code generated by Aeson.TH:

src\Language\Clafer\Intermediate\Intclafer.hs:392:3:
    Couldn't match expected type `Data.Text.Internal.Text'
                with actual type `Data.ByteString.Builder.Internal.Builder'
    In the first argument of `(Data.Aeson..=)', namely
      `aeson-0.10.0.0:Data.Aeson.Encode.Builder.text
         (Data.Text.pack "gcard")'
    In the first argument of `(<$>)', namely
      `(aeson-0.10.0.0:Data.Aeson.Encode.Builder.text
          (Data.Text.pack "gcard")
        Data.Aeson..=)'

src\Language\Clafer\Intermediate\Intclafer.hs:400:3:
    Couldn't match expected type `Data.Text.Internal.Text'
                with actual type `Data.ByteString.Builder.Internal.Builder'
    In the first argument of `(Data.Aeson..=)', namely
      `aeson-0.10.0.0:Data.Aeson.Encode.Builder.text
         (Data.Text.pack "iType")'
    In the first argument of `(<$>)', namely
      `(aeson-0.10.0.0:Data.Aeson.Encode.Builder.text
          (Data.Text.pack "iType")
        Data.Aeson..=)'

the fields gcard and iType are

, _gcard :: Maybe IGCard

and

_iType :: Maybe IType.

The error occurs on line 392 and line 400.

Activity

  1. juodaspaulius commented on Sep 24, 2015

    @juodaspaulius

    Yep, I was having the same issue and had to downgrade to 0.9.0.1..

  2. s9gf4ult commented on Sep 30, 2015

    @s9gf4ult

    I have the same issue.

  3. Daniel-Diaz commented on Oct 4, 2015

    @Daniel-Diaz

    I ran into the same issue. An instance that used to work, it breaks on aeson-0.10.0.0. At the moment, I am building against 0.9.0.1, but I would like to build my package using the newest version. What is necessary to do in order to adapt to the new aeson?

  4. ankhers commented on Oct 9, 2015

    @ankhers

    I'm also seeing this issue.

    It has something to do with omitNothingFields = True. If you remove that option, things should compile normally.

  5. basvandijk commented on Oct 10, 2015

    @basvandijk
    Member

    This should be fixed by 159de4f. @bos will you do the release honours?

  6. added a commit that references this issue on Dec 8, 2015
    7c68998
  7. mantkiew commented on Jan 6, 2016

    @mantkiew
    Author

    I confirm that it's fixed with HEAD (latest commit ).

    @bos New bug fix release pretty pretty please?

    LTS-4.0 contains aeson-0.10.0.0, so I have to do the following in stack.yaml:

    packages:
    - '.'
    - location:
        git: https://github.com/bos/aeson.git
        commit: 4de5a203eeeea593457bc92bc40062f3ea830426
    
  8. Osager commented on Aug 1, 2016

    @Osager

    @ankhers
    I am still having the exact issue with LTS-4.1

  9. bergmark commented on Aug 1, 2016

    @bergmark
    Collaborator

    @Osager since that is an old LTS version it contains an old version of aeson without the fix. lts-4 was also discontinued early in favor of lts-5 which reverted to aeson 0.9.* (which doesn't have this problem either).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions