Re: [Haskell-cafe] Program used for debugging
On Thu, Dec 1, 2011 at 7:40 PM, Yves Parès limestr...@gmail.com wrote: Hey, What do you mostly use for debugging? Simple calls to Debug.Trace.trace? Hpc? Hood? I also wonder about 'type-debugging' Using ghci: For a top level expression: - if it is not compiling I can put in (or remove) a type decl and see how things change. - if it is compiling I can of course :t it But for internal expressions it can be quite hairy to figure out why what haskell thinks is the type of something and what I think dont match. So is there something like type-intellisense for haskell where if one hovers the mouse (maybe over a selection) haskell tells what type it finds there? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Program used for debugging
But for internal expressions it can be quite hairy to figure out why what haskell thinks is the type of something and what I think dont match. ^^ Just give the internal expression a type you know to be wrong, then GHC will display the infered type and say it doesn't match the one you wrote. 2011/12/2 Rustom Mody rustom.m...@parsci.com On Thu, Dec 1, 2011 at 7:40 PM, Yves Parès limestr...@gmail.com wrote: Hey, What do you mostly use for debugging? Simple calls to Debug.Trace.trace? Hpc? Hood? I also wonder about 'type-debugging' Using ghci: For a top level expression: - if it is not compiling I can put in (or remove) a type decl and see how things change. - if it is compiling I can of course :t it But for internal expressions it can be quite hairy to figure out why what haskell thinks is the type of something and what I think dont match. So is there something like type-intellisense for haskell where if one hovers the mouse (maybe over a selection) haskell tells what type it finds there? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] exhibit space at CeBIT Open Source 2012
Dear Haskellers, this might interest those not too far from Hannover, Germany: http://www.linux-magazine.com/Online/News/CeBIT-Open-Source-2012-Call-for-Projects CeBIT welcomes open source projects to Hannover, Germany! The show organization and Linux Magazine are calling for open source projects to apply for free exhibit space at CeBIT Open Source 2012. There is also a call for papers: http://www.linux-magazine.com/Online/News/CeBIT-2012-Call-for-Papers-Open-Source-Forum Best, Mathias ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] cabal install --hyperlink-source ?
Hello. I can do cabal install --enable-documentation which is nice because it does configure, build, haddock and copy in one go, but I don't see how to pass options from cabal install to cabal haddock (e.g., --hyperlink-source) Any hints appreciated, J.W. signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install --hyperlink-source ?
On 2 December 2011 16:13, Johannes Waldmann waldm...@imn.htwk-leipzig.dewrote: but I don't see how to pass options from cabal install to cabal haddock (e.g., --hyperlink-source) As it seems, it is not possible. http://stackoverflow.com/questions/2472630/enable-hyperlink-source-for-cabal-install -- Ozgur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: monad-control-0.3
Hello, I just released monad-control-0.3. The package for lifting control operations (like catch, bracket, mask, alloca, timeout, forkIO, modifyMVar, etc.) through monad transformers: http://hackage.haskell.org/package/monad-control-0.3 It has a new and improved API which is: * easier to understand by explicitly representing the monadic state using type families. * 60 times faster than the previous release! * more general because control operations can now, not only be lifted from IO, but from any base monad (ST, STM, etc.) I also released a new package: lifted-base: http://hackage.haskell.org/package/lifted-base-0.1 It provides lifted versions of functions from the base library. Currently it exports the following modules: * Control.Exception.Lifted * Control.Concurrent.Lifted * Control.Concurrent.MVar.Lifted * System.Timeout.Lifted These are just modules which people have needed in the past. If you need a lifted version of some function, just ask me to add it or send me a patch. Note that Peter Simons just discovered that these packages don't build with GHC-7.0.4 (https://github.com/basvandijk/monad-control/issues/3). I just committed some fixes which enable them to be build on GHC = 6.12.3. Hopefully I can release these fixes this weekend. Regards, Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3
On 3 December 2011 00:45, Bas van Dijk v.dijk@gmail.com wrote: * 60 times faster than the previous release! Here are some benchmark results that compare the original monad-peel, the previous monad-control-0.2.0.3 and the new monad-control-0.3: http://basvandijk.github.com/monad-control.html Note that the benchmarks use Bryan O'Sullivan's excellent new criterion-0.6 package. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Weird interaction between literate haskell, ghci and OverloadedStrings
Hi, I'm working on a literate haskell document (actually TeX, but the example below is just test) and I'm using ByteStrings in the code. I know I can do: ghci -XOverloadedStrings file.lhs or, after ghci is running I can do: Main :set -XOverloadedStrings but I'd like to embed a directive in the file so that when loaded in GHCi, I will automatically get OverloadedStrings. This is mainly so that it JustWorks(tm) when I pass the file on to someone else. Is there a way to do this? There is a short example file below. I'm using ghc-7.0.4 from Debian testing. Cheers, Erik --8--8--8--8-- {-# LANGUAGE OverloadedStrings #-} This is just text that that ghc/ghci should ignore import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BS Simple function: newlineCount :: ByteString - Int newlineCount bs = BS.foldl foldFun 0 bs where foldFun s ch = if ch == '\n' then s + 1 else s Once this file is loaded, I should be able to do this: newlineCount abcd\ncdead\nasdasd\n --8--8--8--8-- -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Weird interaction between literate haskell, ghci and OverloadedStrings
On 3 December 2011 16:18, Erik de Castro Lopo mle...@mega-nerd.com wrote: Hi, I'm working on a literate haskell document (actually TeX, but the example below is just test) and I'm using ByteStrings in the code. I know I can do: ghci -XOverloadedStrings file.lhs or, after ghci is running I can do: Main :set -XOverloadedStrings Add :set -XOverloadedStrings to a (possibly local) .ghci file? It doesn't contain it within the same document, but then if it's a local one you could also add :load file.lhs in there so that you just have to type ghci. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Weird interaction between literate haskell, ghci and OverloadedStrings
Ivan Lazar Miljenovic wrote: Add :set -XOverloadedStrings to a (possibly local) .ghci file? It doesn't contain it within the same document, but then if it's a local one you could also add :load file.lhs in there so that you just have to type ghci. Unfortunately, thats no better than telling people do: ghci -XOverloadedStrings file.lhs Probably worse actually. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe