Commit e195add1 authored by Rufflewind's avatar Rufflewind Committed by Ben Gamari
Browse files

Unquote ‘import’ in bad import error message

    In module ‘Prelude’:
      ‘True’ is a data constructor of ‘Bool’
    To import it use
      ‘import’ Prelude( Bool( True ) )

The quotes around `import` don't make any sense.

Test Plan: manual

Reviewers: austin, mpickering, bgamari

Reviewed By: mpickering, bgamari

Subscribers: dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D2935
parent d5cd505b
......@@ -1488,11 +1488,11 @@ badImportItemErrDataCon dataType_occ iface decl_spec ie
<+> text "is a data constructor of"
<+> quotes dataType
, text "To import it use"
, nest 2 $ quotes (text "import")
, nest 2 $ text "import"
<+> ppr (is_mod decl_spec)
<> parens_sp (dataType <> parens_sp datacon)
, text "or"
, nest 2 $ quotes (text "import")
, nest 2 $ text "import"
<+> ppr (is_mod decl_spec)
<> parens_sp (dataType <> text "(..)")
]
......
mod90.hs:3:16:
mod90.hs:3:16: error:
In module ‘Prelude’:
‘Left’ is a data constructor of ‘Either’
To import it use
import Prelude( Either( Left ) )
import Prelude( Either( Left ) )
or
import Prelude( Either(..) )
import Prelude( Either(..) )
......@@ -3,6 +3,6 @@ T10668.hs:3:27: error:
In module ‘Data.Type.Equality’:
‘Refl’ is a data constructor of ‘(:~:)’
To import it use
import Data.Type.Equality( (:~:)( Refl ) )
import Data.Type.Equality( (:~:)( Refl ) )
or
import Data.Type.Equality( (:~:)(..) )
import Data.Type.Equality( (:~:)(..) )
T5385.hs:3:16:
T5385.hs:3:16: error:
In module ‘T5385a’:
‘(:::)’ is a data constructor of ‘T’
To import it use
import T5385a( T( (:::) ) )
import T5385a( T( (:::) ) )
or
import T5385a( T(..) )
import T5385a( T(..) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment