text-format icon indicating copy to clipboard operation
text-format copied to clipboard

The type variable `t0' is ambiguous

Open erthalion opened this issue 11 years ago • 0 comments

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?

erthalion avatar Apr 05 '14 14:04 erthalion