[Haskell-beginners] How do you show a Data.ByteArray?
David McBride
toad3k at gmail.com
Sun Aug 28 23:08:19 UTC 2016
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 at 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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160828/03e8955f/attachment.html>
More information about the Beginners
mailing list