Skip to content
  • Ben Gamari's avatar
    Give seq a more precise type and remove magic · 08d595c0
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    `GHC.Prim.seq` previously had the rather plain type:
    
        seq :: forall a b. a -> b -> b
    
    However, it also had a special typing rule to applications
    where `b` is not of kind `Type`.
    
    Issue #17440 noted that levity polymorphism allows us to rather give
    it the more precise type:
    
        seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
    
    This allows us to remove the special typing rule that we previously
    required to allow applications on unlifted arguments. T9404 contains a
    non-Type application of `seq` which should verify that this works as
    expected.
    
    Closes #17440.
    08d595c0