on master help sign in
Parse integer SIMD types
86b5a5bBenjamin Saunders
src/Core/CoreParser.hs+2−1
@@ -36,7 +36,8 @@ idrisDef = haskellDef {
36 "using", "namespace", "class", "instance",
36 "using", "namespace", "class", "instance",
37 "public", "private", "abstract", "implicit",
37 "public", "private", "abstract", "implicit",
38 "Int", "Integer", "Float", "Char", "String", "Ptr",
38 "Int", "Integer", "Float", "Char", "String", "Ptr",
39− "Bits8", "Bits16", "Bits32", "Bits64"]
39+ "Bits8", "Bits16", "Bits32", "Bits64",
40+ "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
40 }
41 }
41
42
42-- | The characters allowed in operator names
43-- | The characters allowed in operator names
src/Idris/Parser.hs+4
@@ -1149,6 +1149,10 @@ pConstant = do reserved "Integer";return (AType (ATInt ITBig))
1149 <|> do reserved "Bits16"; return (AType (ATInt (ITFixed IT16)))
1149 <|> do reserved "Bits16"; return (AType (ATInt (ITFixed IT16)))
1150 <|> do reserved "Bits32"; return (AType (ATInt (ITFixed IT32)))
1150 <|> do reserved "Bits32"; return (AType (ATInt (ITFixed IT32)))
1151 <|> do reserved "Bits64"; return (AType (ATInt (ITFixed IT64)))
1151 <|> do reserved "Bits64"; return (AType (ATInt (ITFixed IT64)))
1152+ <|> do reserved "Bits8x16"; return (AType (ATInt (ITVec IT8 16)))
1153+ <|> do reserved "Bits16x8"; return (AType (ATInt (ITVec IT16 8)))
1154+ <|> do reserved "Bits32x4"; return (AType (ATInt (ITVec IT32 4)))
1155+ <|> do reserved "Bits64x2"; return (AType (ATInt (ITVec IT64 2)))
1152 <|> try (do f <- float; return $ Fl f)
1156 <|> try (do f <- float; return $ Fl f)
1153 <|> try (do i <- natural; return $ BI i)
1157 <|> try (do i <- natural; return $ BI i)
1154 <|> try (do s <- strlit; return $ Str s)
1158 <|> try (do s <- strlit; return $ Str s)