Skip to content

In ghci, :i leaves out parens in type

In ghci, :i sometimes leaves out parentheses in the type. For example, in Data.Stream,

Prelude Data.Stream> :i Stream

data Stream a where
  Stream :: forall a s.
            (Data.Stream.Unlifted s) =>
            !s -> Step a s -> !s -> Stream a
        -- Defined in Data.Stream

instance Functor Stream -- Defined in Data.Stream

Here the type

(Data.Stream.Unlifted s) => !s -> Step a s -> !s -> Stream a

should instead be

(Data.Stream.Unlifted s) => (!s -> Step a s) -> !s -> Stream a
Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information