Change the type of PGF.Lexing.bindTok to [String] -> [String]

The old type was [String] -> String. This function was only used
in GF.Text.Lexing.stringOp, which now uses (unwords . bindTok) instead,
with no change in behaviour.
This commit is contained in:
hallgren
2014-04-09 17:39:21 +00:00
parent 677d849840
commit 50ea3d265c
2 changed files with 6 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ stringOp name = case name of
"lexcode" -> Just $ appLexer lexCode "lexcode" -> Just $ appLexer lexCode
"lexmixed" -> Just $ appLexer lexMixed "lexmixed" -> Just $ appLexer lexMixed
"words" -> Just $ appLexer words "words" -> Just $ appLexer words
"bind" -> Just $ appUnlexer bindTok "bind" -> Just $ appUnlexer (unwords . bindTok)
"unchars" -> Just $ appUnlexer concat "unchars" -> Just $ appUnlexer concat
"unlextext" -> Just $ appUnlexer (unlexText . unquote) "unlextext" -> Just $ appUnlexer (unlexText . unquote)
"unlexcode" -> Just $ appUnlexer unlexCode "unlexcode" -> Just $ appUnlexer unlexCode

View File

@@ -30,12 +30,12 @@ unlexText = capitInit . unlext where
_ -> [] _ -> []
-- | Bind tokens separated by Prelude.BIND, i.e. &+ -- | Bind tokens separated by Prelude.BIND, i.e. &+
bindTok :: [String] -> String bindTok :: [String] -> [String]
bindTok ws = case ws of bindTok ws = case ws of
w:"&+":ws2 -> w ++ bindTok ws2 w1:"&+":w2:ws -> bindTok ((w1++w2):ws)
w:[] -> w "&+":ws -> bindTok ws
w:ws2 -> w ++ " " ++ bindTok ws2 w:ws -> w:bindTok ws
[] -> "" [] -> []
-- * Code lexing -- * Code lexing