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 abstract-value computation (or constants or error codes),
a snippet of whi
On 5/7/11 5:15 PM, dm-list-haskell-c...@scs.stanford.edu wrote:
In general, I try to place as few requirements in the contexts of
functions as possible.
One counterargument to this philosophy is that there are many cases
where fmap can be defined more efficiently than the liftM derived from
r
On 5/7/11 4:29 PM, Eitan Goldshtrom wrote:
I know about the $ symbol, that's why it's in there in the respective
places. I see that I can use it to fix my problem, but I was trying to
figure out function composition really. I guess that's just not the
place for it. I'll check out Control.Applicat
As another suggestion, you may try HLint [1]. It usually tells you if
you put unnecessary parenthesis. Among other nice suggestions.
[1] http://community.haskell.org/~ndm/hlint/ (or cabal-install hlint)
Cheers, =)
--
Felipe.
___
Haskell-Cafe maili
At Sat, 07 May 2011 21:50:13 +0100,
Maciej Marcin Piechotka wrote:
>
> Sorry for third post but I wonder why the many instances are restricted
> by Monad.
It would be great if Functor were a superclass of Monad. However,
since it isn't, and since I can't think of anything particularly
useful to
Sorry for third post but I wonder why the many instances are restricted
by Monad.
Both Functor and Applicative can by constructed without Monad:
> instance (Functor m) => Functor (CtlArg t m) where
> fmap f (CtlArg arg g c) = CtlArg arg (fmap f . g) c
>
> instance (Functor m) => Functor (Ite
Got it.
You mean use the formula for summing an arithmetic progression twice
and take account of duplicates.
Sheer genius!
On Sat, May 7, 2011 at 11:56 AM, Eugene Kirpichov wrote:
> One doesn't have to touch them to compute their sum.
>
> 2011/5/7 KC :
>> Do you mean O(1) complexity?
>>
>> Don
I know about the $ symbol, that's why it's in there in the respective
places. I see that I can use it to fix my problem, but I was trying to
figure out function composition really. I guess that's just not the
place for it. I'll check out Control.Applicative. Also thanks for the
clarification on
On Sat, May 7, 2011 at 2:10 PM, Eitan Goldshtrom wrote:
> Hi. I am kind of tired of all of the parentheses I have to put in places and
> I'm trying to figure out what is the correct way to write code such that I
> can leave out parentheses. For example, I have the following:
>
> data Message = ...
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 5/7/11 15:10 , Eitan Goldshtrom wrote:
> I get the error "Couldn't match expected type `[Char]' with actual type `a0
> -> c0'". The only way it seems to work is
> f p = putStrLn $ (show (Main.id p)) ++ " - message received"
Interestingly enough, yo
Hi. I am kind of tired of all of the parentheses I have to put in places
and I'm trying to figure out what is the correct way to write code such
that I can leave out parentheses. For example, I have the following:
data Message = ... --leaving this out because it's not important
data Plane = Pla
One doesn't have to touch them to compute their sum.
2011/5/7 KC :
> Do you mean O(1) complexity?
>
> Don't you have to touch at least the multiples of 3 & 5 making it O(k)
> where is the number of multiples of 3 and the number of multiples of
> 5?
>
>
> On Fri, May 6, 2011 at 10:10 PM, Lyndon May
Do you mean O(1) complexity?
Don't you have to touch at least the multiples of 3 & 5 making it O(k)
where is the number of multiples of 3 and the number of multiples of
5?
On Fri, May 6, 2011 at 10:10 PM, Lyndon Maydwell wrote:
> If you're looking for efficiency, I believe you can actually do #
On Sat, May 7, 2011 at 12:38 PM, Andrew Coppin
wrote:
> On 07/05/2011 09:10 AM, Gregory Collins wrote:
>>
>> Linode. Can't recommend them highly enough.
>
> If Linode is really the cheapest that the Internet has to offer, I'm going
> to need to find a job that pays /significantly/ more money...
I
Sönke Hahn wrote:
> There is a related bug report in ghc's trac: [1]. According to that, you
> could try to remove the "-fvia-C" flag to prevent ghc from using the C
> backend. (I had no luck with that, so I guess there is still another bug
> lurking.)
Just FYI:
I tried again and realised, why I
I am considering hetzner online in Germany -
http://www.hetzner.de/en/hosting/produkte_rootserver/eq4
Ralph Hodgson
@ralphtq
On May 7, 2011, at 6:27 AM, Charles-Pierre Astolfi wrote:
> I'm using tilaa.nl. It starts at ~10€/month and they are quite
> friendly and competent.
> --
> Cp
>
>
>
>
I've had good experiences with prgmr VPSes; I currently have a 1024MB VPS that
I'm paying $16 a month for (the month by month rate is $20, but I'm paying for
it yearly). You can also grab a 256MB VPS for $8 month by month or $6.40
yearly, if that'd be enough. In the last year I think there was
I'm using tilaa.nl. It starts at ~10€/month and they are quite
friendly and competent.
--
Cp
On Sat, May 7, 2011 at 13:53, Nicolas Wu wrote:
> On 7 May 2011 13:52, Nicolas Wu wrote:
>>> Then again,
>>> I haven't found many companies that list prices in GBP.)
>>
>> I use rackhost.co.uk
>
> Oops
On 7 May 2011 13:52, Nicolas Wu wrote:
>> Then again,
>> I haven't found many companies that list prices in GBP.)
>
> I use rackhost.co.uk
Oops, I mean rackspace.co.uk, who I believe are the people behind
slicehost.com which comes highly recommended.
Nick
___
> Then again,
> I haven't found many companies that list prices in GBP.)
I use rackhost.co.uk I've had no problems with them at all, and they
charge in GBP. A cheaper alternative is CheapVPS, I moved away from
them since they're not terribly reliable, but probably good enough for
personal websites
Hi all,
Manatee-0.2.1 release! (Detail see: http://goo.gl/MkVw
http://goo.gl/PnPbq http://goo.gl/OSpz8)
New features in new version:
* Show welcome page when you first time use Manatee, make manatee easier to use.
* Keymap helper, you just need hit Ctrl+/ or Ctrl+? if you don't know keymap.
* Wi
On Sat, May 7, 2011 at 12:38, Andrew Coppin wrote:
> On 07/05/2011 09:10 AM, Gregory Collins wrote:
>>
>> Linode. Can't recommend them highly enough.
>
> If Linode is really the cheapest that the Internet has to offer, I'm going
> to need to find a job that pays /significantly/ more money...
>
> (
On 06/05/2011 07:16 PM, JP Moresmau wrote:
I use Amazon EC2 Free Tier. You can install Yesod/Warp easily enough
and it's fine for small traffic.
My understanding is that EC2 is only free for 1 year, after which you
pay full price. ($0.02/hour = $15/month if it's running full-time.)
_
On 07/05/2011 09:10 AM, Gregory Collins wrote:
Linode. Can't recommend them highly enough.
If Linode is really the cheapest that the Internet has to offer, I'm
going to need to find a job that pays /significantly/ more money...
(I'm also not sure whether being billed in USD is possibly a bad
Linode. Can't recommend them highly enough.
G
On Fri, May 6, 2011 at 8:07 PM, Andrew Coppin
wrote:
> OK, so strictly this is unrelated to Haskell as such. However, there's
> enough people doing webby stuff with Haskell that some of you must have
> wanted to run your code on a real, Internet-acce
"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 lambdabot.
___
Andrew Coppin wrote:
OK, so strictly this is unrelated to Haskell as such. However, there's
enough people doing webby stuff with Haskell that some of you must have
wanted to run your code on a real, Internet-accessible web server. So
does anybody have any suggestions on which companies offer th
27 matches
Mail list logo