mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-14 07:51:12 +03:00
addresses the typo in 'delimiter'
This commit is contained in:
parent
44ed1db47c
commit
36ec976511
@ -644,7 +644,7 @@ symbolyId :: String -> Either Err (String, String)
|
|||||||
symbolyId r@('.':s)
|
symbolyId r@('.':s)
|
||||||
| s == "" = symbolyId0 r --
|
| s == "" = symbolyId0 r --
|
||||||
| isSpace (head s) = symbolyId0 r -- lone dot treated as an operator
|
| isSpace (head s) = symbolyId0 r -- lone dot treated as an operator
|
||||||
| isDelimeter (head s) = symbolyId0 r --
|
| isDelimiter (head s) = symbolyId0 r --
|
||||||
| otherwise = (\(s, rem) -> ('.':s, rem)) <$> symbolyId' s
|
| otherwise = (\(s, rem) -> ('.':s, rem)) <$> symbolyId' s
|
||||||
symbolyId s = symbolyId' s
|
symbolyId s = symbolyId' s
|
||||||
|
|
||||||
@ -722,8 +722,8 @@ layoutCloseOnlyKeywords = Set.fromList ["}"]
|
|||||||
delimiters :: Set Char
|
delimiters :: Set Char
|
||||||
delimiters = Set.fromList "()[]{},?;"
|
delimiters = Set.fromList "()[]{},?;"
|
||||||
|
|
||||||
isDelimeter :: Char -> Bool
|
isDelimiter :: Char -> Bool
|
||||||
isDelimeter ch = Set.member ch delimiters
|
isDelimiter ch = Set.member ch delimiters
|
||||||
|
|
||||||
reservedOperators :: Set String
|
reservedOperators :: Set String
|
||||||
reservedOperators = Set.fromList ["->", ":", "&&", "||"]
|
reservedOperators = Set.fromList ["->", ":", "&&", "||"]
|
||||||
|
@ -7,7 +7,7 @@ id x = x
|
|||||||
|
|
||||||
id2 = id . id
|
id2 = id . id
|
||||||
|
|
||||||
-- You need a space or delimeter char after the dot,
|
-- You need a space or delimiter char after the dot,
|
||||||
-- otherwise Unison assumes it's a rooted name - this will look for
|
-- otherwise Unison assumes it's a rooted name - this will look for
|
||||||
-- a term called `zonk` in the root:
|
-- a term called `zonk` in the root:
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user