The reference includes both pairs and triples under "Tuples," but only
pairs under "Bigger types." You may wish to add the following example
under "Bigger types":
(a, b, c) triple of types a, b, and c (a, b, and c are type
variables)
Also, the examples under "Tuples" suggest that only pairs
Hello Michael,
Friday, November 7, 2008, 8:51:46 AM, you wrote:
> Have others run into this problem before? What options are there for
> working around it?
if your goal is to maximize portability and not speed, one option is
to make another structure without bit fields, and add C helper
functio
> I tried your example in GHC 6.10 and isum appears to work fine.
> The type of 1000 gets defaulted to Integer, a specialized version
> of isum for Integer is then created, the strictness analyzer
> determines that isum is strict in s, and the code generator produces a
> loop. (If you want to
I'm writing a Storable instance for a data type that marshals to a C
structure that contains bit fields such as the following:
struct Foo {
short x;
short y;
unsigned int a : 1;
unsigned int b : 1;
unsigned int c : 1;
unsigned int d : 1;
unsigned int reserved : 12;
}
For the "x" and
Ah, that's good to know. I thought initGL would create the context.
Sorry to be unclear in the code I posted, but part of createGUIObject
is a glDrawingAreaNew. It creates a drawing area, which is then
stored in a giant UserInterface record.
data UserInterface = MainWindow {
...
, drawing_ca
[CCing gtk2hs-users]
Jefferson Heard wrote:
> import Graphics.UI.Gtk
> import Graphics.UI.Gtk.Glade
> import Graphics.UI.Gtk.OpenGL
> import qualified Graphics.Rendering.OpenGL as GL
> import Graphics.Rendering.OpenGL (($=))
>
> main = do
> initGUI
> initGL
"initGL" may be slightly misleadin
On Thu, Nov 6, 2008 at 4:44 PM, Thomas Schilling
<[EMAIL PROTECTED]> wrote:
> You need to use base-3. For a temporary fix, edit the file HDBC.cabal
> and change the base part of the "build-depends" to look like this:
> base == 3.*, (wherever it occurs)
>
That worked.
Thanks!
> 2008/11/6 PJ Durai
Or build with --constraint='base<4'
nominolo:
> You need to use base-3. For a temporary fix, edit the file HDBC.cabal
> and change the base part of the "build-depends" to look like this:
> base == 3.*, (wherever it occurs)
>
> 2008/11/6 PJ Durai <[EMAIL PROTECTED]>:
> > Greetings
> >
> > I would
You need to use base-3. For a temporary fix, edit the file HDBC.cabal
and change the base part of the "build-depends" to look like this:
base == 3.*, (wherever it occurs)
2008/11/6 PJ Durai <[EMAIL PROTECTED]>:
> Greetings
>
> I would like to report that I am not able to compile hdbc 1.1.5.0.
>
>
[Redirecting to cafe@ since haskell@ is not meant for discussions]
Sure, they are bad for one reason: you cannot link to a frame
configuration directly. However, for this particular use case they
are quite handy. There are some features missing (like hoogle
integration) and some annoyances (if j
Alexander Foremny wrote:
> I am writing an single server, multi channel IRC bot with the support of
> plugins and limited plugin communication. With the plugin system I am facing
> problems I cannot really solve myself.
Here's an approach built completely around Data.Typeable. The
fundamental idea
import Graphics.UI.Gtk
import Graphics.UI.Gtk.Glade
import Graphics.UI.Gtk.OpenGL
import qualified Graphics.Rendering.OpenGL as GL
import Graphics.Rendering.OpenGL (($=))
main = do
initGUI
initGL
GL.shadeModel $= GL.Flat
GL.depthFunc $= Just GL.Less
(window1,gui,dlgs) <- constructGUIObje
Conal Elliott <[EMAIL PROTECTED]> wrote:
> To help me understand your question, would you be unhappy with
> the following structure?
>
> -- runnable
> main = interact f
> -- composable
> f = ...
>
> The discipline is to use interact (or another combinator) to
> wrap a functional/com
Greetings
I would like to report that I am not able to compile hdbc 1.1.5.0.
$ runghc.exe Setup.lhs build
Preprocessing library HDBC-1.1.5...
Building HDBC-1.1.5...
[1 of 6] Compiling Database.HDBC.ColTypes ( Database\HDBC\ColTypes.hs,
dist\build\Database\HDBC\ColTypes.o )
[2 of 6] Compiling Data
With ghc 6.10.1, the patches aren't necessary for the lasted releases of the
bindings. I've put a walkthrough on my blog for the process of getting
`freeglut+GLUT binding+GL binding+ghc 6.10.1` up and running.
http://netsuperbrain.com/blog/
David
On Tue, Oct 28, 2008 at 10:48 AM, David Sankel <[
Hi Mauricio. What you want actually already exists in QuickCheck as
the "Gen" monad.
>From
>http://hackage.haskell.org/packages/archive/QuickCheck/1.1.0.0/doc/html/src/Test-QuickCheck.html#Gen
newtype Gen a
= Gen (Int -> StdGen -> a)
instance Monad Gen where
return a= Gen (\n r -> a)
2008/11/6 Wolfgang Jeltsch <[EMAIL PROTECTED]>:
> Am Donnerstag, 6. November 2008 00:21 schrieb David Waern:
>> * Add framed view of the HTML documentation
>
> After many years with many people telling us that frames are bad, you add
> frame support to Haddock? Hmm.
You should discuss this with
Mauricio wrote:
The problem is that I need 'a' or 'b' above to sometimes also change the
environment. I think with this method I could not get that.
I no longer understand what you want.
I thought you wanted an environment which automatically changed every
"step".
I showed you how you can
The docs in latest are for 6.10.1 at this point, I don't think that
function is in 6.8.2:
http://www.haskell.org/ghc/docs/6.8.2/html/libraries/Cabal/Distribution-Simple.html
-Ross
Maurício wrote:
According to this page:
http://www.haskell.org/ghc/docs/latest/html/libraries/Cabal/Distribution
[...]
Are you sure you don't want to use monad transformers?
No. Do you have a sugestion on how could I do
it in this situation?
Maurício
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
According to this page:
http://www.haskell.org/ghc/docs/latest/html/libraries/Cabal/Distribution-Simple.html
there's an available toplevel declaration named:
autoconfUserHooks
in Distribution.Simple. However:
ghci --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
ghci
Hi,
the reference suggests the use of otherwise (instead of _) as the
default pattern in a case expression. While it certainly works, isn’t it
bad style, as it shadows Prelude.otherwise:
$ cat otherwise.lhs ; runhaskell otherwise.lhs
>demo b arg = case b of
> True -> do print
Mauricio <[EMAIL PROTECTED]> wrote:
> [...]
>
Are you sure you don't want to use monad transformers?
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibite
Is there some abstraction in current ghc library that implements
something like Reader, but where the value of the environment is
updated at every "step"?
>>>
> It doesn't quite make sense, because one "step" isn't well defined.
> How many "steps" is "return (f x)" ? how
On Thu, Nov 6, 2008 at 7:59 AM, Mauricio <[EMAIL PROTECTED]> wrote:
> Hi,
>
> According to this page:
>
> http://www.haskell.org/ghc/docs/latest/html/libraries/Cabal/Distribution-Simple.html
>
> there's an available toplevel declaration named:
>
> autoconfUserHooks
>
> in Distribution.Simple. Howev
Hi,
According to this page:
http://www.haskell.org/ghc/docs/latest/html/libraries/Cabal/Distribution-Simple.html
there's an available toplevel declaration named:
autoconfUserHooks
in Distribution.Simple. However:
ghci --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
Mauricio wrote:
Is there some abstraction in current ghc library
that implements something like Reader, but where
the value of the environment is updated at every
"step"?
do-it-yourself? you can start from reader definition and add what you
need. you just need to make "initial state" consisting
Hello Mauricio,
Thursday, November 6, 2008, 2:52:16 PM, you wrote:
> that. But I wanted to know if there's already the
> "right way to do it" instead of my "newbie way to
> do it" :)
"All about monads" doesn't mention it, at least :)
--
Best regards,
Bulatmailto:[
Is there some abstraction in current ghc library
that implements something like Reader, but where
the value of the environment is updated at every
"step"?
do-it-yourself? you can start from reader definition and add what you
need. you just need to make "initial state" consisting from state
itsel
Hello Mauricio,
Thursday, November 6, 2008, 2:30:00 PM, you wrote:
> Is there some abstraction in current ghc library
> that implements something like Reader, but where
> the value of the environment is updated at every
> "step"?
do-it-yourself? you can start from reader definition and add what
Hi,
Is there some abstraction in current ghc library
that implements something like Reader, but where
the value of the environment is updated at every
"step"? I imagine something that instead of running
like this:
runReader ( do ... ) environment
I would run like:
runReader ( do ... ) environm
wren ng thornton <[EMAIL PROTECTED]> wrote:
> If Haskell had strictness annotations as part of the type system,
> then there might be room for progress. We could imagine constructing
> separate polymorphic bodies for isum, one for each strictness variant
> of (+). Then, when isum is instantiated a
I tried your example in GHC 6.10 and isum appears to work fine.
The type of 1000 gets defaulted to Integer, a specialized version
of isum for Integer is then created, the strictness analyzer
determines that isum is strict in s, and the code generator produces a
loop. (If you want to look at th
2008/11/6 Duncan Coutts <[EMAIL PROTECTED]>:
> Will .haddock files generated by haddock-2.3.0 work with haddock-2.4? If
> not it would be preferable to have a 2.3.1 release or something for
> distributions that want to package haddock separately from ghc (eg
> gentoo). Otherwise we somehow have to
Hello Bulat,
Thanks for suggestion. The problem is not reproducible w/ GHC 6.10.1.
Regards,
Dmitry
On Thu, Nov 6, 2008 at 2:01 AM, Bulat Ziganshin
<[EMAIL PROTECTED]> wrote:
> Hello dmitry,
>
> Wednesday, November 5, 2008, 10:46:20 PM, you wrote:
>
>> (.text+0x66dd7):fake: undefined reference to
On Thu, 2008-11-06 at 00:21 +0100, David Waern wrote:
>
> -- Haddock 2.4.0
>
>
> A new version of Haddock, the Haskell documentation tool, is out.
>
> This is a later version than the one shipped with GHC 6.
Bulat Ziganshin wrote:
Hello wren,
Thursday, November 6, 2008, 12:00:22 PM, you wrote:
the trie automaton I mentioned in my previous post: just add a (?{
$value = ... }) action to the end of each component regex and read out
the value of $value after you match.
$value? in haskell? :)
Shh,
Hello wren,
Thursday, November 6, 2008, 12:00:22 PM, you wrote:
> the trie automaton I mentioned in my previous post: just add a (?{
> $value = ... }) action to the end of each component regex and read out
> the value of $value after you match.
$value? in haskell? :)
--
Best regards,
Bulat
ChrisK wrote:
If you need to be left-biased then you need a perl-style engine, and you
can use the regex-pcre or pcre-light haskell package and the PCRE
library. These are obtainable from Hackage. I doubt PCRE uses a simple
DFA...
I don't know if regex-pcre or pcre-light supports the (?{...
Mitchell, Neil wrote:
Hi Martijn,
> It's not that tricky if you do a regular expression state machine
> yourself, but that's probably a bit too much work. One way to get
> a speed up might be to take the regular expressions a,b,c,d and
> generate a regex a+b+c+d, and one a+b. You can then check
Dominic Steinitz wrote:
wren ng thornton freegeek.org> writes:
[snick]
> > isum 0 s = s
> > isum n s = isum (n-1) (s+n)
> This is tail recursive, and will be optimized to an iterative loop;
[snick]
> In terms of having a compiler 'smart enough', it's not clear that
> functions of this sor
Derek Elkins <[EMAIL PROTECTED]> wrote:
> On Wed, 2008-11-05 at 10:01 -0800, Daryoush Mehrtash wrote:
> > Lets assume we don't have undefined in the list, are there functions
> > (or properties in the function) that would cause foldl to have
> > different results than foldl'?
>
> The only differe
42 matches
Mail list logo