Skip to content

Commit 2867382

Browse files
committed
Update TryPurescript code for core
1 parent 37adacd commit 2867382

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

staging/core/psc-package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
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",
@@ -40,7 +37,6 @@
4037
"record",
4138
"refs",
4239
"semirings",
43-
"sets",
4440
"st",
4541
"strings",
4642
"tailrec",

staging/core/src/TryPureScript.purs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module TryPureScript
22
( Inline
33
, Doc
4-
, DOM
54
, text
65
, p
76
, link
@@ -19,29 +18,23 @@ module TryPureScript
1918
) where
2019

2120
import Prelude
22-
import Control.Monad.Eff (kind Effect, Eff)
2321
import Data.Foldable (class Foldable, foldMap)
2422
import 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

3427
foreign import encode :: String -> String
3528

3629
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)
4033

4134
withConsole
42-
:: forall eff a
43-
. Eff eff a
44-
-> Eff eff Doc
35+
:: forall a
36+
. Effect a
37+
-> Effect Doc
4538
withConsole f = map toDoc (withConsoleImpl f) where
4639
toDoc = Doc <<< tag' "pre" <<< tag' "code" <<< joinWith "\n"
4740

@@ -73,7 +66,7 @@ newtype Doc = Doc String
7366
unDoc :: Doc -> String
7467
unDoc (Doc html) = html
7568

76-
render :: forall eff. Doc -> Eff (dom :: DOM | eff) Unit
69+
render :: Doc -> Effect Unit
7770
render (Doc html) = setInnerHTML html
7871

7972
derive newtype instance semigroupDoc :: Semigroup Doc

0 commit comments

Comments
 (0)