on master help sign in
Remove long-deprecated `abstract`
0cfc98cJason Felice
CHANGELOG.md+1
@@ -31,6 +31,7 @@
31 intMax : IO Int
31 intMax : IO Int
32 intMax = foreign FFI_C "#INT_MAX" (IO Int)
32 intMax = foreign FFI_C "#INT_MAX" (IO Int)
33 ```
33 ```
34++ The deprecated `abstract` keyword has been removed.
34
35
35## Library Updates
36## Library Updates
36
37
samples/tutorial/BTreeMod.idr+5−5
@@ -1,20 +1,20 @@
1module btree
1module btree
2
2
3−abstract data BTree a = Leaf
3+export data BTree a = Leaf
4− | Node (BTree a) a (BTree a)
4+ | Node (BTree a) a (BTree a)
5
5
6−abstract
6+export
7insert : Ord a => a -> BTree a -> BTree a
7insert : Ord a => a -> BTree a -> BTree a
8insert x Leaf = Node Leaf x Leaf
8insert x Leaf = Node Leaf x Leaf
9insert x (Node l v r) = if (x < v) then (Node (insert x l) v r)
9insert x (Node l v r) = if (x < v) then (Node (insert x l) v r)
10 else (Node l v (insert x r))
10 else (Node l v (insert x r))
11
11
12−abstract
12+export
13toList : BTree a -> List a
13toList : BTree a -> List a
14toList Leaf = []
14toList Leaf = []
15toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
15toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
16
16
17−abstract
17+export
18toTree : Ord a => List a -> BTree a
18toTree : Ord a => List a -> BTree a
19toTree [] = Leaf
19toTree [] = Leaf
20toTree (x :: xs) = insert x (toTree xs)
20toTree (x :: xs) = insert x (toTree xs)
src/Idris/Parser/Helpers.hs+1−7
@@ -260,7 +260,7 @@ float = token . P.try $ P.float
260reservedIdentifiers :: HS.HashSet String
260reservedIdentifiers :: HS.HashSet String
261reservedIdentifiers = HS.fromList
261reservedIdentifiers = HS.fromList
262 [ "Type"
262 [ "Type"
263− , "abstract", "case", "class", "codata", "constructor", "corecord", "data"
263+ , "case", "class", "codata", "constructor", "corecord", "data"
264 , "do", "dsl", "else", "export", "if", "implementation", "implicit"
264 , "do", "dsl", "else", "export", "if", "implementation", "implicit"
265 , "import", "impossible", "in", "infix", "infixl", "infixr", "instance"
265 , "import", "impossible", "in", "infix", "infixl", "infixr", "instance"
266 , "interface", "let", "mutual", "namespace", "of", "parameters", "partial"
266 , "interface", "let", "mutual", "namespace", "of", "parameters", "partial"
@@ -531,12 +531,6 @@ accessibility'
531 (fc, Msg "'public' is deprecated. Use 'public export' instead.")
531 (fc, Msg "'public' is deprecated. Use 'public export' instead.")
532 : parserWarnings ist }
532 : parserWarnings ist }
533 return Public
533 return Public
534− <|> do fc <- extent $ reserved "abstract"
535− ist <- get
536− put ist { parserWarnings =
537− (fc, Msg "The 'abstract' keyword is deprecated. Use 'export' instead.")
538− : parserWarnings ist }
539− return Frozen
540 <|> do reserved "export"; return Frozen
534 <|> do reserved "export"; return Frozen
541 <|> do reserved "private"; return Private
535 <|> do reserved "private"; return Private
542 <?> "accessibility modifier"
536 <?> "accessibility modifier"