2009/3/13 Martijn van Steenbergen :
> Hello,
>
> Looking at Parsec 3 I see:
>
>> chainr1 :: (Stream s m t) => ParsecT s u m a ->
>> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
>> chainr1 p op = scan where
>> scan = do x <- p; rest x
>> rest x = (do f <- op; y <- scan; return (f x y))
2009/3/13 Pavel Perikov :
> Hi café !
>
> I googled for some kind of vim support for cabal but found nothing. I mean
> syntax highlighting of .cabal and probably integration with haskellmode. Did
> anyone hear about such thing?
>
> Pavel
I've been wanting something like this as well, so you inspi
2009/4/2 Henry Laxen :
> Dear Group,
>
> I'm trying to read the paper:
> "Functional Pearl: Implicit Configurations"
> at http://www.cs.rutgers.edu/~ccshan/prepose/
> and when running the code in prepose.lhs I get:
> ../haskell/prepose.lhs:707:0: Parse error in pattern
> which is pointing at:
> nor
2009/4/4 :
> So some time ago I saw mentioned the game of Zendo
> https://secure.wikimedia.org/wikipedia/en/wiki/Zendo_(game) as a good game
> for programmers to play (and not just by Okasaki). The basic idea of Zendo
> is that another player is creating arrangements of little colored plastic
> sh
2009/4/22 michael rice :
> Just exploring. How to load?
>
> Michael
>
> [mich...@localhost ~]$ ghci Data.Complex
> GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer ... linking ... done.
> Loading package base .
2009/4/28 Tuve Nordius :
> If I for some data type wants to derive, in this case Data and Typeable for
> use with syb code, but the problem is the same regardless what I want to
> derive.
>
>
>
> data family Something
>
> data Tree = Leaf Something | Fork Something Tree Tree
> deriving (Data
2009/5/1 Paul Keir :
> There's nothing better than making a data type an instance of Num. In
> particular, fromInteger is a joy. But how about lists?
>
> For example, if I have
>
> data Foo a = F [a]
>
> I can create a fromInteger such as
> fromInteger i = F [fromInteger i]
>
> and then a 19::(Foo
If you don't mind using GHC extensions (which in a view pattern thread
probably isn't much of a stretch to assume :) ), there's always record
punning (-XNamedFieldPuns):
data Foo = { [snip] }
f (Foo { a, g }) = ...
2009/1/15 John Van Enk :
> I've often thought having constructor "views" w
2009/8/5 xu zhang :
> Hi there,
>
> If I import a module and do not explicitly point out the entities I have
> imported. And I want the ghc to point out the entities automatically. Is
> there any method to do this? any methods to have the ghc point out the
> entities I import and export?
> Because
2009/9/27 Paul Moore :
> I'm still playing round with my random dieroll generation program. In
> doing so, I just hit a segmentation fault (I didn't think Haskell
> could *cause* a segfault!) I'm sure it's my code - I got this to
> compile by fiddling with types until the errors (which I didn't
> u
2009/10/8 Andrew U. Frank :
> i have a strange error, which does not occur when i run
> runghc Setup.lhs configure
> but when i use cabal configure and then build, it occurs.
>
> the error is
> Type constructor Control.Exception.Exception used as a class
> in the instance declaration.
> (i have imp
Can you have Typeable as an extra constraint? If so:
> {-# LANGUAGE ExistentialQuantification #-}
>
> import Data.Typeable
>
> data Baz = forall a. (Eq a, Typeable a) => Baz a
>
> instance Eq Baz where
> Baz x == Baz y =
> case cast y of
> Just y' -> x == y'
> Nothing -> Fa
12 matches
Mail list logo