diff --git a/backend-src/Miso.hs b/backend-src/Miso.hs deleted file mode 100644 index f433e014..00000000 --- a/backend-src/Miso.hs +++ /dev/null @@ -1,29 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE KindSignatures #-} ------------------------------------------------------------------------------ --- | --- Module : Miso --- Copyright : (C) 2016-2018 David M. Johnson --- License : BSD3-style (see the file LICENSE) --- Maintainer : David M. Johnson --- Stability : experimental --- Portability : non-portable ----------------------------------------------------------------------------- -module Miso - ( module Miso.Event - , module Miso.Html - , module Miso.Router - , module Miso.TypeLevel - , module Miso.Util - , module Miso.WebSocket - ) where - -import Miso.Event -import Miso.Html -import Miso.Router -import Miso.TypeLevel -import Miso.Util -import Miso.WebSocket diff --git a/backend-src/Miso/Html/Internal.hs b/backend-src/Miso/Html/Internal.hs deleted file mode 100644 index d04cb58e..00000000 --- a/backend-src/Miso/Html/Internal.hs +++ /dev/null @@ -1,303 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE TypeSynonymInstances #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ConstraintKinds #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE UndecidableInstances #-} ------------------------------------------------------------------------------ --- | --- Module : Miso.Html.Internal --- Copyright : (C) 2016-2018 David M. Johnson --- License : BSD3-style (see the file LICENSE) --- Maintainer : David M. Johnson --- Stability : experimental --- Portability : non-portable ----------------------------------------------------------------------------- -module Miso.Html.Internal ( - -- * Core types and interface - VTree (..) - , View (..) - , ToView (..) - , Attribute (..) - -- * Smart `View` constructors - , node - , text - , textRaw - -- * Key patch internals - , Key (..) - , ToKey (..) - -- * Namespace - , NS (..) - -- * Setting properties on virtual DOM nodes - , prop - -- * Setting CSS - , style_ - -- * Handling events - , on - , onWithOptions - -- * Life cycle events - , onCreated - , onDestroyed - , onBeforeDestroyed - ) where - -import Data.Aeson (Value(..), ToJSON(..)) -import qualified Data.Map as M -import Data.Proxy -import Data.String (IsString(..)) -import qualified Data.Text as T -import qualified Data.Vector as V -import qualified Lucid as L -import qualified Lucid.Base as L -import Prelude hiding (null) -import Servant.API - -import Miso.Event -import Miso.String hiding (map) - --- | Virtual DOM implemented as a Rose `Vector`. --- Used for diffing, patching and event delegation. --- Not meant to be constructed directly, see `View` instead. -data VTree action where - VNode :: { vType :: Text -- ^ Element type (i.e. "div", "a", "p") - , vNs :: NS -- ^ HTML or SVG - , vProps :: Props -- ^ Fields present on DOM Node - , vKey :: Maybe Key -- ^ Key used for child swap patch - , vChildren :: V.Vector (VTree action) -- ^ Child nodes - } -> VTree action - VText :: { vText :: Text -- ^ TextNode content - } -> VTree action - -- Invariant: To avoid complexity with collapsing mixed VText and - -- VTextRaw nodes, VTextRaw node is always the only child. - -- That's not a big limitation, since the intended purpose is to be able - -- to use