{-# LANGUAGE QuasiQuotes #-} import Data.List (elemIndex) import Text.Hamlet (shamlet, Html) import Text.Cassius (Css, renderCss, cassius) import Text.Blaze.Html.Renderer.String (renderHtml) import System.Random (getStdGen, randomRs) styles :: p -> Css styles = [cassius| table, th, td border: 1px solid black border-collapse: collapse th, td padding: 15px th, .rowLabel background-color: #895 td text-align: right |] renderTable :: [[Int]] -> Html renderTable xs = [shamlet| $doctype 5