Kazu Yamamoto | 1 Apr 2011 03:48
Picon
Gravatar

A maintenance command of Haskell cabal packages

Hello cafe,

Let me announce a maintenance command of Haskell cabal packages.

	http://www.mew.org/~kazu/proj/cab/en/

----
"cab" is a MacPorts-like maintenance command of Haskell cabal
packages. Some part of this program is a wrapper to "ghc-pkg" and
"cabal".

If you are always confused due to inconsistency of two commands, or if
you want a way to check all outdated packages, or if you want a way to
remove outdated packages recursively, this command helps you.
----

I'm a user of Yesod. Yesod consists of many packages and they are
being updated very quickly. So, I need this command.

Regards,

--Kazu
Conrad Parker | 1 Apr 2011 03:59
Favicon
Gravatar

Re: A maintenance command of Haskell cabal packages

On 1 April 2011 10:48, Kazu Yamamoto <kazu <at> iij.ad.jp> wrote:
> Hello cafe,
>
> Let me announce a maintenance command of Haskell cabal packages.
>
>        http://www.mew.org/~kazu/proj/cab/en/
>
> ----
> "cab" is a MacPorts-like maintenance command of Haskell cabal
> packages. Some part of this program is a wrapper to "ghc-pkg" and
> "cabal".
>
> If you are always confused due to inconsistency of two commands, or if
> you want a way to check all outdated packages, or if you want a way to
> remove outdated packages recursively, this command helps you.
> ----

whoah, it has uninstall!!! awesome!

Conrad.
Kazu Yamamoto | 1 Apr 2011 04:07
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages

> whoah, it has uninstall!!! awesome!

It just unregisters libraries not delete them actually. But I guess it
is enough for you.

The "cabal-delete" command does delete libraries and I'm planning to
integrate "cab" and "cabal-delete". But the author of "cabal-delete"
is now suffering from the Tsunami in Japan. I'm just waiting for
his recovery.

I want to integrate "cab" and "cabal-dev" also. But I cannot
understand how to use "cabal-dev" at this momemnt...

--Kazu
Jason Dagit | 1 Apr 2011 04:12
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages



On Thu, Mar 31, 2011 at 7:07 PM, Kazu Yamamoto <kazu <at> iij.ad.jp> wrote:
> whoah, it has uninstall!!! awesome!

It just unregisters libraries not delete them actually. But I guess it
is enough for you.

The "cabal-delete" command does delete libraries and I'm planning to
integrate "cab" and "cabal-delete". But the author of "cabal-delete"
is now suffering from the Tsunami in Japan. I'm just waiting for
his recovery.

I want to integrate "cab" and "cabal-dev" also. But I cannot
understand how to use "cabal-dev" at this momemnt...

Have you read this?

cabal-dev is a wrapper around cabal.  It creates the directory "cabal-dev" in your current directory when you run commands.

If you understand how to use 'cabal' then 'cabal-dev' should be pretty easy to figure out.  Do you have any specific questions?

Jason
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Kazu Yamamoto | 1 Apr 2011 04:19
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages

Hello,

> Have you read this?
> http://www.reddit.com/r/haskell/related/f3ykj/
> psa_use_cabaldev_to_solve_dependency_problems/

I did know this page. I will read it later. Thank you.

> cabal-dev is a wrapper around cabal. It creates the directory
> "cabal-dev" in your current directory when you run commands.

Yes, I know. But when I typed "cabal-devel install" on a package
directory, nothing happened.

> If you understand how to use 'cabal' then 'cabal-dev' should be
> pretty easy to figure out. Do you have any specific questions?

I read its source but I could not found the code where cabal-dev
passes GHC_PACKAGE_PATH to ghc. I don't know how cabal-dev can
implement the sandbox featrue.

--Kazu
Rogan Creswick | 1 Apr 2011 04:31
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages

On Thu, Mar 31, 2011 at 7:19 PM, Kazu Yamamoto <kazu <at> iij.ad.jp> wrote:
>> cabal-dev is a wrapper around cabal. It creates the directory
>> "cabal-dev" in your current directory when you run commands.
>
> Yes, I know. But when I typed "cabal-devel install" on a package
> directory, nothing happened.

Can you give a specific example? Surely *something* happened :)

> I read its source but I could not found the code where cabal-dev
> passes GHC_PACKAGE_PATH to ghc. I don't know how cabal-dev can
> implement the sandbox featrue.

running cabal-dev with --verbose=3 will show you all the cabal and
ghc-pkg commands, which is probably the best way to see what's going
on.

Cabal-dev uses a custom cabal.config file that's (by default) located
in the sandbox directory.  That file specifies a package-db to use
(amongst a few other things), and cabal-install is invoked with that
config.

--Rogan

>
> --Kazu
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
Kazu Yamamoto | 1 Apr 2011 07:38
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages

Hello,

>>> cabal-dev is a wrapper around cabal. It creates the directory
>>> "cabal-dev" in your current directory when you run commands.
>>
>> Yes, I know. But when I typed "cabal-devel install" on a package
>> directory, nothing happened.
> 
> Can you give a specific example? Surely *something* happened :)

I guess this happens with Haskell Platform for MacOS only. In this
environment, .cabal/config specifies as follows:

	remote-repo-cache: /Users/≤user>/Library/Haskell/repo-cache

But cabal-dev refers to /Users/≤user>/.cabal/packages. After
"cabal-dev update" to create it, everything becomes fine to me.

Thank you.

--Kazu
Anders Persson | 1 Apr 2011 08:32
Picon

Re: A maintenance command of Haskell cabal packages

https://github.com/creswick/cabal-dev/issues#issue/15

My workaround was to create a link:
ln -s ~/Library/Haskell/repo-cache ~/.cabal/packages
Cheers,
Anders

On Apr 1, 2011, at 7:38 AM, Kazu Yamamoto (山本和彦) wrote:

Hello,

cabal-dev is a wrapper around cabal. It creates the directory
"cabal-dev" in your current directory when you run commands.

Yes, I know. But when I typed "cabal-devel install" on a package
directory, nothing happened.

Can you give a specific example? Surely *something* happened :)

I guess this happens with Haskell Platform for MacOS only. In this
environment, .cabal/config specifies as follows:

remote-repo-cache: /Users/<user>/Library/Haskell/repo-cache

But cabal-dev refers to /Users/<user>/.cabal/packages. After
"cabal-dev update" to create it, everything becomes fine to me.

Thank you.

--Kazu

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
oleg | 1 Apr 2011 09:00

Strictness is observable


Daniel Fischer wrote:
> If you have a strict function, you may evaluate its argument eagerly
> without changing the result^1, while eager evaluation of a non-strict
> function's argument may produce _|_ where deferred evaluation wouldn't.

Sadly, that is quite untrue. Strictness is observable, already in
Haskell98. That distressing result has nothing to do with imprecise
exceptions, seq, non-termination, lack of resources, or the use of
unsafe features. Plainly, just by changing the strictness of a
function one may cause the program to print different results, such as
"strict" or "non-strict" in the code below.

-- Haskell98!
-- Strictness is observable
-- With no seq, no unsafe operations

import Control.Exception

-- fs and fns are both essentially (const True) functions, 
-- but differ in strictness
fs,fns :: Bool -> Bool

-- non-strict
fns x = True

-- strict
fs True = True
fs x    = True

handler :: SomeException -> IO ()
handler _ = print "strict"

test f = handle handler $
          if f (error "Bang!") then print "non-strict" else return ()

main_s = test fs
-- prints "strict"

main_ns = test fns
-- prints "non-strict"
Kazu Yamamoto | 1 Apr 2011 09:04
Picon
Gravatar

Re: A maintenance command of Haskell cabal packages

> My workaround was to create a link:
> ln -s ~/Library/Haskell/repo-cache ~/.cabal/packages

I have already done it. :)

--Kazu

Gmane