Skip to content

The type variable `t0' is ambiguous #11

@erthalion

Description

@erthalion

I'm little confused about formatting a Text type. I'm trying to do this:

import Data.Text.Format
import Data.Text.Encoding

format "{} {}" (decodeUtf8 someByteString, otherParams)

and this happens:

No instance for (Data.Text.Buildable.Buildable t0)
      arising from a use of `format'
    The type variable `t0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there are several potential instances:
      instance Data.Text.Buildable.Buildable Bool
        -- Defined in `Data.Text.Buildable'
      instance Data.Text.Buildable.Buildable
                 text-1.0.0.1:Data.Text.Lazy.Builder.Internal.Builder
        -- Defined in `Data.Text.Buildable'
      instance Data.Text.Buildable.Buildable Char
        -- Defined in `Data.Text.Buildable'
      ...plus 32 others

Can you help me and explain what I'm doing wrong?

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