Skip to content

Instantly share code, notes, and snippets.

@agocorona
Last active August 29, 2015 14:27
Show Gist options
  • Save agocorona/e03a316123ff2ec0fe07 to your computer and use it in GitHub Desktop.
Save agocorona/e03a316123ff2ec0fe07 to your computer and use it in GitHub Desktop.
module Main where
import MFlow.Wai.Blaze.Html.All hiding( page)
import qualified MFlow.Wai.Blaze.Html.All as MF(page)
main= runNavigation "" $ transientNav testNav
testNav= do
page1
page2
page3
return ()
page1= page $ p << "THIS IS MY FIRST PAGE" ++> wlink () << p << "press"
page2= page $ p << "THIS IS MY SECOND PAGE" ++> wlink () << p << "press"
page3= page $ p << "THIS IS MY THIRD PAGE" ++> wlink () << p << "press"
page content= do
r <- MF.page $ (Left <$> topMenu) <|> (Right <$> content)
case r of
Left 1 -> page1
Left 2 -> page2
Left 3 -> page3
Right other -> return other
topMenu= wlink (1 ::Int) << p << "page1" <|>
wlink 2 << p << "page2" <|>
wlink 3 << p << "page3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment