On Sun, Feb 6, 2011 at 11:59 PM, C K Kashyap wrote:
>>
>> $ ghci
>> GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
>> Loading package ghc-prim ... linking ... done.
>> Loading package integer-gmp ... linking ... done.
>> Loading package base ... linking ... done.
>> Loading package
K Kashyap
Cc: Haskell Cafe
Subject: Re: [Haskell-cafe] Extending GHCi
On 02/07/2011 12:45 PM, C K Kashyap wrote:
> $ ghci
> GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... link
On 02/07/2011 12:45 PM, C K Kashyap wrote:
$ ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ff
>
>
> $ ghci
> GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.
> Loading package base ... linking ... done.
> Loading package ffi-1.0 ... linking ... done.
> Prelude> :m +Data.IORef C
>
>
>
> What part of that doesn't already work? You can forkIO threads in GHCi,
> you can listen on the network. If you have written the server so it can be
> controlled from another thread, you can run those controlling functions
> at the prompt while the server is working.
>
>
> Thanks Brandon .
>
>
> $ ghci
> GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.
> Loading package base ... linking ... done.
> Loading package ffi-1.0 ... linking ... done.
> Prelude> :m +Data.IORef C
>Hi,
>I am looking for a way to extend GHCI such that I can do something like this
>
>startMyFunction will do a forkIO and listen on a network port for interaction
>with a remote process and will drop back to GHCI prompt where I can invoke
>haskell functions that'll control the way the interactio
Ok, so someFunction should modify the server's configuration? Maybe you
can model it with an IORef like this (untested!):
> import Data.IORef
>
> type Config = String -- String to be prepended to every answer
>
> someFunction :: String -> IORef Config -> IORef Config
> someFunction s r = modi
On Fri, Feb 4, 2011 at 9:41 AM, C K Kashyap wrote:
> Thanks Steffen,
>
>>
>> Prelude> :l MyModule.hs
>> *MyModule> conn <- waitForAndAcceptConnection
>> *MyModule> someData <- getSomeData conn
>> *MyModule> sendSomeAnswer conn $ processSomeData someData
>> ...
>>
>
> So this cycle of getting data
Thanks Steffen,
> Prelude> :l MyModule.hs
> *MyModule> conn <- waitForAndAcceptConnection
> *MyModule> someData <- getSomeData conn
> *MyModule> sendSomeAnswer conn $ processSomeData someData
> ...
>
>
So this cycle of getting data from the connection and writing answer on the
connection should h
On 02/04/2011 12:36 PM, C K Kashyap wrote:
Hi,
I am looking for a way to extend GHCI such that I can do something
like this
$ ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loa
Hi,
I am looking for a way to extend GHCI such that I can do something like this
$ ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading
12 matches
Mail list logo