Say I have such sum type
data YesOrNo = Yes | No
If somehow I have a value of this type in GHCI
>:t yOrN
yOrN :: YesOrNo
Is it possible to get the data type of this value so that I know if it's a Yes or a No?
Context:
I'm using a library that returns a sum type of 10+ types https://hackage.haskell.org/package/bson-0.3.2.3/docs/Data-Bson.html#t:Value
Now I have a value of this type, I would like to know which data type exactly is that value.