Package

purescript-show-python

Repository
purescript-python/purescript-show-python
License
MIT
Uploaded by
thautwarm
Published on
2020-02-24T16:21:42Z

This is a library for accessing Python internal IO operations in PureScript.

Currently only work for PureScript-Python backend.

The generated Python package purescript_show_python can also be used in the Python side.

import Prelude
import Python.IO.Unsafe as Unsafe

newtype Box a = Box a

ops :: Effect Unit
ops = do
    Unsafe.printLn {a: 1} -- {"a": 1}
    Unsafe.printLn [1, 2] -- (1, 2)
    Unsafe.printLn $ Unsafe.repr "1" -- '1'
    Unsafe.printLn $ Unsafe.show "1" -- 1
    x <- Unsafe.show 1
    y <- Unsafe.show $ Box 1
    Unsafe.assert $ x == y
Modules
Python.IO.Unsafe
Dependencies