git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
clean up fix for #606
116668cMichael Ficarra
examples/passing/ReservedWords.purs+6−4
@@ -1,11 +1,13 @@
1+-- See https://github.com/purescript/purescript/issues/606
1module Main where
2module Main where
2
3
3 o :: { type :: String }
4 o :: { type :: String }
4− o = { type: "Done" }
5+ o = { type: "o" }
5
6
7+ p :: { type :: String }
6− p = o { type = o.type }
8+ p = o { type = "p" }
7
9
8 f :: forall r. { type :: String | r } -> String
10 f :: forall r. { type :: String | r } -> String
9− f { type = a } = a
11+ f { type = "p" } = "Done"
10
12
11− main = Debug.Trace.trace p.type
13+ main = Debug.Trace.trace $ f { type: p.type, foo: "bar" }
src/Language/PureScript/Parser/Common.hs+1−4
@@ -137,10 +137,7 @@ identifier = PT.identifier tokenParser
137-- Parse an identifier in a more permissive position
137-- Parse an identifier in a more permissive position
138--
138--
139identifierName :: P.Parsec String u String
139identifierName :: P.Parsec String u String
140−identifierName = lexeme $ do
140+identifierName = lexeme $ (:) <$> identStart <*> many identLetter
141− c <- identStart
142− cs <- many identLetter
143− return (c:cs)
144
141
145-- |
142-- |
146-- Parse a reserved word
143-- Parse a reserved word