x - take_while some_condition some_list
and
x - takeWhile someCondition someList
x - take-while some-condition some-list
As someone who is dyslexic, I find both camelCase and dashes far easier to
read than underscores. I find it hard to count the words in the underscore
version - the
Perhaps what you are looking for is a more powerful defining semantics?
newtype MyFoo = Foo defining (Foo(..)) -- all class instances that Foo has
are delegated through from MyFoo
Matthew
not sure if this is what you are thinking at, but everytime I wrap a
type Foo in a newtype MyFoo to
Of course, I meand 'deriving', not 'defining'
/me embarsed
2009/12/3 Matthew Pocock matthew.poc...@ncl.ac.uk
Perhaps what you are looking for is a more powerful defining semantics?
newtype MyFoo = Foo defining (Foo(..)) -- all class instances that Foo has
are delegated through from MyFoo
I have had some luck with the graphviz (dotter) bindings for drawing
node/ark graphs. It's not an ideal solution, and will require some wrappers
to bind to your data structures, but it does work.
Matthew
2009/11/20 Victor Mateus Oliveira rhapso...@gmail.com
Hi,
Anyone knows a good library
2009/11/12 Heinrich Apfelmus apfel...@quantentunnel.de
Interestingly, this is different from Control.Monad.State.Strict . The
latter never forces the state itself, just the pair constructor of the
(result,state) pair.
Yes. This bit me the first time I came across it. I think we need a
2009/11/12 Heinrich Apfelmus apfel...@quantentunnel.de
Interestingly, this is different from Control.Monad.State.Strict . The
latter never forces the state itself, just the pair constructor of the
(result,state) pair.
Yes. This bit me the first time I came across it. I think we need a
How about:
instance (Monad m) = MonadState s (SStateT s m) where
get = S get
put s = S (put $ using s $ strategy m)
where our state monad has a strategy field?
Matthew
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Is there a state monad that is strict on the state but lazy on the
computation? Of course, strictness in the state will force a portion of the
computation to be run, but there may be significant portions of it which are
not run. Would there be a way to write a state monad such that it is
entirely
Hi,
It seems every time I look at hackage there is yet another stringy datatype.
For lots of apps, the particular stringy datatype you use matters for
performance but not algorithmic reasons. Perhaps this is a good time for
someone to propose a stringy class?
Matthew
On Monday 24 March 2008, Don Stewart wrote:
Let's get a new faster Data.Map and other containers ready to go by the
end of the northern summer?
And while we are visiting this, can I put in a vote for a seperation between
the default Data.* container concrete implementations and associated
Hi,
Who currently maintains the Random monad code? I have some patches to
contribute.
Matthew
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Monday 24 March 2008, Henning Thielemann wrote:
On Mon, 24 Mar 2008, Matthew Pocock wrote:
Who currently maintains the Random monad code? I have some patches to
contribute.
Do you refer to the code on the wiki?
No, to the code in darcs at http://code.haskell.org/monadrandom
Matthew
Hi,
Happy Easter!
I've been using monad transformers for the first time in anger this week. They
certainly do the job. However, there's an operation that I keep defining over
and over again. It is sort of like lift and return in that it's glue to get
operations and values into the monad from
Hi Yitz,
I was thinking along the lines of a class linking the monad transformer with
the base monad:
class (MonadTrans mt, Monad b) = MonadTForm mt b | mt - b
where
hoist :: (Monad m) = b a - mt m a
This is to restrict it directly between the base monad and the transformed
version. If
| I'd be interested in any progress here -- we noticed issues with
| optimisations in the stream fusion package across module boundaries
| that we never tracked down. If there's some key things not firing,
| that would be good to know.
|
| I suspect that if all modules are compiled -O0,
Hi,
I've been working a lot with maps, sets and lists. While the process of
getting things out of them is abstracted by foldable, traversable and
friends, the process of building one up is not. Would it be possible to have
something like:
class Buildable b where
empty :: b a --makes an
On Wednesday 06 February 2008, Henning Thielemann wrote:
If the type checker does not terminate because the checked function does
not terminate on the example input, then the function does not pass the
type check and as a compromise this would be ok.
Can't fault this logic. The problem is
On Monday 04 February 2008, Adrian Hey wrote:
Yikes!
Also, I can't help thinking that the common justification for the
current limit (that it helps find alleged bugs) is a little lame.
It only helps find bugs if one expects ones program to use less than
8M of stack (hence if it's using more,
On Monday 04 February 2008, Neil Mitchell wrote:
Hi
That would be nice. But its only beneficial if there are programs
which takes large amounts of stack at some point, but then shrink down
to very little stack and continue for a reasonable amount of time.
From the 'when I was a lad'
On Monday 28 January 2008, Rene de Visser wrote:
It would be nice if HXT was incremental even when you are processing the
whole tree.
If I remember correctly, the data type of the tree in HXT is something like
data Tree = Tree NodeData [Tree]
which means that already processed parts of the
On Saturday 26 January 2008, Keith Fahlgren wrote:
Perhaps a more modern approach would be StAX[1]-like rather than SAX-like?
In either case, streaming, non-DOM.
I am concerned by the number of people expressing willingness to abandon
namespace support, but perhaps I'm being too much of a
Hi,
I've been using hxt to process xml files. Now that my files are getting a bit
bigger (30m) I'm finding that hxt uses inordinate amounts of memory. I have
8g on my box, and it's running out. As far as I can tell, this memory is
getting used up while parsing the text, rather than in any
On Thursday 24 January 2008, Albert Y. C. Lai wrote:
Matthew Pocock wrote:
I've been using hxt to process xml files. Now that my files are getting a
bit bigger (30m) I'm finding that hxt uses inordinate amounts of memory.
I have 8g on my box, and it's running out. As far as I can tell
Would a bytestring-backed implementation of parsec solve my problems? Is there
such a beast out there?
Matthew
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
Hello,
data DecoratedFormula = DF{formula :: Formula,
iformula :: IFormula}
type FastClause = MH.Min US.Set DecoratedFormula
FastClause.hs:71:25:
`US.Set' is not applied to enough type arguments
Expected kind `*', but `US.Set' has kind `* - *'
On Sunday 29 July 2007, Jim Apple wrote:
The way I would do this would be to encode as much of the value as I
cared to in the constructors for concepts, rather than just encoding
the top-level constructor.
data Named
data Equal a b
data Negation a
data Top
data Concept t where
Hi,
I'm trying to get to grips with GADTs, and my first attempt was to convert a
simple logic language into negative normal form, while attempting to push the
knowledge about what consitutes negative normal form into the types. My code
is below.
I'm not entirely happy with it, and would
Hi,
I saw that it's possible to peal off kinds from the right-hand side when
instantiating classes. Is it possible to peel them off from the left-hand
side? Or in any order?
I have been told in #haskell by people who seems to know that Very Bad Things
happen if you do this without also making
Fortress (sun's possibly-not-vaporware hpc language) supports arbitrary
unicode chars in code, and has an escape syntax for commonly used things.
Similarly, proof-general/isabelle supports tex-style escapes for symbols
greek. It seems to me that a pre-processor that turns human-friendly
Hi,
Does anybody know of any compilers that can compile portions of a haskell
program to an FPGA? I have found a few domain-specific languages implemented
in haskell for FPGAs, but so far no back-ends for compilers like ghc.
Thanks,
Matthew
___
On Tuesday 04 July 2006 13:20, Simon Peyton-Jones wrote:
Lexically-scoped type variables are undergoing a slight upheaval in GHC 6.6
that has not quite settled, and that is what you are running into.
Thanks for the help. After a lot of trial error, and reading and stuff I've
got past the
Hi,
I had some trouble getting syb-generics 2.9 to compile with ghc 6.5 (don't
ask - I should probably be waiting for a stable release). I fixed the first
problem by replacing a definition with in-line type info by splitting the
type out, although I am not sure that I have done it right. Can
32 matches
Mail list logo