You haven't actually decided what c is, just that it is some type that is an instance of the ByteArray class.

:i ByteArray

should show:
instance ByteArray ByteString
instance ByteArray Bytes
instance ByteArray ScrubbedBytes

try

print (c :: ByteString)
print (c :: ScrubbedBytes)


On Sun, Aug 28, 2016 at 6:56 PM, <haskell@verge.info.tm> wrote:
Prelude Data.ByteArray> c = Data.ByteArray.zero 20
Prelude Data.ByteArray> :type c
c :: ByteArray ba => ba
Prelude Data.ByteArray> c

<interactive>:38:1: error:
    • Ambiguous type variable ‘a0’ arising from a use of ‘print’

Uhm...

Prelude Data.ByteArray> index c 3

<interactive>:39:1: error:
    • Ambiguous type variable ‘a0’ arising from a use of ‘index’

I can't print a byte?
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners