[GHC] #15084: Functions in HsUtils don't have the most general type

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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: -------------------------------------+------------------------------------- In 1aa1d405d8212a99ac24dcfd48024a17c3ffd296 the types of a lot of functions in `HsUtils` was changed and now they are too restrictive. For example, `nlHsfunTy` has the following type. {{{ nlHsFunTy :: LHsType (GhcPass p) -> Rig -> LHsType (GhcPass p) -> LHsType (GhcPass p) }}} It should instead be given the more general type which will allow it to work as before in many situations. {{{ nlHsFunTy :: (XFunTy p ~ PlaceHolder) => LHsType p -> Rig -> LHsType p -> LHsType p }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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): Alan/Shayan should say, but I think using `GhcPass p` rather than `p` might do the job more simply -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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): It breaks downstream consumers such as Haddock which ends up with `LHsType DocStringI`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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: | -------------------------------------+------------------------------------- Changes (by alanz): * cc: alanz (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 bgamari): We should try to sort this out. Alanz, is Matthew's suggested type okay with you? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 alanz): Yes, I am fine with this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15084: Functions in HsUtils don't have the most general type -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 bgamari): Yikes, there are a lot of these. Do we really want to generalize everything in this module? These constraints are going to get quite noisy. Yuck. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15084#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC