alexeevg / ipprint Goto Github PK
View Code? Open in Web Editor NEWTiny helper for pretty-printing values in ghci console
License: Other
Tiny helper for pretty-printing values in ghci console
License: Other
λ> IPPrint.pshow 2
" 2"
it :: String
λ> "hello"
"hello"
it :: [Char]
I noticed that pshow adds 4 spaces in front of the value, i'm used to the value being aligned to the left of the terminal. Is there any way to not have it print with 4 spaces in front of the value?
I'm using the numbers package in GHCI, and the output precision can be truncated when it passes through the parser. An example (without ipprint):
Prelude> import Data.Number.BigFloat
Prelude Data.Number.BigFloat> 0 :: BigFloat Prec50
0.00000000000000000000000000000000000000000000000000e0
I think the problem is that we can use this output to assign to a non-big float. That is,
Prelude> let x = 0.123456789012345678901234567890e0
Prelude> x
0.12345678901234568
Maybe there's something that can be done when precision of a number is greater than that of the default? For comparison, with ipprint,
λ. import Data.Number.BigFloat
λ. let x = 0.123456789012345678901234567890e0
λ. x
0.12345678901234568
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.