mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
CategorySet is Categorizable.
This commit is contained in:
parent
90b3da2291
commit
64c4787d81
@ -1,5 +1,6 @@
|
||||
module Main where
|
||||
|
||||
import Categorizable
|
||||
import Diff
|
||||
import Patch
|
||||
import Range
|
||||
@ -42,6 +43,12 @@ instance (Eq a, Eq annotation, Arbitrary a, Arbitrary annotation) => Arbitrary (
|
||||
|
||||
data CategorySet = A | B | C | D deriving (Eq, Show)
|
||||
|
||||
instance Categorizable CategorySet where
|
||||
categories A = Set.fromList [ "a" ]
|
||||
categories B = Set.fromList [ "b" ]
|
||||
categories C = Set.fromList [ "c" ]
|
||||
categories D = Set.fromList [ "d" ]
|
||||
|
||||
instance Arbitrary HTML where
|
||||
arbitrary = oneof [
|
||||
Text <$> arbitrary,
|
||||
|
Loading…
Reference in New Issue
Block a user