Skip to content

What fixity does `~` has?

Prelude Data.Type.Equality> :i :~:
...
infix 4 :~:

yet

Prelude Data.Type.Equality> :i (~)
...
-- says nothing

I'd expect them to have similar fixity.

Having ~ bind less tight then e.g. GHC.TypeLits.+ (infixl 6) would be very nice.

Prelude Data.Type.Equality GHC.TypeLits> :kind! 5 + 5 :~: 10
5 + 5 :~: 10 :: *
= 10 :~: 10
Prelude Data.Type.Equality GHC.TypeLits> :kind! 5 + 5 ~ 10

<interactive>:1:5: error:
     Expected kind Nat, but 5 ~ 10 has kind Constraint
     In the second argument of (+), namely 5 ~ 10
      In the type 5 + 5 ~ 10
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information