File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 " functors" ,
2424 " generics-rep" ,
2525 " globals" ,
26- " graphs" ,
2726 " identity" ,
28- " inject" ,
2927 " integers" ,
3028 " lazy" ,
3129 " math" ,
3230 " maybe" ,
33- " monoid" ,
3431 " ordered-collections" ,
3532 " prelude" ,
3633 " profunctor" ,
4037 " record" ,
4138 " refs" ,
4239 " semirings" ,
43- " sets" ,
4440 " st" ,
4541 " strings" ,
4642 " tailrec" ,
Original file line number Diff line number Diff line change 11module TryPureScript
22 ( Inline
33 , Doc
4- , DOM
54 , text
65 , p
76 , link
@@ -19,29 +18,23 @@ module TryPureScript
1918 ) where
2019
2120import Prelude
22- import Control.Monad.Eff (kind Effect , Eff )
2321import Data.Foldable (class Foldable , foldMap )
2422import Data.String (joinWith )
25- import Data.Monoid ( class Monoid )
23+ import Effect ( Effect )
2624
27- foreign import data DOM :: Effect
28-
29- foreign import setInnerHTML
30- :: forall eff
31- . String
32- -> Eff (dom :: DOM | eff ) Unit
25+ foreign import setInnerHTML :: String -> Effect Unit
3326
3427foreign import encode :: String -> String
3528
3629foreign import withConsoleImpl
37- :: forall eff a
38- . Eff eff a
39- -> Eff eff (Array String )
30+ :: forall a
31+ . Effect a
32+ -> Effect (Array String )
4033
4134withConsole
42- :: forall eff a
43- . Eff eff a
44- -> Eff eff Doc
35+ :: forall a
36+ . Effect a
37+ -> Effect Doc
4538withConsole f = map toDoc (withConsoleImpl f) where
4639 toDoc = Doc <<< tag' " pre" <<< tag' " code" <<< joinWith " \n "
4740
@@ -73,7 +66,7 @@ newtype Doc = Doc String
7366unDoc :: Doc -> String
7467unDoc (Doc html) = html
7568
76- render :: forall eff . Doc -> Eff ( dom :: DOM | eff ) Unit
69+ render :: Doc -> Effect Unit
7770render (Doc html) = setInnerHTML html
7871
7972derive newtype instance semigroupDoc :: Semigroup Doc
You can’t perform that action at this time.
0 commit comments