both emacs and vim can pass buffer segments and editing
session information to external (haskell) code, working as
text or file transformers, and both emacs and vim can be
controlled by such external code.
This is what shim tries to do.
I've added a link to the wiki IDE page.
Marc Weber
:: Name - Exp
und n = AppE (VarE (mkName show)) (SigE (VarE (mkName undefined))
(ForallT [n] [] (VarT n)))
should create the (show $ undefined :: a)
part.
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
HTH
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
comprehensive list of editor support on haskell.org. Either it's to late
or it is gone.
No, it's still there:
http://haskell.org/haskellwiki/Applications_and_libraries - Program
developement - Editor support
Perhaps a link to this should be made on the front page?
This is a topic every newcomer
Example:
main = readFile /dev/input/mouse = mapM print . streamToEvents
That's no easy.
Now I want to listen to those events remotely using a network conncetion
Data.Network does provide everything I need.
Is this done by substituting the print function with something like
sent event = do
Hi Oleg!
On Sun, Jun 10, 2007 at 04:26:43PM -0700, [EMAIL PROTECTED] wrote:
[...] A type-indexed Product (TIP, or TIR)
is a similar collection of values -- indexed [..] by their type.
So its stylistic too. Because you can also just use hOccurs?
and product vs record emphasizes that there is
Do you know what a type indexed coproduct is ?
(TIC.hs from HList)
What is the purpose of this module?
Why the Proxy type has been introduced?
Can you think of a short application?
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
clearly.) The problems I'm seeing are the ugly white-on-red for
underlines, the lack of any kind of differentiation for
Hi.
Sorry for this stupid question but have you tried :set nohlsearch?
Or /searchsomethingwhichdoesntexistcr ?
You can also put your cursor an those underlines and
example:
data A = A INt
| B [A]
instace Arbitrary A where
arbitrary = oneof [ liftM A arbitrary
, liftM B arbitrary
]
But now QuickCheck will propably create a test value
A ( B [ A ( B [ A - no end
Is there an easy QuickCheck way to prevent
You can download the modified version from
http://mawercer.de/marcweber/hasktags.hs
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, May 24, 2007 at 02:38:05PM +0800, L.Guo wrote:
Thanks for your suggestion, and sorry for the subject.
I have read the introduction of Data.ByteString, it is helpful.
And also, there is one problem left. When i read a binary file, data is
truncated at the charactor EOF.
You have
I did think about this topic many times.
My conclusion: We need some other kind of interface (keyboard and mouse
at the same time which would speed up your workflow very often,
especially when doing some kind of graphics where you have to enter some
text)..
One solution I did find is
On Fri, Apr 27, 2007 at 08:05:53PM +, Georg Sauthoff wrote:
On 2007-04-22, Marc Weber [EMAIL PROTECTED] wrote:
Hi,
I've written some completion scripts for vim. Don't know wether you can
call it an ide. Also tagging source is supported by one command.
what tagging program do you
Is the cell evaluation engine one? I think not. I do not believe what
you can type into those cells does constitute a programming language,
or at least not a turing complete one. As far as i know only simple
calculations can be performed. For example, is there any way to
On Wed, Apr 25, 2007 at 09:28:37AM -0700, Dan Piponi wrote:
What's the easiest way, from Haskell, to open a serial port (under
Windows, say) with the correct baud rate and parity, and send data
through it? Is there a serial library for Haskell?
Don't know wethere there are some libraries
This
On Sun, Apr 22, 2007 at 07:34:27PM +0200, Philipp Volgger wrote:
What IDE support is available for Haskell (Visuall Haskell, EclipseFP),
anything else?
Hi Philipp.
I've written some completion scripts for vim. Don't know wether you can
call it an ide. Also tagging source is supported by one
a)
After filtering the content I want to use how do I extract the text?
eg
a = xtract html/body/h2/-
which should return the text contained in the h2 tag.
There is a parser called text which returns the text but I don't know
how to use it ? Is there a much simpler way I have missed?
On Thu, Apr 19, 2007 at 08:59:17AM -0700, Justin Bailey wrote:
All,
I'm interested in automating Excel using Haskell. I'm writing a little
program for my wife and it'd be nice to fill out an Excel spreadsheet
for her (with formatting so I don't think CSV will cut it). A bit of
On Thu, Apr 19, 2007 at 06:18:24PM +0100, Neil Mitchell wrote:
No, VBA only.
I had VBA in mind but typed the wrong name.
Thanks Neil for correcting my statement.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
stefan has pointed me a nice version:
= ===
randomInts :: IO [Int]
randomInts = randoms `fmap` newStdGen
main = do
ints - randomInts
print $ take 5 ints
===
sequence isn't lazy (not in the IO monad at least); it will try to run
to completion, returning an infinite list of (as yet unevaluated, due
I should have learned that lesson already..
This is the second time I could have needed a lazy IO monad version..
Does something like this already exist?
Right now, you can largely do the same thing, but you have to write the XML
representations of your data structures manually.
-Alex-
I'm not sure but doesn't use HAppS kind of stripped down HaXml ?
DrIft can derive HaXml instances automatically.
Where is the problem doing using DrIft?
Marc
Brief:
I want to make the parser
choice [string dummy, anystring ]
where anystring = many get
return the first match.
(Thus if dummy matches disregarg all following
parsers)
..)
details:
I want to parse some wmii events.
They all look this way
ClientFocus 2
ClientFocus 2
I think I've solved the problem.
The Text.Read.Lex does contain the missing parts.
I had two problems. The one is solved by using ++ ( use the first
parser, falback to the second), the second was: parse till EOF.
This is solved by using the functions defined in Lex itself.
Thanks for listening
those 10 events after having typed the
10th character.
Do I need continuation passing style?
Would unsafeInterleaveIO help?
The final goal is writing a timetracker which sums up the time you've
spent on different wmii tags (= you can think of them beeing different screens )
Marc Weber
It's done. The mailinglist is called web-devel hosted on haskell.org and
can be fond by haskell.org - mailinglists - a comprehensive list of ..
To subscribe goto
http://www.haskell.org/mailman/listinfo/web-devel
If you want to help administrating the list drop me a mail.
Marc
I've been talking to Chris Eidhof the last days and we'd like to suggest adding
another specialized haskell mailinglist: Haskell and web developement.
I think the global interest will increase in the feature, libraries are
evolving and it would be nice to have a place to discuss them.
Any
On Tue, Mar 20, 2007 at 04:04:42PM -0400, S. Alexander Jacobson wrote:
There is currently a happs mailing list. I see no reason not to
broaden the subject matter to haskell web development in general.
The URL for the list is http://groups.google.com/group/happs
-Alex-
Hi Alex
The
On Tue, Mar 20, 2007 at 02:25:41PM +0100, Marc Weber wrote:
I've been talking to Chris Eidhof the last days and we'd like to suggest
adding
another specialized haskell mailinglist: Haskell and web developement.
I've written to John Peterson who replied:
I'm sure that will be fine
Hello,
I've noticed that the summer of code tickets contain one item:
lightweight web framework. I've dropped out university one year ago.
So I can't participate, right?
Do you want to explore with me how this might be done propably using
HAppS or fastcgi ?
I just need another person to talk to
Claus, Stephan: I hope you don't mind me having put a link to your work at the
bottom ;)
(link below)
If someone knows of a simple way to generate a function/type list of
the standard modules, I'd love to hear about it. Generating such a
list on the fly each time is probably not an option, as
However, it seems that your particular problem can be solved with
simpler means:
instance (HList a) = HListAppendArbitrary a HNil a where
hAppendArbitrary a _ = a
instance (HList a, HList b, HList c)
= HListAppendArbitrary a (HCons b d) c where
hAppendArbitrary a b = hAppend
does not belong to class HList.
Of course there is another opportunity by writing (HCons a x) instead of
to force the first type beeing a HList...
Which is the topic to read from the ghc/ haskell manual ?
Marc Weber
___
Haskell-Cafe mailing list
Wow.
That said, it is quite possible in Haskell to achieve genuine
class-based dispatch, with backtracking if necessary:
http://pobox.com/~oleg/ftp/Haskell/poly2.txt
Thanks for digging this up.
I'll have to reread it tomorrow.
I wasn't able to find the definition of AllOf(But):
quote
curious about reading you comments on a) b) ;)
Happily
Marc Weber
= testfile - needs HList and GHC =
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -fallow-undecidable-instances #-}
{-# OPTIONS -fallow-incoherent-instances #-}
{-# OPTIONS -fallow-overlapping-instances
to look up how to do it.
If you still get stuck somewhere post again.
HTH
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
.
It depends on what you need and how much time you want to spent on this topic ;)
hope this helps
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
how can i fix this?
Mmmh I really need some haskell type class traingings ;)
= test file ==
module Main where
import HList
import HOccurs
import Control.Monad.Reader
class Get a b where
get :: a - b
data D1 = D1 Int -- dummy type
type
Having the module given below I can't see why using
printAndRerun l1
printAndRerun2 l2
but not
printAndRerun l1
printAndRerun l2
?
They only differ in their name.
Can you point me in the right direction?
{-#
Hi David.
I see that its useful to add complete type signatures without letting
the compiler add stuff magically. This is why I've tried to write the final
question down under a new topic wether it would be useful to be able to write
down partial type signatures where browsing coders know that
Why do I have to specify (Monad m) here again?
class (Monad m) = GetMV m a where
...
instance GetMV m c where
...
No instance for (Monad m)
arising from the superclasses of an instance declaration
possible fix:
add (Monad m) to the instance declaration superclass context
Marc
On Sun, Feb 18, 2007 at 05:06:33PM +0300, Bulat Ziganshin wrote:
Hello Marc,
Sunday, February 18, 2007, 5:21:36 PM, you wrote:
Why do I have to specify (Monad m) here again?
class (Monad m) = GetMV m a where
instance GetMV m c where
because you can find another way to ensure
On Sun, Feb 18, 2007 at 06:59:32PM +0300, Bulat Ziganshin wrote:
Hello Marc,
Sunday, February 18, 2007, 7:32:54 PM, you wrote:
When using your example (Monad IO):
class (Monad m) = MonadIO m where
liftIO :: IO a - m a
it it basically the same, isn't it? This
David: Thanks again for your explanation
Because, in general, m isn't an instance of Monad.
Talking about my example:
class (Monad m) = GetMV m a where
...
instance GetMV m c where (2)
(2) There are only 2 cases:
ghc supposes m does instantiates Monad
= success
ghc
i mean that it makes error message more obvious - you don't need to
remember that this context is implied due to class declaration
The error might look like
Missing instance (Ord m) araising from use of ... imposed by
automatically infered class constraint from context line xy ? ;)
Something
Thanks for all the feedback. It did help me a lot.
Now I know that if there is something left to discuss the topic should
be:
Would it make sense to specify partial type declarations ?
I don't need an answer right now.
Marc
___
Haskell-Cafe mailing
*
If this and google didn't help you I would ask ;)
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Am I right that the way to do this now is create your own preprocessor
run on files havirg your extionsion?
What about naming the source files eg Module.hs.cpp.di.gc.chs ?
This would mean first run c2hs, then greencard thin DrIft then cpp and
put the results in
Module.hs.cpp.di.gc.chs 1)
On Thu, Dec 21, 2006 at 01:47:48PM -0800, Ranjan Bagchi wrote:
Is there a fast way to do this using ghc? I can extract fields by
using a ByteString, but I may not be using it fast enough: I've had
to write my own routines to extract ints, longs and doubles.
The other option is to write
The function takes a pointer to an integer, prints its value and returns the
increment.
void cl_inc(int *i){
printf(changing int from %d to %d, *i, (++i));
}
I've managed it by using this code:
{#fun pure cl_inc
{alloca `CInt' peek*}
I want to have a look at fruit which is using GCJNI, greencard, ...
That's why I want to learn how to use greencard with cabal.
If this is only a RTFM problem, can you point me to the docs?
When using the cabal builtin preprocessor I get the error that
--libdir has to be specified.
So I tried
suggests that it wants --libdir=../c_lib
instead of --libdir ../c_lib. Could this be the case? I'd like to
think it would parse them pretty much the same way but you can never be
sure...
Hi Dougal.
Thanks for your suggestion.
This might be the case. But is not here.
(I could have bet that my
Anyway, how to set the options using cabal ?
the preprocessor is there so there must be a working way without my
modifications I don't know about.
And Greencard.hs isn't just empty?
No, Greencard.*gc* looks like:
module Main where
import
I've been busy for some days writing this humbled helper scripts for vim:
Goto vim - by Marc Weber
http://www.haskell.org/haskellwiki/Libraries_and_tools/Program_development#Vim
If you find it useful and drop me a line I'll be glad to read your
feedback.
Marc
Is there somethinig corresponding to Num concering lists?
I mean there is + - /.. defined. + - are not type specific (Int, Double)
neither is : [1,2] notation to Elements.. But what about different
implementatins of lists? (linked lists? hash lists? array with index?
In other words: why not
the rand* function are examples for a typical state usage, arent' they?
Is there any reasoon why they are not defined
RandomGen g = State g a
rather than
RandomGen g = (a,a) - g - (a,g)
?
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
1.)
I know I can use
Build-Depends: lib == version, lib2 version, lib3 =
version
and so on.
Do you think it would be useful to introducue some notation to indicate
a tested with ?
Reason, purpose: I think its sometimes the case that a
OTOH I do not feel like I have a lot of time to dedicate to this, so
if someone else is working on this, could we team up (possibly for a
different (if shown better) approach because one I chose is still
I would join and try to help where /as much as I can
Marc Weber
line 39 works fine
line 56 doesn't. Why?
Isn't both a IO monad (because of the print statements)
After commenting out 56 it compiles fine
Any suggestion appreciated.. I'm struggling for some hours now..
module Modules.ObjectTree where
import Debug.Trace
import Data.FunctorM
import DBUtils
Hi
I've tried as an exercise to learn how to use the state monad to create
a tree this way:
module Main where
import Control.Monad.State
import Data.Tree
import Random
createTree :: Int - Int - (Tree Int, Int)
createTree 4 = runState $ State $ \s - (Node s [] , s+1) -- stop at level 4
Thanks to you all!
I think I've learned a lot.
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I've been using pesco_cmdline for a while now. But I did notice that
it doesn't fit my needs.. And it took me quite a while to get to know
why I was getting strange typeable errors when specifying the wrong
default value or reading the wrong type.. (these errors occur at
runtime thus they
..
But there might be much better solutions.
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
2) Recompiling binaries (necessary in order to link in foreign object
code into GHCi) is slow using GHC. Moreover I have to restart GHCi if I
want to reload a changed DLL (unless there is a way to unload a DLL in
GHCi). It also requires jumping around between several console windows
to
the
leading @
so /ea is equal to /@ea
would it be useful if small letters would also match capital letters
but not the
other way round? The Eclipse Plugin GotoFile (written by Max Uermann)
does it this way
written by Marc Weber
Credits to any other
I'm not sure on which mail of this thread I should append MHO.
What happens if two programmers happen to choose the same package
name? (Prepend the location on the filesystem? ;-)
If something like a package name is introduced I would prefer not
separating package and module name with a .
Have I missed a function or isn't parsec meant to be used this way?
Would you recommend writing your own small parser for this?
I'm parsing everything from the beginning now.. The other way I had to
to rewrite parts of parsec..
Marc
___
Hi.
I want to write a haskellquickfind app to get a list of files using
human readable hash values (eg the first character of
directory/filenames)
Eg hquickfind vtl
should print /var/tmp/local
My implementation should look like this:
Every folder/file is token and I want to run a parser. to
Hi.
Did anyone implement something like pythons urllib yet?
I wont to retrieve some files via http (I could use wget -O - for that
) and send some form information (post/get)..
In other words: Something like expect but for downloading some documents
from a website.. ;)
Perhaps I should have
Everytime I try one of these tools I end up going back to Vim for editing
plus whatever debug tools I can scrape together.
Me is using vim, too..
And fortunately there is eclim on sourceforge
It does neither try to reimplement vim nor eclipse but tries to make
them work together.. But it's java
On Tue, May 23, 2006 at 10:31:17AM +0100, Vladimir Portnykh wrote:
Hello ALL,
I am very new to Haskell and my question might appear very basic sorry
about it in advance.
I have a C++ application and I would like to be able to launch Haskell
interpreter (lets say GHC) supplying the Haskell
Wow.. quite many responses..
I'll have to rearead them thoroughly.. ;)
I think GHCI would be great (expect it's start up time compared to bash
;)
I wouldn't use hs-plugins because it needs quite a lot of time to
compile pieces of code..
I got the idea to use something like Don Libes
task in a new, type-safe fashion.
fromVideo of cause would itself call something like mplayer or
transcode.
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
do you think?
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
just add unsafePerformIO:
great idea!
In my case I can also use unsafeInterleaveIO or lazyness, can't I?
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sat, May 06, 2006 at 12:39:46AM +0200, Marc Weber wrote:
just add unsafePerformIO:
great idea!
In my case I can also use unsafeInterleaveIO or lazyness, can't I?
Of cause I can't. unsafePerformIO is of type IO a - IO a.
Sorry for posting before thinking ;)
Marc
I'm trying to write some true type library (implementing only the tables
I need at the moment).
When loading a font file it doesn't make sense to parse every table
which isn't needed. So lazyness of haskell would perfectly meet
requirements here.
My problem: NewBinary supports memory buffers.
On Wed, Apr 19, 2006 at 11:01:03PM +0200, Christophe Poucet wrote:
For the parsing and lexing I used happy and alex.
Jake Luck wrote:
I would be very interested in this as well. I have looked myself but
haven't found anything else. I wrote one myself in Haskell but for a
subset of C++
Thanks to Bj?rn Bringert. The solution was to remove the z lib
dependency when compiling MySQL (from HSQL library) after runhaskell
Setup.lhs configure.
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I get this error:
calhost db=store uid=marc pwd=
DB/Direct: Daan Leijen (c) 1999, HWT (c) 2003-2004,
Bjorn Bringert (c) 2005
Connecting to database...
DBDirect: user error (loadShared: couldn't load
`/usr/lib/libz.so' because /usr/lib/libz.so: invalid
On Thu, Feb 16, 2006 at 09:50:51AM -0300, Thiago Arrais wrote:
On 2/16/06, Thiago Arrais [EMAIL PROTECTED] wrote:
Just take a look at the latest integration build that you are able to find
at
http://eclipsefp.sourceforge.net/download
There is also a screenshot at
You can access IO values only from within do blocks (see any tutorial,
previous posts or google).
It looks like this then:
do=
myvalue - functionwhichreturnsIOValue
dosomethingwith myvalue
Due to monads you don't have to leave the IO monad this way.
Oh. Have to go now.
do is translated into
Wow, that easy?
Just eval ...?
Can't believe it..
Will have look at those examples..
Marc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Is there a way to use haskell as scripting language in
a) your own project?
b) other projects such as vim (beeing written in C)?
At the moment I'm interested, I don't have any real project..
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
vim7 has introduced omni-completion... So I'm interested wether there
are any projects which support any kind of completion.?
I've read the thread about Eclipse IDE haskell plugin.
Would you recommend picking up code from a haskell compiler and adapt
it for this purpose?
I'm interested but
Hi.. I've found the nice documentation about building ghc on
haskell.org/ghc - documentation.
There is one chapter (#1) about C compilers and environments to use:
Either MSYS or cywin and
gcc of MinGW because gcc of cygwin will link to cygwin1.dll by default
which may change and therefore can
Why do these error occur?
After hiding the packages com (beeing in comlib) and hdirect (beeing in lib)
and adding -package com -package hdirect it works fine. I haven't tried without
hiding but adding -package options yet.
ghc --make -H16m -O -fglasgow-exts -syslib com -fno-warn-missing-methods
Hi. I want to write a little haskell program executing about 4 programs
passing data via pipes. As my python script seems to be slower than a
bash script I want to try a ghc executable now.
It should invoke different parts of a text to speech chain. This way I
have one interface then.
Talar und
time as expected ;-)
Just install cygwin, and run this script. It will download parts of
fptools via cvs (so you need cvs and GNU make from cygwin)
Greetings, Marc
compilehdirect.sh ---
#!/bin/sh
# author: Marc Weber
# [EMAIL PROTECTED]
# configure fptools
WORKDIR
On Mon, Jan 30, 2006 at 08:40:43PM +0100, Gracjan Polak wrote:
Hi all,
Is there any library to make Haskell call Microsoft COM functions
using Dispatch? E.g I don't need the full COM binary functionality,
scripting is enough. Google didn't seem to find anything
interesting...
I'm struggling with this example:
http://www.nomaware.com/monads/html/contmonad.html#example
After looking at it for the fourth time I got much more.. but still not
enough..
because there are so much new things (when beeing translated into some
kind of
condition ? thentodo : elsetodo
which is
On Sun, Jan 08, 2006 at 12:19:40PM +0300, Bulat Ziganshin wrote:
Hello Marc,
Sunday, January 08, 2006, 3:19:56 AM, you wrote:
MW list2=do { x - [1,2,3]; guard (odd x); return x} -- - provided by xerox
list3 = [ x | x - [1,2,3], odd x]
list4= take 2 $ [2*x+1,x-[0..]] ;-)
Hi Bulat..
Thanks
On Sun, Jan 08, 2006 at 12:43:31PM +0100, Tim Walkenhorst wrote:
{- Disclaimer: I'm rather new to Haskell and completely new to this board.
I may not use the correct terminology in all cases, but I hope my
intention becomes clear when you have a look at the code-snippets. -}
Hey
Here is a simple program implementing the above function in 4 different
ways.. See my comments to get to know where I have problems:
-- begin test.hs --
module Main where
import IO
import Control.Monad.List
{- list1,2 are both implementations of the same function f=[1,3] ;-)
Hi.. I'm still struggling with monads ;-)
In the tutorial All about monads there is the function getOne used:
getOne:: (Random a) = (a,a) - State StdGen a
getOne bound = do g -get
(x,g')= return $ randomR bounds g
put g'
return x
In the
Hi.
I now get the errror that the module NativeInfo is in the project
hdirect and in the library lang of ghc. Removing the files from the
hdirect project resulted in a ld error Main_16 not found (don't remember
exactly)..
If you use hdirect on win succesfully, can you tell me which ghc/
hdirect
201 - 296 of 296 matches
Mail list logo