Commit f290fbe9 authored by Camil Staps's avatar Camil Staps 🍃

Remove ignored strictness annotations

parent 9b7cc134
......@@ -10,7 +10,7 @@ import Regex.Print
:: Regex
= Literal ![!Char!]
| CharacterClass !Bool ![!(!Char,!Char)!]
| CharacterClass !Bool ![!(Char,Char)!]
| Concat ![!Regex!]
| Any ![!Regex!]
| Repeated !Greediness !Int !(Maybe Int) !Regex
......
......@@ -161,7 +161,7 @@ singleChar [c:cs]
singleChar []
= Error "expected character"
charClass :: [!(!Char,!Char)!] [Char] -> MaybeErrorString ([!(!Char,!Char)!], [Char])
charClass :: [!(Char,Char)!] [Char] -> MaybeErrorString ([!(Char,Char)!], [Char])
charClass _ [] = Error "unclosed character class"
charClass cls=:[|_:_] [']':cs] = Ok (cls,cs)
charClass cls cs = (try_chars <|> shorthandClass cs) >>=
......@@ -172,7 +172,7 @@ where
['-':cs``] = (\(c2,cs) -> ([|(c1,c2)],cs)) <$> singleChar cs``
_ = Ok ([|(c1,c1)], cs`)
shorthandClass :: [Char] -> MaybeErrorString ([!(!Char,!Char)!], [Char])
shorthandClass :: [Char] -> MaybeErrorString ([!(Char,Char)!], [Char])
shorthandClass ['\\':c:cs] = case lookup c shorthand_classes of
Nothing = Error $ "unknown shorthand class \\" +++ {c}
(Just cc) = Ok (cc,cs)
......
......@@ -57,7 +57,7 @@ parens False s = toString s
(<+) infixr 5 :: a b -> String | toString a & toString b
(<+) x y = toString x + toString y
printCharClasses :: [!(!Char,!Char)!] -> [String]
printCharClasses :: [!(Char,Char)!] -> [String]
printCharClasses [|] = []
printCharClasses cs = case findShorthand shorthand_classes cs of
(Just (n,cs`)) = [n:printCharClasses cs`]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment