We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4848fb1 commit c1f12c8Copy full SHA for c1f12c8
recipes/ValueBasedJsonCodecLog/src/Main.purs
@@ -18,7 +18,7 @@ import Data.String (splitAt)
18
import Data.TraversableWithIndex (forWithIndex)
19
import Effect (Effect)
20
import Effect.Console (log, logShow)
21
-import Partial.Unsafe (unsafeCrashWith, unsafePartial)
+import Partial.Unsafe (unsafeCrashWith)
22
23
main :: Effect Unit
24
main = do
@@ -47,7 +47,7 @@ main = do
47
log $ stringify $ encode entireRecordCodec exampleValue
48
49
exampleJson :: Json
50
-exampleJson = unsafePartial $ (fromRight' \_ -> unsafeCrashWith "got Left: bad parser") $ jsonParser
+exampleJson = fromRight' (\_ -> unsafeCrashWith "got Left: bad parser") $ jsonParser
51
"""
52
{
53
"string":"string value",
0 commit comments