{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
-- from the 'Route' algebraic data-type
-- a function transforming Eithers-of-Tuples into a 'Route'.
router =
- dataType @Route $
- pathSegment "index"
- <+> "about"
- </> pathSegment "me"
+ dataType @Route
+ $ pathSegment "index" -- <.> response @Char @'[PlainText]
+ <+> "about"
+ </> pathSegment "me"
+
+-- <. response2 @Char @'[PlainText]
content = \case
- Index -> return "INDEX"
+ -- In -> Out
+ Index{} -> return "INDEX"
About -> return "ABOUT"
+
+-- c0 = compile CompilerEnv{} router content
+
+address_IndexMe :: Address
+address_IndexMe = address router Index
+
+address_AboutMe :: Address
+address_AboutMe = address router About