Unix domain sockets are a type of socket created between two programs
on a single Unix system. They are useful in part because over them you
can send so-called ancillary data: file descriptors and credentials
(i.e. a proof of who the process on the other end is). The thing is,
Haskell doesn't have
On 2/4/07, Eric Olander [EMAIL PROTECTED] wrote:
Hi,
I'm still somewhat new to Haskell, so I'm wondering if there are better
ways I could implement the following functions, especially shiftl:
moves the last element to the head of the list
shiftl :: [a] - [a]
shiftl [] = []
On 12/17/06, David Roundy [EMAIL PROTECTED] wrote:
Hello fellow haskellers,
I am wondering if anyone has an idea whether I'd run into trouble if I
rebound = in order to provide a more restricted monad. My idea is to
define a class:
. . .
which seems rather heavy. Can anyone think of
On 10/10/06, Nicolas Frisby [EMAIL PROTECTED] wrote:
data Fin
data Inf
data List l a = Cons a (List l a) | Nil
It's possible to make both infinite list and finite list datatypes:
data Inf a = InfCons a (Inf a)
data Fin a = FinCons a !(Fin a) | FinNil
At least, I think the Fin type there
On 10/8/06, Yang [EMAIL PROTECTED] wrote:
And do most (experienced) Haskell
users sacrifice cleanliness for speed, or speed for cleanliness?
Keep the internals of your code--that which will be looked at a
lot--fast and ugly, while the rest can be clean. If you have a
function that does
On 10/8/06, ihope [EMAIL PROTECTED] wrote:
Keep the internals of your code--that which will be looked at a
lot--fast and ugly, while the rest can be clean.
Sorry. Meant that which will be used a lot.
___
Haskell-Cafe mailing list
Haskell-Cafe
On 7/10/06, Fritz Ruehr [EMAIL PROTECTED] wrote:
Were you interested in seeing the function, you could do so, at least
for finite, total functions (you can also enumerate them, compare them
for equality, etc.). See my haskell-cafe message at
On 7/5/06, John Goerzen [EMAIL PROTECTED] wrote:
On 2006-07-05, Duncan Coutts [EMAIL PROTECTED] wrote:
evaluate is for just that purpose.
evaluate (length input)
from the docs:
http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html#v%3Aevaluate
That looks like
On 7/8/06, David Roundy [EMAIL PROTECTED] wrote:
Hi all,
I'm wanting to create a data structure to hold a directed acyclic
graph (which will have patches represented by edges), and haven't yet
been able to figure out a nice representation. I'd like one that can
be reasoned with recursively, or
for a different reason.
How about this:
maximum (a:b:xs) = maximum ((: xs) $! max a b)
--ihope
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
?
--ihope
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Does Haskell have a handy way to spawn a new terminal window and give
you a handle to access it with?
--ihope
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
In the Haddock source, there's the following line:
import Paths_haddock( getDataDir )
Paths_haddock doesn't seem to be anywhere inside the Haddock
distribution, and a Google search doesn't turn up any useful results.
Where can I find this thing?
I grabbed the source code to Haddock, but GHC doesn't like the #if's
and the #endif's. What can I do with these?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 4/13/06, Jason Dagit [EMAIL PROTECTED] wrote:
Try using passing -cpp to ghc when you compile.
Jason
Thanks. Will do.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 4/12/06, Scott Weeks [EMAIL PROTECTED] wrote:
Hello everyone,
I've been banging my head against my desk a bit so I figured it's time
to ask for help :-)
When a user queries I have to read the input from IO and then somehow
cast the key/index type without angering the type checker. If I
On 4/7/06, Jared Updike [EMAIL PROTECTED] wrote:
given an Ord instance (for a type T) a corresponding Eq instance can be
given by:
instance Eq T where
a == b = compare a b == EQ
where did this second -^ == come from? (I guess if if Ordering
derives Eq :-) I think you meant
On 4/5/06, Michael Goodrich [EMAIL PROTECTED] wrote:
Looks like my calulation involves a self referential set of definitions.
Is Haskell not able to deal with a self referential set of definitions?
Yes, it is, but not if that definition doesn't evaluate to a proper
value. For example:
main =
On 3/29/06, Aaron Denney [EMAIL PROTECTED] wrote:
(And yes, we desperately need something like class aliases.)
You mean like this?
class Foo a b where
foo :: a - b
class Foo a b = Bar a b where
instance Foo a b = Bar a b where
This will make every instance of Foo one of Bar, and make sure
On 3/24/06, Henning Thielemann [EMAIL PROTECTED] wrote:
A new type, say Cardinal as in Modula, would document for the user of a
function that only non-negative numbers are allowed and the function
writer can be sure, that only non-negative numbers are passed.
...
newtype Cardinal =
On 3/27/06, lee marks [EMAIL PROTECTED] wrote:
So this is legal:
type Fix s a = s a (Fix s a)
fold :: Functor (s a) = (s a b - b) - Fix s a - b
fold f = f . fmap (fold f)
but this is not:
fold f = f . fmap (fold f)
data Fix s a = Fix {runFix :: s a (Fix s a)}
fold :: Functor (s
I'd like to propose more syntactic sugar more Haskell. (A spoonful of
syntactic sugar makes the medicine go down...)
Put simply, this would provide a smallish bit of pattern matching, and
hopefully clarify some things. A simple example should pretty much
define the whole thing:
fromJust = {Just
Today I started on a simple IRC bot framework thingy. I decided to
post the source code here so people can look at it and tell me what
the heck I did wrong :-P
module IRC where
import Control.Monad.State
import System.IO
import Network
23 matches
Mail list logo