cabal2nix-2.5: 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 [(mkFlagName "foo", True), (mkFlagName "FOO", True), (mkFlagName "Foo", False)]
[(FlagName "foo",True)]