[GHC] #15771: Could there be further refactoring to the `seq` typing rule

GHC ghc-devs at haskell.org
Thu Oct 18 08:45:39 UTC 2018


#15771: Could there be further refactoring to the `seq` typing rule
-------------------------------------+-------------------------------------
           Reporter:  aspiwack       |             Owner:  (none)
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           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:
-------------------------------------+-------------------------------------
 Seq has a special cased typing rule. It's been greatly simplified in
 aab3c6d18416b3bc8e1378dfc4d485a9307ca5c7 . But there is still duplication,
 with a different rule applying when `seq` is used in infix position
 (unchanged in that commit), and when used in prefix position.

 Could there be a way to reduce code duplication here? I find it really
 hard to convince myself that both cases do the same thing.

 Though, really, given levity polymorphism, does `seq` need a special
 typing rule at all anymore?

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15771>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list