Skip to content

syntax error in pretty-printed kind ascriptions

Program below; here's the output:

$ inplace/bin/ghc-stage1 -ddump-tc \
  -XNoMonomorphismRestriction -XTypeOperators test.hs
[1 of 1] Compiling Foo              ( test.hs, test.o )
TYPE SIGNATURES
    baz :: forall (** :: * -> * -> *) x. (Num x, Foo (**)) => (**) x x

Note how the first occurrence of (**) is missing parens.

Patch to fix it is attached.

Sample program:

module Foo
where
class Foo (**) where
  bar :: x -> x ** x
baz = bar 3
Trac metadata
Trac field Value
Version 7.0.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information