Re: [Haskell-cafe] Compliments on the "IO inside" tutorial

2013-01-04 Thread Junior White
As a Haskell Beginner I also appreciate this excellent work!


On Fri, Dec 7, 2012 at 10:53 AM, Andriy Drozdyuk  wrote:

> I just wanted to express my gratitude to whoever wrote the "IO inside"
> tutorial:
> http://www.haskell.org/haskellwiki/IO_inside
>
> It is one of the best pieces of writing in Haskell I've ever come
> across: not only is it clear and very intuitive, but it also manages
> to strike a perfect balance between "programmers" and  "beginner
> haskell programmers".
> It certainly ties together a lot of other stuff one reads in books and
> category theory - and actually makes sense!
>
> My sincere gratitude, and keep up great job. I can only hope to write
> something as clear and useful as this.
>
> My only complaint is that it is really wasting away inside the Haskell
> Wiki - which gives it a rather bad "reputation", since a lot of wiki
> pages are of much lower quality. This should be nicely formatted in a
> PDF file or a even part of a book! Make it pretty and get people to
> notice it!!!
>
> Now i must sleep,
> -Andriy Drozdyuk
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal bug? repeat "--reinstall"

2013-01-04 Thread Albert Y. C. Lai

On 13-01-04 04:36 PM, Niklas Hambüchen wrote:

I get the following:

$ cabal install --only-dependencies --reinstall

Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.


Can somebody confirm that they see the same?


I confirm.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-04 Thread Colin Adams
There have been lots of proposals to fix the CATCALL problems in recent
years. None have been implemented (at least in ISE/GEC compilers. And
tecomp has been abandonded by its author - he is now writing a series of
blogs about a vapourware product called "Modern Eiffel").

I don't find the CATCALL problem a great problem in practice (one gets used
to avoiding the problem). But it is a nasty whole in the theory of the type
system.

On 3 January 2013 22:07, Timon Gehr  wrote:

> On 01/02/2013 11:19 PM, MigMit wrote:
>
>>
>> On Jan 3, 2013, at 2:09 AM, Gershom Bazerman  wrote:
>>
>>  On 1/2/13 4:29 PM, MigMit wrote:
>>>

  BTW. Why you think that Eiffel type system is unsafe?
>
 Well, if I remember correctly, if you call some method of a certain
 object, and this call compiles, you can't be certain that this object
 actually has this method. Could be that this object belongs to some
 subclass which removes this method.


>>> Eiffel doesn't handle the relationship of co- and contra-variance of
>>> arguments with subtyping in a principled way. This is apparently known as
>>> the "catcall" problem. See, e.g., this article:
>>> http://www.eiffelroom.org/**node/517
>>>
>>
>> Yes, variance is another big source of unsafety, that's for sure. And
>> another reason I think there is no real "theory" behind Eiffel, just a
>> bunch of features (or "concepts") boiled together.
>>
>>
> There seem to be efforts to fix this:
> http://tecomp.sourceforge.net/**index.php?file=doc/papers/**proof/
>
> The resulting language appears to be type safe:
> http://tecomp.sourceforge.net/**index.php?file=doc/papers/**
> lang/modern_eiffel.txt#**chapter_20
>
>
>
>
>
> __**_
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal bug? repeat "--reinstall"

2013-01-04 Thread Niklas Hambüchen
I get the following:

$ cabal install --only-dependencies --reinstall

Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.


Can somebody confirm that they see the same?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Makefile for a Haskell Project

2013-01-04 Thread Albert Y. C. Lai

On 13-01-02 01:01 AM, xuan bach wrote:

=
BASEDIR=/usr/local
INCS= -I$(BASEDIR)/include/omega -I.
LIBS= -L$(BASEDIR)/lib
LIB= -lcode_gen -lomega -lm

GHC=ghc

#
CFILES=$(CURDIR)/cfile
HSFILES=$(CURDIR)/hsfile
COBJFILES=$(CFILES)/termops.o $(CFILES)/termops2.o
ALLCFILES=$(CFILES)/termops.c $(CFILES)/termops2.c
#

GHC_FLAGS= -O2 -fglasgow-exts -fallow-overlapping-instances

_ffi_ex: $(COBJFILES)
 ghc $(GHC_FLAGS)  -lstdc++ --make -main-is  FfiEx -o ffi_ex
FfiEx.hs $(HSFILES)/*.hs $(LIBS) $(LIB) $(COBJFILES)
=
=> *fatal error: omega.h: No such file or directory


An implicit rule is triggered to compile *.c to *.o. The rule goes like

$(CC) -c $(CPPFLAGS) $(CFLAGS)

Therefore, your -I$(BASEDIR)/include/omega -I. is ignored.

To solve, put -I$(BASEDIR)/include/omega -I. in CFLAGS, or write your 
own rule for compiling *.c to *.o.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-04 Thread Kim-Ee Yeoh
On Fri, Jan 4, 2013 at 7:27 PM, David Thomas wrote:

> Well, "hidden" - it *is* right there in the type signature still, it just
> doesn't *look* like an argument.
>

If you squint hard enough, (=>) looks like (->). Or maybe the other way
round. Whatever. :)


> It also might be optimized away in static cases (certainly, it *could*
> happen, whether does or is even worthwhile is another question).
>

The optimization at stake is specialization. Given (Num a => a), specialize
it to Int or Double  or X so that it's memoizably first-class, which is
where functions still fall down [1]. All functions are values but data
values still play nicer than others.

Isn't fixing this the real cure for the monomorphism restriction?

[1]
http://lukepalmer.wordpress.com/2009/07/07/emphasizing-specialization/#comment-862

-- Kim-Ee
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-04 Thread David Thomas
On Sun, Dec 30, 2012 at 1:27 PM, Brandon Allbery wrote:

>
> [T]he "Monad m =>" in the signature really means "hey, compiler, pass me
> the appropriate implementation of Monad so I can figure out what I'm doing
> with this type m".  It's not a built in table, it's a hidden parameter.
>
>
Well, "hidden" - it *is* right there in the type signature still, it just
doesn't *look* like an argument.

It also might be optimized away in static cases (certainly, it *could*
happen, whether does or is even worthwhile is another question).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe