Hello,<div>I&#39;m working on a general text-processing library [1] and one of my quickcheck tests is designed to make sure that my library doesn&#39;t throw exceptions (it returns an Either type on failure). However, there are some inputs that cause me to pass bogus values to the &#39;chr&#39; function (such as 1208914), which causes it to throw an exception. Is there a version of that function that is safe? (I&#39;m hoping for something like Int -&gt; Maybe Char). Alternatively, is there a way to know ahead of time whether or not an Int will cause &#39;chr&#39; to throw an exception?</div>

<div><br></div><div>Thanks,</div><div>Myles C. Maxfield</div><div><br></div><div>[1] <a href="http://hackage.haskell.org/package/punycode">http://hackage.haskell.org/package/punycode</a></div>