cabal2nix-2.0.2: Convert Cabal files into Nix build instructions.

Safe HaskellNone
LanguageHaskell2010

Distribution.Nixpkgs.Haskell.FromCabal.Normalize

Synopsis

Documentation

normalizeCabalFlags :: FlagAssignment -> FlagAssignment Source #

When a flag is specified multiple times, the first occurrence counts. This is counter-intuitive, IMHO, but it's how cabal does it. Flag names are spelled in all lowercase.

>>> normalizeCabalFlags [(FlagName "foo", True), (FlagName "FOO", True), (FlagName "Foo", False)]
[(FlagName "foo",True)]