mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-11 08:55:23 +03:00
Remove long-deprecated abstract
This commit is contained in:
parent
a2e981ed80
commit
0cfc98cf79
@ -31,6 +31,7 @@
|
||||
intMax : IO Int
|
||||
intMax = foreign FFI_C "#INT_MAX" (IO Int)
|
||||
```
|
||||
+ The deprecated `abstract` keyword has been removed.
|
||||
|
||||
## Library Updates
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
module btree
|
||||
|
||||
abstract data BTree a = Leaf
|
||||
| Node (BTree a) a (BTree a)
|
||||
export data BTree a = Leaf
|
||||
| Node (BTree a) a (BTree a)
|
||||
|
||||
abstract
|
||||
export
|
||||
insert : Ord a => a -> BTree a -> BTree a
|
||||
insert x Leaf = Node Leaf x Leaf
|
||||
insert x (Node l v r) = if (x < v) then (Node (insert x l) v r)
|
||||
else (Node l v (insert x r))
|
||||
|
||||
abstract
|
||||
export
|
||||
toList : BTree a -> List a
|
||||
toList Leaf = []
|
||||
toList (Node l v r) = btree.toList l ++ (v :: btree.toList r)
|
||||
|
||||
abstract
|
||||
export
|
||||
toTree : Ord a => List a -> BTree a
|
||||
toTree [] = Leaf
|
||||
toTree (x :: xs) = insert x (toTree xs)
|
||||
|
@ -260,7 +260,7 @@ float = token . P.try $ P.float
|
||||
reservedIdentifiers :: HS.HashSet String
|
||||
reservedIdentifiers = HS.fromList
|
||||
[ "Type"
|
||||
, "abstract", "case", "class", "codata", "constructor", "corecord", "data"
|
||||
, "case", "class", "codata", "constructor", "corecord", "data"
|
||||
, "do", "dsl", "else", "export", "if", "implementation", "implicit"
|
||||
, "import", "impossible", "in", "infix", "infixl", "infixr", "instance"
|
||||
, "interface", "let", "mutual", "namespace", "of", "parameters", "partial"
|
||||
@ -531,12 +531,6 @@ accessibility'
|
||||
(fc, Msg "'public' is deprecated. Use 'public export' instead.")
|
||||
: parserWarnings ist }
|
||||
return Public
|
||||
<|> do fc <- extent $ reserved "abstract"
|
||||
ist <- get
|
||||
put ist { parserWarnings =
|
||||
(fc, Msg "The 'abstract' keyword is deprecated. Use 'export' instead.")
|
||||
: parserWarnings ist }
|
||||
return Frozen
|
||||
<|> do reserved "export"; return Frozen
|
||||
<|> do reserved "private"; return Private
|
||||
<?> "accessibility modifier"
|
||||
|
Loading…
Reference in New Issue
Block a user