Re: [Haskell-cafe] DSL libraries

2010-11-04 Thread Dupont Corentin
I) > still have some ideas for this project and hope we can someday revive it. > > Cheers, > Sebastiaan > > [1] https://github.com/sebastiaanvisser/AwesomePrelude > > On Nov 4, 2010, at 6:51 PM, Dupont Corentin wrote: > > Nobody had the compilation messages I had?

Fwd: [Haskell-cafe] DSL libraries

2010-11-04 Thread Dupont Corentin
Nobody had the compilation messages I had? -- Forwarded message -- From: Dupont Corentin Date: Tue, Nov 2, 2010 at 2:30 PM Subject: [Haskell-cafe] DSL libraries (Was: Map constructor in a DSL) To: steffen , haskell-cafe@haskell.org Hello Steffen, can you compile AwesomePrelude

[Haskell-cafe] How can I use MACID in my existing application?

2010-11-04 Thread Dupont Corentin
Hello, I'm wondering how can I use Happstack's MACID in my application without breaking everything. I have a monad like that: type Comm = StateT Communication IO type GameState a = StateT Game Comm a and many functions like: foo :: GameState () foo = do lift $ putComm modify The state

Re: [Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-04 Thread Dupont Corentin
Hello, reading this thread a question came to me: Is there a way of automatically deriving programming languages ascendancy? Like biologist can determine the distance between two genotypes, and determine a hierarchy between species from that. Are you aware of researchs made in the field? On the

[Haskell-cafe] DSL libraries (Was: Map constructor in a DSL)

2010-11-02 Thread Dupont Corentin
/tomlokhorst/AwesomePrelude > [2] http://github.com/urso/AwesomePrelude > [3] http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls > [4] http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video > > On 28 Okt., 12:09, Dupont Corentin wrote: > > Thank you for your rich responses

Re: [Haskell-cafe] Re: State & nested structures

2010-10-29 Thread Dupont Corentin
r StateT/ > ErrorT instead of State and some Either inside it...). > > On 29 Okt., 17:35, Stephen Tetley wrote: > > 2010/10/29 Dupont Corentin : > > > > > Also, I can't manage to write the more generic function SB x -> SA x. > > > > However, I&#

[Haskell-cafe] State & nested structures

2010-10-29 Thread Dupont Corentin
Hello the list, I have another silly question. In my software I have a very common pattern: --in file A.hs module A where data A = A {b :: B, i :: Int} type SA x = State A x -- many functions with SA x --in file B.hs data B = B {r :: Int} type SB x = State B x -- many functions with SB x Of

Re: [Haskell-cafe] Test command line programs

2010-10-28 Thread Dupont Corentin
e not on the handle itself but a little after. Maybe "mock handle" can help. Corentin On Tue, Oct 26, 2010 at 11:32 PM, Antoine Latter wrote: > On Tue, Oct 26, 2010 at 11:11 AM, Dupont Corentin > wrote: > > Hello again café, > > > > I have a command line progra

Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Dupont Corentin
1] http://github.com/tomlokhorst/AwesomePrelude > [2] http://github.com/urso/AwesomePrelude > [3] http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls > [4] http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video > > On 28 Okt., 12:09, Dupont Corentin wrote: > > Thank you

Re: [Haskell-cafe] Re: Map constructor in a DSL

2010-10-28 Thread Dupont Corentin
Thank you for your rich responses. Indeed I think I miss some thinks in my DSL, that would make things easier to deal with lists and first class functions. I don't really know what for now. Perhaps a List Constructor? Or a constructor on functions like yours Ryan? EAp :: Exp ref (a -> b) -> Exp re

Re: [Haskell-cafe] Map constructor in a DSL

2010-10-26 Thread Dupont Corentin
want to perform this democratic vote ;) Hope this answer to your question. Corentin On Tue, Oct 26, 2010 at 7:17 PM, Christopher Done wrote: > On 26 October 2010 18:07, Dupont Corentin > wrote: > > But how can I write the evaluator for Map? > > Where do values for PlayerNum

[Haskell-cafe] Test command line programs

2010-10-26 Thread Dupont Corentin
Hello again café, I have a command line program that takes input from various handles (actually network sockets) like this: > s <- hGetLine h > etc. I'd like to unit test this. How can I do? I'd like to inject data on the handle so that all the input chain is tested. How are command line progra

[Haskell-cafe] Map constructor in a DSL

2010-10-26 Thread Dupont Corentin
Hello café, I have a little DSL in my program as follow. Now I'd like to add a Map constructor in it. Thats where I would need help! > data Obs a where > AllPlayers :: Obs [Int] > Plus :: (Num a) => Obs a -> Obs a -> Obs a > And:: Obs Bool -> Obs Bool -> Obs Bool >

Re: [Haskell-cafe] Manual Type-Checking to provide Read instances for GADTs. (was Re: [Haskell-cafe] Read instance for GATD)

2010-06-26 Thread Dupont Corentin
That's really nice. Very interesting. Thank you. On Fri, Jun 25, 2010 at 9:55 PM, Edward Kmett wrote: > I've obtained permission to repost Gershom's slides on how to deserialize > GADTs by typechecking them yourself, which are actually a literate haskell > source file, that he was rendering to s

Re: [Haskell-cafe] Re: GATD and pattern matching

2010-06-11 Thread Dupont Corentin
Thanks all, it works fine (see below). I lamentably try to make the same for show: > showTypeable :: (Typeable a) => a -> String > showTypeable x = case cast x of > Just x' -> show x' > Nothing -> "" Because it really upsets me to add this show constraint

Re: [Haskell-cafe] Re: GATD and pattern matching

2010-06-10 Thread Dupont Corentin
But it doesn't work. thanks for your help, Corentin On Thu, Jun 10, 2010 at 2:47 AM, Maciej Piechotka wrote: > On Wed, 2010-06-09 at 22:28 +0200, Dupont Corentin wrote: > > Thanks for your response. > > > > How would you do it? I design this GATD for a game i'

Re: [Haskell-cafe] Re: GATD and pattern matching

2010-06-10 Thread Dupont Corentin
On Thu, Jun 10, 2010 at 11:14 PM, Daniel Fischer wrote: > On Thursday 10 June 2010 22:01:38, Dupont Corentin wrote: > > Hello Maciej, > > i tried this out, but it didn't worked. > > > > Daniel, > > > > I added a (Show a) constraint to Equal: > >

Re: [Haskell-cafe] GATD and pattern matching

2010-06-09 Thread Dupont Corentin
entin On Wed, Jun 9, 2010 at 9:10 PM, Daniel Fischer wrote: > On Wednesday 09 June 2010 20:37:22, Dupont Corentin wrote: > > Hello, > > > > I am making a little GATD: > > > {-# LANGUAGE GADTs#-} > > > > > > data Obs a where > > > Equ

[Haskell-cafe] GATD and pattern matching

2010-06-09 Thread Dupont Corentin
Hello, I am making a little GATD: > {-# LANGUAGE GADTs#-} > data Obs a where > Equal :: Obs a -> Obs a -> Obs Bool > Plus :: (Num a) => Obs a -> Obs a -> Obs a (etc..) > instance Show t => Show (Obs t) where > show (Equal a b) = (show a) ++ " Equal " ++ (show b) > show (Plus a b)

Re: [Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-09 Thread Dupont Corentin
Hello, I am making a little GATD: > {-# LANGUAGE GADTs#-} > data Obs a where > Equal :: Obs a -> Obs a -> Obs Bool > Plus :: (Num a) => Obs a -> Obs a -> Obs a (etc..) > instance Show t => Show (Obs t) where > show (Equal a b) = (show a) ++ " Equal " ++ (show b) > show (Plus a b)

Re: [Haskell-cafe] accents

2010-05-10 Thread Dupont Corentin
Thank you Daniel and Ivan, with firefox i finded out that my text file was encoded in WINDOWS-1252. So a commande line such as: iconv -f WINDOWS-1252 -t ISO-8859-1 liste.txt > liste2.txt did the trick. Alternatively, i modified my code with: myReadFile a = do h <- openFile a ReadMode

[Haskell-cafe] Type system game (was: Nomic game in Haskell)

2010-05-07 Thread Dupont Corentin
Hello, I think your type should be: type Board a b c d e f g h i = Either (Three a b c) (Either (Three d e f) (Either (Three g h i) (Either (Three a d g) (Either (Three b e h) (Either (Three c f i) (Either (Three a e i) (Three c e g))) as far as i can understand, it

Re: [Haskell-cafe] accents

2010-05-07 Thread Dupont Corentin
ci? Unicode? Its seems not be the same since the représentation for "é" is not the same (\233 and \218). How to have accented characters in ghci? Can't find any ressources on the net. Cheers, Corentin PS: please let me know is you can't see the accented characters in this email

Re: [Haskell-cafe] Nomic game in Haskell

2010-04-15 Thread Dupont Corentin
in active rules, allow player voting etc. Corentin. On 4/15/10, Brent Yorgey wrote: > On Wed, Apr 14, 2010 at 09:14:18PM +0200, Dupont Corentin wrote: >> Hello Café, >> do you know Nomic? >> >> It's a fabulous and strange game where you have the right to change t

[Haskell-cafe] Nomic game in Haskell

2010-04-14 Thread Dupont Corentin
Hello Café, do you know Nomic? It's a fabulous and strange game where you have the right to change the rules in the middle of the game! In fact, changing the rules is the goal of the game. Changing a rule is considered as a move. Of course even that could be changed! www.nomic.net I'm wondering

Re: [Haskell-cafe] cabal through PHPProxy

2010-03-31 Thread Dupont Corentin
haskell-cafe-boun...@haskell.org] On Behalf Of Dupont Corentin >> >> i'm using PHPProxy to go on the internet (www.phpproxy.fr). >> How can i tell cabal to use this? > > > I think the normal way is through setting HTTP_PROXY env var e.g. set > HTTP_PROXY=http://localhos

[Haskell-cafe] cabal through PHPProxy

2010-03-31 Thread Dupont Corentin
Hello, i'm using PHPProxy to go on the internet (www.phpproxy.fr). How can i tell cabal to use this? Cheers, Corentin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] phonetic dictionnary

2010-03-25 Thread Dupont Corentin
source text-to-speech engine that has > a free French pronouncing dictionary. > > --Max > > On Thu, Mar 25, 2010 at 2:59 PM, Dupont Corentin > wrote: >> Hello, >> sorry if i ask a lot of questions these days! >> Do you know of a phonetic dictionnary? >> >

Re: [Haskell-cafe] phonetic dictionnary

2010-03-25 Thread Dupont Corentin
exes: > > http://en.wikipedia.org/wiki/Soundex > > the algorithm is really simple and you can process a whole dictionnary > in no time to obtain what you're looking for. > > Paul > > On Thu, Mar 25, 2010 at 01:59:28PM +0100, Dupont Corentin wrote: >> Hello, &

[Haskell-cafe] phonetic dictionnary

2010-03-25 Thread Dupont Corentin
Hello, sorry if i ask a lot of questions these days! Do you know of a phonetic dictionnary? i'm very fond of enigmas. To solve certain enigmas, i've made a little program that search into a french dictionnary. But it would be much better if i could search into a phonetic dictionnary... The goal is

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-24 Thread Dupont Corentin
el Vilaça > > A 2010/03/23, às 05:31, Ronald Guida escreveu: > > On Mon, Mar 22, 2010 at 7:02 PM, Dupont Corentin > wrote: > > Hello, I’m relatively new to Haskell. > > I’m wondering if it exist a tool to graphically represent Haskell code. > > ... > > Let’s try t

[Haskell-cafe] accents

2010-03-24 Thread Dupont Corentin
Hello, i have a list of french words with accents. How could i handle them? If i load them with ghci i get: > a <- readFile "list.txt" > head $ lines a "abn\233gation" putStrLn displays a strange character for the "é". Cheers, Corentin ___ Haskell-Cafe

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-23 Thread Dupont Corentin
Hello! Thanks for the welcome! Ivan: Too overcome the problem of large and messy images, i propose too have a system to navigate into the code. You could zoom in and out, occulting unecessary details while zooming out. My big graphic of map (+1) could easely be summed up to: (Embedded image moved

[Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Dupont Corentin
Hello, I’m relatively new to Haskell. I’m wondering if it exist a tool to graphically represent Haskell code. Look at the little graphics at: http://www.haskell.org/arrows/index.html (and following pages) from Ross Paterson. If found these very usefu

Re: [Haskell-cafe] games of chance

2010-02-21 Thread Dupont Corentin
Thanks a lot Mark. Corentin On Sat, Feb 20, 2010 at 4:26 AM, Mark Wassell wrote: > Take a look at: > > http://hackage.haskell.org/package/probability > > and > > http://web.engr.oregonstate.edu/~erwig/pfp/<http://web.engr.oregonstate.edu/%7Eerwig/pfp/> > >

[Haskell-cafe] games of chance

2010-02-19 Thread Dupont Corentin
Hello, are you aware of a framework to find probabilities in a given game of chance, in Haskell? l would like to compute probabilities like: "roll 3 dices, sum the result, then roll 3 other dices, sum the result, what is the probability to obtain the same sum?" Cheers, Corentin _