G'day all.
Quoting José Romildo Malaquias :
I am writing here to ask suggestions on how to annotate an ast with
types (or any other information that would be relevant in a compiler
phase) in Haskell.
This might help:
http://www.haskell.org/haskellwiki/Indirect_composite
Andrew Bromage
_
Hi Hongmin,
I think you're looking for how to hot-swap Haskell program.
There are two approach to reach target:
1) Source-Code level:
Recompile source code to build new execute cache file, if re-compile
successful, use executeFile to switch new entry. You perhaps need use
Binary instanc
Hi,
I'm using GHC API to dynamically load some module, and evaluate it; and
later change the content of the module, and re-evaluate it. But I found
unless I delete the object file created by previous compilation, the module
seems not reloaded. I have set ghcLink = LinkInMemory as an older post
sug
I use Apache Thrift, as someone else mentioned for IPC with some java code that
connects to a third party data vendor. As of version 0.2, there are some bugs
that you need to be aware of.
However, and possibly more of interest to you, I have already written a FIX
implementation in pure haskell
Ah, I found the attachment on your other email.
I would recommend using the Fix and Ann types, instead of the AnnFix type.
I modified your code a bit (and fixed the Show instances etc...) and put it
here:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=27823#a27823
Let me know if you have question
>
> Someone has written a large Java library (QuickFIX/J) which speaks
> a gnarled, ugly protocol (FIX).
They've also written a large C++ library for the same purpose called
QuickFix[1].
You could try wrapping it directly via the Haskell FFI.
Travis
[1] http://www.quickfixengine.org/
On Thu,
Malcolm Wallace wrote:
I still like the original design on http://imgur.com/NjiVh a lot
better, It has a simple modern design to it in my opinion :)
+1. It is simply beautiful. Much more striking and memorable than the
blue diver.
I really like the background image; it's nicely striking an
Niemeijer, R.A. wrote:
Is it just me, or does aligning [OSX,Win,Linux] `zip` [Comprehensive,
Robust, CuttingEdge] send the wrong message...
Yeah, I noticed that too when designing it, but at the time it didn't bother me
too much.
I know folks who'd refute all three of those associations, so.
Forgot the attachment.
Romildo
--- Begin Message ---
On Mon, Jul 19, 2010 at 01:51:57PM -0400, Job Vranish wrote:
> Martijn van Steenbergen has a good blog post that describes the method I
> generally use:
> http://martijn.van.steenbergen.nl/journal/2010/06/24/generically-adding-position-informati
Awesome. It worked. Haskell continues to impress me. Thanks for the help
everyone.
-Eitan
On 7/19/2010 4:42 AM, Max Bolingbroke wrote:
Use NoMonomorphismRestriction or give an explicit type signature:
width :: Num a => a
width = 800
Max
___
H
I would be inclined to add type annotations as an extra constructor of
the expression representation type.
data Exp
= IntExp Integer
| VarExp Symbol
| AssignExp Symbol Exp
| IfExp Exp Exp (Maybe Exp)
| CallExp Symbol [Exp]
| LetExp [Dec] Exp
| Exp `HasType` Ty
This i
Hi Ali,
Ali Razavi writes:
> Greetings,
> I have only used the wxHaskell library before, but I am looking into trying
> one of these more
> advanced' frameworks. To
> serve my proclivity for QT, I would like to know how its Haskell binding,
> qtHaskell, compares to
> that of Gtk.
If you just
I haven't used the Gtk bindings much, but the qtHaskell bindings work quite
well. If you've used Qt before, it should be pretty easy to pick up.
- Job
On Mon, Jul 19, 2010 at 10:19 AM, Ali Razavi wrote:
> Greetings,
> I have only used the wxHaskell library before, but I am looking into
> tryin
Martijn van Steenbergen has a good blog post that describes the method I
generally use:
http://martijn.van.steenbergen.nl/journal/2010/06/24/generically-adding-position-information-to-a-datatype/
In his example he annotates the expression tree with position information,
but you can use the same me
Sorry, the previous code does not compile. It should be:
replace :: Int -> [IORef (Int,Int,Int)] -> (Int,Int,Int) -> IO ()
replace index pixels new_val = do
old_val <- return $ pixels !! index
writeIORef old_val new_val
print_pixels = mapM_ (\p -> readIORef p >>= print)
test_data :: [(Int,Int
Hello,
I'm currently learning Haskell and I want to write a small tool to
collect some data in a CouchDB-Database
Sadly, the Database.CouchDB module from hackage (and from git) seems
broken. It looks like a bug deep in the JSON handling of the lib.
Some examples can be found in this gist: http://
Hi Tom
This will the job for a UserHooks - probably preBuild? - see
Distribution.Simple.UserHooks.
postConf - Hook to run after configure command
preBuild - Hook to run before build command. Second arg indicates
verbosity level.
buildHook - Over-ride this hook to get different behaviour during bu
Hello.
In his book "Modern Compilder Implementation in ML", Appel presents a
compiler project for the Tiger programming language where type checking
and intermediate code generation are intrinsically coupled.
There is a function
transExp :: Absyn.Exp -> (Tree.Exp,Types.Type)
that do semantic
Do you want a solution like this?
import Data.IORef
replace :: Int -> [IORef (Int,Int,Int)] -> (Int,Int,Int) -> IO ()
replace index pixels new_val = do
old_val <- return $ pixels !! index
writeIORef old_val new_val
print_pixels = mapM (\p -> readIORef p >>= print)
test_data :: [(Int,Int,Int
On Sun, Jul 18, 2010 at 5:59 PM, Emil Melnikov wrote:
> On 2010, July 18, 23:27
> Ivan Lazar Miljenovic wrote:
>
>> When discussing a similar issue with Manuel Chakravarty, he convinced me
>> that cunning newtype deriving is actually rather bad in practice and
>> shouldn't be used as there's a la
I have a script I'm using to generate some Haskell code for a library.
How do I specify this flow in the cabal setup file? Would someone
point me to a relevant library I can reference as an example?
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haske
On Sun, 18 Jul 2010 12:02:39 -0700, Carter Schonwald
wrote:
nope, I was suggesting rather:
./A.hs has module A which has an import A.B line
./A/ has B.hs with module A.B which imports A.B.C
/C which has module A.B.C in file C.hs
I think this scenario should work
-carter
It's an int
Greetings,
I have only used the wxHaskell library before, but I am looking into trying
one of these more 'advanced' frameworks. To serve my proclivity for QT, I
would like to know how its Haskell binding, qtHaskell, compares to that of
Gtk.
Regards,
Ali Razavi
On Mon, Jul 19, 2010 at 9:24 AM, David Virebayre
wrote:
> A minor point: instead of removing the punctuation, you maybe should
> convert it to whitespace.
>
> Otherwise in texts like "there was a quick,brown fox" (notice the
> missing space after the comma) you'll have the word "quickbrown"
> ins
On Mon, Jul 19, 2010 at 10:17 AM, Ketil Malde wrote:
> At it's heart, monads are "just" syntactic convenience, but like many
> other syntactic conveniences, allows you to structure your code better.
> Thus it's more about programmer efficiency than program efficiency.
> (The "do notation" is synta
Also, Claude ... If I am correct, in your example, there is no in-place
replacement happening.
On Mon, Jul 19, 2010 at 2:36 PM, C K Kashyap wrote:
> Okay...I think I am beginning to understand.
> Is it right to assume that "magic" is backed by FFI and cannot be done in
> "pure" Haskell?
>
>
> On
Okay...I think I am beginning to understand.
Is it right to assume that "magic" is backed by FFI and cannot be done in
"pure" Haskell?
On Mon, Jul 19, 2010 at 1:47 PM, Ketil Malde wrote:
> C K Kashyap writes:
>
> > I looked at State Monad yesterday and this question popped into my mind.
> > Fro
Use NoMonomorphismRestriction or give an explicit type signature:
width :: Num a => a
width = 800
Max
On 19 July 2010 09:17, Eitan Goldshtrom wrote:
> Correction to my last e-mail. I figured out why it worked at first and then
> failed, so I'll refine my question. I'd like the compiler to simpl
Eitan Goldshtrom writes:
> Correction to my last e-mail. I figured out why it worked at first and
> then failed, so I'll refine my question. I'd like the compiler to
> simply put the number 800 everywhere that I put the name "width" in my
> code. Instead it's putting (800 :: Float), or Double or
On Tue, Jul 13, 2010 at 11:49 PM, Frank1981 wrote:
>
> First of all: I'm not sure if this question is allowed here. If not, I
> apologize
>
> I'm trying to solve the following problem: For each word in a text find the
> number of occurences for each unique word in the text.
>
> i've come up with t
C K Kashyap writes:
> I looked at State Monad yesterday and this question popped into my mind.
> From what I gather State Monad essentially allows the use of Haskell's do
> notation to "invisibly" pass around a state. So, does the use of Monadic
> style fetch us more than syntactic convenience?
Correction to my last e-mail. I figured out why it worked at first and
then failed, so I'll refine my question. I'd like the compiler to simply
put the number 800 everywhere that I put the name "width" in my code.
Instead it's putting (800 :: Float), or Double or Int, whatever I want,
but it's
One point of clarification that'd be nice. I'm getting some type errors
that I wasn't getting before, so I'd just like to know something about
the inline pragma. I have
width = 800
{-# INLINE width #-}
main = (truncate width, fromIntegral width)
Now when I ran this program it seemed to work a
Daniel Fischer writes:
>> First of all: I'm not sure if this question is allowed here. If not, I
>> apologize
You might want to check out the haskell-beginners list, but IMO most
questions are okay to post here.
Just a couple of style issues Daniel didn't mention:
>> process :: [Char] -> [Stri
34 matches
Mail list logo