1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

Add missing arbitrary instances for Category constructors

This commit is contained in:
Rick Winfrey 2016-08-12 12:42:22 -05:00
parent 2d63f3f1f1
commit d226eacdfc

View File

@ -40,6 +40,8 @@ data Category
| IntegerLiteral
-- | A regex literal.
| Regex
-- | A return statement.
| Return
-- | A symbol literal.
| SymbolLiteral
-- | A template string literal.
@ -74,8 +76,6 @@ data Category
| Operator
-- | An object/dictionary/hash literal.
| Object
-- | A return statement.
| Return
-- | A throw statement.
| Throw
-- | A constructor statement, e.g. new Foo;
@ -116,6 +116,7 @@ instance Arbitrary Category where
, pure StringLiteral
, pure IntegerLiteral
, pure Regex
, pure Return
, pure SymbolLiteral
, pure TemplateString
, pure ArrayLiteral
@ -133,6 +134,13 @@ instance Arbitrary Category where
, pure Case
, pure Operator
, pure Object
, pure Throw
, pure Constructor
, pure Try
, pure Catch
, pure Finally
, pure Class
, pure Method
, Other <$> arbitrary
]