[Haskell-cafe] Cabal: Retrieve directory in which binaries get installed

2012-12-17 Thread Björn Peemöller
Hello cafe,

I'd like to retrieve the path in which binaries get installed when I
`cabal install` a package.

Normally, this would be ~/.cabal/bin on my Linux, but since I share my
home folder on two architectures, in ~/.cabal/config I set the
user-install prefix to ~/.cabal/$arch, so binaries get installed to
~/.cabal/$arch/bin.

I have the feeling that it should be rather simple to retrieve the
FilePath from the Cabal API, does anyone know how to do this?

Thanks in advance,
Björn

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Parsing pragmas in a Haskell-like language

2012-08-16 Thread Björn Peemöller
Dear cafe,

I'm experimenting with extending the parser for a Haskell-like language
by module pragmas. The parser is written using parser combinators.

Currently, I adapted the lexer to ignore whitespace and comments, but
create lexemes for both the pragma start and end (and the pragma's
content, of course). While these lexemes are necessary for parsing the
pragmas before the module header, they somehow should be ignored
(treated like comments) afterwards.

Could anyone give me a hint me how this behaviour (treat pragmas like
comments) is achieved in GHC or in haskell-src-exts?

Thanks in advance,
Björn

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use MySQL from Haskell

2009-06-19 Thread Björn Peemöller
Maciej Podgurski schrieb:
> So I switched to HDBC-2.1.1 and got the next compile error:
>
> Building convertible-1.0.5...
>
> Data/Convertible/Instances/Num.hs:671:0:
> warning: no newline at end of file
> [...]
> [5 of 8] Compiling Data.Convertible.Instances.C (
> Data/Convertible/Instances/C.hs, dist\build/Data/C
> onvertible/Instances/C.o )
> [6 of 8] Compiling Data.Convertible.Instances.Time (
> Data/Convertible/Instances/Time.hs, dist\build/
> Data/Convertible/Instances/Time.o )
>
> Data/Convertible/Instances/Time.hs:64:0:
>Duplicate instance declarations:
>  instance Typeable NominalDiffTime
>-- Defined at Data/Convertible/Instances/Time.hs:(64,0)-(65,42)
>  instance Typeable NominalDiffTime
>-- Defined in time-1.1.3:Data.Time.Clock.UTC
>
> Data/Convertible/Instances/Time.hs:67:0:
>Duplicate instance declarations:
>  instance Typeable UTCTime
>-- Defined at Data/Convertible/Instances/Time.hs:(67,0)-(68,34)
>  instance Typeable UTCTime
>-- Defined in time-1.1.3:Data.Time.Clock.UTC 

Hi Maciej,

this is quite easy to fix (although a little bit dirty). The problem is
that time-1.1.3 now defines some Typeable instances which time-1.1.2.4
did not and which are therefore defined in convertible, too. I don't
know a general fix to the problem, but you can either

- download the convertible package and comment out the two instance
declarations as shown in the error message and then cabal install it
- install from Hackage with additional constraint: cabal install
convertible --constraint=time<1.1.3

I hope this will help you get HDBC running.

Cheers,
Björn




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe