[Haskell-cafe] Render fonts in HopenGL

2011-02-26 Thread er9999
Hello, Can anyone give me an example for fonts rendering? I tried to use FTGL library, but it is too complicated on Windows(compile). Is it possible to do it in a simple way? I need more than the given example in red book(Font.hs), something like outline font. By the way, I am new in OpenGL

Re: [Haskell-cafe] why is ghci trying to load hsc file ??

2011-02-26 Thread Chris Smith
On Sat, 2011-02-26 at 21:36 -0800, bri...@aracnet.com wrote: > [1 of 2] Compiling Bindings.HDF5( dist/build/Bindings/HDF5.hs, > interpreted ) *** Parser: > > src/Bindings/HDF5.hsc:49:8: parse error on input `import' So it's in HDF5.hs ultimately, but LINE directives are telling it to report a

Re: [Haskell-cafe] why is ghci trying to load hsc file ??

2011-02-26 Thread briand
On Sat, 26 Feb 2011 18:18:27 -0800 (PST) Brandon Moore wrote: > I assume there's a LINE directive in the file it's actually reading. > Run ghci with -v to see what file it's actually trying to read. > > > Here's the relevant output with -v flag: compile: input file dist/build/Bindings

Re: [Haskell-cafe] why is ghci trying to load hsc file ??

2011-02-26 Thread Brandon Moore
I assume there's a LINE directive in the file it's actually reading. Run ghci with -v to see what file it's actually trying to read. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] why is ghci trying to load hsc file ??

2011-02-26 Thread briand
Howdy, I worked out a small hdf5 binding using cabal and bindings-DSL and sqlite3 as my example. Time to try it ! ghci -idist/build/ dist/build/Bindings/HDF5.o -lhdf5 -lhdf5_hl hdf5_pkg_test.hs GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking

Re: [Haskell-cafe] Type problem

2011-02-26 Thread michael rice
Yeah, my bad. Thanks. Michael --- On Sat, 2/26/11, Stephen Tetley wrote: From: Stephen Tetley Subject: Re: [Haskell-cafe] Type problem To: Cc: haskell-cafe@haskell.org Date: Saturday, February 26, 2011, 3:24 PM Does this help? listbind :: [a] -> (a -> [b]) -> [b] listbind = (>>=)

Re: [Haskell-cafe] Type problem

2011-02-26 Thread Stephen Tetley
Does this help? listbind :: [a] -> (a -> [b]) -> [b] listbind = (>>=) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type problem

2011-02-26 Thread Thomas Davie
Because applying f to the list is not the same thing is applying bind to the list and f. Bob On 26 Feb 2011, at 20:17, michael rice wrote: > Why? Shouldn't this work for any type a? > > Michael > > == > > f :: [a] -> [a] > f l = do x <- l > return x > > == > > *Mai

[Haskell-cafe] Type problem

2011-02-26 Thread michael rice
Why? Shouldn't this work for any type a? Michael == f :: [a] -> [a] f l = do x <- l return x == *Main> :r [1 of 1] Compiling Main ( test.hs, interpreted ) Ok, modules loaded: Main. *Main> f "abcde" "abcde" *Main> f [1,2,3,4,5] [1,2,3,4,5] *Main> "abcde" >>=

Re: [Haskell-cafe] Simulating open datatypes with type families?

2011-02-26 Thread Stephen Tetley
I don't think typeclasses or a type family will solve the problem directly. Both the statement parsers are producing concrete types - type class polymorphism won't be able to create a union of the two concrete types - a concrete sum type (i.e. Either) will be able to make the union, but it would m

Re: [Haskell-cafe] Auto elimination of MVars using a monad or monad transformer.

2011-02-26 Thread Ryan Ingram
You might want to take a look at http://hackage.haskell.org/package/Adaptivesince it seems really similar to what you are trying to do. In fact, you might also want to google 'Functional Reactive Programming'. -- ryan On Thu, Feb 24, 2011 at 10:41 PM, Chris Dew wrote: > Hello, just like ever

[Haskell-cafe] Simulating open datatypes with type families?

2011-02-26 Thread Patrick Thomson
I'm currently working on a project that involves a C parser (using Parsec3) that needs to be dynamically extensible - i.e. end-users should be able to add new statement types, expression types, operators, and so on and so forth. Since Haskell ADT's are closed, I thought I would be able to simula

Re: [Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-26 Thread Mark Lentczner
This should be fixed in the next (2011) Haskell Platform. You should receive "Please install Xcode developer tools first." - Mark ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell Platform install instructions

2011-02-26 Thread Mark Lentczner
> * Should we document this somewhere in the Haskell Platform install > process? I'm sure many old-time users of cabal are well aware that > they need ~/.cabal/bin in the PATH, but new users will not be. In the next version of Haskell Platform, on Mac OS X, happy will be installed with the other

Re: [Haskell-cafe] FFI: C-side object not destructed

2011-02-26 Thread Daniel Fischer
On Saturday 26 February 2011 13:53:41, Maciej Marcin Piechotka wrote: > It is implementation defined (so not "C++" but " implementation>". IIRC, it's not even that, but undefined behaviour. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://w

Re: [Haskell-cafe] FFI: C-side object not destructed

2011-02-26 Thread Maciej Marcin Piechotka
On Sat, 2011-02-26 at 14:22 +0300, Miguel Mitrofanov wrote: > Well, this code in C++ would probably work too: > > Klass *k = new Klass(4,5); > delete k; > std::cout << k->getY() << std::endl; > > though smart compiler would probably issue a warning. See, when you > delete something, C++ doesn't a

Re: [Haskell-cafe] FFI: C-side object not destructed

2011-02-26 Thread Yves Parès
I assume you are right. The weirdest thing here is that getY() returns the Y value of the destructed object while getX() returns always 0. 2011/2/26 Miguel Mitrofanov > Well, this code in C++ would probably work too: > > Klass *k = new Klass(4,5); > delete k; > std::cout << k->getY() << std::en

Re: [Haskell-cafe] Either instance of Monad?

2011-02-26 Thread Yves Parès
I tried reinstalling GHC 7.0.1 from scratch, the issue remains... 2011/2/26 Daniel Fischer > On Saturday 26 February 2011 12:54:02, Yves Parès wrote: > > When I look at the documentation of Control.Monad.Error [1] or > > Control.Applicative [2] it is not said that it re-exports > > Control.Mona

Re: [Haskell-cafe] Either instance of Monad?

2011-02-26 Thread Daniel Fischer
On Saturday 26 February 2011 12:54:02, Yves Parès wrote: > When I look at the documentation of Control.Monad.Error [1] or > Control.Applicative [2] it is not said that it re-exports > Control.Monad.Instances. So maybe this behaviour is normal... I don't think so. Instances are automatically propag

Re: [Haskell-cafe] Either instance of Monad?

2011-02-26 Thread Yves Parès
When I look at the documentation of Control.Monad.Error [1] or Control.Applicative [2] it is not said that it re-exports Control.Monad.Instances. So maybe this behaviour is normal... [1] http://hackage.haskell.org/packages/archive/mtl/2.0.1.0/doc/html/Control-Monad-Error.html [2] http://hackage.ha

Re: [Haskell-cafe] FFI: C-side object not destructed

2011-02-26 Thread Miguel Mitrofanov
Well, this code in C++ would probably work too: Klass *k = new Klass(4,5); delete k; std::cout << k->getY() << std::endl; though smart compiler would probably issue a warning. See, when you delete something, C++ doesn't automagically mark your pointer as "invalid"; in fact, it preserves all the

Re: [Haskell-cafe] Fun with the ST monad

2011-02-26 Thread Stephen Tetley
Hi wren Thanks for that explanation - it's by far the clearest description of iteratees / enumerators I've seen. Best wishes Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Fun with the ST monad

2011-02-26 Thread Kevin Quick
In part to help solidify my own understanding and usage, I wrote up the following which shows a comparison of processing an input file. Andrew Coppin originally posed the issue concerning strictness imposed by using the ST monad for processing an input file. This literate example shows a comparis