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:
parent
d80ea55a59
commit
c4c37914a0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user