From 5a9ca5c89aa32331450609e13aab1cfb56d9020b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 25 Jan 2019 10:30:03 -0800 Subject: Implement a basic mock-up of IBB --- ibb/Main.hs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- ibb/default.nix | 42 +++++++++++++++++----------------- ibb/ibb.cabal | 25 +++++++++++++++++++++ ibb/shell.nix | 5 ----- 4 files changed, 115 insertions(+), 27 deletions(-) create mode 100644 ibb/ibb.cabal delete mode 100644 ibb/shell.nix (limited to 'ibb') diff --git a/ibb/Main.hs b/ibb/Main.hs index e552769..48e93b1 100644 --- a/ibb/Main.hs +++ b/ibb/Main.hs @@ -1,4 +1,72 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + module Main where +import Web.Scotty (ActionM, scotty, get, html) +import Text.Blaze.Html.Renderer.Text (renderHtml) +import Text.Hamlet (shamlet) +import Text.Blaze.Html (Html) +import Text.Blaze (Markup) +import Data.Monoid (mconcat) + +render :: Html -> ActionM () +render = html . renderHtml + main :: IO () -main = putStrLn "Hello World" +main = scotty 3000 $ + get "/" $ render steveJobs + +steveJobs :: Markup +steveJobs = [shamlet| + +