packages feed

char-qq-0.1.1: library/CharQq/Pat.hs

module CharQq.Pat
where

import CharQq.Prelude


codepoint :: Char -> Pat
codepoint = LitP . IntegerL . fromIntegral . ord

codepoints :: [Char] -> Pat
codepoints = ListP . map codepoint

char :: Char -> Pat
char = LitP . CharL