purescript-contrib/purescript-uint

UInt constructor export for pattern matching

jamesdbrock opened this issue · 1 comments

It’s too bad we can’t pattern match on a literal UInt 2.

https://pursuit.purescript.org/packages/purescript-protobuf/2.1.1/docs/Protobuf.Internal.Runtime#t:FieldNumberInt

But if we did export the UInt constructor for pattern matching it wouldn't even make sense, because what happens when we pattern match on UInt (-2)? That’s right you know what happens.

I'm inclined to export the constructor and then write stern documentation about using only literals as the constructor argument, not expressions.