e in
Bulat Ziganshin's streams library.
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
definetly will use a compiled version instead
of interpreted).
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Micah Cowan <[EMAIL PROTECTED]> writes:
> Max Vasin wrote:
>> Hello, haskellers!
>>
>> Suppose we have function (it filters package filenames from apt Packages
>> file):
>>
>>> getPackageList :: FilePath -> IO [FilePath]
>>>
rop 10) $! filter (startsWith "Filename:") $! lines c
with no success.
Chaning it to
> return $! map (drop 10) $ filter (startsWith "Filename:") $ lines c
makes getPackageList function return several (but not all) filenames.
What I'm missing? And how can I fix my code?
2007/12/24, Simon Peyton-Jones <[EMAIL PROTECTED]>:
> Would someone familiar with the command-line-parsing libraries care to help
> Krassimir?
AFAIU Krassimir's needs, hs-plugins will help him (function eval).
--
WBR,
Max Vasin
JID:
ped only if $(sel x y) has type (a, b) -> c.
--
WBR,
Max Vasin
JID: [EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ment for explorer), not a window manager. In
Windows there is no such thing as window manager (it's functionality
is built-in into Windows itself).
--
WBR,
Max Vasin
JID: [EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
ht
er.
> If so, would it be possible to integrate this into GTK2HS so it works as
> a docking manager inside an application?
First of all, gtk is a cross platform toolkit and gtk2hs is just a
wrapper. It will be better to implement a docking manager in C to let
whole gtk community use it.
--
W
u can get a better version by changing
> the last line:
>
> mapPairs f (x:y:zs) = ... - left as an exercise, but no need for head or tail.
And you can get less equations if you replace first two equations with
mapPairs f x = x and place it after Neil's.
--
WBR,
Max Vasin
JID: [EMAI
ll libs from sources. So, do
$ apt-get source libghc6-mtl-dev
$ cd
$ runhaskell Setup.lhs configure
$ runhaskell Setup.lhs build
$ sudo runhaskell Setup.lhs install
Another way is to take ghc6 and all haskell libs from fiesty.
--
WBR,
Max Vasin.
___
>>>>> "Bahtijar" == Bahtijar Vogel <[EMAIL PROTECTED]> writes:
Bahtijar> Hi, How am I supposed to use infinite lists to define
Bahtijar> the list of all negative integers?
negs = [-1,-2..]
--
WBR,
Max Vasin.
> boolFromMaybe Nothing = False
import isJust
boolFromMaybe = isJust
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
here
> ssnd (_:y:_) = return y
> ssnd _ = fail "don't got none"
> main = do
> print $ (ssnd [1, 2, 3] :: Maybe Int)
> print $ (ssnd [1] :: Maybe Int)
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>>> "Pedro" == Pedro Baltazar Vasconcelos <[EMAIL PROTECTED]> writes:
Pedro> On Wed, 17 Jan 2007 16:57:54 +0300
Pedro> Max Vasin <[EMAIL PROTECTED]> wrote:
> It does not enforce presence of required fields at type level. Also it
>> does n
>>>>> "Henning" == Henning Thielemann <[EMAIL PROTECTED]> writes:
Henning> On Wed, 17 Jan 2007, Max Vasin wrote:
> Hello all!
>>
>> Let
>>
>> > data Book = Book { > authors :: [String], > title :: String,
>> > ed
>>>>> "Colin" == Colin DeVilbiss <[EMAIL PROTECTED]> writes:
Colin> On 1/17/07, Max Vasin <[EMAIL PROTECTED]> wrote:
>> Fields of the Book datatype which are not (Maybe a) are
>> required to be present.
Colin> This doesn't actually
>>>>> "Pedro" == Pedro Baltazar Vasconcelos <[EMAIL PROTECTED]> writes:
Pedro> On Wed, 17 Jan 2007 15:58:04 +0300
Pedro> Max Vasin <[EMAIL PROTECTED]> wrote:
> Hello all!
>>
>> Let
>>
>> > data Book = Book { > au
class Empty e where
> empty :: e
But still I have to emplement instances by hand. There are a number of
approaches to automatically
derive instances (TH, generic classes in GHC, drift). What would you recommend
using in this case?
Or may be it would be better to drop out Empty and
table to be covered by
the GNU General Public License. This exception does not however
invalidate any other reasons why the executable file might be covered by
the GNU General Public License.
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
cial code
Benjamin> I hate to be nitpicking but GPL is not only compatible
Benjamin> with but encourages commerce in general and commercial
Benjamin> software in particular. It is incompatible with
Benjamin> proprietary software. There's a difference.
A small addition: s
I think Haskell packages from sid can be installed on etch with no harm
(or problem). All you need is to configure apt to use both testing and
unstable.
--
WBR, Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
On linux you should use your package manager (whenever possible), not binaries
from the site (or compile it yourself).
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s for Linux.
PS: I'm using Debian testing/unstable.
--
WBR,
Max Vasin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s. i am aware of trace, but the potentially messed up
Peter> execution order makes it very hard for me to get useful
Peter> information out of the resulting trace. besides, IO will
Peter> scale to more elaborate logging mechanisms later on...
If all you want from IO is logging why
d> Haskell, (I think at least a few people on this list have
Donald> written one or two themselves ... ;) please add it to the
Donald> list.
I have no login at haskell.org, so I post here. There is a Curry compiler
implemented in Haskell: The Münster Cur
t; utf-8 stuff automatically? What does it mean when I find
John> that parsec is picking up "" at the beginning of the
All strings in Haskell are unicode - you only have to input them correctly
:-) I've used Streams (somewhere at haskell.org) library to read files i
iler that will run from a USB
>> stick?
>>
>> i'm ôäüùûå sure
Jón> Блым?
almost %-) Bulat accidently switched keyboard layout to russian :-)
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
7;t be updated later.
It should be :-)
PS: It is better to build a custom package (dh_make will help you).
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
believers in language classification by generation?
As already mentioned you can write algorithms in Haskell (3GL), embed
a DSL in it and write a program in that DSL or in several DSLs (4GL).
AFAIK Mathematica is not a logic programming language, thus all its
features can be implemented in Haskell
m in a top-down
Ch> style
I would say in a "more declarative" style, the "where" is closer to thinking
of the program as a set of equations (as opposed to "let").
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
cessed with cpp, so if constants
are #define'd (and not declared with `const') you can use preprocessor
macros to generate Haskell code (yeh, I know it's silly, but why not?).
--
WBR,
Max Vasin.
NP: Nothing playing right now
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
cannot show"
E.g:
data Foo = Bar | Foo (Int -> Int -> Int)
instance Show Foo where
show Bar = "Bar"
show (Foo _) = "Func!"
main = do putStrLn $ show Bar
putStrLn $ show $ Foo (+)
--
WBR,
Max Vasin.
NP: Nothing playing right now
()
writeList (x:xs) = do writeHtml x
writeList xs
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
process to run 'runhaskell file.hs' and redirect
its stdout to a pipe.
There is also an FFI which allows you to call functions written in Haskell
from other languages. In this case your Haskell program must export C-level API
to be used from C++.
Or, and of ca
gt; mv, etc. Has anyone implemented grep, find, etc?
Brian> This is also how I would start because it would allow all the
Brian> control flow/ ease of use issues to be explored just using GHCi
Brian> / Hugs etc before tackling the problem of how to get binaries
Brian> to interface w
at your Entry type needs to be existentially
Stefan> quantified?
I want a map of entries (mapping lables to entries). Generally each style
can define its own data types for database objects. Converting entries from
data BibEntry = { beLabel :: String
, beKind :: Strin
t,> (Haskell98!):
>> class DatabaseEntry e where entryLabel :: e -> String formatEntry
>> :: e -> String compareEntries :: e -> e -> Ordering
>>
>> data Entry a = Entry a
No. I don't want that. The database parsing function returns
Map.Map String Entry bu
; entryLabel (Entry e) = entryLabel e
> formatEntry (Entry e) = formatEntry e
How can I define compareEntries for this instance?
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ut this
runDaytimeServer :: DaytimeServer -> IO DaytimeServer
runDaytimeServer dts = do
dts' <- runStreamDaytimeServer dts
dts' <- runDgramDaytimeServer dts'
return dts'
runDaytimeServer dts
= runStreamDaytimeServer dts >>= runDgramDaytimeServer
Don't
mation would be appreciated.
Don't export constructors and define functions which will imply
your constraints.
module Foo (..., Category,...
makeCategory1,
makeCategory2,
...)
--
WBR,
Max Vasin.
___
Haskell-C
On Sun, 8 May 2005 20:29:31 +0200, Tomasz Zielonka <[EMAIL PROTECTED]> said:
> On Sun, May 08, 2005 at 10:19:28PM +0400, Max Vasin wrote:
>> On Sun, 8 May 2005 18:34:37 +0200, Tomasz Zielonka
>> <[EMAIL PROTECTED]> said:
>> > On Sun, May 08, 2005 at 07:54:
On Sun, 8 May 2005 18:34:37 +0200, Tomasz Zielonka <[EMAIL PROTECTED]> said:
> On Sun, May 08, 2005 at 07:54:43PM +0400, Max Vasin wrote:
>> Hello!
>>
>> Suppose we have functions
>>
>> f :: ReaderT env monad1 rtype g :: Reader env rtype
>>
>&g
tly pass it). Is there another way to get things done?
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Daniel Carrera <[EMAIL PROTECTED]> writes:
> Max Vasin wrote:
>
>> But why do you need that? Where do need to make an assumption about the size
>> of the list?
>
> I'm implementing the RC4 algorithm, which requires a state array with
> 256 elements cont
I'd love to have Haskell make sure that the array
> I build is the correct size.
In short: in type declarations you can't.
But why do you need that? Where do need to make an assumption about the size
of the list?
--
WBR,
Max Vasin.
__
lue
stmt "Code"
return (toSqlValue i)
-- etc for all SqlType data constructors
putStrLn (unwords [show id, codestr])
At least it compiles. But it's ugly :-(
--
WBR,
Max Vasin.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
no operations in
> the SqlBind class, it's just a marker as near as I can tell.
As of HSQL 1.4 this class has method
toSqlValue :: a -> String
which probably can help you (I really don't know).
Some RTFSing shows that in most cases toSqlVal
47 matches
Mail list logo