[GHC] #11610: Remove IEThingAll constructor from IE datatype

#11610: Remove IEThingAll constructor from IE datatype -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- It seems that now `IEThingWith` can include a wildcard that the `IEThingAll` constructor is a special case. I'm not sure how involved this would be but it seems worth doing. {{{ | IEThingAll (Located name) -- ^ Class/Type plus all methods/constructors -- -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen', -- 'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose', -- 'ApiAnnotation.AnnType' -- For details on above see note [Api annotations] in ApiAnnotation -- See Note [Located RdrNames] in HsExpr | IEThingWith (Located name) IEWildcard [Located name] [Located (FieldLbl name)] -- ^ Class/Type plus some methods/constructors -- and record fields; see Note [IEThingWith] -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen', -- 'ApiAnnotation.AnnClose', -- 'ApiAnnotation.AnnComma', -- 'ApiAnnotation.AnnType' -- For details on above see note [Api annotations] in ApiAnnotation }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11610 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11610: Remove IEThingAll constructor from IE datatype -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I'm dubious about the benefit. It'll need special treatment regardless. Do we allow wildcards in exports lists today? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11610#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11610: Remove IEThingAll constructor from IE datatype -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Yes, Today you can write {{{#!hs {-# LANGUAGE PatternSynonyms #-} module Foo(T(.., P)) where data T = T pattern P :: T pattern P = T }}} which is documented here - http://downloads.haskell.org/~ghc/8.0.1-rc2/docs/html/users_guide/glasgow_ex... #import-and-export-of-pattern-synonyms -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11610#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11610: Remove IEThingAll constructor from IE datatype -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Ah I see. So you propose to kill off `IEThingAll n` in favour of `IEThingWith n IEWildCard [] []`. Yes that seems fine. Better make certain that the behaviour is identical but it jolly well ought to be. Meanwhile, could you also add a comment with {{{ data IEWildcard = NoIEWildcard | IEWildcard Int deriving (Eq, Data, Typeable) }}} What is this `Int`? Comment plus example. (I think it may indicate where the single `...` occurs in the list perhaps? Ditto in {{{ data ImpExpSubSpec = ImpExpAbs | ImpExpAll | ImpExpList [Located RdrName] | ImpExpAllWith [Located (Maybe RdrName)] }}} what is this `Maybe` doing? Perhaps `Nothing` indicates `..`? Might you add commentary and an example to explain? Data types are such a golden golden opportunity for comments :-). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11610#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11610: Remove IEThingAll constructor from IE datatype -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * keywords: => newcomer -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11610#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC