Skip to content

Commit

Permalink
Import/export lists
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst committed Sep 20, 2022
1 parent 8532cd5 commit 24cda6d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions web/src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE CPP #-}

module Main where
module Main (main) where

import Miso hiding (go, set)

#ifndef __GHCJS__
import Language.Javascript.JSaddle.Warp as JSaddle
Expand All @@ -10,19 +12,18 @@ import qualified Network.Wai.Application.Static as Wai
import Network.WebSockets (defaultConnectionOptions)
#endif

import Control.Monad.State
import Control.Monad.State (evalState, gets, modify)
import Data.Generics.Labels ()
import Data.Map.Strict (Map, (!?))
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import GHC.Generics (Generic)
import Lens.Micro
import Miso hiding (go, set)
import Lens.Micro (Lens', set)
import Miso.String (MisoString, fromMisoString, ms, toLower)
import qualified Miso.String as Miso
import Prettyprinter.Render.Util.SimpleDocTree (SimpleDocTree (..), treeForm)
import Text.Pretty.Simple
import Text.Pretty.Simple (OutputOptions, StringOutputStyle (..), defaultOutputOptionsNoColor)
import Text.Pretty.Simple.Internal (Annotation (..), layoutString')

#ifndef __GHCJS__
Expand Down Expand Up @@ -142,9 +143,10 @@ example1 =
, "(FunTy (Box (CInterval {lowerBound = CNat 1, upperBound = CVar (Id \"n\" \"n_0\")}) (TyApp (TyCon "
, "(Id \"N\" \"N\")) (TyVar (Id \"n\" \"n_0\")))) (TyCon (Id \"Int\" \"Int\"))))]"
]
example2 = "Example 1 (\"text\", [] )"
-- from https://github.com/cdepillabout/pretty-simple/issues/64
example3 = ms $ show ("\DC1\205N\237\232s\225\232N\147K\173\RSE\201\EM" :: String)

-- example2 = "Example 1 (\"text\", [] )"
-- -- from https://github.com/cdepillabout/pretty-simple/issues/64
-- example3 = ms $ show ("\DC1\205N\237\232s\225\232N\147K\173\RSE\201\EM" :: String)

{- Wrappers around HTML elements -}

Expand Down

0 comments on commit 24cda6d

Please sign in to comment.