Closed amesgen closed 1 year ago
@asarkar As you have been giving feedback on the old Ormolu Live version, I would be interested in your thoughts, in particular if you think that the new version resolves #951.
@amesgen Thanks for doing this, I’ll take a look later. One unrelated comment, can you display a verbiage on the page about the storage/usage of code that is being formatted? In other words, if you’re not saving any of the code or phoning home or using any part of it to train the tool, can you call it out, so that people formatting sensitive code know what to expect.
One unrelated comment, can you display a verbiage on the page about the storage/usage of code that is being formatted? In other words, if you’re not saving any of the code or phoning home or using any part of it to train the tool, can you call it out, so that people formatting sensitive code know what to expect.
Good point, I could imagine that it might even be illegal under the GDPR to send the data without explicit consent. I added this line:
Note that this website is entirely client-side; in particular, your input is never sent to a remote server.
I've had a chance to look at the new page, and here are my findings:
Input abc <- xs
results in:
<input>:1:5-6
The GHC parser (in Haddock mode) failed:
parse error on input `<-'
Now, while the last line does say what the problem is, this is an exception rather than the rule as Haskell is notorious for hard-to-understand compiler errors. Column 5 happens to be the beginning of <-
.
I've had a chance to look at the new page, and here are my findings:
Thanks, I just updated the site based on your findings with only slight deviations (ghc-lib-parser version is next to the commit link, and I left off point 3 for now, as I find it somewhat neat to be able to directly jump to the README).
LGTM :thumbsup:
it'll be helpful to show the column
Just want to say that this was a great idea. I pasted the following code at https://ormolu-live.tweag.io/:
module Chapter03.Lib () where
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
then_ :: Maybe a -> (a -> Maybe b) -> Maybe b
instance Monad Maybe where
return = Just
(>>=) = then_
-- Exercise3.1. Write the implementation of ap.
ap :: Monad m => m (b -> c) -> m b -> m c
ap f x = f >>= $ \f' -> x >>= $ \x' -> f' x'
and it failed with:
The GHC parser failed:
<input>:15:16
parse error on input `$'
However, column numbers aren't shown in the input, so, it's not immediately apparent which of the two $
is the problem. Thanks for implementing my suggestions.
New Ormolu Live based on the upcoming GHC WASM backend.
Closes #951
Test deployment at https://ormolu-live-testbed.netlify.app/
Diff is severly inflated by lockfile changes.