File tree Expand file tree Collapse file tree 2 files changed +9
-20
lines changed Expand file tree Collapse file tree 2 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 23
23
" functors" ,
24
24
" generics-rep" ,
25
25
" globals" ,
26
- " graphs" ,
27
26
" identity" ,
28
- " inject" ,
29
27
" integers" ,
30
28
" lazy" ,
31
29
" math" ,
32
30
" maybe" ,
33
- " monoid" ,
34
31
" ordered-collections" ,
35
32
" prelude" ,
36
33
" profunctor" ,
40
37
" record" ,
41
38
" refs" ,
42
39
" semirings" ,
43
- " sets" ,
44
40
" st" ,
45
41
" strings" ,
46
42
" tailrec" ,
Original file line number Diff line number Diff line change 1
1
module TryPureScript
2
2
( Inline
3
3
, Doc
4
- , DOM
5
4
, text
6
5
, p
7
6
, link
@@ -19,29 +18,23 @@ module TryPureScript
19
18
) where
20
19
21
20
import Prelude
22
- import Control.Monad.Eff (kind Effect , Eff )
23
21
import Data.Foldable (class Foldable , foldMap )
24
22
import Data.String (joinWith )
25
- import Data.Monoid ( class Monoid )
23
+ import Effect ( Effect )
26
24
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
33
26
34
27
foreign import encode :: String -> String
35
28
36
29
foreign 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 )
40
33
41
34
withConsole
42
- :: forall eff a
43
- . Eff eff a
44
- -> Eff eff Doc
35
+ :: forall a
36
+ . Effect a
37
+ -> Effect Doc
45
38
withConsole f = map toDoc (withConsoleImpl f) where
46
39
toDoc = Doc <<< tag' " pre" <<< tag' " code" <<< joinWith " \n "
47
40
@@ -73,7 +66,7 @@ newtype Doc = Doc String
73
66
unDoc :: Doc -> String
74
67
unDoc (Doc html) = html
75
68
76
- render :: forall eff . Doc -> Eff ( dom :: DOM | eff ) Unit
69
+ render :: Doc -> Effect Unit
77
70
render (Doc html) = setInnerHTML html
78
71
79
72
derive newtype instance semigroupDoc :: Semigroup Doc
You can’t perform that action at this time.
0 commit comments