I'd like something like the following:
constrName :: Data a=> a -> String
constrName = showConstr . toConstr
But for GHC.Generics
. I see the Constructor
class, but don't see any instances in scope. I'm using base-4.8.1.0
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…