1 -- |
    2 -- Module      : Data.Text.Encoding.Utf32
    3 -- Copyright   : (c) 2008, 2009 Tom Harper,
    4 --               (c) 2009, 2010 Bryan O'Sullivan,
    5 --               (c) 2009 Duncan Coutts
    6 --
    7 -- License     : BSD-style
    8 -- Maintainer  : bos@serpentine.com, rtomharper@googlemail.com,
    9 --               duncan@haskell.org
   10 -- Stability   : experimental
   11 -- Portability : portable
   12 --
   13 -- Basic UTF-32 validation.
   14 module Data.Text.Encoding.Utf32
   15     (
   16       validate
   17     ) where
   18 
   19 import Data.Word (Word32)
   20 
   21 validate    :: Word32 -> Bool
   22 -- entered 10,866 timesvalidate x1 = x1 < 0xD800 || (x1 > 0xDFFF && x1 <= 0x10FFFF)
   23 {-# INLINE validate #-}