mirror of
https://github.com/github/semantic.git
synced 2024-12-30 10:27:45 +03:00
Gotta use error
This commit is contained in:
parent
6a294827e2
commit
1c2abd36d0
@ -29,7 +29,7 @@ instance HasDefault Name where
|
||||
|
||||
instance Primitive Name where
|
||||
encodePrimitive num (Name text) = Encode.text num (LT.fromStrict text)
|
||||
encodePrimitive _ (I _) = fail "We should never be encoding I :: Name constructors"
|
||||
encodePrimitive _ (I _) = error "We should never be encoding I :: Name constructors"
|
||||
decodePrimitive = Name . LT.toStrict <$> Decode.text
|
||||
primType _ = Bytes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user