pat :: String -> (Either String Pattern, String)
--cpat _ | trace "J-1: " $ False  = undefined
  cpat [] = (Left "unexpected end of input", [])

cpat :: String -> (Either String Pattern, String)
cpat [] = (Left "unexpected end of input", [])
cpat [] = (Left "unexpected end of input", [])