--
Work is punishment for failing to procrastinate effectively.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Victor Nazarov
) = a
ttail (a, b, c) = (b, c)
tcons a (b, c) = (a, b, c)
tupleF t a = thead t a `tcons` tupleF (ttail t) a
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
(runReader m r)) r
deriving (Functor)
So syntax changes are very minor.
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Monoid Hash where
mempty = Hash 0
Hash a `mappend` Hash b = Hash (a `combine` b)
class Eq a = Hashable a where
hash :: a - Hash
hashWithSalt :: Hash - a - Hash
hashWithSalt salt x = salt `mappend` hash x
--
Victor Nazarov
On Wed, Oct 27, 2010 at 7:46 PM, Martijn Schrage mart...@oblomov.com wrote:
On 27-10-10 16:20, Victor Nazarov wrote:
Very cool. I'll incorporate your changes, If you don't mind.
Not at all.
However, I have some minor remarks.
You shouldn't override hscall function, or you may break partial
On Wed, Oct 27, 2010 at 4:30 PM, Martijn Schrage mart...@oblomov.com wrote:
On 21-10-10 01:01, Victor Nazarov wrote:
I've been working on this for some month and I think now I'm ready to
share the results.
Great stuff! I've been looking for something like this for a long time.
If you add
wasn't able to run it in Chrome without dedicated HTTP-server, seems
like it is the only way...
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, Oct 21, 2010 at 6:35 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote:
On 21/10/2010, at 12:01 PM, Victor Nazarov wrote:
I've been working on this for some month and I think now I'm ready to
share the results.
Given that this is alpha code, what's the performance like?
I don't have
to experiment with it as you wish.
Implementation
--
Compiler is implemented as [GHC](http://www.haskell.org/ghc/) backend
using GHC API. And been tested with GHC 6.12.1.
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
= id
main =
do putStrLn hello
putStrLn . concat
[ hello
, show (f 25 1)
]
flip mapM_ [1..100] $ \n -
do print n
putStrLn hello
where hello = Hello
I allways use spaces without tabs and allways use camelCase.
--
Victor Nazarov
.
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
...
I agree, the fact that this doesn't work is really dumb.
I think it is more simple like:
class Bijection a b where
...
type LeftToRight a = (Bijection a b) = b
type RightToLeft b = (Bijection a b) = a
--
Victor Nazarov
___
Haskell-Cafe
a b
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
)
In the expression: do { print (sizeof :: Sizeof Word16) }
What can I do with this code to make it type-check?
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Mon, Jun 28, 2010 at 12:33 AM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
On Sunday 27 June 2010 21:52:18, Victor Nazarov wrote:
I've allways found code like
-- maxBound (undefined :: Int)
a bit strange
Well, that would indeed be a bit strange since
maxBound :: (Bounded
On Fri, Feb 5, 2010 at 9:54 PM, Mario Blažević mblaze...@stilo.com wrote:
Victor Nazarov wrote:
Hello,
I've been writing some GUI application with Gtk2hs. It's an
interpreter for lambda-calculus and combinatory logic, it's GPL and if
you interested I can share it with cafe.
The problem
On Wed, Feb 3, 2010 at 4:11 PM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Victor Nazarov wrote:
data Behaviour a =
forall b. BBind (Behaviour b) (b - Behaviour a)
| BIO (IO a)
| forall obj. GObjectClass obj = BWaitEvent (Event obj) (Behaviour a)
instance Monad Behaviour
let buttonB label =
do liftIO $ set button [buttonLabel := label]
waitEvent (onClicked button)
buttonB (label ++ *)
runBehaviour (buttonB *)
set window [containerChild := button]
widgetShowAll window
mainGUI
--
Victor Nazarov
{-# LANGUAGE
:: a - a - Difference a
patch :: a - Difference a - a
prop_diffpatch a b = patch a (diff a b) == b
?
If not, where can I start towards the implementation? What's the way
to do it more functionally?
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe
comb a b = q * a + b
addCols q m n (LisMatrix xs) = ListMatrix $ map (\row -
modifyNth n (comb (row !! m)) row)
where comb a b = q * a + b
...
How can I fix this?
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Tue, Sep 22, 2009 at 1:31 AM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
Am Montag 21 September 2009 23:15:48 schrieb Victor Nazarov:
I've tried to reimplement code presented in the following blog post:
http://cdsmith.wordpress.com/2009/09/20/side-computations-via-type-classes
what happens
main = runFastCGI $ handleErrors test -- This works fine
So one variant of main function works, the other allways gives no
output. What can be the case?
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
flag. Everything works fine
with this flag.
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
,
utf8-string-0.3.5, xhtml-3000.2.0.1, zlib-0.5.2.0
/home/vir/.ghc/i386-linux-6.10.4/package.conf:
Cabal-1.6.0.1, Cabal-1.6.0.3, binary-0.5.0.1, utf8-string-0.3.5
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
. If somebody here can provide either a proof or a
counter-example, that would be helpful.
It seems obvious scince beta reduction never introduces new variales...
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
is not the Haskell way and should be avoid.
--
Victor Nazarov
On Wed, May 6, 2009 at 11:41 AM, Nico Rolle nro...@web.de wrote:
super nice.
best solution for me so far.
big thanks.
regards
2009/5/6 Victor Nazarov asviraspossi...@gmail.com:
On Tue, May 5, 2009 at 8:49 PM, Nico Rolle nro
, a] - (x y) (z a)
doLam :: Ord a = ([a] - Bool) - [a] - Bool
doLam lam params = lam params
So, this will work fine:
doLam lam1 [1, 2]
doLam lam2 [1,2,3,4]
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
/lib/cabal/bin into your PATH.
--
Victor Nazarov
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I wonder what software licence I can use to release my application.
I've developed some education tool with the following dependencies:
% ghci Main.hs
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking
Hello, cafe.
I whant to switch to GHC 6.10
My application compiled fine with 6.8.3, but after switchin to 6.10,
I've got errors about usage of catch function:
Main.hs:165:14:
Ambiguous type variable `e2' in the constraint:
`Exception e2' arising from a use of `catch' at
On Feb 10, 2008 3:40 PM, Mattes Simeon [EMAIL PROTECTED] wrote:
Thanks for your help. It was very useful.
Though in comparison with C or C++ I can't figure out so clear the syntax.
Maybe it has to do with the syntactic Sugar of each Language. I 'll give you a
similar example I saw in a book
On Jan 27, 2008 11:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote:
oh, yes, they are really still study 19th century physics, but not
because of great mind, but due to age of university professors. i've
studied at Moscow University in 89-91 and department of computer
languages still studied
On Jan 10, 2008 8:39 PM, apfelmus [EMAIL PROTECTED] wrote:
Victor Nazarov wrote:
Yes, there is: you can use a zipper
http://en.wikibooks.org/wiki/Haskell/Zippers
Here's how:
data Branch v = AppL (Term v)
| AppR (Term v)
| Lamb v
type Context
Hello,
I have little practice in Haskell. And I look forward for suggestions on how
to improve the code. Code is not working: some definitions are missed.
The goal of the code is to implement the evaluator for untyped lambda-calculus.
The main problem is how to display each step of reduction?
On Jan 11, 2008 2:11 AM, Felipe Lessa [EMAIL PROTECTED] wrote:
On Jan 10, 2008 8:54 PM, Luke Palmer [EMAIL PROTECTED] wrote:
Can someone explain what the heck is going on here?
AFAICT, nothing is wrong. You see, both returned the very same values.
[snip]
But referential transparency wasn't
On Jan 11, 2008 2:28 AM, Felipe Lessa [EMAIL PROTECTED] wrote:
On Jan 10, 2008 9:20 PM, Luke Palmer [EMAIL PROTECTED] wrote:
Ahh, it was ghc 6.8.1, without any optimization. If I turn on optimization,
the behavior goes away, and they both behave like the const version.
That was what I
On Dec 7, 2007 4:46 PM, Luke Palmer [EMAIL PROTECTED] wrote:
On Dec 7, 2007 6:27 AM, Victor Nazarov [EMAIL PROTECTED] wrote:
nary 0 x [] = x
nary n f (x:xs) | n 0 = nary (n-1) (f $ read x) xs
Sometimes it helps to write type signatures for functions. As in this
case, where you'll find
On Dec 7, 2007 2:52 PM, [EMAIL PROTECTED] wrote:
In fact, that distinction is possible. The following article
How to write an instance for not-a-function
http://okmij.org/ftp/Haskell/typecast.html#is-function-type
specifically describes a method of writing an instance which
On 10/4/07, Justin Bailey [EMAIL PROTECTED] wrote:
On 10/3/07, Victor Nazarov [EMAIL PROTECTED] wrote:
But how would you know that evil dictator uses unsafePerformIO???
You don't. unsafePerformIO can't be taken it away (there are legitimate
reasons to strip IO), which is why I wonder
i am a newbie in haskell.
i have read about the tool distcc, http://distcc.samba.org/.
so i was wondering, does something like this already exist for
haskell?
would it be possible to implement a similar tool based on ghc for
haskell or does this not make sense as a haskell program has to be
I still can't remember how guards are treated in Haskell. Here is the
code snippet in question:
foo a | a == 1 = 6
foo a | a == 2 = 7
foo a = 8
Would Haskell fall through to the third alternative if a is not equal
to 1 or 2. I know that this can be rewritten more sanely, but I just
consider
42 matches
Mail list logo