Re: [Haskell-cafe] Extracting exposed modules from an installed library

2013-03-21 Thread Corentin Dupont
Hi Joachim, that's right thanks, but I was looking for a way to do that from a program. ghc-pkg does not seems to expose any library... On Wed, Mar 20, 2013 at 11:23 PM, Joachim Breitner m...@joachim-breitner.de wrote: Hi, Am Mittwoch, den 20.03.2013, 00:34 +0100 schrieb Corentin Dupont:

Re: [Haskell-cafe] Extracting exposed modules from an installed library

2013-03-21 Thread Ivan Lazar Miljenovic
On 21 March 2013 19:52, Corentin Dupont corentin.dup...@gmail.com wrote: Hi Joachim, that's right thanks, but I was looking for a way to do that from a program. ghc-pkg does not seems to expose any library...

[Haskell-cafe] Excercise on tagless final interpreters

2013-03-21 Thread matteo vezzola
I'm playing with tagless final interpreters reading [1], using a very simple language: class Ints repr where int :: Integer - repr Integer (.+.) :: repr Integer - repr Integer - repr Integer (.*.) :: repr Integer - repr Integer - repr Integer (.-.) :: repr Integer - repr

[Haskell-cafe] A question about data declaration

2013-03-21 Thread C K Kashyap
Hi, I have a situation where I need to define a data type T such that data T = C1 Int | C2 Char | C3 T However, I want to enforce a constraint that C3 only allows (C2 Char) and not (C1 Int). That is x = C3 (C1 10) -- should not compile - but my above definition will let it compile I was

Re: [Haskell-cafe] A question about data declaration

2013-03-21 Thread Erik Hesselink
You could use a GADT: {-# LANGUAGE GADTs #-} data T a where C1 :: Int - T Int C2 :: Char - T Char C3 :: T Char - T Char This will allow you to put a C3 in a C3. If you want to prevent that, just invent some other index, something like: {-# LANGUAGE GADTs, EmptyDataDecls #-} data Yes

Re: [Haskell-cafe] Excercise on tagless final interpreters

2013-03-21 Thread Jacques Carette
On 13-03-21 06:32 AM, matteo vezzola wrote: I'm playing with tagless final interpreters reading [1], using a very simple language: class Ints repr where int :: Integer - repr Integer (.+.) :: repr Integer - repr Integer - repr Integer (.*.) :: repr Integer - repr Integer - repr

Re: [Haskell-cafe] Excercise on tagless final interpreters

2013-03-21 Thread Brent Yorgey
On Thu, Mar 21, 2013 at 11:32:21AM +0100, matteo vezzola wrote: I'm playing with tagless final interpreters reading [1], using a very simple language: class Ints repr where int :: Integer - repr Integer (.+.) :: repr Integer - repr Integer - repr Integer (.*.) :: repr

Re: [Haskell-cafe] A question about data declaration

2013-03-21 Thread Brent Yorgey
On Thu, Mar 21, 2013 at 06:18:46PM +0530, C K Kashyap wrote: Hi, I have a situation where I need to define a data type T such that data T = C1 Int | C2 Char | C3 T However, I want to enforce a constraint that C3 only allows (C2 Char) and not (C1 Int). That is If C3 should only be able

[Haskell-cafe] 2nd CFP: SBLP 2013 (17th Brazilian Symposium on Programming Languages)

2013-03-21 Thread Andre Rauber Du Bois
[Apologies if you receive multiple copies of this CFP] === 2nd CALL FOR PAPERS 17th BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES Brasília, Distrito Federal, Brazil September 29th to October 4th, 2013 http://cbsoft2013.cic.unb.br/sblp

[Haskell-cafe] ANN: bytestring-lexing 0.4.3

2013-03-21 Thread wren ng thornton
-- bytestring-lexing 0.4.3 The bytestring-lexing package offers efficient reading and packing of common types like Double and Integral types. -- Changes (since

[Haskell-cafe] ANNOUNCE: monoid-subclasses-0.1.1, incremental-parser-0.2.2, and SCC-0.8

2013-03-21 Thread Mario Blažević
The new package monoid-subclasses [1] exports a number of classes that sit between monoids and groups: ReductiveMonoid, CancellativeMonoid, GCDMonoid, MonoidNull, and FactorialMonoid among others. The package also comes with class instances for all applicable data types from base, vector,