Re: More flexible literate Haskell extensions (Trac #9789), summary on wiki

2014-11-14 Thread Simon Hengel
On Fri, Nov 14, 2014 at 03:53:13PM +0800, Simon Hengel wrote: Can you explain why this would not solve your usecase? i.e., why would README.lhs.md not suffice? I haven't tried, but my assumption was that this is not picked up by GitHub. I just verified, GitHub dose not pick up

Re: More flexible literate Haskell extensions (Trac #9789), summary on wiki

2014-11-13 Thread Simon Hengel
to indicated that: * the proposal as it stands does not solve my use case * there are other ways to solve this (namely: using symlinks) Cheers, Simon Hengel ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org

Re: RFC: changes to -i flag for finding source files

2014-05-29 Thread Simon Hengel
Thanks for all the feedback. Clearly opinion is divided on this one, so I'll sit on it and think it through some more. My assumption was that with what Felipe Lessa suggested, this proposal is pretty much obsolete. As I understand it, it provides the same benefits, the major difference being

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Simon Hengel
I want to propose something really simple that would avoid this problem with minimal additional complexity: ghc -iGraphics.UI.Gtk=src the meaning of this flag is that when searching for modules, ghc will look for the module Graphics.UI.Gtk.Button in src/Button.hs, rather than

Re: ghc-7.6.2 breaks haddock interface...

2012-12-12 Thread Simon Hengel
Hi Joachim, On Wed, Dec 12, 2012 at 12:20:35AM +0100, Joachim Breitner wrote: there really a change to the on-disk format of the .haddock files? Yes, the on-disk format changed, hence the interface version was bumped from 21 to 22. But Haddock can still read files with interface version 21

Re: ghc-7.6.2 breaks haddock interface...

2012-12-12 Thread Simon Hengel
On Wed, Dec 12, 2012 at 12:30:10PM +0100, Joachim Breitner wrote: Hi Simon, Am Mittwoch, den 12.12.2012, 12:15 +0100 schrieb Simon Hengel: On Wed, Dec 12, 2012 at 12:20:35AM +0100, Joachim Breitner wrote: there really a change to the on-disk format of the .haddock files? Yes

Re: Extending GHCi

2012-12-04 Thread Simon Hengel
Now I'm wondering whether the approaches I have in mind are sensible or if anyone can think of a better way to achieve my goals? Is there a way to extend GHCi without copying some of its source code? Is there a chance of having these features flow back into mainline GHCi once they are

Re: Using DeepSeq for exception ordering

2012-11-13 Thread Simon Hengel
Sounds like a bug, -fpedantic-bottoms should work here. Please open a ticket. done [1]. [1] http://hackage.haskell.org/trac/ghc/ticket/7411 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: Using DeepSeq for exception ordering

2012-11-12 Thread Simon Hengel
Did you try -fpedantic-bottoms? I just tried. The exception (or seq?) is still optimized away. Here is what I tried: -- file Foo.hs import Control.Exception import Control.DeepSeq main = evaluate (('a' : undefined) `deepseq` return () :: IO ()) $ ghc -fforce-recomp

Re: Using DeepSeq for exception ordering

2012-11-08 Thread Simon Hengel
Hi Edward, thanks a lot for your reply. rnf can be thought of a function which produces a thunk (for unit) which, when forced, fully evaluates the function. With this in hand, it's pretty clear how to use evaluate to enforce ordering: evaluate (rnf ('a': throw exceptionA)) So if I

Using DeepSeq for exception ordering

2012-11-07 Thread Simon Hengel
Hi, I'm puzzled whether it is feasible to use existing NFData instances for exception ordering. Here is some code that won't work: return $!! 'a' : throw exceptionA throwIO exceptionB Here GHC makes a non-deterministic choice between exceptionA and exceptionB. The reason is that the

Re: Request for comments on proposal for literate programming using markdown

2012-08-14 Thread Simon Hengel
On Mon, Aug 13, 2012 at 03:20:53PM +, Philip Holzenspies wrote: I see some value in your proposal to replace GHC's unlit, mainly in terms of setting a common standard. Personally, I'd still feel more comfortable if that proposed standard would be developed as a Hackage package, so

Re: ANNOUNCE: GHC 7.6.1 Release Candidate 1

2012-08-14 Thread Simon Hengel
On Tue, Aug 14, 2012 at 03:47:18PM +0200, Christian Maeder wrote: Am 12.08.2012 21:57, schrieb Ian Lynagh: We are pleased to announce the first release candidate for GHC 7.6.1: http://www.haskell.org/ghc/dist/7.6.1-rc1/ This includes the source tarball, installers for 32bit and

Re: Request for comments on proposal for literate programming using markdown

2012-08-13 Thread Simon Hengel
On Mon, Aug 13, 2012 at 08:45:51AM +, Philip Holzenspies wrote: However, it's a bit of an overspec'd package to link into the compiler, don't you think? I did not mean to modify the Compiler. Unliting is done by an external program. This already allows you to customize unliting

Re: Request for comments on proposal for literate programming using markdown

2012-08-13 Thread Simon Hengel
On Mon, Aug 13, 2012 at 11:02:59AM +, Philip Holzenspies wrote: My proposal, however, is to replace the external unlit .. by code *inside* GHC. What is the benefit of doing so? Cheers, Simon ___ Glasgow-haskell-users mailing list

Re: Request for comments on proposal for literate programming using markdown

2012-08-13 Thread Simon Hengel
Hi Philip, On Mon, Aug 13, 2012 at 12:57:44PM +, Philip Holzenspies wrote: What is the benefit of doing so? - Simpler build environment - Easier to understand interaction and bugs resulting from them (viz. [1], [2]), because the interactions happen in the same domain - (as

Re: Request for comments on proposal for literate programming using markdown

2012-08-09 Thread Simon Hengel
Hi, On Thu, Aug 09, 2012 at 12:00:44PM +, Philip Holzenspies wrote: Dear GHC-ers, A little while ago, I submitted a new feature request on the Trac. I'm more than happy to build this myself, but I would like to get it right the first time, so I'm looking for comments from developers and

Re: Request for comments on proposal for literate programming using markdown

2012-08-09 Thread Simon Hengel
On Thu, Aug 09, 2012 at 01:07:10PM +, Philip Holzenspies wrote: I have looked at pandoc and I use it for quite a few things. Just to clarify, I was not talking about pandoc, but pandoc-unlit (which uses pandoc to unlit Markdown, see the README [1]). However, it's a bit of an overspec'd

Re: API for looking-up/retrieving Haddock comments?

2012-08-08 Thread Simon Hengel
I guess both items could be improved upon by extending GHCi to provide an additional `:def` facility tailored to Haskell symbols allowing to pass more meta-information (such as package and module information) into the resulting command string... would something like that have any chance of

Re: API for looking-up/retrieving Haddock comments?

2012-08-03 Thread Simon Hengel
I've been wondering if there have been attempts to provide some library/API or similiar facility (other than pointing your web-browser to the static Haddock HTML report) for looking up Haddock comments associated with Haskell symbols? As an obvious application: When coding in dynamic

How to force recompilation of preprocessed files (-F -pgmF ..)

2012-05-17 Thread Simon Hengel
Hi, I'm experimenting with a preprocessor to automatically generate test drivers[1]. The result depends on the existence of other files on the disk. When files are added or removed, the test driver has to be regenerated. Ideally ghc would just always recompile that single file (akin to make's

Re: How to force recompilation of preprocessed files (-F -pgmF ..)

2012-05-17 Thread Simon Hengel
Hi Etienne, thanks for your reply. You can use Template Haskell's addDependentFile to register a dependency on external files. http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile That's interesting. But from what

Re: GHCi and line numbers (with ghc-7.4.1)

2012-03-22 Thread Simon Hengel
ghc --interactive now behaves different in regards to line numbers in error messages than previous versions. They are now incremented with each evaluated expression. $ ghc --interactive -ignore-dot-ghci Prelude foo interactive:2:1: Not in scope: `foo' Prelude bar

GHCi and line numbers (with ghc-7.4.1)

2012-03-20 Thread Simon Hengel
Hi, ghc --interactive now behaves different in regards to line numbers in error messages than previous versions. They are now incremented with each evaluated expression. $ ghc --interactive -ignore-dot-ghci Prelude foo interactive:2:1: Not in scope: `foo' Prelude bar

Re: ANNOUNCE: GHC 7.4.1 Release Candidate 2

2012-02-01 Thread Simon Hengel
I just type runghc on everything and it seems like a lot of those don't have the executable bit set, so I hadn't thought of that reason. I think this is most eminent with Darcs repos. Darcs can't revision file permissions (--set-scripts-executable tries to remedy that). Cheers, Simon

Re: Panic when using syb with GHC API

2011-09-01 Thread Simon Hengel
Hi Pedro, If it seems like this avoids the problem, I'd be happy to release a new version of SYB containing these type-guided traversals. Do you think it would be a good idea to make the interfaces of Data.Generics.GPS and Data.Generics more similar? One thing I have noted is, that

Re: Panic when using syb with GHC API

2011-08-29 Thread Simon Hengel
In any case, maybe Simon Hengel can try using this. I just tried Data.Generics.GPS with the simple example from my previous post, and it did not hit any error thunks. I may try to do something more useful with it, and let you know how that worked out. Cheers, Simon

Panic when using syb with GHC API

2011-08-24 Thread Simon Hengel
Hello, I'm trying to query a type-checked module with syb, this works for a plain binding. But as soon as I add a type signature for that binding, I get an panic! I experienced similar problems with a renamed module. Are those data structures meant to be used with syb? And if yes, what did I

Re: non-linear complexity of :reload combined with :module in ghci

2011-07-12 Thread Simon Hengel
Could you create a ticket please? That looks like an interesting result and we should investigate. done [1] Cheers. [1] http://hackage.haskell.org/trac/ghc/ticket/5317 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

non-linear complexity of :reload combined with :module in ghci

2011-07-04 Thread Simon Hengel
Hi all, I realized that ghci shows non-linear time complexity for a sequence of :module and :reload commands, say we do multiple times: :module *Foo :reload Steps to reproduce: time for i in {1..10}; do echo -e ':m Prelude\n:r'; done |ghci time for i in {1..99}; do echo -e ':m

Changing language options in ghci at runtime

2011-04-09 Thread Simon Hengel
Hello, does anyone know whether you can somehow change the currently active language flags during a ghci session (say change what `:show languages' outputs)? If no, is this possible by using the GHC API? Cheers, Simon ___ Glasgow-haskell-users mailing

Re: Changing language options in ghci at runtime

2011-04-09 Thread Simon Hengel
On Sat, Apr 09, 2011 at 02:04:47PM +0200, Daniel Fischer wrote: On Saturday 09 April 2011 13:50:03, Simon Hengel wrote: Hello, does anyone know whether you can somehow change the currently active language flags during a ghci session (say change what `:show languages' outputs)? :set

Odd behavior of ncurses with -threaded

2010-11-11 Thread Simon Hengel
Hello, the following program should wait 3 seconds for user input before. If now user input occurs within that time, it just prints -1. {-# LANGUAGE ForeignFunctionInterface #-} module Main where import Foreign import Foreign.C.String import Foreign.C.Types import

Re: Odd behavior of ncurses with -threaded

2010-11-11 Thread Simon Hengel
ghc --make -threaded -lcurses Main.hs I bet, if you switch off the barrage of thread scheduling SIGALRMs, +RTS -V0 -RTS , it will work like it's supposed to. That helped, thanks! Cheers, Simon ___ Glasgow-haskell-users mailing list