Re: [Haskell-cafe] TH splicing and recompilation checking

2013-07-16 Thread Tristan Ravitch
I think you want qAddDependentFile in Language.Haskell.TH.Syntax http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html On Tue, Jul 16, 2013 at 05:41:19PM +, Johannes Waldmann wrote: > Hi. > > we are using template Haskell to splice

Re: [Haskell-cafe] cabal-dev: installing/running with profiling enabled

2013-07-02 Thread Tristan Ravitch
On Tue, Jul 02, 2013 at 09:07:18AM +0300, Ömer Sinan Ağacan wrote: > OK, so I removed `cabal-dev` directory, and installed again with this > command. But it still failed with same error message("the flag -p > requires the program to be built with -prof"). Maybe you are running into this: https

Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Tristan Ravitch
This one caught my attention as well. I didn't see any contact information for the participants (I didn't look too hard, I admit), but I was wondering if they had considered basing their work off of Qt Smoke. The smoke project (http://techbase.kde.org/Development/Languages/Smoke) is used by a few

Re: [Haskell-cafe] Haskell syntax/indentation for vim

2013-03-04 Thread Tristan Ravitch
liked about it, especially given my plan to rewrite the whole thing > > [1]! :) > > > > [1] https://github.com/dag/vim2hs/issues/45 > > > > > > On Sun, Mar 3, 2013 at 3:38 PM, dag.odenh...@gmail.com < > > dag.odenh...@gmail.com> wrote: > > > >>

[Haskell-cafe] Haskell syntax/indentation for vim

2013-03-02 Thread Tristan Ravitch
Cafe, I've recently been playing with vim and wasn't quite satisfied with the existing syntax highlighting and indentation, so I thought I'd try my hand at a new Haskell mode: https://github.com/travitch/hasksyn It is minimal in that it doesn't provide support for running external commands over

[Haskell-cafe] Free lunch with GADTs

2013-02-13 Thread Tristan Ravitch
Hi cafe, I'm playing around with GADTs and was hoping they would let me have my cake and eat it too. I am trying to use GADTs to tag a type with some extra information. This information is very useful in a few cases, but the more common case is that I just have a list of items without the tags.

Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?

2012-11-21 Thread Tristan Ravitch
The composition package on hackage has a few operators for this family of operations too http://hackage.haskell.org/packages/archive/composition/1.0.1.0/doc/html/Data-Composition.html On Wed, Nov 21, 2012 at 05:03:33PM -0500, Thomas Bereknyei wrote: > I use > .@. (sometimes ...) > .#. > .$. >

Re: [Haskell-cafe] ANNOUNCE: persistent-vector-0.1.0.1

2012-08-29 Thread Tristan Ravitch
stent" part of the name comes from?. It can be > serialized/deserialized from a persistent storage automatically or on > demand? > > 2012/8/29 Tristan Ravitch > > > I uploaded a package implementing persistent vectors using array > > mapped tries (based on the im

[Haskell-cafe] ANNOUNCE: persistent-vector-0.1.0.1

2012-08-29 Thread Tristan Ravitch
I uploaded a package implementing persistent vectors using array mapped tries (based on the implementation in clojure). Version 0.1.0.0 was broken, so I am starting off with 0.1.0.1. http://hackage.haskell.org/package/persistent-vector Persistent vectors are a sequence container offering effic

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 07:20:39PM +0300, Michael Snoyman wrote: > On Jul 12, 2012 7:13 PM, "Tristan Ravitch" wrote: > > > > On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: > > > Are you trying this on a 32 bit system? And when you compiled th

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: > Are you trying this on a 32 bit system? And when you compiled that C > program, did you try to add > > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE > > to the compile command? When I define those the res

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 06:29:41PM +0300, Michael Snoyman wrote: > I've come up with a minimal example that demonstrates this problem. The > crux of the matter is the following C code: > > #include > #include > #include > #include > > typedef int stat_func(const char*, struc

Re: [Haskell-cafe] where to put general-purpose utility functions

2012-01-21 Thread Tristan Ravitch
You might find many of these on hackage in various forms already.. it might be easier to just depend on some of those libraries. On Sat, Jan 21, 2012 at 04:20:25PM -0400, Joey Hess wrote: > > Some quite generic monadic control functions, few of them truely unique: > > whenM :: Monad m => m Boo

[Haskell-cafe] cabal and conditional build-depends

2012-01-08 Thread Tristan Ravitch
Hi Cafe, I have a package that depends on several other Haskell libraries. One of these libraries depends on some native libraries (and associated headers) to build. I would like to make this dependency optional in my package if the libraries don't exist. To do this, I tried to switch my build-

Re: [Haskell-cafe] ST not strict enough?

2011-11-16 Thread Tristan Ravitch
On Wed, Nov 16, 2011 at 12:16:34PM -0800, Johan Tibell wrote: > Just double checked. modifySTRef is too lazy: > > -- |Mutate the contents of an 'STRef' > modifySTRef :: STRef s a -> (a -> a) -> ST s () > modifySTRef ref f = writeSTRef ref . f =<< readSTRef ref > > We need Data.STRef.Strict That wo

Re: [Haskell-cafe] ST not strict enough?

2011-11-16 Thread Tristan Ravitch
On Wed, Nov 16, 2011 at 07:58:51PM +, Jason Dusek wrote: > 2011/11/15 Johan Tibell : > > On Tue, Nov 15, 2011 at 12:08 PM, Jason Dusek wrote: > >> Should I be annotating my functions with strictness, for the > >> vector reference, for example? Should I be using STUArrays, > >> instead? > > > >

[Haskell-cafe] Identifying thunks from GHC heap profiles

2011-11-13 Thread Tristan Ravitch
I am trying to debug a stack overflow that seems to be caused by a large chain of thunks being evaluated all at once. I have some profiles generated using +RTS -hd -RTS that show some promising candidates, but they have generated names like Module.sat_s9et, Module.sat_s9jk, etc Is there any co

[Haskell-cafe] GHC/Cabal on AFS

2011-09-05 Thread Tristan Ravitch
I have the Haskell Platform (and my home directory with my cabal-installed packages) installed on an AFS (a network filesystem) volume and have been noticing a strange issue. Whenever I install a package using cabal-install and it gets to a phase of the build where it needs to load a bunch of pack

Re: [Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-15 Thread Tristan Ravitch
On Sun, Aug 14, 2011 at 11:25:59PM -0700, Alexander Dunlap wrote: > Thanks, that worked! Also, is there a way to change the default color > of text printed by the bar? (I've added span tags with colors to the > different text widget formats, but it would be nice to be able to set > a default - it s

Re: [Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-15 Thread Tristan Ravitch
On Mon, Aug 15, 2011 at 08:55:44AM +0200, Vincent Hanquez wrote: > On Sat, Aug 13, 2011 at 10:56:49AM -0500, Tristan Ravitch wrote: > > I've wanted a slightly fancier status bar than xmobar for a while, so > > I finally made one. It uses gtk2hs and dbus extensively, so if yo

Re: [Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-15 Thread Tristan Ravitch
On Sun, Aug 14, 2011 at 11:25:59PM -0700, Alexander Dunlap wrote: > Thanks, that worked! Also, is there a way to change the default color > of text printed by the bar? (I've added span tags with colors to the > different text widget formats, but it would be nice to be able to set > a default - it s

Re: [Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-14 Thread Tristan Ravitch
On Sun, Aug 14, 2011 at 02:45:24PM -0700, Alexander Dunlap wrote: > I apologize if I'm missing something obvious here, but when I try to > run taffybar I get > > Launching custom binary /home/alex/.cache/taffybar/taffybar-linux-i386 > > taffybar-linux-i386: ConnectionError "connectSession: > DBUS_

Re: [Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-13 Thread Tristan Ravitch
On Sat, Aug 13, 2011 at 09:54:13PM -0700, Joel Burget wrote: > This sounds really intriguing. Since I'm temporarily not using xmonad, and > I'm sure others would like to see as well, could we get a screenshot? Oops, how could I forget. http://pages.cs.wisc.edu/~travitch/taffybar.jpg I have the

[Haskell-cafe] ANNOUNCE: taffybar: an alternative status bar for xmonad

2011-08-13 Thread Tristan Ravitch
I've wanted a slightly fancier status bar than xmobar for a while, so I finally made one. It uses gtk2hs and dbus extensively, so if you hate either of those things it probably isn't for you. Being written in gtk, though, it can have more graphical widgets. http://hackage.haskell.org/package/t

Re: [Haskell-cafe] Alex Lexer Performance Issues

2011-06-22 Thread Tristan Ravitch
On Wed, Jun 22, 2011 at 07:48:40AM +0100, Stephen Tetley wrote: > How fast is good old String rather than ByteString? > > For lexing, String is a good fit (cheap deconstruction at the head / > front). For your particular case, maybe it loses due to the large file > size, maybe it doesn't... I gave

[Haskell-cafe] Alex Lexer Performance Issues

2011-06-21 Thread Tristan Ravitch
Hi Cafe, In one of my projects I have a lexer that seems to be taking an inordinate amount of time and space. The lexer is generated by Alex using the lazy ByteString (with position information) template. I compiled and ran with profiling enabled and I get a report like this: --

Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-18 Thread Tristan Ravitch
On Fri, Mar 18, 2011 at 08:23:10AM +0100, Ketil Malde wrote: > Tristan Ravitch writes: > > > The ghc7 binaries are compiled against a newer version of glibc than > > is available on RHEL/CentOS. It works fine if you compile ghc7 from > > source yourself (you can use 6.

Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-17 Thread Tristan Ravitch
On Thu, Mar 17, 2011 at 07:52:01AM +0100, Ketil Malde wrote: > frode k writes: > > > Installation of GHC 7.0.2 failed: > > # ./configure --prefix=/usr/haskell-platform-2011.2.0.0/ > > checking for path to top of build tree... > > utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLI