Commit d7bc387b authored by James Laver's avatar James Laver

kill unused thermite interop and tidy up some warnings

parent 0859bf96
...@@ -103,7 +103,7 @@ instance encodeJsonSessions :: EncodeJson Sessions where ...@@ -103,7 +103,7 @@ instance encodeJsonSessions :: EncodeJson Sessions where
~> jsonEmptyObject ~> jsonEmptyObject
where where
encodeSessions :: Seq Session -> Json encodeSessions :: Seq Session -> Json
encodeSessions ss = fromArray $ encodeJson <$> (Seq.toUnfoldable ss) encodeSessions ss2 = fromArray $ encodeJson <$> (Seq.toUnfoldable ss2)
unSessions :: Sessions -> Array Session unSessions :: Sessions -> Array Session
......
...@@ -22,7 +22,6 @@ import Reactix.DOM.HTML (ElemFactory, text) ...@@ -22,7 +22,6 @@ import Reactix.DOM.HTML (ElemFactory, text)
import Reactix.React (react, createDOMElement) import Reactix.React (react, createDOMElement)
import Reactix.SyntheticEvent as RE import Reactix.SyntheticEvent as RE
import Reactix.Utils (currySecond, hook, tuple) import Reactix.Utils (currySecond, hook, tuple)
import Thermite (Spec, simpleSpec, Render, defaultPerformAction)
import Unsafe.Coerce (unsafeCoerce) import Unsafe.Coerce (unsafeCoerce)
newtype Point = Point { x :: Number, y :: Number } newtype Point = Point { x :: Number, y :: Number }
...@@ -42,30 +41,17 @@ buff = unsafeCoerce ...@@ -42,30 +41,17 @@ buff = unsafeCoerce
scuff :: R.Element -> ReactElement scuff :: R.Element -> ReactElement
scuff = unsafeCoerce scuff = unsafeCoerce
class ToElement a where -- class ToElement a where
toElement :: a -> R.Element -- toElement :: a -> R.Element
instance toElementElement :: ToElement R.Element where -- instance toElementElement :: ToElement R.Element where
toElement = identity -- toElement = identity
instance toElementReactElement :: ToElement ReactElement where -- instance toElementReactElement :: ToElement ReactElement where
toElement = buff -- toElement = buff
instance toElementArray :: ToElement a => ToElement (Array a) where -- instance toElementArray :: ToElement a => ToElement (Array a) where
toElement = R.fragment <<< map toElement -- toElement = R.fragment <<< map toElement
{-
instance isReactElementElement :: IsReactElement R.Element where
toElement = scuff
-}
elSpec :: forall component props
. R.IsComponent component props (Array R.Element)
=> component -> Spec {} (Record props) Void
elSpec cpt = simpleSpec defaultPerformAction render
where
render :: Render {} (Record props) Void
render _ props _ children = [scuff $ R.createElement cpt props (buff <$> children)]
createElement' :: forall required given createElement' :: forall required given
. ReactPropFields required given . ReactPropFields required given
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment