Open Browser From Haskell Interpreter
I've been messing around a lot with oeis.org, I found a module on Hackage that provides an interface to oeis.org (Math.OEIS), but it displays its results on the command line. I was won开发者_Python百科dering if anyone knew how to go about opening a url in the default browser from ghci.
Thanks
Here's what I use:
-- | Attempt to open a web browser on the given url, all platforms.
openBrowserOn :: String -> IO ExitCode
https://hackage.haskell.org/package/hledger-1.22.2/docs/src/Hledger.Cli.Utils.html#openBrowserOn
20110630: see wai-handler-launch (blog post) for more robust code.
精彩评论