Build failure with GHC 8.2

[ 5 of 11] Compiling Network.Wai.Predicate.MediaType ( src/Network/Wai/Predicate/MediaType.hs, dist/build/Network/Wai/Predicate/MediaType.o )

src/Network/Wai/Predicate/MediaType.hs:22:19: error:
    • Couldn't match type ‘text-1.2.2.2:Data.Text.Internal.Text’
                     with ‘[Char]’
      Expected type: String
        Actual type: Demote Symbol
    • In the first argument of ‘pack’, namely ‘(fromSing t)’
      In the expression: pack (fromSing t)
      In an equation for ‘f’: f _ t = pack (fromSing t)
   |
22 |     f _ t = pack (fromSing t)
   |                   ^^^^^^^^^^

src/Network/Wai/Predicate/MediaType.hs:28:19: error:
    • Couldn't match type ‘text-1.2.2.2:Data.Text.Internal.Text’
                     with ‘[Char]’
      Expected type: String
        Actual type: Demote Symbol
    • In the first argument of ‘pack’, namely ‘(fromSing s)’
      In the expression: pack (fromSing s)
      In an equation for ‘f’: f _ s = pack (fromSing s)
   |
28 |     f _ s = pack (fromSing s)
   |                   ^^^^^^^^^^