-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprecation warning for import qualified syntax
- Loading branch information
Showing
12 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,7 @@ data SimpleErrorMessage | |
| UnusedExplicitImport ModuleName [String] | ||
| UnusedDctorImport ProperName | ||
| UnusedDctorExplicitImport ProperName [ProperName] | ||
| DeprecatedQualifiedSyntax ModuleName ModuleName | ||
deriving (Show) | ||
|
||
-- | Error message hints, providing more detailed information about failure. | ||
|
@@ -275,6 +276,7 @@ errorCode em = case unwrapErrorMessage em of | |
UnusedExplicitImport{} -> "UnusedExplicitImport" | ||
UnusedDctorImport{} -> "UnusedDctorImport" | ||
UnusedDctorExplicitImport{} -> "UnusedDctorExplicitImport" | ||
DeprecatedQualifiedSyntax{} -> "DeprecatedQualifiedSyntax" | ||
|
||
|
||
-- | | ||
|
@@ -692,6 +694,10 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError | |
paras [ line $ "The import of type " ++ runProperName name ++ " includes the following unused data constructors:" | ||
, indent $ paras $ map (line .runProperName) names ] | ||
|
||
renderSimpleErrorMessage (DeprecatedQualifiedSyntax name qualName) = | ||
paras [ line $ "The import of type " ++ runModuleName name ++ " as " ++ runModuleName qualName ++ " uses the deprecated 'import qualified' syntax." | ||
, line $ "This syntax form will be removed in PureScript 0.9." ] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
garyb
Author
Member
|
||
|
||
renderHint :: ErrorMessageHint -> Box.Box -> Box.Box | ||
renderHint (ErrorUnifyingTypes t1 t2) detail = | ||
paras [ detail | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.9 or 0.8?