Hoogle Search

Within LTS Haskell 24.66 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. data NixpkgsPlatform

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    Representation of platform(s) as supported by nixpkgs:

    • NixpkgsPlatformGroup represents the name of a platform list as found in lib.platforms. For example, at the time of writing NixpkgsPlatformGroup "darwin" would represent the platform tuples x86_64-darwin, aarch64-darwin, i686-darwin and armv7a-darwin. Naturally, this is subject to change as nixpkgs updates lib.platforms.
    • NixpkgsPlatformSingle indicates a single platform tuple represented using Cabal's Platform.
    The former is useful to express related groups of platforms which have similar properties. The latter can be used to, for example, exclude a single, specific platform. hackage2nix has used the latter approach historically and is being extended to support nixpkgs' platform groups as well for increased maintainer convenience. The Pretty instance allows for converting a NixpkgsPlatform into a Nix expression compatible with meta.platforms:
    >>> pPrint $ NixpkgsPlatformSingle $ Platform X86_64 NetBSD
    "x86_64-netbsd"
    
    For NixpkgsPlatformGroup we assume that the lib attribute set is in scope:
    >>> pPrint $ NixpkgsPlatformGroup $ ident # "riscv"
    lib.platforms.riscv
    

  2. NixpkgsPlatformGroup :: Identifier -> NixpkgsPlatform

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    Identifier of the attribute name of a platform group in nixpkgs' lib.platforms.

  3. NixpkgsPlatformSingle :: Platform -> NixpkgsPlatform

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    Single platform represented as a Cabal platform. Can be understood as equivalent to Nix's system strings and will be converted to one usually.

  4. badPlatforms :: Lens' Meta (Maybe (Set NixpkgsPlatform))

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    No documentation available.

  5. hydraPlatforms :: Lens' Meta (Maybe (Set NixpkgsPlatform))

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    No documentation available.

  6. nixpkgsPlatformFromString :: String -> Maybe NixpkgsPlatform

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    Obtain a NixpkgsPlatform from a string representation intended for config files.

    • Every string starting with lib.platforms. or platforms. is parsed into NixpkgsPlatformGroup.
    • All other strings are attempted to be interpreted as a nix(pkgs) style system tuple and parsed into NixpkgsPlatformSingle.
    If none of these formats match the input String, Nothing is returned. A Just result thus only indicates that the format of the platform is sound — nixpkgsPlatformFromString does not check if the parsed platform actually exists. NixpkgsPlatformSingle is parsed from system tuples as understood by Nix and nixpkgs. System tuples are derived from autoconf's target triplets, dropping the vendor part. They have the form cpu-os where os can either be a single component or of the form kernel-system (system is an autoconf term here, not a Nix system). Note that three component systems are very rare. The two main candidates x86_64-linux-musl and x86_64-linux-gnu are prohibited for historical reasons and represented as plain x86_64-linux instead. Note that nixpkgsPlatformFromString expects to receive a valid system tuple, i.e. it will accept all system tuples that have a sound format (with the caveat that it will accept n-tuples for n >= 4 even though they are technically invalid). This is done because the ambiguity of system tuples requires knowledge over its legal contents in order to check their validity properly. Since lib.systems.elaborate from nixpkgs is the source of truth in this case, we want to avoid the need to continuously update distribution-nixpkgs to reflect its inner workings. nixpkgsPlatformFromString does, however, some conversions to alleviate some discrepancies between Cabal and nixpkgs. Parsing and rendering system tuples using nixpkgsPlatformFromString and rendering them via the Pretty instance of NixpkgsPlatform should not change the system tuple for tuples accepted by nixpkgs. This has been tested for all known tuples (from lib.platforms and lib.systems.examples) as of 2024-12-01. Please open an issue if any newly added ones are not recognized properly. Warning: nixpkgsPlatformFromString consequently tries to preserve all information of the passed system tuple. This means that it distinguishes between things that Cabal wouldn't, e.g. powerpc64 and powerpc64le. If you use this function to obtain a Platform that is later used to evaluate a .cabal file, it will behave unexpectedly in some situation. It is recommended to use Cabal's own facilities or Distribution.Nixpkgs.Haskell.Platform, provided by cabal2nix, instead. nixpkgsPlatformFromString is also not the inverse operation for NixpkgsPlatform's Pretty instance. It is not intended for parsing Nix expressions.
    >>> nixpkgsPlatformFromString "x86_64-netbsd"
    Just (NixpkgsPlatformSingle (Platform X86_64 NetBSD))
    
    >>> nixpkgsPlatformFromString "platforms.riscv"
    Just (NixpkgsPlatformGroup (Identifier "riscv"))
    
    >>> nixpkgsPlatformFromString "garbage"
    Nothing
    

  7. platforms :: Lens' Meta (Maybe (Set NixpkgsPlatform))

    distribution-nixpkgs Distribution.Nixpkgs.Meta

    No documentation available.

  8. unFormat :: Format -> ByteString

    djot Djot.AST

    No documentation available.

  9. jsonParserForDef :: ETypeDef -> String

    elm-bridge Elm.Json

    Compile a JSON parser for an Elm type definition

  10. jsonParserForType :: EType -> String

    elm-bridge Elm.Json

    Compile a JSON parser for an Elm type

Page 1396 of many | Previous | Next