mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Add text conversion for Category
This commit is contained in:
parent
df2fbfe060
commit
117a131fc3
@ -1,8 +1,10 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# OPTIONS_GHC -funbox-strict-fields #-}
|
||||
module Category where
|
||||
|
||||
import Prologue
|
||||
import Test.QuickCheck hiding (Args)
|
||||
import Data.Text (pack)
|
||||
import Data.Text.Arbitrary()
|
||||
|
||||
-- | A standardized category of AST node. Used to determine the semantics for
|
||||
@ -132,6 +134,9 @@ data Category
|
||||
|
||||
instance Hashable Category
|
||||
|
||||
instance (StringConv Category Text) where
|
||||
strConv _ = pack . show
|
||||
|
||||
instance Arbitrary Category where
|
||||
arbitrary = oneof [
|
||||
pure Program
|
||||
|
Loading…
Reference in New Issue
Block a user