This repository was archived by the owner on Jul 25, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-39
lines changed
Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -176,34 +176,6 @@ parsing :: (Text -> t) -> Parser Text -> String -> Parser (t, Location)
176176parsing constructor parser description = do
177177 start <- getPosition
178178 text <- parser <?> description
179- mapM_
180- (bailOnUnsupportedKeywords text)
181- [ " class"
182- , " data"
183- , " default"
184- , " deriving"
185- , " do"
186- , " forall"
187- , " import"
188- , " infix"
189- , " infixl"
190- , " infixr"
191- , " instance"
192- , " module"
193- , " if"
194- , " then"
195- , " else"
196- , " case"
197- , " newtype"
198- , " qualified"
199- , " type"
200- , " where"
201- , " foreign"
202- , " ccall"
203- , " as"
204- , " safe"
205- , " unsafe"
206- ]
207179 end <- getPosition
208180 pure
209181 ( constructor text
@@ -212,17 +184,6 @@ parsing constructor parser description = do
212184 (sourceColumn start)
213185 (sourceLine end)
214186 (sourceColumn end))
215- where
216- supportedKeywords = [" if" ," then" ," else" ]
217- bailOnUnsupportedKeywords text word =
218- when
219- (text == word)
220- (unexpected
221- (if elem word supportedKeywords
222- then " the keyword " ++ curlyQuotes (T. unpack word) ++ " isn't in the right place or is incomplete. Try adding a space after it?"
223- else (" “" ++ T. unpack word ++ " ”: that keyword isn't allowed, " ++ ext)))
224- where
225- ext = " but you could use this instead: " ++ T. unpack word ++ " _"
226187
227188parseNumbers :: [a ] -> Parser (Token , Location )
228189parseNumbers prespaces = parser <?> " number (e.g. 42, 3.141, etc.)"
You can’t perform that action at this time.
0 commit comments