What does the exclamation mark mean in this Haskell data declaration:
data Sample = First !Integer | Second !String
It makes this field strict - see here
if you add this to the field you make sure that the value is evaluated when you use the constructor - it's usually helpful to avoid space-leaks (from a huge thunk-chain)
if you use GHC8 you can have this by default if you use the Strict
or StrictData
pragma