]> Git — Sourcephile - webc.git/blob - tests/Examples/E01.hs
impl: remove unused initial algebra
[webc.git] / tests / Examples / E01.hs
1 {-# LANGUAGE DeriveGeneric #-}
2 {-# LANGUAGE NoMonomorphismRestriction #-}
3 {-# OPTIONS_GHC -Wno-missing-signatures #-}
4
5 module Examples.E01 where
6
7 import Relude
8 import Symantic.Classes (SumFunctor (..), adt)
9 import Webc
10
11 data Site
12 = Index
13 | About
14 | Contact
15 deriving (Eq, Show, Generic)
16
17 site =
18 -- Using Generic, 'adt' derives (Iso{a2b, b2a} <%>)
19 -- from the 'Site' algebraic datatype
20 adt @Site $
21 slug "index.html"
22 <+> slug "about.html"
23 <+> slug "contact.html"