on master help sign in
Merge pull request #558 from ahmadsalim/feature/notypesaskeywords

Removed types from keyword list

commitc261501d1e6f576028bb2a0d488670c0b174882a authorEdwin Brady <edwin.brady@gmail.com> dateWed 23 Oct 2013, 07:04 (13 years ago) parent89d0f5dd564e1d
3 files changed+5−11
src/Core/CoreParser.hs+1−4 src/Idris/ParseExpr.hs+3−3 src/Idris/ParseHelpers.hs+1−4
src/Core/CoreParser.hs+1−4
@@ -35,10 +35,7 @@ idrisDef = haskellDef {
3535 "where", "with", "syntax", "proof", "postulate",
3636 "using", "namespace", "class", "instance",
3737 "public", "private", "abstract", "implicit",
38− "quoteGoal",
39− "Int", "Integer", "Float", "Char", "String", "Ptr",
40− "Bits8", "Bits16", "Bits32", "Bits64",
41− "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
38+ "quoteGoal"]
4239 }
4340
4441-- | The characters allowed in operator names
src/Idris/ParseExpr.hs+3−3
@@ -270,6 +270,9 @@ simpleExpr syn =
270270 <|> tacticsExpr syn
271271 <|> caseExpr syn
272272 <|> do reserved "Type"; return PType
273+ <|> do c <- constant
274+ fc <- getFC
275+ return (modifyConst syn fc (PConstant c))
273276 <|> do fc <- getFC
274277 x <- fnName
275278 return (PRef fc x)
@@ -283,9 +286,6 @@ simpleExpr syn =
283286 return (PAppBind fc s [])
284287 <|> do lchar '('
285288 bracketed (disallowImp syn)
286− <|> do c <- constant
287− fc <- getFC
288− return (modifyConst syn fc (PConstant c))
289289 <|> do symbol "_|_"
290290 fc <- getFC
291291 return (PFalse fc)
src/Idris/ParseHelpers.hs+1−4
@@ -154,10 +154,7 @@ idrisStyle = IdentifierStyle _styleName _styleStart _styleLetter _styleReserved
154154 "where", "with", "syntax", "proof", "postulate",
155155 "using", "namespace", "class", "instance", "parameters",
156156 "public", "private", "abstract", "implicit",
157− "quoteGoal",
158− "Int", "Integer", "Float", "Char", "String", "Ptr",
159− "Bits8", "Bits16", "Bits32", "Bits64",
160− "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
157+ "quoteGoal"]
161158
162159char :: MonadicParsing m => Char -> m Char
163160char = Chr.char