1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# OPTIONS_GHC -Wno-missing-signatures #-}
4 module Examples.Ex01 where
6 import Control.Monad (Monad (..))
7 import Data.Text (Text)
9 import Symantic qualified as Sym
11 -- | Polymorphic expression describing the website,
12 -- to be instantiated to the various interpreters.
13 -- NoMonomorphismRestriction is used to avoid specifying manually
14 -- the inferred symantic classes.
16 pathSegment "index" <.> response @Text @'[PlainText]
17 <+> "about" </> pathSegment "me"
20 (Sym.endpoint (return "INDEX"), return "ABOUT")