diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2025-07-17 20:44:40 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2025-07-17 20:44:40 +0200 |
| commit | 49fcd0ca44bc3dd49019386543e32e2189d39c7f (patch) | |
| tree | 17831481698ca98abca4faccd39f4b3f57f3b34b /Toks.hs | |
| parent | ecdaa9511d277b8adca6928a40d1e48955894441 (diff) | |
| download | werge-49fcd0ca44bc3dd49019386543e32e2189d39c7f.tar.gz werge-49fcd0ca44bc3dd49019386543e32e2189d39c7f.tar.bz2 | |
clean up
Diffstat (limited to 'Toks.hs')
| -rw-r--r-- | Toks.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -15,11 +15,11 @@ unescape :: String -> String unescape [] = [] unescape ('\\':'\\':xs) = '\\' : unescape xs unescape ('\\':'n':xs) = '\n' : unescape xs -unescape ('\\':_) = error "bad escape?" +unescape ('\\':_) = error "bad escape on input" unescape (x:xs) = x : unescape xs markSpace :: String -> Tok -markSpace [] = error "wat" +markSpace [] = error "empty token" markSpace s@(c:_) | isSpace c = '.' : s | otherwise = '|' : s @@ -27,7 +27,7 @@ markSpace s@(c:_) unmarkSpace :: Tok -> String unmarkSpace ('.':s) = s unmarkSpace ('|':s) = s -unmarkSpace x = error "unwat" +unmarkSpace _ = error "bad space marking on input" space :: Tok -> Bool space ('.':_) = True |
