From 117a131fc3208aff7c84610eb99647a42f71ae65 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Wed, 9 Nov 2016 17:39:07 -0600 Subject: [PATCH] Add text conversion for Category --- src/Category.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Category.hs b/src/Category.hs index f7cca715f..dcc85712b 100644 --- a/src/Category.hs +++ b/src/Category.hs @@ -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