On 8 May 2011 06:14, Nicholas Tung nt...@ntung.com wrote:
Dear all,
I'd like to write a function maybeShow :: a - Maybe String, which
runs show if its argument is of class Show.
I'm pretty sure this is not readily possible - there might be some
hack through Typeable but that would oblige
The behavior you are asking for maybeShow violates parametricity, so it
can't exist without some sort of typeclass constraint.
That said, in your particular situation, it's an interesting question.
The Show instance for Either is
instance (Show a, Show b) = Show (Either a b) where ...
so we as
On May 7, 2011, at 12:41 AM, Stephen Tetley wrote:
show is the failing package
A look on Hackage suggests that show had problems with its cabal
file at versions 0.4 0.4.1 and was fixed at 0.4.1.1.
Can you try installing show individually at 0.4.1.1 the try
installing the rest of
On Sun, May 8, 2011 at 7:14 AM, Nicholas Tung nt...@ntung.com wrote:
Dear all,
I'd like to write a function maybeShow :: a - Maybe String, which
runs show if its argument is of class Show.
The context and motivation for this are as follows. I have a GADT type
which encapsulates
On 6 May 2011, at 23:07, Nicolas Frisby wrote:
all of the %time cells in the generated Main.prof file are 0.0, as is
the total time count (0.00 secs and 0 ticks). The %alloc cells seem
normal.
See
http://hackage.haskell.org/trac/ghc/ticket/5137
Regards,
Malcolm
It looks like cabal-install is wanting to do wacky things to the GHC
boot libraries, which means something is seriously astray.
What happens when you run `ghc-pkg check` ?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Sunday 08 May 2011 09:24:50, Sean Perry wrote:
package random-1.0.0.3 requires time-1.2.0.3
package random-1.0.0.3 requires time-1.2.0.4
Preprocessing library show-0.4.1.1...
Building show-0.4.1.1...
command line: cannot satisfy -package-id
random-1.0.0.3-749b78c54a8a1b32dbb45d98a91b:
At Sat, 7 May 2011 22:14:27 -0700,
Nicholas Tung wrote:
Dear all,
I'd like to write a function maybeShow :: a - Maybe String, which runs
show if its argument is of class Show.
You can't do this, because in general there is no way to know whether
an arbitrary object a is of class Show.
For Project Euler #24 you don't need to generate all the lexicographic
permutations by Knuth's method or any other.
You're only looking for the millionth lexicographic permutation of
0123456789
Problem 24
A permutation is an ordered arrangement of objects. For example, 3124
is one
On Sun, May 8, 2011 at 10:41 AM, cas...@istar.ca wrote:
For Project Euler #24 you don't need to generate all the lexicographic
permutations by Knuth's method or any other.
This is a clever, smart solution. You should post it to the Haskell
Wiki page [0].
[0]
Are there any drawbacks to using the Apache license for Haskell
packages?
/M
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: mag...@therning.org jabber: mag...@therning.org
twitter: magthe http://therning.org/magnus
I invented the term Object-Oriented, and I
On 11-05-08 03:24 AM, Sean Perry wrote:
package random-1.0.0.3 requires time-1.2.0.3
package random-1.0.0.3 requires time-1.2.0.4
In addition to unregistering --user random-1.0.0.3, also unregister
--user time-1.2.0.4, the real culprit. The real culprit is why you are
infected with a
I see from the solutions on Project Euler others did think of this way
but at least on my last IQ test I did get an 'A'; 95.
I am a jenius. :D
--
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I'm happy to announce Newt: a trivial tool for creating boilerplate.
I frequently need to create projects with slight customizations -- I
have a particular layout for cabal projects, and make files for LaTeX
papers, etc... However, there are often fields that need to be
updated in many places.
On 7/05/2011, at 2:44 PM, Mario Blažević wrote:
As I said, the most usual name for the Enumerator concept would be Generator.
That term is already used in several languages to signify this kind of
restricted coroutine. I'm not aware of any good alternative naming for
Iteratee.
This being
Howdy,
as usual, the haskell type system complete defeats me in the simplest of
applications:
import Data.Array.Repa as A
import Data.Array.Repa.Index
import Data.Array.Repa.Shape as AS
main = do
let x = A.fromList (AS.shapeOfList [2, 2]) ([1.0, 2.0, 3.0, 4.0]::[Double])
putStrLn $ show x
On Sun, 8 May 2011 16:23:59 -0700
Rogan Creswick cresw...@gmail.com wrote:
Newt scans the input (either a file, directory or stdin) for tags
marked with tagName [1], then replaces those entries with
values specified on the command line, producing either a new file,
modifying the input
17 matches
Mail list logo