
Hi, I'm pleased to announce HSH 1.2.0. Since version 1.0.0 was announced a few days ago, there have been some improvements: * run is now a function with a polymorphic return type. Depending on the value expected, it can return to you a String representing all output, an exit code, a list of lines of output, etc. runS is now removed. * A number of new helper functions in ShellEquivs. Fixes to readlink and readlinkabs there. * New helper functions runIO (to force an IO () context) and runSL (returns a single line of output, \n stripped) * There are now 82 unit tests. Get it at: http://software.complete.org/hsh -- John Goerzen Author, Foundations of Python Network Programming http://www.amazon.com/exec/obidos/tg/detail/-/1590593715

On Sat, Mar 03, 2007 at 08:38:57AM -0600, John Goerzen wrote:
I'm pleased to announce HSH 1.2.0. Since version 1.0.0 was announced a few days ago, there have been some improvements:
How about -||- as an alias for something like `catch` $ \_ -> ? Or I'm not sure the best design, in the sense of how you want to treat booleans. e.g. This would allow simple shell-like error handling in pipes, using exception-throwing as pipes: sh: echo "hello world" | grep z || echo "there is no z" hsh: run $ echo "hello world" -|- "grep z" -||- echo "there is no z" I find this sort of idiom helpful in shell scripting. The catch is that you would probably have to treat the return code of grep as an exception, which often isn't what you want. And, of course, this wouldn't work at all with your haskell grep, unless you change it to throw an exception on failure to match (which seems ugly). Another suggestion: might it be possible to move ShellCommand somehow more directly into the IO monad? It'd be really nice if we wouldn't need the "run $" on every line of a hsh script, and it seems like if you made something like (and I don't believe it could be this simple) (-|-) :: (ShellCommand a, ShellCommand b, RunResult c) => a -> b -> c and then created an instance of ShellCommand for a RunResult, maybe you would only need run when there's no pipe going on? i.e. I'd like to be able to see do l <- "echo hello world" -|- length rnd <- "cat /dev/urandom" -|- take l run $ "echo " ++ (concatMap tohex rnd) where tohex _ = "hex" Yes, this code is stupid and could be simplified, but hopefully you can see what I'd like: to be able to mingle your hsh ShellCommands right into the IO monad. I'm afraid that to work properly, this might require defaulting on the ShellCommand or RunResult classes. If so, it might be a good example to guide the Haskell' discussion of defaulting. I intentionally wrote the above example so the typechecker could determine the result of each line, because I use them... except for the last, which it'll bomb on, and currently needs to be written as runIO. But defaulting would be far cleaner... -- David Roundy http://www.darcs.net

On 03/03/07, John Goerzen
I'm pleased to announce HSH 1.2.0. Since version 1.0.0 was announced a few days ago, there have been some improvements:
I've had a little look, and it looks nice. However, as a mainly Windows user, I'd be interested to know - does it work on Windows (alternatively, is portability to Windows a goal)? It might be worth mentioning up front, if it's Unix-only. Thanks, Paul.

Hello Paul, Saturday, March 3, 2007, 8:06:16 PM, you wrote:
I've had a little look, and it looks nice. However, as a mainly Windows user, I'd be interested to know - does it work on Windows (alternatively, is portability to Windows a goal)? It might be worth mentioning up front, if it's Unix-only.
path-handling functions are not windows aware, at least i always thought that Haskell (probably, hugs) is a great shell scripting tool but it lacks filename/file processing libraries. with help of Filepath library by Neil and not-yet-written module for file manipulations it would became obvious :) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Sat, Mar 03, 2007 at 11:58:42PM +0300, Bulat Ziganshin wrote:
path-handling functions are not windows aware, at least
i always thought that Haskell (probably, hugs) is a great shell scripting tool but it lacks filename/file processing libraries. with help of Filepath library by Neil and not-yet-written module for file manipulations it would became obvious :)
FilePath is indeed quite nice. You might also want to look at System.Path and its submodules in MissingH (API docs at [1]). I've got some stuff that FilePath doesn't, namely making paths absolute, wildcard matching/globbing, and also a function that converts a POSIX wildcard into a regexp. HSH makes use of both FilePath and MissingH for its ShellEquivs module, and has some new code in there too. -- John [1] http://software.complete.org/missingh/static/doc/

Hi
FilePath is indeed quite nice. You might also want to look at System.Path and its submodules in MissingH (API docs at [1]).
I've got some stuff that FilePath doesn't, namely making paths absolute, wildcard matching/globbing, and also a function that converts a POSIX wildcard into a regexp.
FilePath did have a function that made paths absolute, but it got removed as its already in the base libraries: http://haskell.org/hoogle/?canonicalizePath Wildcard matching/globbing was intentionally left out, so as to have less disagreements when trying to put it in to base :) Thanks Neil

On Sat, Mar 03, 2007 at 10:19:38PM +0000, Neil Mitchell wrote:
I've got some stuff that FilePath doesn't, namely making paths absolute, wildcard matching/globbing, and also a function that converts a POSIX wildcard into a regexp.
FilePath did have a function that made paths absolute, but it got removed as its already in the base libraries: http://haskell.org/hoogle/?canonicalizePath
There are a couple of things about that function... First, I did see it, but its description is rather vague on what it does. From the description, it sounds like it is possible that it would not return an absolute path; I read it more as expanding symlinks. If it does indeed return an absolute path, I think that should be stated explicitly for clarity.
Wildcard matching/globbing was intentionally left out, so as to have less disagreements when trying to put it in to base :)
Heh, that's fine. I'm happy to donate that code in MissingH to your library and/or base if people want it. Thanks, BTW, for the library you're maintaining. I use it heavily. -- John

Hi
There are a couple of things about that function...
First, I did see it, but its description is rather vague on what it does. From the description, it sounds like it is possible that it would not return an absolute path; I read it more as expanding symlinks. If it does indeed return an absolute path, I think that should be stated explicitly for clarity.
More fatally it's only implemented on GHC, not for any reason, but because whoever originally implemented it only used GHC! It's explicitly #ifdef'd to do nothing (just a return) on other compilers. I also hate the name. I know plenty of people who wanted the function, but none who ever found it...
Thanks, BTW, for the library you're maintaining. I use it heavily.
Thanks. Ditto, I use MissingH heavily too :) (and hope to make Yhc depend on it shortly...) Neil

Neil Mitchell wrote:
Hi
There are a couple of things about that function...
First, I did see it, but its description is rather vague on what it does. From the description, it sounds like it is possible that it would not return an absolute path; I read it more as expanding symlinks. If it does indeed return an absolute path, I think that should be stated explicitly for clarity.
More fatally it's only implemented on GHC, not for any reason, but because whoever originally implemented it only used GHC! It's explicitly #ifdef'd to do nothing (just a return) on other compilers. I also hate the name. I know plenty of people who wanted the function, but none who ever found it...
I note that the deadline for discussion of System.FilePath has now passed (well, a long time ago :-), so it looks like it's going into base. Any final objections before we do this? Regarding canonicalizePath, I'd be perfectly happy to change its name and/or somehow make it more easily discoverable: does anyone want to make a proposal? Cheers, Simon

Hi
I note that the deadline for discussion of System.FilePath has now passed (well, a long time ago :-), so it looks like it's going into base. Any final objections before we do this?
The deadline passed before Christmas, and no one objected. I still intend to move it in to base, I just haven't had the time to put together a patch. The code needs tweaking a bit before it goes in.
Regarding canonicalizePath, I'd be perfectly happy to change its name and/or somehow make it more easily discoverable: does anyone want to make a proposal?
I recommend either changing the name to unportableGHCCanonicalizePath or implementing it for Hugs ;) I can't think of a good name, FilePath originally called it makePathAbsolute, but I'm not convinced that is any better. Maybe if the documentation refered to the fact it makes the file path absolute it would be better. I do think canconicalPath would be an improvement though, the ise/ize is confusing enough when writing English, having it in Haskell is annoying, and requires me to think every time. Thanks Neil

-- i've added crossposts to John Meacham and Einar Karttunen because -- you also denoted interest in new i/o library Hello Neil, Friday, March 9, 2007, 9:12:31 PM, you wrote:
I note that the deadline for discussion of System.FilePath has now passed (well, a long time ago :-), so it looks like it's going into base. Any final objections before we do this?
The deadline passed before Christmas, and no one objected. I still intend to move it in to base,
may be it is a good time to start File library? i has some ideas for it, and also want to propose it as SoC project. just a couple of ideas: - ghc rts independent i/o lib - portable async i/o which is able to work via select/epoll/... - support for unicode filenames - String/ByteString/UTF8String as filename - filepath operations (your module) - filesystem operations (System.Directory) - support for large files (>4gb) on windows - bytestring i/o - interfacing with Streams and FPS libraries there are LOTS of things that need to be implemented in order to make modern i/o library. your module seem as a first building block. we can't make all these things inside Base lib because upgradability problems will hit us all the way. so i propose to make File library consisting of your sole module and start to wait contributions :) if someone will need just the interface you already implemented, he can request File-0.1 version - it will be again impossible if you will integrate your library in the Base as i many times said, Base is the dead end for any code, so it should contain only things that will be not changed in next 5 years. i know how your code may be changed in near future - by adding ByteString support. moreover, i propose to "split" base library without losing backward compatibility just by creating new libs that will contain essentially the same code. i propose to start new i/o lib with your module
Regarding canonicalizePath, I'd be perfectly happy to change its name and/or somehow make it more easily discoverable: does anyone want to make a proposal?
I recommend either changing the name to unportableGHCCanonicalizePath or implementing it for Hugs ;)
I can't think of a good name, FilePath originally called it makePathAbsolute,
i like this name. it denotes action and that is right because it works in IO monad, not a pure function. and it makes clear that it does, while "canonical" may mean everything, just like "shuffle" or "change'a'bit" -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Bulat Ziganshin wrote:
-- i've added crossposts to John Meacham and Einar Karttunen because -- you also denoted interest in new i/o library
Me, too :-)
just a couple of ideas:
- portable async i/o which is able to work via select/epoll/...
I think you mean non-blocking I/O here, right? Async is not the same thing.
- interfacing with Streams and FPS libraries
It should also integrate cleanly with the network stack, which needs an overhaul about as badly as the I/O library. Einar Karttunen maintains his network-alt library at http://www.cs.helsinki.fi/u/ekarttun/network-alt/ which I think is a good starting point.

On Sat, Mar 03, 2007 at 05:06:16PM +0000, Paul Moore wrote:
On 03/03/07, John Goerzen
wrote: I'm pleased to announce HSH 1.2.0. Since version 1.0.0 was announced a few days ago, there have been some improvements:
I've had a little look, and it looks nice. However, as a mainly Windows user, I'd be interested to know - does it work on Windows (alternatively, is portability to Windows a goal)? It might be worth mentioning up front, if it's Unix-only.
Presently, it is Unix-only, though it likely would run fine under Cygwin. I am not yet sure if the new System.Process is powerful enough for this. Upon initial examination, I believe that it is not because it lacks support for pipes. I don't know how Windows shells deal with piping, or even if they can. All I know is that DOS used to simulate it with temporary files, lacking any real multitasking. -- John

John Goerzen wrote:
On Sat, Mar 03, 2007 at 05:06:16PM +0000, Paul Moore wrote:
On 03/03/07, John Goerzen
wrote: I'm pleased to announce HSH 1.2.0. Since version 1.0.0 was announced a few days ago, there have been some improvements: I've had a little look, and it looks nice. However, as a mainly Windows user, I'd be interested to know - does it work on Windows (alternatively, is portability to Windows a goal)? It might be worth mentioning up front, if it's Unix-only.
Presently, it is Unix-only, though it likely would run fine under Cygwin. I am not yet sure if the new System.Process is powerful enough for this. Upon initial examination, I believe that it is not because it lacks support for pipes.
I don't know how Windows shells deal with piping, or even if they can. All I know is that DOS used to simulate it with temporary files, lacking any real multitasking.
Windows has proper pipes these days, and System.Process.runInteractiveProcess creates pipes for you. Cheers, Simon

On Mon, Mar 05, 2007 at 01:30:23PM +0000, Simon Marlow wrote:
I don't know how Windows shells deal with piping, or even if they can. All I know is that DOS used to simulate it with temporary files, lacking any real multitasking.
Windows has proper pipes these days, and System.Process.runInteractiveProcess creates pipes for you.
But it is not suitable for this purpose. It returns Handles, but it doesn't let me specify Handles going in. That means that it is not possible to create a pipe going directly from program A to program B. -- John

John Goerzen wrote:
On Mon, Mar 05, 2007 at 01:30:23PM +0000, Simon Marlow wrote:
I don't know how Windows shells deal with piping, or even if they can. All I know is that DOS used to simulate it with temporary files, lacking any real multitasking. Windows has proper pipes these days, and System.Process.runInteractiveProcess creates pipes for you.
But it is not suitable for this purpose. It returns Handles, but it doesn't let me specify Handles going in. That means that it is not possible to create a pipe going directly from program A to program B.
You certainly can pipe directly from one process to another: ------ import System.Process main = do (hin,hout,herr,p1) <- runInteractiveCommand "cat pipe.hs" p2 <- runProcess "tr" ["A-Z","a-z"] Nothing Nothing (Just hout) Nothing Nothing waitForProcess p1 >>= print waitForProcess p2 >>= print ------- However, I'll accept that there are certain arrangements of pipes that aren't possible, or will construct too many pipes and you'll need extra threads to connect them together, because the only way to create pipes is with runInteractive* and that creates pipes for all of stdin/stdout/stderr. Of course we're open to suggestions for improving System.Process. Perhaps there should be a version that lets you specify a Handle *or* create a pipe, for each standard file descriptor. Cheers, Simon

On 2007-03-06, Simon Marlow
John Goerzen wrote:
possible to create a pipe going directly from program A to program B.
You certainly can pipe directly from one process to another:
That only works for 2 processes. What if I have 4 processes, and want to pipe from one to the next, all along, as in ls -l /tmp | tr a-zA-Z | sort | md5sum to give a contrived example -- John

John Goerzen wrote:
On 2007-03-06, Simon Marlow
wrote: John Goerzen wrote:
possible to create a pipe going directly from program A to program B. You certainly can pipe directly from one process to another:
That only works for 2 processes. What if I have 4 processes, and want to pipe from one to the next, all along, as in
ls -l /tmp | tr a-zA-Z | sort | md5sum
to give a contrived example
Before I answer the question, if you don't mind I'll quote from my own message:
However, I'll accept that there are certain arrangements of pipes that aren't possible, or will construct too many pipes and you'll need extra threads to connect them together, because the only way to create pipes is with runInteractive* and that creates pipes for all of stdin/stdout/stderr.
Of course we're open to suggestions for improving System.Process. Perhaps there should be a version that lets you specify a Handle *or* create a pipe, for each standard file descriptor.
So ideally we'd have a version of runInteractiveProcess that didn't create all three pipes, and then it would be easy to program your example. Unfortunately we don't have such a function, but it's still possible to code up your example - you just end up with too many pipes and you'd need some Haskell threads to act as dummy "processes" between the extra pipe ends. I'm aware this isn't a satisfactory solution, for various reasons. Cheers, Simon

On Tue, Mar 13, 2007 at 10:51:47AM +0000, Simon Marlow wrote:
Before I answer the question, if you don't mind I'll quote from my own message:
[ snip ]
So ideally we'd have a version of runInteractiveProcess that didn't create all three pipes, and then it would be easy to program your example. Unfortunately we don't have such a function, but it's still possible to code up your example - you just end up with too many pipes and you'd need some Haskell threads to act as dummy "processes" between the extra pipe ends. I'm aware this isn't a satisfactory solution, for various reasons.
Right, sorry, that makes sense. I don't immediately know what such a function should look like, but yeah, I don't really want to get into having data mover threads in this. One other weakness about the current setup is that runInteractiveProcess is a sort of all-or-nothing approach. You can get stdin, stdout, and stderr redirected to Handles -- or you can use a different function and not have them redirected to Handles. You can't get just stdin and stdout redirected with stderr still going to the console, and you can't get stdout and stderr redirected to the same Handle. I almost wonder if a lower-level equivalent to dup2() and pipe() is warranted. Also, there is a weakness in waitForProcess. You'll note that the POSIX waitpid() function (getProcessStatus in Haskell) returns more information than waitForProcess does. Specifically, it can return whether a process was killed by a signal, and if so, which signal. A glance at the source code for waitForProcess revealed that it was simply using -1 for all signals. Perhaps it would be better to at least use the bash convention of 128+n, where n is the signal number. But even better, the Posix type ProcessStatus could be brought into the main libraries and used here. -- John

On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote:
On 2007-03-06, Simon Marlow
wrote: John Goerzen wrote:
possible to create a pipe going directly from program A to program B.
You certainly can pipe directly from one process to another:
That only works for 2 processes. What if I have 4 processes, and want to pipe from one to the next, all along, as in
ls -l /tmp | tr a-zA-Z | sort | md5sum
to give a contrived example
You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
import System.IO import System.Process import System.Posix.IO
run program arguments stdin stdout = runProcess program arguments Nothing Nothing stdin stdout Nothing hCreatePipe = do (readFd, writeFd) <- createPipe read <- fdToHandle readFd write <- fdToHandle writeFd return (read, write)
main = do (read1, write1) <- hCreatePipe run "ls" ["-l","/tmp"] Nothing (Just write1) (read2, write2) <- hCreatePipe run "tr" ["a-z","A-Z"] (Just read1) (Just write2) (read3, write3) <- hCreatePipe run "sort" [] (Just read2) (Just write3) (read4, write4) <- hCreatePipe run "md5sum" [] (Just read3) (Just write4) hash <- hGetContents read4 putStr hash
Brandon Moore

On 2007-03-13, Brandon Michael Moore
On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote: You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
Right, but the whole point of trying to use System.Process was to remove the dependency on POSIX and thus make the program portable to Windows. -- John

When attempting to build hsh, I get complaint that it can't satisfy
dependency for mtl-any.
How can I get this?
Thanks!
**************
wget http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz
thartman@linodewhyou:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure
Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please
use hs-source-dirs.
Setup.lhs: Warning: No license-file field.
Configuring HSH-1.2.0...
configure: /usr/local/bin/ghc-pkg
configure: Dependency base-any: using base-2.0
configure: Dependency unix-any: using unix-1.0
Setup.lhs: cannot satisfy dependency mtl-any
thartman@linodewhyou:~/haskellInstalls/hsh$ apt-cache search haskell-mtl
thartman@linodewhyou:~/haskellInstalls/hsh$
thartman@linodewhyou:~/haskellInstalls$ apt-cache search haskell | grep mtl
thartman@linodewhyou:~/haskellInstalls$
2007/3/14, John Goerzen
On 2007-03-13, Brandon Michael Moore
wrote: On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote: You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
Right, but the whole point of trying to use System.Process was to remove the dependency on POSIX and thus make the program portable to Windows.
-- John
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

and I'm on...
thartman@linodewhyou:~/haskellInstalls$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
2007/3/21, Thomas Hartman
When attempting to build hsh, I get complaint that it can't satisfy dependency for mtl-any.
How can I get this?
Thanks!
**************
wget http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz
thartman@linodewhyou:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please use hs-source-dirs. Setup.lhs: Warning: No license-file field. Configuring HSH-1.2.0... configure: /usr/local/bin/ghc-pkg configure: Dependency base-any: using base-2.0 configure: Dependency unix-any: using unix-1.0 Setup.lhs: cannot satisfy dependency mtl-any
thartman@linodewhyou:~/haskellInstalls/hsh$ apt-cache search haskell-mtl thartman@linodewhyou:~/haskellInstalls/hsh$
thartman@linodewhyou:~/haskellInstalls$ apt-cache search haskell | grep mtl thartman@linodewhyou:~/haskellInstalls$
2007/3/14, John Goerzen
: On 2007-03-13, Brandon Michael Moore
wrote: On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote: You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
Right, but the whole point of trying to use System.Process was to remove the dependency on POSIX and thus make the program portable to Windows.
-- John
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Some progress, but still not solved.
I built ghc6.6 from source, but apt-get / libghc6-mtl-dev now seem to
be circularly dependent.
I'm not such an apt expert, is there an easy way out of this using
packages or do I have to keep building everything from source?
*************
thartman@linodewhyou:~/haskellInstalls$ sudo apt-get install libghc6-mtl-dev
Reading package lists... Done
Building dependency tree... Done
libghc6-mtl-dev is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
libghc6-mtl-dev: Depends: ghc6 (>= 6.6) but 6.4.1-2ubuntu2 is to be installed
Depends: libghc6-base-prof
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).
thartman@linodewhyou:~/haskellInstalls$ sudo apt-get install ghc6
Reading package lists... Done
Building dependency tree... Done
ghc6 is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
libghc6-mtl-dev: Depends: ghc6 (>= 6.6) but 6.4.1-2ubuntu2 is to be installed
Depends: libghc6-base-prof
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).
thartman@linodewhyou:~/haskellInstalls$
2007/3/21, Thomas Hartman
and I'm on...
thartman@linodewhyou:~/haskellInstalls$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6
2007/3/21, Thomas Hartman
: When attempting to build hsh, I get complaint that it can't satisfy dependency for mtl-any.
How can I get this?
Thanks!
**************
wget http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz
thartman@linodewhyou:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please use hs-source-dirs. Setup.lhs: Warning: No license-file field. Configuring HSH-1.2.0... configure: /usr/local/bin/ghc-pkg configure: Dependency base-any: using base-2.0 configure: Dependency unix-any: using unix-1.0 Setup.lhs: cannot satisfy dependency mtl-any
thartman@linodewhyou:~/haskellInstalls/hsh$ apt-cache search haskell-mtl thartman@linodewhyou:~/haskellInstalls/hsh$
thartman@linodewhyou:~/haskellInstalls$ apt-cache search haskell | grep mtl thartman@linodewhyou:~/haskellInstalls$
2007/3/14, John Goerzen
: On 2007-03-13, Brandon Michael Moore
wrote: On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote: You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
Right, but the whole point of trying to use System.Process was to remove the dependency on POSIX and thus make the program portable to Windows.
-- John
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Furthermore (as the above messages suggest and locate confirms), I
seem to have mtl already
I took a wild guess and tried specifying this with ghc -i
like
sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure
and sudo runghc -i/usr/lib/ Setup.lhs configure
but no dice.
***************
thartman@linodewhyou:~/haskellInstalls/hsh$ locate libghc6-mtl-dev
/home/thartman/libghc6-mtl-dev_1.0-3_i386.deb
/usr/lib/libghc6-mtl-dev
/usr/lib/libghc6-mtl-dev/register.sh
/usr/lib/libghc6-mtl-dev/unregister.sh
/usr/share/doc/libghc6-mtl-dev
/usr/share/doc/libghc6-mtl-dev/changelog.Debian.gz
/usr/share/doc/libghc6-mtl-dev/copyright
/var/lib/dpkg/info/libghc6-mtl-dev.list
/var/lib/dpkg/info/libghc6-mtl-dev.md5sums
/var/lib/dpkg/info/libghc6-mtl-dev.postinst
/var/lib/dpkg/info/libghc6-mtl-dev.prerm
2007/3/21, Thomas Hartman
Some progress, but still not solved.
I built ghc6.6 from source, but apt-get / libghc6-mtl-dev now seem to be circularly dependent.
I'm not such an apt expert, is there an easy way out of this using packages or do I have to keep building everything from source?
*************
thartman@linodewhyou:~/haskellInstalls$ sudo apt-get install libghc6-mtl-dev Reading package lists... Done Building dependency tree... Done libghc6-mtl-dev is already the newest version. You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: libghc6-mtl-dev: Depends: ghc6 (>= 6.6) but 6.4.1-2ubuntu2 is to be installed Depends: libghc6-base-prof E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). thartman@linodewhyou:~/haskellInstalls$ sudo apt-get install ghc6 Reading package lists... Done Building dependency tree... Done ghc6 is already the newest version. You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: libghc6-mtl-dev: Depends: ghc6 (>= 6.6) but 6.4.1-2ubuntu2 is to be installed Depends: libghc6-base-prof E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). thartman@linodewhyou:~/haskellInstalls$
2007/3/21, Thomas Hartman
: and I'm on...
thartman@linodewhyou:~/haskellInstalls$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6
2007/3/21, Thomas Hartman
: When attempting to build hsh, I get complaint that it can't satisfy dependency for mtl-any.
How can I get this?
Thanks!
**************
wget http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz
thartman@linodewhyou:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please use hs-source-dirs. Setup.lhs: Warning: No license-file field. Configuring HSH-1.2.0... configure: /usr/local/bin/ghc-pkg configure: Dependency base-any: using base-2.0 configure: Dependency unix-any: using unix-1.0 Setup.lhs: cannot satisfy dependency mtl-any
thartman@linodewhyou:~/haskellInstalls/hsh$ apt-cache search haskell-mtl thartman@linodewhyou:~/haskellInstalls/hsh$
thartman@linodewhyou:~/haskellInstalls$ apt-cache search haskell | grep mtl thartman@linodewhyou:~/haskellInstalls$
2007/3/14, John Goerzen
: On 2007-03-13, Brandon Michael Moore
wrote: On Mon, Mar 12, 2007 at 05:14:57PM -0500, John Goerzen wrote: You can do this with runProcess, if you use System.Posix.IO.{createPipe,fdToHandle} to make a pipe and wrap the ends as handles. I hope hCreatePipe could be implemented on windows.
Right, but the whole point of trying to use System.Process was to remove the dependency on POSIX and thus make the program portable to Windows.
-- John
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

"Thomas" == Thomas Hartman
writes:
Thomas> Furthermore (as the above messages suggest and locate confirms), I Thomas> seem to have mtl already Thomas> I took a wild guess and tried specifying this with ghc -i Thomas> like Thomas> sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure Thomas> and sudo runghc -i/usr/lib/ Setup.lhs configure Thomas> but no dice. Thomas> *************** Thomas> thartman@linodewhyou:~/haskellInstalls/hsh$ locate libghc6-mtl-dev Thomas> /home/thartman/libghc6-mtl-dev_1.0-3_i386.deb Thomas> /usr/lib/libghc6-mtl-dev Thomas> /usr/lib/libghc6-mtl-dev/register.sh Thomas> /usr/lib/libghc6-mtl-dev/unregister.sh Thomas> /usr/share/doc/libghc6-mtl-dev Thomas> /usr/share/doc/libghc6-mtl-dev/changelog.Debian.gz Thomas> /usr/share/doc/libghc6-mtl-dev/copyright Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.list Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.md5sums Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.postinst Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.prerm As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do $ apt-get source libghc6-mtl-dev $ cd <haskell-mtl-or-whatever-dir-is-named> $ 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.

As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
I did this, and got the feeling this would probably work, but is a real sad world of dependency chasing with no (clear) end in sight. So I investigated your second suggestion
Another way is to take ghc6 and all haskell libs from fiesty.
which to me seems much preferrable.
http://old.pupeno.com/blog/unstable-packages-on-ubuntu/
Was indispensible in helping me figure out how to do this.
To give some details on this (which is really more apt packaging know
how than haskell but whatever), I did something like
1) change /etc/apt/sources.list to add
deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted
universe multiverse
note, only add deb-src line here, not deb line, see article above for why.
sudo aptitude install fakeroot (needed utility)
fakeroot apt-get source --build ghc6
-- complains, some dependencies are missing
sudo aptitude install .....
install packages with above command, not from source. it's my first
time using the aptitude command, I wonder if this does the same thing
as apt-get install, which is what I usually do. Whatever the case...
fakeroot apt-get source --build ghc6
works :)
2007/3/21, Max Vasin
"Thomas" == Thomas Hartman
writes: Thomas> Furthermore (as the above messages suggest and locate confirms), I Thomas> seem to have mtl already
Thomas> I took a wild guess and tried specifying this with ghc -i
Thomas> like
Thomas> sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure Thomas> and sudo runghc -i/usr/lib/ Setup.lhs configure
Thomas> but no dice.
Thomas> ***************
Thomas> thartman@linodewhyou:~/haskellInstalls/hsh$ locate libghc6-mtl-dev Thomas> /home/thartman/libghc6-mtl-dev_1.0-3_i386.deb Thomas> /usr/lib/libghc6-mtl-dev Thomas> /usr/lib/libghc6-mtl-dev/register.sh Thomas> /usr/lib/libghc6-mtl-dev/unregister.sh Thomas> /usr/share/doc/libghc6-mtl-dev Thomas> /usr/share/doc/libghc6-mtl-dev/changelog.Debian.gz Thomas> /usr/share/doc/libghc6-mtl-dev/copyright Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.list Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.md5sums Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.postinst Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.prerm
As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
$ apt-get source libghc6-mtl-dev $ cd <haskell-mtl-or-whatever-dir-is-named> $ 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.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Well, I guess I spoke to soon. After building ghc6 from feisty as
described above, I tried building missingh and have basically what I
started with.
Is there something I can tweak to get the above straightened out using
those nice deb packages, or do I have to do all the dependency chasing
involved with building from source? Or is there another way?
If this is too debian oriented please yell at me and I will ask about
this on a deb/ubuntu forum.
thanks...
Note, should have mentioned, after doing as my above post describes, I
installed all the newly generated deb packages with
dpkg -i *.deb
****************
thartman@linodewhyou:~/haskellInstalls/missingh>runghc Setup.hs configure
Configuring MissingH-0.18.3...
configure: /usr/lib/ghc-6.6/bin/ghc-pkg
configure: Dependency unix-any: using unix-1.0
Setup.hs: cannot satisfy dependency network-any
thartman@linodewhyou:~/haskellInstalls/missingh>which runghc
/usr/lib/ghc-6.6/bin/runghc
# note, definitely the thing I installed today:
thartman@linodewhyou:~/haskellInstalls/missingh>ls -l `which runghc`
-rwxr-xr-x 1 root root 300716 Apr 2 09:17 /usr/lib/ghc-6.6/bin/runghc
thartman@linodewhyou:~/haskellInstalls/missingh>
# and I installed it from deb ghc6, dpkg recognizes it
thartman@linodewhyou:~/haskellInstalls/missingh>dpkg -S
/usr/lib/ghc-6.6/bin/runghc
ghc6: /usr/lib/ghc-6.6/bin/runghc
# it does seem like ghc6 comes with a network package
thartman@linodewhyou:~/learning/haskell>apt-cache showpkg ghc6 | grep -i network
6.4.1-2ubuntu2 - libghc6-readline-dev libghc6-stm-dev libghc6-hgl-dev
libghc6-x11-dev libghc6-fgl-dev libghc6-mtl-dev libghc6-hunit-dev
libghc6-quickcheck-dev libghc6-network-dev libghc6-haskell-src-dev
libghc6-parsec-dev libghc6-cabal-dev libghc6-unix-dev
libghc6-template-haskell-dev libghc6-haskell98-dev libghc6-base-dev
libghc6-rts-dev ghc haskell-compiler
# I get lost here. Do I have libghc6-network-dev, or don't I?
thartman@linodewhyou:~/haskellInstalls/missingh>sudo apt-get install
libghc6-network-dev
Reading package lists... Done
Building dependency tree... Done
Note, selecting ghc6 instead of libghc6-network-dev
ghc6 is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
hat-ghc6: Depends: ghc6 (< 6.4.1+) but 6.6-3 is to be installed
libghc6-cabal-dev: Depends: ghc6 (< 6.4.2) but 6.6-3 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or
specify a solution).
2007/4/2, Thomas Hartman
As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
I did this, and got the feeling this would probably work, but is a real sad world of dependency chasing with no (clear) end in sight.
So I investigated your second suggestion
Another way is to take ghc6 and all haskell libs from fiesty.
which to me seems much preferrable.
http://old.pupeno.com/blog/unstable-packages-on-ubuntu/
Was indispensible in helping me figure out how to do this.
To give some details on this (which is really more apt packaging know how than haskell but whatever), I did something like
1) change /etc/apt/sources.list to add
deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
note, only add deb-src line here, not deb line, see article above for why.
sudo aptitude install fakeroot (needed utility) fakeroot apt-get source --build ghc6 -- complains, some dependencies are missing
sudo aptitude install ..... install packages with above command, not from source. it's my first time using the aptitude command, I wonder if this does the same thing as apt-get install, which is what I usually do. Whatever the case...
fakeroot apt-get source --build ghc6
works :)
2007/3/21, Max Vasin
: > "Thomas" == Thomas Hartman
writes: Thomas> Furthermore (as the above messages suggest and locate confirms), I Thomas> seem to have mtl already
Thomas> I took a wild guess and tried specifying this with ghc -i
Thomas> like
Thomas> sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure Thomas> and sudo runghc -i/usr/lib/ Setup.lhs configure
Thomas> but no dice.
Thomas> ***************
Thomas> thartman@linodewhyou:~/haskellInstalls/hsh$ locate libghc6-mtl-dev Thomas> /home/thartman/libghc6-mtl-dev_1.0-3_i386.deb Thomas> /usr/lib/libghc6-mtl-dev Thomas> /usr/lib/libghc6-mtl-dev/register.sh Thomas> /usr/lib/libghc6-mtl-dev/unregister.sh Thomas> /usr/share/doc/libghc6-mtl-dev Thomas> /usr/share/doc/libghc6-mtl-dev/changelog.Debian.gz Thomas> /usr/share/doc/libghc6-mtl-dev/copyright Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.list Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.md5sums Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.postinst Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.prerm
As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
$ apt-get source libghc6-mtl-dev $ cd <haskell-mtl-or-whatever-dir-is-named> $ 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.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

resolved issue at
http://groups.google.de/group/fa.haskell/browse_thread/thread/ceabae2c3fdc8abc/5ab21d4ae2a9b1fc?lnk=st&q=hsh++tphyahoo&rnum=5&hl=en#5ab21d4ae2a9b1fc
2007/4/2, Thomas Hartman
Well, I guess I spoke to soon. After building ghc6 from feisty as described above, I tried building missingh and have basically what I started with.
Is there something I can tweak to get the above straightened out using those nice deb packages, or do I have to do all the dependency chasing involved with building from source? Or is there another way?
If this is too debian oriented please yell at me and I will ask about this on a deb/ubuntu forum.
thanks...
Note, should have mentioned, after doing as my above post describes, I installed all the newly generated deb packages with
dpkg -i *.deb
****************
thartman@linodewhyou:~/haskellInstalls/missingh>runghc Setup.hs configure Configuring MissingH-0.18.3... configure: /usr/lib/ghc-6.6/bin/ghc-pkg configure: Dependency unix-any: using unix-1.0 Setup.hs: cannot satisfy dependency network-any
thartman@linodewhyou:~/haskellInstalls/missingh>which runghc /usr/lib/ghc-6.6/bin/runghc
# note, definitely the thing I installed today: thartman@linodewhyou:~/haskellInstalls/missingh>ls -l `which runghc` -rwxr-xr-x 1 root root 300716 Apr 2 09:17 /usr/lib/ghc-6.6/bin/runghc thartman@linodewhyou:~/haskellInstalls/missingh>
# and I installed it from deb ghc6, dpkg recognizes it
thartman@linodewhyou:~/haskellInstalls/missingh>dpkg -S /usr/lib/ghc-6.6/bin/runghc ghc6: /usr/lib/ghc-6.6/bin/runghc
# it does seem like ghc6 comes with a network package thartman@linodewhyou:~/learning/haskell>apt-cache showpkg ghc6 | grep -i network 6.4.1-2ubuntu2 - libghc6-readline-dev libghc6-stm-dev libghc6-hgl-dev libghc6-x11-dev libghc6-fgl-dev libghc6-mtl-dev libghc6-hunit-dev libghc6-quickcheck-dev libghc6-network-dev libghc6-haskell-src-dev libghc6-parsec-dev libghc6-cabal-dev libghc6-unix-dev libghc6-template-haskell-dev libghc6-haskell98-dev libghc6-base-dev libghc6-rts-dev ghc haskell-compiler
# I get lost here. Do I have libghc6-network-dev, or don't I?
thartman@linodewhyou:~/haskellInstalls/missingh>sudo apt-get install libghc6-network-dev Reading package lists... Done Building dependency tree... Done Note, selecting ghc6 instead of libghc6-network-dev ghc6 is already the newest version. You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: hat-ghc6: Depends: ghc6 (< 6.4.1+) but 6.6-3 is to be installed libghc6-cabal-dev: Depends: ghc6 (< 6.4.2) but 6.6-3 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
2007/4/2, Thomas Hartman
: As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
I did this, and got the feeling this would probably work, but is a real sad world of dependency chasing with no (clear) end in sight.
So I investigated your second suggestion
Another way is to take ghc6 and all haskell libs from fiesty.
which to me seems much preferrable.
http://old.pupeno.com/blog/unstable-packages-on-ubuntu/
Was indispensible in helping me figure out how to do this.
To give some details on this (which is really more apt packaging know how than haskell but whatever), I did something like
1) change /etc/apt/sources.list to add
deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
note, only add deb-src line here, not deb line, see article above for why.
sudo aptitude install fakeroot (needed utility) fakeroot apt-get source --build ghc6 -- complains, some dependencies are missing
sudo aptitude install ..... install packages with above command, not from source. it's my first time using the aptitude command, I wonder if this does the same thing as apt-get install, which is what I usually do. Whatever the case...
fakeroot apt-get source --build ghc6
works :)
2007/3/21, Max Vasin
: >> "Thomas" == Thomas Hartman
writes: Thomas> Furthermore (as the above messages suggest and locate confirms), I Thomas> seem to have mtl already
Thomas> I took a wild guess and tried specifying this with ghc -i
Thomas> like
Thomas> sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure Thomas> and sudo runghc -i/usr/lib/ Setup.lhs configure
Thomas> but no dice.
Thomas> ***************
Thomas> thartman@linodewhyou:~/haskellInstalls/hsh$ locate libghc6-mtl-dev Thomas> /home/thartman/libghc6-mtl-dev_1.0-3_i386.deb Thomas> /usr/lib/libghc6-mtl-dev Thomas> /usr/lib/libghc6-mtl-dev/register.sh Thomas> /usr/lib/libghc6-mtl-dev/unregister.sh Thomas> /usr/share/doc/libghc6-mtl-dev Thomas> /usr/share/doc/libghc6-mtl-dev/changelog.Debian.gz Thomas> /usr/share/doc/libghc6-mtl-dev/copyright Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.list Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.md5sums Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.postinst Thomas> /var/lib/dpkg/info/libghc6-mtl-dev.prerm
As you have built ghc6.6 from sources I think that you also need to build all haskell libs from sources. So, do
$ apt-get source libghc6-mtl-dev $ cd <haskell-mtl-or-whatever-dir-is-named> $ 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.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (10)
-
Brandon Michael Moore
-
Bryan O'Sullivan
-
Bulat Ziganshin
-
David Roundy
-
John Goerzen
-
Max Vasin
-
Neil Mitchell
-
Paul Moore
-
Simon Marlow
-
Thomas Hartman