mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
CategorySet is Categorizable.
This commit is contained in:
parent
90b3da2291
commit
64c4787d81
@ -1,5 +1,6 @@
|
|||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
import Categorizable
|
||||||
import Diff
|
import Diff
|
||||||
import Patch
|
import Patch
|
||||||
import Range
|
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)
|
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
|
instance Arbitrary HTML where
|
||||||
arbitrary = oneof [
|
arbitrary = oneof [
|
||||||
Text <$> arbitrary,
|
Text <$> arbitrary,
|
||||||
|
Loading…
Reference in New Issue
Block a user