Why does ghci desugar type lists and type families? Can this be selectively disabled?

The workaround that I know of is using :kind. For instance,

ghci> :kind (Container ‘[String,String,String,String,String])

Gives:

( Container ‘[String,String,String,String,String]) :: *

While

ghci> :kind! (Container ‘[String,String,String,String,String])

Will print something like this:

Container

((‘:)

  *
  [Char]
  ((':)
     * [Char] ((':) * [Char] ((':) * [Char] ((':) * [Char] ('[] *))))))

Officially, of course, you’re asking ghci a different question with kind, but it works. Using undefined :: is sort of a workaround anyhow, so I thought this might suffice.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)