primitive (byte) string literal with length?

Viktor Dukhovni ietf-dane at dukhovni.org
Tue Aug 24 04:32:08 UTC 2021


Is there any GHC syntax for constructing a primitive string literal with a known (not hand coded) byte count?
With `"some bytes"#` I get just the `Addr#` pointer, but not the size.

If there's nothing available, would it be reasonable to introduce a new syntax?
Perhaps:

	"some bytes"## :: (# Addr#, Int# #)

-- 
	Viktor.



More information about the ghc-devs mailing list