patch applied (cabal): Change handling of bool command line
args to allow an unset state
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Thu May 1 06:49:36 EDT 2008
On Thu, 2008-05-01 at 11:02 +0100, Malcolm Wallace wrote:
> This patch breaks the nhc98 build of Cabal. Here is the error:
>
> $ /Users/malcolm/Haskell/nhc98/script/nhc98 -c Distribution/Simple/Command.hs
> nhc98comp: The class Prelude.Functor has no instance for the type Prelude.->.
> Possible sources for the problem are: 189:72-189:75
> When type checking declarations at: 189:1-189:81
>
> And the offending lines of the patch:
>
> hunk ./Distribution/Simple/Command.hs 188
> -boolOpt' :: (b -> Bool) -> (Bool -> b) -> OptFlags -> OptFlags -> MkOptDescr (a -> b) (b -> a -> a) a
> -boolOpt' g s ffT ffF _sf _lf d get set = BoolOpt d ffT ffF (set.s) (g.get)
> +boolOpt' :: (b -> Maybe Bool) -> (Bool -> b) -> OptFlags -> OptFlags -> MkOptDescr (a -> b) (b -> a -> a) a
> +boolOpt' g s ffT ffF _sf _lf d get set = BoolOpt d ffT ffF (set.s) (g `fmap` get)
Thanks. Fixed.
Thu May 1 11:46:20 BST 2008 Duncan Coutts <duncan at haskell.org>
* Revert one change of (.) to fmap. It was not necessary and broke nhc98.
The other one was needed as we changed a type from Bool to Maybe Bool.
Duncan
More information about the cabal-devel
mailing list