[Haskell-cafe] Installation Failed: Haskell Platform 2011.2.0.1-i386 for OS X

2011-06-27 Thread John Velman
I'm running OS X 10.6.7, XCode 3.2.5.  When  I try to install The Haskell
Platform 2011.2.0.1 for Mac OS X 10.6 (Snow Leopard)  it goes all the way
through to running package scripts, then says installation failed

I did two separate downloads, and tried the first installation two time,
the second download one time.  Same result all three times.

Is this a problem with the package, or ?  Any suggestions?

Thanks,

John Velman

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


[Haskell-cafe] Haskell on iPad? (Scheme and Ocaml are there)

2011-06-18 Thread John Velman

There are (at least) two Scheme interpreters for iPad at the iTunes store:
PixieScheme and GambitREPL.  Both allow entry of scripts, by typing or
pasting.  The Gambit community is very busy trying to expand the usefulness
of their interpreter.  Both have pretty good interfaces.

There is also an Ocaml app, but I don't know or want to know Ocaml, and the
interface looks very unfriendly.

I'd really like to have something like this in Haskell, in the education
pot, as is the GambitREPL.  Hugs is written in C, if I recall correctly.
Would it be possible to compile Hugs for the iPad processor, taking out
enough system calls to make it acceptable?

John Velman

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


Re: [Haskell-cafe] Haskell *interpreter* on iPad? (Scheme and Ocaml are there)

2011-06-18 Thread John Velman
Well, I'm not interested in a lisp interpreter written in Haskell.  Nor am
I (at the moment) interested in writing an iPad app in Haskell.

I changed the subject to clarify.

What I would like to see is A Haskell Interpreter on the iPad.  

To further emphasize, I'd like to type in (or paste in) Haskell code and
have it executed on the iPad.  To reiterate:  Something like Hugs, or ghci
on the iPad.

By the way, there are three Scheme interpreters in the iPad app store.  In
addition to the two I previously mentioned, there is iScheme.

- John Velman



On Sat, Jun 18, 2011 at 12:43:45PM -0400, Don Stewart wrote:
 See e.g.
 
 http://www.haskell.org/haskellwiki/IPhone
 
 http://www.haskell.org/haskellwiki/IPhone
 https://github.com/dpp/LispHaskellIPad
 
 https://github.com/dpp/LispHaskellIPad
 
 On Sat, Jun 18, 2011 at 12:18 PM, John Velman vel...@cox.net wrote:
 
 
  There are (at least) two Scheme interpreters for iPad at the iTunes store:
  PixieScheme and GambitREPL.  Both allow entry of scripts, by typing or
  pasting.  The Gambit community is very busy trying to expand the usefulness
  of their interpreter.  Both have pretty good interfaces.
 
  There is also an Ocaml app, but I don't know or want to know Ocaml, and the
  interface looks very unfriendly.
 
  I'd really like to have something like this in Haskell, in the education
  pot, as is the GambitREPL.  Hugs is written in C, if I recall correctly.
  Would it be possible to compile Hugs for the iPad processor, taking out
  enough system calls to make it acceptable?
 
  John Velman
 
  ___
  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] Haskell *interpreter* on iPad? (Scheme and Ocaml are there)

2011-06-18 Thread John Velman
On Sat, Jun 18, 2011 at 10:44:01PM +0400, MigMit wrote:

Well, this is my point.  THERE ARE 3 SCHEME INTERPRETERS in the iPad app
store.

They run on factory iPads, not jailbroken.

The GUI for the gambitREPL  (Read, Evaluate, Print, Loop) is just like a
console.   Input a scheme expression.  CR. Answer appears, new prompt.

In haskell we need to allow for some way to input layout.  I don't recall
how Hugs handles this, if at all.

There are probably 5 or 10 people out there who want to learn functional
programming, and they are studying Scheme on their iPads.  Or Ocaml.

I don't forsee doing production programming ON THE IPAD, but experimenting,
testing some functions, and, by the way, learning Haskell.

While I'm fantasizing, something like Hugs or ghci with SOE would really be
neat.

Sorry for shouting  :-)

John Velman

 Well, Haskell is fun, isn't it? And that's what iPhone is perfect for: fun.
 
 Back when I had iPod Touch 1G (jailbroken, of course), I used to run Hugs on 
 it. Now I would love to see a Haskell interpreter in the App Store — which, 
 by the way, is possible; as there are Scheme interpreters there, why not 
 Haskell?
 
 Отправлено с iPhone
 
 Jun 18, 2011, в 22:27, Jack Henahan jhena...@uvm.edu написал(а):
 
  I suppose you could make a GUI, by why? Given that you'll have to be 
  working on a jailbroken device, anyway, one could just as well use one of 
  the numerous terminal emulators now floating around for jailbroken iOS. 
  That said, the idea of people writing Haskell on phones and iPads and so on 
  makes me just a little bit grinny.
  
  On Jun 18, 2011, at 2:17 PM, Alexander Solla wrote:
  
  
  
  On Sat, Jun 18, 2011 at 10:46 AM, John Velman vel...@cox.net wrote:
  To further emphasize, I'd like to type in (or paste in) Haskell code and
  have it executed on the iPad.  To reiterate:  Something like Hugs, or ghci
  on the iPad.
  
  Since the iPhone OS is pretty much OS X for ARM, and GHC apparently now 
  supports cross-compilation, you can compile GHC for iOS.  I guess you 
  could cross compile Hugs with GCC.  Doing so probably isn't trivial, but 
  it should be straightforward.
  
  I bet you could even use Xcode to make a graphical user interface to GHCi.
  ___
  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 mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell platform questions

2010-03-25 Thread John Velman
I had the same problem -- downloaded and installed the new Haskell
Platform, and when I tried cabal I got the: dyld  error.  I'm also
on OS X 10.5.8.  Also, ghc users guide appears to be missing.

I filed a bug report.  To solve the cabal problem I got
  cabal-install version 0.9.0
  using version 1.9.0 of the Cabal library 

from darcs, and put  symlink to ~/.cabal/bin/cabal for /usr/local/bin/cabal

Now I'm happy (so far) with ghc 6.12.1 and platform 2010.1.0.0

Best,

John V.
  


On Wed, Mar 24, 2010 at 03:36:46AM -0400, wren ng thornton wrote:
 Don Stewart wrote:
 You should file a bug on the Haskell Platform bug tracker.

 http://haskell.org/haskellwiki/Haskell_Platform#Trouble_shooting

 And I'm CC'ing the dmg maintainer -- it may also be a GHC issue as well.

 -- Don

 warrensomebody:
 I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today... ran  
 the uninstaller, ghc installer and the platform installer. When I run  
 ghci, it seems to work fine, but when I try cabal, I get this crash:

 $ cabal --version
 dyld: unknown required load command 0x8022
 Trace/BPT trap

 Same thing here.

 w...@semiramis:~ $ cabal --version
 dyld: unknown required load command 0x8022
 Trace/BPT trap

 OSX = 10.5.8
 CPU = Core 2 Duo


 -- 
 Live well,
 ~wren
 ___
 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] haskell platform questions

2010-03-18 Thread John Velman
I'm also on Mac Leopard.  I tried installing ghc 6.12 with Haskell
Platform 2009.2.9.2-i386.dmg (ghc 6.10.4) for some reason, and ran into
a bunch of problems (problems to me, anyway).  I ended up uninstalling 6.12
and reinstalling haskell platform.  Uninstall is easy, there is an
uninstaller script in /Library/Frameworks/GHC.framework/Tools.
(strangely, not in ..Frameworks/HaskellPaltform.framework). 

I'm still using Leopard, but would like to move to Snow Leopard once I get
a few things out of the way.  But I see that there are (or were) some tricks in
getting ghc to work on OS X 10.6, apparently.  These seem to be well
documented, but, I'd rather spend the time on my own projects.

Best,

John V.



On Wed, Mar 17, 2010 at 09:07:03PM -0700, Warren Harris wrote:
 I installed haskell platform some time ago, and now I'm wondering what 
 version I have. How do I find out?

 Also, when the new one comes along on the 21st, is there a way to upgrade? 
 Or if I must first uninstall the one I have now, how do I uninstall it?

 Is it recommended to periodically upgrade packages that came with the 
 platform (cabal upgrade), or is it recommended that they be left alone to 
 avoid dependency incompatibilities. Similar question for ghc itself -- 
 can/should it be upgraded in the context of haskell platform?  (I was 
 hoping to try Leksah, but it dies without ghc 6.12.1. I seem to have 
 6.10.4.)

 Apologies in advance if this is all documented somewhere, but I couldn't 
 find it on the haskell platform site/trac. BTW, I'm on Mac/Leopard -- love 
 the fact that it didn't take hours to build everything!

 Warren
 ___
 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: [solved] Re: [Haskell-cafe] Calling Haskell from C, Linking with gcc?

2009-10-29 Thread John Velman
It's taken 21 days with interruptions, but I finally posted a tutorial with
details of what I did on the Haskel Wiki.  Category:Tutorials,
title: Using Haskell in an Xcode Cocoa project

Hope it's clear.  Please send comments and suggestions.

John V.


On Thu, Oct 08, 2009 at 10:34:07AM +0200, Wouter Swierstra wrote:

 On 7 Oct 2009, at 23:39, John Velman wrote:

 For anyone following this:  The XCode ld script is complex, and has mac
 specific defaults early in the search path specification, and I probably
 don't want to change these.  A library in a default path is the wrong
 libgmp.[dylib | a].

 Is there any chance you'll write up exactly what you needed to do on a 
 blog/TMR article/Haskell wiki page? I've tried doing something similar, ran 
 into linking problems, and gave up my fight with XCode. I think this would 
 be a really useful resource for both Obj-C programmers looking into Haskell 
 and Haskell programmers who want to have a fancy Cocoa GUI. Thanks!

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


Re: [Haskell-cafe] Cabal says no installed version of base

2009-10-28 Thread John Velman
On Tue, Oct 27, 2009 at 09:28:39AM +, Duncan Coutts wrote:
 On Wed, 2009-10-21 at 16:05 -0700, John Velman wrote:
  I'm on OS X Leopard 10.5.8, using ghc 6.10.4 from Haskell Platform.
  
  I'm trying to get a static .a library, callable from C, that I can use in
  an OS X Cocoa program.  I've tried a very simple case (the one in Haskell
  Wiki Tutorials,calling haskell from C) I've managed to make a Mac Cocoa
  application by adding the ghc generated .o program, plus adding one by one
  the needed Haskell libraries for symbol not found to my Xcode project.
  There should be a better way.
  
  I've tried just about everything I could find on creating Haskell
  libraries, with no joy.  My latest try is to use Cabal, following advice
  found both in How to write a Haskell program and the Cabal users guide.
  
  My output from cabal -v configure tells me, among others:
 
 Is that the full command you ran? No other flags or arguments? I'm
 assuming you're using cabal-install version 0.6.2.
 

I checked results that I kept, and that was the full command.  As I recall,
ghc-pkg didn't report any problem, but I don't recall whether or not it
listed in {}'s.

After posting this message, (and waiting for a while), I tinkered
considerably with my installation without any better results.  I then
uninstalled, and reinstalled Haskell Platform.

I then went back to documenting what I actually did to get a working Cocoa
with Haskell function program running.

I'll try to redo the cabal version of library creation carefully, and check
the things you mention below, after I finish my documentation of my Cocoa
with Haskell test case.

Thanks,

John V.


 According to the source it only produces that error in response to a top
 level constraint passed on the command line. It internally adds such a
 dependency, to make sure the solver never tries to pick a version of
 base from hackage. The problem could be that your base package is broken
 (missing dependencies) and thus the constraint on an installed base
 cannot be satisfied.
 
 When you run ghc-pkg list base, does it list it in {}'s? Does ghc-pkg
 check report any problems?
 
 Duncan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal says no installed version of base

2009-10-21 Thread John Velman
I'm on OS X Leopard 10.5.8, using ghc 6.10.4 from Haskell Platform.

I'm trying to get a static .a library, callable from C, that I can use in
an OS X Cocoa program.  I've tried a very simple case (the one in Haskell
Wiki Tutorials,calling haskell from C) I've managed to make a Mac Cocoa
application by adding the ghc generated .o program, plus adding one by one
the needed Haskell libraries for symbol not found to my Xcode project.
There should be a better way.

I've tried just about everything I could find on creating Haskell
libraries, with no joy.  My latest try is to use Cabal, following advice
found both in How to write a Haskell program and the Cabal users guide.

My output from cabal -v configure tells me, among others:
---
Reading installed packages...
/usr/bin/ghc-pkg dump --global
/usr/bin/ghc-pkg dump --user
Reading available packages...
Resolving dependencies...
There is no installed version of base
---

But when I do ghc-pkg dump --global it appears base is listed.  

Apparently, no installed version of base short circuits the whole
process.


Any suggestions, pointers to reading, whatever will be appreciated. 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [solved] Re: [Haskell-cafe] Calling Haskell from C, Linking with gcc?

2009-10-08 Thread John Velman
On Thu, Oct 08, 2009 at 10:34:07AM +0200, Wouter Swierstra wrote:

 On 7 Oct 2009, at 23:39, John Velman wrote:

 For anyone following this:  The XCode ld script is complex, and has mac
 specific defaults early in the search path specification, and I probably
 don't want to change these.  A library in a default path is the wrong
 libgmp.[dylib | a].

 Is there any chance you'll write up exactly what you needed to do on a 
 blog/TMR article/Haskell wiki page? I've tried doing something similar, ran 
 into linking problems, and gave up my fight with XCode. I think this would 
 be a really useful resource for both Obj-C programmers looking into Haskell 
 and Haskell programmers who want to have a fancy Cocoa GUI. Thanks!

   Wouter

Yes, it is my intention to do just that.  Unfortunately, I don't always
follow through!  But with a specific request, I'll try to get it done in
the next few days.

I'll post the url here.

Best,

John Velman

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


Re: [Haskell-cafe] Calling Haskell from C, Linking with gcc?

2009-10-07 Thread John Velman
This is probably an Xcode problem now, rather than a strictly Haskell
problem.  

There are a bunch of libgmp.a and libgmp.dylib files in existence on this
computer, some in /usr/local/lib, or linked from there.

I've got my errors down to references in libgmp, whether or not I try to
include libgmp.a in the project.

Whenever I try to add libgmp.a, or libgmp.dylib to my project, I get the
error message:

--
ld warning: 
 in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libgmp.dylib, 
 file is not of required architecture
-

followed by a list of undefined symbols, all of which (well, all I've
checked!) are defined in the Haskell Platform version of libgmp.a

I'm sure there must be a way around this in the Xcode IDE, but haven't
found it.  I'll take the question to the Xcode mailing list.

Thanks to all for help on this.  I'll let you know how it works out!

Best,

John Velman



On Tue, Oct 06, 2009 at 07:56:07PM -0400, Brandon S. Allbery KF8NH wrote:
 On Oct 6, 2009, at 19:20 , John Velman wrote:
  HSghc-prim-0.1.0.0.o, HSinteger-0.1.0.1.o,   libffi.a,   libgmp.a,
  libHSbase-3.0.3.1.a,   libHSbase-3.0.3.1_p.a,   libHSbase-4.1.0.0.a,
  libHSghc-prim-0.1.0.0_p.a,   libHSrts.a

 Note that library order matters; libgmp.a should probably be last on the 
 command line.

 -- 
 brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
 system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
 electrical and computer engineering, carnegie mellon universityKF8NH

[previous messages snipped to save virtual paper]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[solved] Re: [Haskell-cafe] Calling Haskell from C, Linking with gcc?

2009-10-07 Thread John Velman
For anyone following this:  The XCode ld script is complex, and has mac
specific defaults early in the search path specification, and I probably
don't want to change these.  A library in a default path is the wrong
libgmp.[dylib | a].  

My solution:
do a

ln -s libgmp.a lib-h-gmp.a 

in the /Library/Frameworks/GHC.Framework//usr/lib folder.

Then add lib-h-gmp.a to my Xcode project.

Compiled, linked, and ran and got the right output.

Thanks to everyone who helped.

John V.

On Wed, Oct 07, 2009 at 10:38:53AM -0700, John Velman wrote:
 This is probably an Xcode problem now, rather than a strictly Haskell
 problem.  
 
 There are a bunch of libgmp.a and libgmp.dylib files in existence on this
 computer, some in /usr/local/lib, or linked from there.
 
 I've got my errors down to references in libgmp, whether or not I try to
 include libgmp.a in the project.
 
 Whenever I try to add libgmp.a, or libgmp.dylib to my project, I get the
 error message:
 
 --
 ld warning: 
  in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libgmp.dylib, 
  file is not of required architecture
 -
 
 followed by a list of undefined symbols, all of which (well, all I've
 checked!) are defined in the Haskell Platform version of libgmp.a
 
 I'm sure there must be a way around this in the Xcode IDE, but haven't
 found it.  I'll take the question to the Xcode mailing list.
 
 Thanks to all for help on this.  I'll let you know how it works out!
 
 Best,
 
 John Velman
 
 
 
 On Tue, Oct 06, 2009 at 07:56:07PM -0400, Brandon S. Allbery KF8NH wrote:
  On Oct 6, 2009, at 19:20 , John Velman wrote:
   HSghc-prim-0.1.0.0.o, HSinteger-0.1.0.1.o,   libffi.a,   libgmp.a,
   libHSbase-3.0.3.1.a,   libHSbase-3.0.3.1_p.a,   libHSbase-4.1.0.0.a,
   libHSghc-prim-0.1.0.0_p.a,   libHSrts.a
 
  Note that library order matters; libgmp.a should probably be last on the 
  command line.
 
  -- 
  brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
  system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
  electrical and computer engineering, carnegie mellon universityKF8NH
 
 [previous messages snipped to save virtual paper]
 ___
 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] Calling Haskell from C, Linking with gcc?

2009-10-06 Thread John Velman
I think if I knew which libraries to add to the gcc link, I could make this
work, but can't seem to find out from the documentation.

Here are more specifics:

I'd like to build a Cocoa  program on OS X with the Aqua user interface
using Xcode, but using a Haskell module with functions accessed through the
foreign export  interface.  In fact this seems to fit in well with the
Apple Model-View-Control programming pattern, with Haskell implementation
of the Model, maybe some of the Control,  and Cocoa implementation of the
View and some of the Control.

I've put together a short program (from the Wiki calling Haskell from C
example) and compiling and linking with ghc it runs as advertised.

As an experiment, I put the c main program into an Xcode project, added the
haskell module .o and stub.o, stub.h files.  Also added the HsFFI.h.  Then
did a build and run.  As expected I got a bunch of missing entry points
(26, if I recall correctly).  Adding libffi.a and libHSrts.a brings me up
to 56 missing entry points. Searching the other lib files for these seems
pretty hopeless.

Any pointers to documentation, or other help will be greatly appreciated!

Thanks,

John Velman

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


Re: [Haskell-cafe] Calling Haskell from C, Linking with gcc?

2009-10-06 Thread John Velman
On Tue, Oct 06, 2009 at 09:48:44AM -0700, Thomas DuBuisson wrote:


Thanks, Thomas.

Linking in only libffi.a, libgmp.a, I get (for example, there are many
more) missing:

  _newCAF  
  _base_GHCziBase_plusInt_closure
  _base_GHCziList_zzipWith_info
  _base_GHCziList_lvl5_closure

by also linking in libHSrts.a, I no longer am missing _newCAF, (and others
that were missing without it) but am missing a lot of _base_GHCzi...
references.  I've been unable to track these down.

By the way, I can't find either a libc.a or libm.a on this machine using
either locate or spotlight.

Is there a way to guess which library things are in, short of doing 
an nm with some appropriate option on each .a file in the Haskell lib?

Thanks,

John V.


 Generally you should be able to tell which library you're missing
 based on the names of the undefined symbols.  Have you link in...
 libgmp.a? libm.a? libc.a?  What are the missing symbols?
 
 Thomas
 
 On Tue, Oct 6, 2009 at 9:44 AM, John Velman vel...@cox.net wrote:
  I think if I knew which libraries to add to the gcc link, I could make this
  work, but can't seem to find out from the documentation.
 
  Here are more specifics:
 
  I'd like to build a Cocoa  program on OS X with the Aqua user interface
  using Xcode, but using a Haskell module with functions accessed through the
  foreign export  interface.  In fact this seems to fit in well with the
  Apple Model-View-Control programming pattern, with Haskell implementation
  of the Model, maybe some of the Control,  and Cocoa implementation of the
  View and some of the Control.
 
  I've put together a short program (from the Wiki calling Haskell from C
  example) and compiling and linking with ghc it runs as advertised.
 
  As an experiment, I put the c main program into an Xcode project, added the
  haskell module .o and stub.o, stub.h files.  Also added the HsFFI.h.  Then
  did a build and run.  As expected I got a bunch of missing entry points
  (26, if I recall correctly).  Adding libffi.a and libHSrts.a brings me up
  to 56 missing entry points. Searching the other lib files for these seems
  pretty hopeless.
 
  Any pointers to documentation, or other help will be greatly appreciated!
 
  Thanks,
 
  John Velman
 
  ___
  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] Calling Haskell from C, Linking with gcc?

2009-10-06 Thread John Velman
Thanks, Gregory.  I did something like that.  In particular, I did

find . -name lib*.a | xargs nm  ~/develop/haskellLibInfo/libInfo

Then I used the output from the build results file to look for stuff in the
libInfo file (using mac_vim).  In this way I cut the number of undefined
references down to 17 (from 56).  The remaining references all seem (from
the nm results) to be in libgmp.a, which I included in the project early
in this experiment.  The remaining ones are, for example:

  ___gmpz_init, 
  ___gmpz_divexact, 
  ___gmpz_tdiv_qr

  ...

  All are of the __gmpz variety.

So far all that I've looked in my libInfo have entries something like: 


  T ___gmpz_tdiv_qr

I'm way out of my depth here.  Here is a list of files I included in the
project from 

 /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/...
 so far:

  HSghc-prim-0.1.0.0.o, HSinteger-0.1.0.1.o,   libffi.a,   libgmp.a,
  libHSbase-3.0.3.1.a,   libHSbase-3.0.3.1_p.a,   libHSbase-4.1.0.0.a,
  libHSghc-prim-0.1.0.0_p.a,   libHSrts.a 

I'm using Haskell installed from

haskell-platform-2009.2.0.2-i386.dmg (for OS X).


Well, any further pointers will be highly appreciated.

I'll have to sign off from this today, but hopefully will have more
insights (from self and others) tomorrow.

Best,

John Velman


On Tue, Oct 06, 2009 at 03:07:01PM -0400, Gregory Collins wrote:
 John Velman vel...@cox.net writes:
 
  On Tue, Oct 06, 2009 at 09:48:44AM -0700, Thomas DuBuisson wrote:
 
 
  Thanks, Thomas.
 
  Linking in only libffi.a, libgmp.a, I get (for example, there are many
  more) missing:
 
_newCAF  
_base_GHCziBase_plusInt_closure
_base_GHCziList_zzipWith_info
_base_GHCziList_lvl5_closure
 
  by also linking in libHSrts.a, I no longer am missing _newCAF, (and others
  that were missing without it) but am missing a lot of _base_GHCzi...
  references.  I've been unable to track these down.
 
  By the way, I can't find either a libc.a or libm.a on this machine using
  either locate or spotlight.
 
  Is there a way to guess which library things are in, short of doing 
  an nm with some appropriate option on each .a file in the Haskell lib?
 
 $ cd /Library/Frameworks/GHC.framework/Versions/Current/usr/lib/
 
 $ for i in `find . -name '*.a'`; do nm -a $i 2/dev/null | grep 
 --label=$i -H 'D *_base_GHCziBase_plusInt_closure'; done
 ./ghc-6.10.4/base-4.1.0.0/libHSbase-4.1.0.0.a:008c D 
 _base_GHCziBase_plusInt_closure
 ./ghc-6.10.4/base-4.1.0.0/libHSbase-4.1.0.0_p.a:010c D 
 _base_GHCziBase_plusInt_closure
 
 G.
 -- 
 Gregory Collins g...@gregorycollins.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] problems with HOC install from svn

2009-09-09 Thread John Velman

I'm guessing the problem was with cabal's use of dlopen (see my inclusion
of error message below).  From some googling, the OS-X dlopen was redone by
apple at some time and from results I obtained, seems to require dylib
libraries unless (some things I don't understand).

It seems that some earlier versions of GHC could use dylibs, but not 6.10.

From some similar sounding issues I found in the issues part of the HOC
site on code.google, I made a wild guess that using 

sudo runhaskell Setup.hs [options] 

might work.  It did.  I went all the way through the installation
instructions using this procedure wherever the README file said cabal.
Everything compiled, linked, and installed in global locations.  Also
compiled and linked one of the examples this way, and it seems to work.

I'll submit an issue to the HOC site (if it will let me -- don't know about
permissions for issues on this site).

Thanks for your interest and help.

John Velman

On Tue, Sep 08, 2009 at 11:44:36PM -0400, Ross Mellgren wrote:
 I have binary-0.5 not binary-0.5.0.1, but it doesn't have any dylibs. 
 Moreover, I was under the impression that GHC does not yet support shared 
 libraries like those, so I'm not sure why it would be looking for one. I 
 can't really speculate, maybe more of the build output might help?

 -Ross

 On Sep 8, 2009, at 10:54 PM, John Velman wrote:


 Thanks.  Now I do have libHSbinary-0.5.0.1.a in /usr/local/lib,
 but apparently  not the dylib version.  Tomorrow I'll look further.
 Perhaps there are some options to produce dylib libraries.  I've used
 Haskell on Linux some time ago (but not Cabal), and have been Xcoding with
 Objective C for a year or so now, but never tried this before.  I am
 interested in HOC, but I've obviously got a lot to learn.

 Thanks again,

 John Velman



 On Tue, Sep 08, 2009 at 08:35:54PM -0400, Ross Mellgren wrote:
 It sounds like it's looking for the binary package -- you should install 
 it
 using cabal, e.g.

 private (per-user) install:
 cabal update
 cabal install binary

 global (system-wide) install:
 sudo cabal update
 sudo cabal install --global binary

 -Ross

 On Sep 8, 2009, at 7:57 PM, John Velman wrote:

 I'm unable to build HOC from the svn read-only checkout.  Here are some
 details of what I'm doing.

 I'm running OS X 10.5.8 on an intel iMac with Xcode is 3.1.3.

 Haskel and Cabal are from the Haskel platform,
 haskell-platform-2009.2.0.2-i386.dmg

 I got Parsec 3.0 from Hackage.

 I checked out HOC using the svn command at
 http://code.google.com/p/hoc/source/checkout

 and checked out revision 411.

 Configure goes OK except for the complaint:
 
 Setup.hs:1:0:
   Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: Use simpleUserHooks or autoconfUserHooks, unless
 you need Cabal-1.2
compatibility in which case you must stick with
 defaultUserHooks
 

 But when I try to build, I get, after a bunch of apparently successful
 things:
 ---
 Loading package binary-0.5.0.1 ... command line: can't load .so/.DLL
 for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not
 found)
 ---

 I certainly can't find libHSbinary... of any version on my computer, 
 dylib
 or not.  Tried looking in the /Library/Frameworks/GHC.Framework stuff,
 also
 did a find . -iname *libHS* and found libHSGLFW..., libHSparsec-3.0.0.

 (also tried this in my home directory).

 What is this, and how do I get it?

 Best,

 John Velman




 ___
 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] problems with HOC install from svn

2009-09-08 Thread John Velman
I'm unable to build HOC from the svn read-only checkout.  Here are some
details of what I'm doing.

I'm running OS X 10.5.8 on an intel iMac with Xcode is 3.1.3. 

Haskel and Cabal are from the Haskel platform, 
haskell-platform-2009.2.0.2-i386.dmg

I got Parsec 3.0 from Hackage.

I checked out HOC using the svn command at 
http://code.google.com/p/hoc/source/checkout

and checked out revision 411.

Configure goes OK except for the complaint:

Setup.hs:1:0:
Warning: In the use of `defaultUserHooks'
 (imported from Distribution.Simple):
 Deprecated: Use simpleUserHooks or autoconfUserHooks, unless you 
need Cabal-1.2
 compatibility in which case you must stick with defaultUserHooks


But when I try to build, I get, after a bunch of apparently successful
things:
---
Loading package binary-0.5.0.1 ... command line: can't load .so/.DLL for: 
HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
---

I certainly can't find libHSbinary... of any version on my computer, dylib
or not.  Tried looking in the /Library/Frameworks/GHC.Framework stuff, also
did a find . -iname *libHS* and found libHSGLFW..., libHSparsec-3.0.0.

(also tried this in my home directory).

What is this, and how do I get it?

Best,

John Velman




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


Re: [Haskell-cafe] problems with HOC install from svn

2009-09-08 Thread John Velman

Thanks.  Now I do have libHSbinary-0.5.0.1.a in /usr/local/lib,
but apparently  not the dylib version.  Tomorrow I'll look further.
Perhaps there are some options to produce dylib libraries.  I've used
Haskell on Linux some time ago (but not Cabal), and have been Xcoding with
Objective C for a year or so now, but never tried this before.  I am
interested in HOC, but I've obviously got a lot to learn.

Thanks again,

John Velman



On Tue, Sep 08, 2009 at 08:35:54PM -0400, Ross Mellgren wrote:
 It sounds like it's looking for the binary package -- you should install it 
 using cabal, e.g.

 private (per-user) install:
 cabal update
 cabal install binary

 global (system-wide) install:
 sudo cabal update
 sudo cabal install --global binary

 -Ross

 On Sep 8, 2009, at 7:57 PM, John Velman wrote:

 I'm unable to build HOC from the svn read-only checkout.  Here are some
 details of what I'm doing.

 I'm running OS X 10.5.8 on an intel iMac with Xcode is 3.1.3.

 Haskel and Cabal are from the Haskel platform,
 haskell-platform-2009.2.0.2-i386.dmg

 I got Parsec 3.0 from Hackage.

 I checked out HOC using the svn command at
 http://code.google.com/p/hoc/source/checkout

 and checked out revision 411.

 Configure goes OK except for the complaint:
 
 Setup.hs:1:0:
Warning: In the use of `defaultUserHooks'
 (imported from Distribution.Simple):
 Deprecated: Use simpleUserHooks or autoconfUserHooks, unless 
 you need Cabal-1.2
 compatibility in which case you must stick with 
 defaultUserHooks
 

 But when I try to build, I get, after a bunch of apparently successful
 things:
 ---
 Loading package binary-0.5.0.1 ... command line: can't load .so/.DLL 
 for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not 
 found)
 ---

 I certainly can't find libHSbinary... of any version on my computer, dylib
 or not.  Tried looking in the /Library/Frameworks/GHC.Framework stuff, 
 also
 did a find . -iname *libHS* and found libHSGLFW..., libHSparsec-3.0.0.

 (also tried this in my home directory).

 What is this, and how do I get it?

 Best,

 John Velman




 ___
 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] Why Perl is more learnable than Haskell

2007-04-11 Thread John Velman
On Wed, Apr 11, 2007 at 05:55:08AM -0700, kynn wrote:
 
 Perl is a large, ugly, messy language filled with quirks and eccentricities,
 while Haskell is an extremely elegant language whose design is guided by a
 few overriding ideas.  (Or so I'm told.)
 
 Based on this one would think that it would be much easier to learn Haskell
 than to learn Perl, but my experience is exactly the opposite.
 Haskell useful to the learner as quickly as possible...  If such already
snip

 exist and I've missed it, please let me know.
 
 Or I can always wait until I retire; then I'll probably have a sufficiently
 long stretch of free time in my hands (barring any operations, strokes,
 heart attacks, hip fractures, etc.).  I bet I could start a Haskell Wannabes
 Club at the nursing home...
 
 kj

My experience is a lot like yours, except I retired 5 years ago, and still
haven't learned Haskell.  Unfortunately, I've had lots of interruptions
that have kept me away from the keyboard.  I've got a few unfinished
projects, including one I started in Perl years ago, moved to Python, then
moved to Haskell.  The only useful thing I've programmed since I retired
was a program to update my checkbook/bank statement postgresql database
using Prolog for parsing entries the way I like to write them in a text
file.  Someday I'll move this to Haskell :-).  I've sworn off other
languages since I don't have any deadlines except my own.

I never really learned Perl, but I used it a lot for simple one to thirty
liners.  The thing was, any thing I wanted to do I could find the bits and
pieces of in Learning Perl, Programming Perl, or Learning Perl/TK.

I have on my shelf Haskell: The craft..., The Haskell school of
expression, and The Haskell road to Logic  I've read them.  I know
I should sit down with each one at the computer and work through the
exercises.  But..,.

When my current spate of unavoidable interruptions is over, I'll look into
the email on Haskell one-liners, and some of the new tutorials to try to
come back up to speed.  Not in a nursing home yet!

Good luck,

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


[Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread John Velman
I've tried google and google scholar, wikipedia, and planetMath.  Can't
find a description.  Can someone point me to a freely available reference?

Thanks,

John Velman

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


Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread John Velman
Thanks, this is very helpful.

John Velman

On Fri, Dec 09, 2005 at 02:29:33PM -0500, Cale Gibbard wrote:
 A box is a cell representing some value in a program. It generally
 ...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Learning Haskell

2005-12-05 Thread John Velman

I think you should take a look at some of the tutorial material you can
find at www.haskell.org and jump in.

For some reason there seems to be an affinity between Python and Haskell.
Not clear to me why, since on the surface there is little similarity of
syntax.

If you think you might like it well enough to get a book, there are several
good ones.  I think Paul Hudack's The Haskell School of Expression might
be a good start for you (I'm assuming that the SOEGraphics library is
readily available.  Once when I complained that I couldn't find it, someone
told me I should have been able to!)   Also, Simon Thompson's The Craft of
Functional Programming is very good.

Haskell should be good for doing small 'throw away' programs, once you get
used to the IO.

Caveats, and truth in advertising:

1. I'm pretty much a Haskell novice.  Although I've lurked in the foothills
here for some years, only recently have I had a chance to try to get up to
speed for something relatively serious.

2. I intend to use Haskell for most of what I used to use Perl for, in the
way of small programs.  I haven't actually done this, since I haven't had
the need. (I'm currently working on a parser for the Conceptual Graph
Interchange Format (CGIF) -- which will be a small program itself, using Parsec.
I hope to use it as part of a graphical CG editor, eventually.  If I ever
get time I intend to rewrite my Prolog/Postgresql bank statement tracking
and reconciling program using Haskell/Postgresql, but that's a ways down on
my list.)

3. I have been certified to have a strong math background :-), so take my
advice with a grain of salt.  I definitely don't understand monads, but can
use them in a primative, unsophisticated way.  I think if you can get along
ok in Python and groan java script /groan you ought to be able to get
along ok in Haskell.

4. If you want a GUI, there are several in the works but (as far as I
know), none standard.  I'm using HTk, because of an old slow machine and
previous knowledge of tcl/Tk.  I also tried developing a little drawing
program with GTK2HS, but its development was moving too fast for me.
wxHaskell is also pretty active.  Others may have better advice.

5. Oh, and my platform is Linux.  I used to use Hugs on Windows a long time
ago when my job required Windows.

Happy Haskelling!

John Velman



On Mon, Dec 05, 2005 at 04:26:20PM -0600, Jimmie Houchin wrote:
 Hello,
 
 I am exploring the possibility of learning Haskell. I am not a 
 professional programmer, nor do I have a CS or Math degree.
 
 I do play and program with Python, Smalltalk (Squeak), Javascript, 
 explored Erlang some.
 
 I do not have a strong math background.
 
 Is lack of strong math background a major hindrance to learning Haskell?
 
 Also, I understand Haskell's benefits for programming larger projects.
 But how does it do on programming in the small?
 ie: using Haskell where I might have used Python for scripting?
 
 Thanks for any help and wisdom.
 
 Jimmie Houchin
 ___
 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] Making Haskell more open

2005-11-11 Thread John Velman
I agree with Gour.  I found txt2tags as a result of a discussion on the
GTK2HS list.  It is simple to use, readable as is, or easily transformable
to a variety of targets.  Also, it is consistent with bird-track literate
Haskell, so I can run my .lhs documents through txt2tags and get html,
latex, pretty text, or a bunch of things I haven't tried yet including
*.doc (msword) (the latter via txt2tags for html, soffice to go from html
to *.doc).

John Velman


On Fri, Nov 11, 2005 at 06:29:24PM +0100, Gour wrote:
 Simon Marlow ([EMAIL PROTECTED]) wrote:
 
  We already use DocBook XML, and I'm relatively pleased with it, except
  for the fact that it's far from easy to set up a working DocBook
  toolchain on your system unless your OS of choice is up to date and has
  a well-maintained set of DocBook packages.
 
 I consider that the structure of the present ghc manual does not need
 such a rich markup as DocBook which is, imho, not very user-friendly.
 
 otoh, I'd prefer something simple (if you want to get contributions from
 more users) like 'txt2tags' 
 
 (see e.g. http://txt2tags.sourceforge.net/screenshots.html)
 
 which enables one to do lot with very simple markup.
 
 There are many targets supported, light sys-reqs, cli  gui, and even
 syntax highlighting for (g)vim, emacs, kate...
 
 Sincerely,
 Gour
 
 -- 
 Registered Linux User | #278493
 GPG Public Key| 8C44EDCD
  
 ___
 Haskell mailing list
 Haskell@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell-cafe] Question about instance

2005-01-13 Thread John Velman
Instance with a context doesn't seem to work as I expect.

Here's the story:

I define an data type, Relation, and I want to make it an instance of
Show, partly so I can debug and tinker with things interactively and have
ghci print something.

Here is my first try:


import Data.Set

type EN = String  -- element name

type RN = String  -- relation name

instance Show a = Show (Set a) where
   show s = mkSet  ++ show (setToList s) 

data Relation  = Relation {name::RN, arity::Int, members::(Set [EN])}

instance (Show a, Show i, Show b) = Show (Relation a i b)
   where
 show (Relation a i b) =
a ++ / ++ (show i) ++  
++ (show b)


When I try to load this into ghci, I get:

---GHCI:

*Main :l test.hs
Compiling Main ( test.hs, interpreted )

test.hs:14:
Kind error: `Relation' is applied to too many type arguments
When checking kinds in `Relation a i b'
When checking kinds in `Show (Relation a i b)'
In the instance declaration for `Show (Relation a i b)'
Failed, modules loaded: none.
Prelude
---END GHCI
But, when I define showRelation separately, then leave the context out of
the instance declaration with show = showRelation it works:

---(Everything down to the instance declaration is the same)
instance  Show Relation 
   where
 show = showRelation

showRelation:: Relation - String
showRelation (Relation a i b) =
a ++ / ++ (show i) ++  
++ (show b)

---

Now I get:
--- GHCI output:
Prelude :l test.hs
Compiling Main ( test.hs, interpreted )
Ok, modules loaded: Main.
*Main mkRelation1 test 2 [[one,two], [three,four]]
test/2 mkSet [[one,two],[three,four]]
*Main 
-- End GHCI

Why does the original instance declaration result in failure and the
message Kind error: `Relation' is applied to too many type arguments (I
confess to not understanding 'kinds' too well.)

I've done a bit of tinkering with the original version, and have tried the
second version with a context in the instance declaration, but none of my
attmepts work.  The only one that worked was the one shown, with no context
in the instance declaration.  Needless to say (?), I've tried to
understand this from reading in the Haskell 98 report, `Haskell school of
Expression', and any place else I can think of, but I'm missing the point
somewhere.  


Thanks,

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


Re: [Haskell-cafe] Question about instance

2005-01-13 Thread John Velman
Thanks, Andreas.  Your example still left me without context in the show
statement itself, but your message set me to look in the right place.

Now I have

--- Code
data Relation a i b = Rel {name::RN, arity::Int, members::(Set [EN])}

instance (Show a, Show i, Show b) = Show (Relation a i b)
   where
 show (Rel a i b) =
a ++ / ++ (show i) ++  
++ (show b)


---
with result:
---GHCI

Prelude :l test.hs
Compiling Main ( test.hs, interpreted )
Ok, modules loaded: Main.
*Main mkRelation1 test 2 [[one,two], [three,four]]
test/2 mkSet [[one,two],[three,four]]
*Main
---End GHCI

It's hard to find examples like this, and the fact that it is fairly
standard practice for the type name and constructor names to be the same
in, for example, Gentle Haskell, and Haskell School of Expression make it
more difficult for the novice to see when each is used!

Best,

John Velman



On Fri, Jan 14, 2005 at 01:49:57AM +0100, Andreas Marth wrote:
 If you replace
 data Relation  = Relation {name::RN, arity::Int, members::(Set [EN])}
 with
 data Relation  = Rel {name::RN, arity::Int, members::(Set [EN])}
 you will easy find out what is wrong and come to:
 
 import Data.Set
 
 type EN = String  -- element name
 
 type RN = String  -- relation name
 
 instance Show a = Show (Set a) where
show s = mkSet  ++ show (setToList s)
 
 data Relation  = Rel {name::RN, arity::Int, members::(Set [EN])}
 
 instance Show (Relation)
where
  show (Rel a i b) = a ++ / ++ (show i) ++   ++ (show b)
 
 
 Of course you can now change Rel back to Relation. But because of the
 problems you just experienced I don't like it to name a type and its
 constructor the same.
 
 
 Happy coding,
 Andreas
 
 
 
 - Original Message - 
 From: John Velman [EMAIL PROTECTED]
 To: haskell-cafe@haskell.org
 Sent: Friday, January 14, 2005 1:29 AM
 Subject: [Haskell-cafe] Question about instance
 
 
  Instance with a context doesn't seem to work as I expect.
 
  Here's the story:
 
  I define an data type, Relation, and I want to make it an instance of
  Show, partly so I can debug and tinker with things interactively and
 have
  ghci print something.
 
  Here is my first try:
  
  
  import Data.Set
  
  type EN = String  -- element name
  
  type RN = String  -- relation name
  
  instance Show a = Show (Set a) where
 show s = mkSet  ++ show (setToList s)
  
  data Relation  = Relation {name::RN, arity::Int, members::(Set [EN])}
  
  instance (Show a, Show i, Show b) = Show (Relation a i b)
 where
   show (Relation a i b) =
  a ++ / ++ (show i) ++  
  ++ (show b)
  
 
  When I try to load this into ghci, I get:
 
  ---GHCI:
 
  *Main :l test.hs
  Compiling Main ( test.hs, interpreted )
 
  test.hs:14:
  Kind error: `Relation' is applied to too many type arguments
  When checking kinds in `Relation a i b'
  When checking kinds in `Show (Relation a i b)'
  In the instance declaration for `Show (Relation a i b)'
  Failed, modules loaded: none.
  Prelude
  ---END GHCI
  But, when I define showRelation separately, then leave the context out of
  the instance declaration with show = showRelation it works:
 
  ---(Everything down to the instance declaration is the same)
  instance  Show Relation
 where
   show = showRelation
  
  showRelation:: Relation - String
  showRelation (Relation a i b) =
  a ++ / ++ (show i) ++  
  ++ (show b)
  
  ---
 
  Now I get:
  --- GHCI output:
  Prelude :l test.hs
  Compiling Main ( test.hs, interpreted )
  Ok, modules loaded: Main.
  *Main mkRelation1 test 2 [[one,two], [three,four]]
  test/2 mkSet [[one,two],[three,four]]
  *Main
  -- End GHCI
 
  Why does the original instance declaration result in failure and the
  message Kind error: `Relation' is applied to too many type arguments (I
  confess to not understanding 'kinds' too well.)
 
  I've done a bit of tinkering with the original version, and have tried the
  second version with a context in the instance declaration, but none of my
  attmepts work.  The only one that worked was the one shown, with no
 context
  in the instance declaration.  Needless to say (?), I've tried to
  understand this from reading in the Haskell 98 report, `Haskell school of
  Expression', and any place else I can think of, but I'm missing the point
  somewhere.
 
 
  Thanks,
 
  John Velman
  ___
  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] Problem with wxHaskell

2005-01-12 Thread John Velman
Your code works fine on Linux.  :-)

Oh, by the way, I compiled my wxHaskell with GHC 6.2.2

I note that the windows binary on the download site was compiled with
GHC 6.2.1, and apparently these are not binary compatible with GHC 6.2.2.

Best,


John Velman

On Wed, Jan 12, 2005 at 04:16:33PM +0100, Dmitri Pissarenko wrote:
 Hello!
 
 I've downloaded wxHaskell, ran the wxhaskell-register.bat file and now try to
 build a minimal wxHaskell program.
 
 For this purpose, I tried to start GHCi using following command
 
 ghci -package wx GuiTest.hs
 
 GHCi crashed with following error messages:
 
 error-messages
 GHC Interactive, version 6.2.2, for Haskell 98.
 http://www.haskell.org/ghc/
 Type :? for help.
 
 Loading package base ... linking ... done.
 Loading package haskell98 ... linking ... done.
 Loading package lang ... linking ... done.
 Loading package concurrent ... linking ... done.
 Loading package QuickCheck ... linking ... done.
 Loading package readline ... linking ...
 C:/ghc/ghc-6.2.2/HSreadline.o: unknown symbol `_rl_redisplay_function'
 ghc.exe: unable to load package `readline'
 /error-messages
 
 What am I doing wrong?
 
 TIA
 
 Dmitri Pissarenko
 
 PS: Here is the code of the application
 
 module Main where
 
 import Graphics.UI.WXCore
 
 main :: IO ()
 main
   = run gui
 
 gui :: IO ()
 gui
   = do frame - frameCreateTopFrame Hello World
windowShow frame
windowRaise frame
return ()
 --
 Dmitri Pissarenko
 Software Engineer
 http://dapissarenko.com
 ___
 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] Information given by :info (Was: Some randomnewbie questions)

2005-01-11 Thread John Velman
On Tue, Jan 11, 2005 at 12:21:35PM -, Simon Marlow wrote:
 On 10 January 2005 10:26, Sebastian Sylvan wrote:
 
  On Mon, 10 Jan 2005 10:30:46 +0100 (MEZ), Henning Thielemann
  [EMAIL PROTECTED] wrote:
  What I also would like to see is the Haddock documentation
  string of a function printed by :info or some other command.

SWI Prolog has a predicate, apropos of arity 1.  When appropos(xxx) is
invoked from the interactive console (which is comparable to the HUGS of
GHCi console), a  new process is started in a window.  The window has two
panes one with a table of contents tree for the manual, one with brief
descriptions of the predicate xxx. There is also an entry box for a new
search, and a menu.

It seems that it wouldn't be too hard to put together something similar
that would work from either the HUGS or GHCi console.  It would be too
large a project of me at the moment :-).

SWI Prolog uses XPCE, which is distributed with SWI Prolog, for the GUI.

Best,

John Velman

  
  
  Now _that_ would be truly useful.
 
 It's not perfect, but it's better than nothing:
 
 :def doc (\s - let (rvar,rmod) = break (=='.') (reverse s); var =
 reverse rvar in System.Cmd.system (mozilla
 http://www.haskell.org/ghc/docs/latest/html/libraries/base/; ++ reverse
 rmod ++ html# ++ (if (Data.Char.isUpper (head var)) then t: else
 v:) ++ var)  return )
 
 eg.
 
 Prelude :doc Prelude.head
 
 You have to use a qualified name, it only works in package base, and you
 can't look up data constructors.  Any hackers out there want to try
 lifting these restrictions?
 
 Cheers,
   Simon
 ___
 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] Building GUIs for Haskell programs

2005-01-11 Thread John Velman
Here is an answer from a newbie at both Haskell and GUI --

I don't think there is a simple answer.  It probably depends on your
experience, your development platform, and where you want to be able to
distribute your application to.  I would say that wxHaskell is probably a
good choice.  It depends on wxWindows, which seems to be fairly well
developed, and is said to work on all reasonable platforms.

Here is my story:

I've done little GUI programming -- some MS Visual C++ and visual basic
years ago, a little perlTK more recently.  I have some familiarity with
TCL/TK from my perlTK experience.   I'm developing on a Linux platform
(Slackware 9) and have GHC 6.2.2.

I looked at, and tried several of the Haskell libraries as listed at
http://www.haskell.org/libraries/#guis

Because of my previous experience with TCL/TK, I wanted to use a TK based
solution initially.  I had problems (I've forgotten what :-) with
TCLHaskell, and went on to HTk.  The HTk package seems pretty nice, but
probably because of my inexperience with Haskell, I found it difficult to
understand.

wxHaskell seems to be the most popular vehicle, so I decided to look into
it, partly based on some advice I got from this list.

I had no trouble compiling and installing wxWindows (specifically,
wxGTK-2.4.2).  I also compiled from source wxHaskell with no problem.

Although the documentation is a bit cryptic (for my level of experience, at
least), and even though I have no past experience with wxWindows, I am able
to figure out how to do what I want to do, so far.

So, based on my experience, I can recommend wxHaskell.

Best regards,

John Velman


On Tue, Jan 11, 2005 at 09:05:43PM +0100, Dmitri Pissarenko wrote:
 Hello!
 
 I want to learn to create GUIs with Haskell.
 
 Which GUI frameworks can you recommend?
 
 Thanks
 
 Dmitri Pissarenko
 --
 Dmitri Pissarenko
 Software Engineer
 http://dapissarenko.com
 ___
 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] GUI

2004-12-29 Thread John Velman
On Mon, Dec 27, 2004 at 11:44:49AM +0100, Arjan van IJzendoorn wrote:
 
 However, I want to know if there has been any practical 
 standardisation in the GUI area.  Last time I looked at this it seemed 
 some decisions had been made (bind to existing api - wxWindows?).  I 
 am waiting for some real standardisation and a mature API before I 
 jump ship from Java for my day-to-day programming.
 
 wxHaskell is available at http://www.wxhaskell.sfnet.org/
 It runs on Windows, Linux and MacOS X. It has many GUI controls, 
 database access, is well documented and ...[snip]
--^^^

Well documented is relative to the background of the user.  As a Haskell
novice who has no prior experience with wxWindows, I have found the
documentation a little bit sparse!  For example, the device context (dc) of
the widget where an event occurs is apparently passed (by the wxHaskell
routines) to the user written callback function for that event.  I had a
need for the dc of a different widget in a certain callback.  I stumbled
onto the function withClientDC more or less by accident.   

I'd like to be able to output my drawing in PostScript. Based on some
wxWindows examples, and some function signatures in the wxHaskall
documentation, I believe I'll eventually be able to do this, but expect to
have to do some heavy digging and reading of a certain amount of C++ code
in order to figure out how.

This is not a complaint, just a warning to the novice.  Don't expect
anything like Python's TKInter Life Preserver.   

I am fairly happy with wxHaskell and get happier with it as I get to
understand it better.  I'm grateful for the work Daan and others have put
into wxHaskell.

wxHaskell does have extensive Haddock documentation, the Wiki has a very good
wxHaskell page (as far as it goes), and Daan's paper wxHaskell A Portable
and Concise GUI Library for Haskell is excellent.

I understand that writing documentation for the novice is time consuming. I
hope to add some comments to the Wiki for other beginers when I get a
little further along.

Best,


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


Re: Top Level TWI's again was Re: [Haskell] Re: Parameterized Show

2004-11-22 Thread John Velman
On Mon, Nov 22, 2004 at 07:27:44PM +0100, Lennart Augustsson wrote:
 
[snip]
 I admit there are proper uses of global variables, but they are very
 rare.  You have not convinced me you have one.
 
   -- Lennart

It's with some trepidation I bring a problem as a total newbie, but I've
been obsessed with this and hung up on it ever since I decided a couple of
weeks ago to learn Haskell by using it.

Some brief background:

A while back I decided I wanted a simple 'concept mapping' program that
would work the way I work instead of the way someone else works.  I
envisioned a GUI with a canvas and an entry box (TK/tcl).  I type a
concept name into the entry box, and it shows up on the canvas (initially
in a slightly randomized position), in a box, with a unique sequenced
identifier.  The identifier is also used as a canvas tag for the item.
Similar input for relations between concepts.   I think that's enough
description for now.

Initially, I started programming this with PerlTK, but that effort was
interrupted for a few weeks.  When I got back to it, I decided to do it in
Python instead. But that effort also got interrupted for a few weeks.
Before I got back to it, I ran across some material on Haskell I've had in
my files for a few years, and decided that I'd use this as a vehicle to
actually learn Haskell.   (This all sounds a bit unfocused, and it is:  I'm
retired, sometimes describe myself as an ex mathematician or an ex-PhD
having spent years in the aerospace industry instead of academia.  Anyway,
I have both the luxury and lack of focus of no deadlines, no pressure to
publish.  I hope to use Haskell to further my main hobby of knowledge
representation.)

In perl, my labels/tags were very easy:

In the initialization code:

 my @taglist = ();
 my $nextag = a;

and in the callback for the entry box:

push(@taglist,$nextag);
$nextag++;

(With the starting tag of a  this results in a,z,aa,ab,...)

Also, ultimately, I want to be able to save  my work and restart
the next day (say) picking up the tags where I left off.

I'm darned if I can see how to do this in a callback without a global
variables (and references from other callbacks, by the way).

In looking for a method, I've discovered that Haskell is a lot richer than
I thought (or learned when I tinkered with it back in the late '90s ).
I've found out about (but don't know how to use properly) implicit
parameters, linear implicit parameters, unsafePerformIO, safe and sound
implementation of polymorphic heap with references and updates (Oleg
Kiselyov, (http://www.haskell.org/pipermail/haskell/2003-June/011939.html),
implicit configurations, phantom types, ...

I've also found warnings against many of these.  I'm inclined to try the
unsafePerformIO route as being the simplest, and most commonly used, even
though perhaps the least haskell-ish.  I like implicit configurations, but
couldn't begin to say I understand them yet, and it's a bit heavy for a
novice.

In a nutshell:

   I want to use the old value of a tag to compute the new value, in a
   callback, 
   
   I want to access the tag from other callbacks, and
   
   I want to the value to a mutable list from within the callback.
   
I'd certainly be interested in doing without global variables, and would
appreciate any advice.

(By the way, I'm using Linux, and so far it looks like HTk is my choice for
the GUI interface.)

Best,

John Velman
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] implicit parameters and the paper prepose.pdf

2004-11-20 Thread John Velman
Thanks to everyone who answered!  I now have a copy.

Best to all,

John Velman
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


[Haskell-cafe] Examples using STRef

2004-11-02 Thread John Velman
I want to label items on a canvas (using HTk for gui) with a sequence of
labels.   It looks like STRef would provide the right capability. (Needless
to say, at this point, I'm new at using Haskell and am trying to swallow
everything at once.)  Are there some examples of programs using STRef?  I'd
like examples that are not too complicated, but not too simple, either. :-)

Thanks,

John Velman
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: New InstallShield: Free At Last

2001-04-23 Thread John . Velman


This sounds good.  One question:  Can this live gracefully with
an already complete Cygwin installation?  I.e., will I automatically
end up with two versions of bash, mv, cp, and so on, and can they
live together?

Thanks,

John Velman




Reuben Thomas [EMAIL PROTECTED]@haskell.org on 04/23/2001 03:41:12 AM

Sent by:  [EMAIL PROTECTED]


To:GHC users mailing list [EMAIL PROTECTED]
cc:

Subject:  New InstallShield: Free At Last


I've uploaded a new InstallShield for GHC 4.08.2 for Windows which includes
*all* the programs required to use and even rebuild GHC from source [GHC
developers should note that it doesn't include everything needed to build
from CVS; see the most recent 5.00 docs in CVS for details]. This means
that
there's no longer any need to install Cygwin.

Since GHC needs bash to work, and building it requires mv, rm and cp, plus
many other basic utilities, you get a reasonably nice minimal command-line
environment anyway; I've added ls to the mix for extra comfort.

Although the InstallShield is now 20M, overall there's far less to
download,
and now GHC should break far less often. Another implication of this
development is that the Windows version of 5.00 should now happen sooner
rather than later.

One caveat: the installation instructions on haskell.org are now somewhat
out of date. I'll try to correct that soonish.

--
http://sc3d.org/rrt/ | Si hoc legere scis nimium eruditionis habes.


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: Dimensional analysis with fundeps

2001-04-09 Thread John . Velman


1) What is a fundep?

2)  This is a very interesting topic, and rather complex.  It
has come up (dimensions, units, -- not Haskell implementations
of them) in some recent work on STEP (ISO 10303).  I'm only
now trying to come up to some speed on Haskell, and only now
trying to recall what I used to know about the algebra of units
and dimensions, so I'm not really prepared to comment deeply
on this suggestion.  However, I'd suggest that someone have a
good long look at "An Ontology for Engineering Mathematics"
(available at http://www-ksl.stanford.edu/KSL_Abstracts/KSL-94-18.html)
(or similar work) before building anything in to standard libraries.

John Velman





Tom Pledger [EMAIL PROTECTED]@haskell.org on 04/09/2001 02:48:48 PM

Sent by:  [EMAIL PROTECTED]


To:anatoli [EMAIL PROTECTED], [EMAIL PROTECTED]
cc:

Subject:  Dimensional analysis with fundeps


I like it!

 :
 | 3) Allow arbitrary user-defined "fundamental" dimensions
 |(for things like dollars or radians) -- this may be
 |very tricky;
 |
 | 4) Allow several unit systems (such as SI and Imperial)
 |to coexist.

Some suggestions/quibbles...

If you clearly make the type system deal with dimensions rather than
units, there's no problem with plugging in multiple unit systems.  You
just have to pick a scale for the representation.

newtype Dimensioned mass length time rep = Dimensioned rep

type Mass rep = Dimensioned One Zero Zero rep

kg, lb :: Num a = Mass a
kg = dm 1
lb = dm 0.4535924

Angles are dimensionless.  (Think of the Taylor series for trig
functions.)

radian, degree :: Unit
radian = dm 1
degree = dm (pi/180)

Regards,
Tom

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell




___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell