Skip to content

Commit

Permalink
Fully merge backend-src and frontend-src (#654)
Browse files Browse the repository at this point in the history
* Move shared types to Miso.Html.Types module

* Make frontend Attribute type a superset of backend Attribute type

* Use frontend-src Attribute type for backend as well

* Move frontend-only orphans into Miso.Html.Types

* Drop duplicate backend-src AllowDrop type

* Merge View types into a single type

* Merge ToView classes

* Get rid of intermediate VTree in ToHtml View instance

* Move Html View instance into shared Miso.Html.Types module

* Drop trivial Miso.Html.Internal module from backend-src

* Move VTree and runView into shared Miso.Html.Types module

* Drop trivial Miso.Html.Internal module from frontend-src

* Move Miso.Delegate and Miso.Diff from frontend-src to src

* Merge separate Miso modules into single union

* Get rid of JSADDLE cpp
  • Loading branch information
tysonzero authored May 2, 2021
1 parent f38f28d commit 3395055
Show file tree
Hide file tree
Showing 18 changed files with 213 additions and 487 deletions.
29 changes: 0 additions & 29 deletions backend-src/Miso.hs

This file was deleted.

303 changes: 0 additions & 303 deletions backend-src/Miso/Html/Internal.hs

This file was deleted.

6 changes: 0 additions & 6 deletions ghcjs-src/Miso/String.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ module Miso.String (
, ms
) where

#if !defined(JSADDLE) || defined(__GHCJS__)
import Data.Aeson
#endif
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Char
Expand All @@ -42,9 +40,6 @@ import Prelude hiding (foldr)
-- | String type swappable based on compiler
type MisoString = JSString

#if !defined(JSADDLE) || defined(__GHCJS__)


-- | `ToJSON` for `MisoString`
instance ToJSON MisoString where
toJSON = String . textFromJSString
Expand All @@ -54,7 +49,6 @@ instance FromJSON MisoString where
parseJSON =
withText "Not a valid string" $ \x ->
pure (toMisoString x)
#endif

-- | Convenience class for creating `MisoString` from other string-like types
class ToMisoString str where
Expand Down
Loading

0 comments on commit 3395055

Please sign in to comment.