1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Define a Listable newtype wrapping Text.

This commit is contained in:
Rob Rix 2017-01-05 14:59:39 -05:00
parent d80ea55a59
commit c4c37914a0

View File

@ -4,6 +4,7 @@ module Category where
import Prologue
import Test.QuickCheck hiding (Args)
import Data.Functor.Listable
import Data.Text (pack)
import Data.Text.Arbitrary()
@ -278,3 +279,8 @@ instance Arbitrary Category where
shrink (Other s) = Other <$> shrink s
shrink _ = []
newtype ListableText = ListableText { unListableText :: Text }
instance Listable ListableText where
tiers = cons1 (ListableText . pack)