File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
plugins/default/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1- {-# LANGUAGE ViewPatterns #-}
21{-# LANGUAGE DeriveAnyClass #-}
32{-# LANGUAGE DeriveGeneric #-}
43{-# LANGUAGE DuplicateRecordFields #-}
54{-# LANGUAGE OverloadedStrings #-}
5+ {-# LANGUAGE ViewPatterns #-}
66
77-- | Provides code actions to add missing pragmas (whenever GHC suggests to)
88module Ide.Plugin.Pragmas
@@ -115,10 +115,24 @@ findPragma str = concatMap check possiblePragmas
115115
116116-- | All language pragmas, including the No- variants
117117allPragmas :: [T. Text ]
118- allPragmas = concat
118+ allPragmas =
119+ concat
119120 [ [name, " No" <> name]
120121 | FlagSpec {flagSpecName = T. pack -> name} <- xFlags
121122 ]
123+ <>
124+ -- These pragmas are not part of xFlags as they are not reversable
125+ -- by prepending "No".
126+ [ -- Safe Haskell
127+ " Unsafe"
128+ , " Trustworthy"
129+ , " Safe"
130+
131+ -- Language Version Extensions
132+ , " Haskell98"
133+ , " Haskell2010"
134+ -- Maybe, GHC 2021 after its release?
135+ ]
122136
123137-- ---------------------------------------------------------------------
124138
You can’t perform that action at this time.
0 commit comments