Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mantkiew opened this issue Sep 24, 2015 · 8 comments

Comments

@mantkiew
Copy link

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.

@juodaspaulius
Copy link

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

@s9gf4ult
Copy link

I have the same issue.

@Daniel-Diaz
Copy link
Contributor

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?

@ankhers
Copy link

ankhers commented Oct 9, 2015

I'm also seeing this issue.

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

@basvandijk
Copy link
Member

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

@mantkiew
Copy link
Author

mantkiew commented Jan 6, 2016

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

@Osager
Copy link

Osager commented Aug 1, 2016

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

@bergmark
Copy link
Collaborator

bergmark commented Aug 1, 2016

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants