]> Git — Sourcephile - webc.git/blob - tests/Utils.hs
build: update dependencies
[webc.git] / tests / Utils.hs
1 {-# LANGUAGE UndecidableInstances #-}
2
3 module Utils where
4
5 import Relude
6 import Symantic qualified as Sym
7
8 import Examples.Ex02 qualified as Ex02
9
10 import Webc
11
12 -- | Gather symantics used by the tests
13 -- to instantiate multiple interpreters
14 -- on the same quantified 'repr'.
15 class
16 ( Sym.Inferable Ex02.Tag (Sym.Reader Ex02.Model repr)
17 , Sym.IsoFunctor repr
18 , Sym.Optionable repr
19 , Sym.ProductFunctor repr
20 , Sym.Repeatable repr
21 , Sym.SumFunctor repr
22 , Endable repr
23 , Slugable repr
24 -- , Fileable repr
25 ) =>
26 Testable model repr
27
28 instance
29 ( Sym.Inferable Ex02.Tag (Sym.Reader Ex02.Model repr)
30 , Sym.IsoFunctor repr
31 , Sym.Optionable repr
32 , Sym.ProductFunctor repr
33 , Sym.Repeatable repr
34 , Sym.SumFunctor repr
35 , Endable repr
36 , Slugable repr
37 -- , Fileable repr
38 ) =>
39 Testable model repr
40
41 ol :: [a] -> [(Int, a)]
42 ol = zip [1 ..]