on master help sign in
Remove deprecated 'public' without 'export'
commit57b64a7f691ef251cb5a521c171361874cc49136 authorJason Felice <jason.m.felice@gmail.com> dateMon 4 Dec 2017, 13:48 (9 years ago) parente35d643
2 files changed+8−17
CHANGELOG.md+4−3 src/Idris/Parser/Helpers.hs+4−14
CHANGELOG.md+4−3
@@ -31,9 +31,10 @@
3131 intMax : IO Int
3232 intMax = foreign FFI_C "#INT_MAX" (IO Int)
3333 ```
34−+ The deprecated keywords `%assert_total`, `abstract`, and `[static]` have been
35− removed.
36−
34++ The deprecated keywords `%assert_total`, `abstract`, and `[static]` have
35+ been removed as well as the use of "public" instead of "public export" to
36+ expose a symbol.
37+
3738## Library Updates
3839
3940+ Removed `oldeffects` library from `libs` folder, use `effects` or `Control.ST` instead.
src/Idris/Parser/Helpers.hs+4−14
@@ -520,20 +520,10 @@ notOpenBraces = do ist <- get
520520
521521{- | Parses an accessibilty modifier (e.g. public, private) -}
522522accessibility' :: IdrisParser Accessibility
523−accessibility'
524− = do fc <- extent $ reserved "public"
525− gotexp <- optional (reserved "export")
526− case gotexp of
527− Just _ -> return ()
528− Nothing -> do
529− ist <- get
530− put ist { parserWarnings =
531− (fc, Msg "'public' is deprecated. Use 'public export' instead.")
532− : parserWarnings ist }
533− return Public
534− <|> do reserved "export"; return Frozen
535− <|> do reserved "private"; return Private
536− <?> "accessibility modifier"
523+accessibility' = Public <$ reserved "public" <* reserved "export"
524+ <|> Frozen <$ reserved "export"
525+ <|> Private <$ reserved "private"
526+ <?> "accessibility modifier"
537527
538528accessibility :: IdrisParser Accessibility
539529accessibility = do acc <- optional accessibility'