on master help sign in
Merge pull request #558 from ahmadsalim/feature/notypesaskeywords
c261501Edwin Brady
src/Core/CoreParser.hs+1−4
@@ -35,10 +35,7 @@ idrisDef = haskellDef {
35 "where", "with", "syntax", "proof", "postulate",
35 "where", "with", "syntax", "proof", "postulate",
36 "using", "namespace", "class", "instance",
36 "using", "namespace", "class", "instance",
37 "public", "private", "abstract", "implicit",
37 "public", "private", "abstract", "implicit",
38− "quoteGoal",
38+ "quoteGoal"]
39− "Int", "Integer", "Float", "Char", "String", "Ptr",
40− "Bits8", "Bits16", "Bits32", "Bits64",
41− "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
42 }
39 }
43
40
44-- | The characters allowed in operator names
41-- | The characters allowed in operator names
src/Idris/ParseExpr.hs+3−3
@@ -270,6 +270,9 @@ simpleExpr syn =
270 <|> tacticsExpr syn
270 <|> tacticsExpr syn
271 <|> caseExpr syn
271 <|> caseExpr syn
272 <|> do reserved "Type"; return PType
272 <|> do reserved "Type"; return PType
273+ <|> do c <- constant
274+ fc <- getFC
275+ return (modifyConst syn fc (PConstant c))
273 <|> do fc <- getFC
276 <|> do fc <- getFC
274 x <- fnName
277 x <- fnName
275 return (PRef fc x)
278 return (PRef fc x)
@@ -283,9 +286,6 @@ simpleExpr syn =
283 return (PAppBind fc s [])
286 return (PAppBind fc s [])
284 <|> do lchar '('
287 <|> do lchar '('
285 bracketed (disallowImp syn)
288 bracketed (disallowImp syn)
286− <|> do c <- constant
287− fc <- getFC
288− return (modifyConst syn fc (PConstant c))
289 <|> do symbol "_|_"
289 <|> do symbol "_|_"
290 fc <- getFC
290 fc <- getFC
291 return (PFalse fc)
291 return (PFalse fc)
src/Idris/ParseHelpers.hs+1−4
@@ -154,10 +154,7 @@ idrisStyle = IdentifierStyle _styleName _styleStart _styleLetter _styleReserved
154 "where", "with", "syntax", "proof", "postulate",
154 "where", "with", "syntax", "proof", "postulate",
155 "using", "namespace", "class", "instance", "parameters",
155 "using", "namespace", "class", "instance", "parameters",
156 "public", "private", "abstract", "implicit",
156 "public", "private", "abstract", "implicit",
157− "quoteGoal",
157+ "quoteGoal"]
158− "Int", "Integer", "Float", "Char", "String", "Ptr",
159− "Bits8", "Bits16", "Bits32", "Bits64",
160− "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
161
158
162char :: MonadicParsing m => Char -> m Char
159char :: MonadicParsing m => Char -> m Char
163char = Chr.char
160char = Chr.char