Skip to content

GHC shouldn't expand constraint synonyms

{-# LANGUAGE ConstraintKinds #-}

type ShowX = Show

showX :: ShowX a => a -> String
showX = show

If I now ask for the type of showX, I get:

*Main> :t showX
showX :: Show a => a -> String
Trac metadata
Trac field Value
Version 7.8.2
Type FeatureRequest
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