spiros-0.4.0: Spiros Boosalis's Custom Prelude

Safe HaskellNone
LanguageHaskell2010

Prelude.Spiros.Application

Description

Synopsis

Documentation

data ApplicationInterface Source #

The kind of application interface.

Cases:

Instances
Bounded ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Enum ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Eq ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Ord ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Read ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Show ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Ix ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Generic ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Associated Types

type Rep ApplicationInterface :: Type -> Type #

Lift ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Default ApplicationInterface Source #
= ApplicationCLI
Instance details

Defined in Prelude.Spiros.Application

NFData ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

rnf :: ApplicationInterface -> () #

GEnum ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

Hashable ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep ApplicationInterface Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep ApplicationInterface = D1 (MetaData "ApplicationInterface" "Prelude.Spiros.Application" "spiros-0.4.0-7yNYhuNqI1YgajQL6GSlo" False) (C1 (MetaCons "ApplicationCLI" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ApplicationGUI" PrefixI False) (U1 :: Type -> Type))

data DesktopPlatform Source #

Platform for desktop applications.

Instances
Bounded DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Enum DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Eq DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Ord DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Read DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Show DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Ix DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Generic DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Associated Types

type Rep DesktopPlatform :: Type -> Type #

Lift DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

lift :: DesktopPlatform -> Q Exp #

NFData DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

rnf :: DesktopPlatform -> () #

GEnum DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

genum :: [DesktopPlatform] #

Hashable DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep DesktopPlatform Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep DesktopPlatform = D1 (MetaData "DesktopPlatform" "Prelude.Spiros.Application" "spiros-0.4.0-7yNYhuNqI1YgajQL6GSlo" False) (C1 (MetaCons "DesktopLinux" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "DesktopWindows" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DesktopMacintosh" PrefixI False) (U1 :: Type -> Type)))

data ApplicationInformation0 Source #

The primary fields of ApplicationInformation, from which the rest are derived (via defaultApplicationInformation).

Required fields share type with their namesake field (implicitly under Identity). Optional fields are wrapped under Maybe.

Instances
Eq ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Ord ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Read ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Show ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Generic ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Associated Types

type Rep ApplicationInformation0 :: Type -> Type #

Lift ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Default ApplicationInformation0 Source #
= defaultApplicationInformation0
Instance details

Defined in Prelude.Spiros.Application

NFData ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

rnf :: ApplicationInformation0 -> () #

Hashable ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep ApplicationInformation0 Source # 
Instance details

Defined in Prelude.Spiros.Application

data ApplicationInformation Source #

Metadata for a (cross-platform) application.

Fields

Metadata:

Platform-specific metadata:

Example

e.g.:

myApplicationInformation :: ApplicationInformation
myApplicationInformation = ApplicationInformation{..}
  where

  $sel:name:ApplicationInformation                  = "My Application"
  $sel:version:ApplicationInformation               = "0.0.0"
  $sel:license:ApplicationInformation               = "GPL-3.0-or-later"
  $sel:vendor:ApplicationInformation                = "sboosali.io"
  $sel:executable:ApplicationInformation            = "my-application"

  $sel:interface:ApplicationInformation             = ApplicationCLI
  $sel:platforms:ApplicationInformation             = allDesktopPlatforms
                              -- [ DesktopLinux, DesktopWindows, DesktopMacintosh ]

  $sel:posixDirectory:ApplicationInformation     = "myapplication/"
  $sel:windowsDirectory:ApplicationInformation   = "sboosaliMy Application"
  $sel:macintoshDirectory:ApplicationInformation = "io.sboosali.My-Application/"
Instances
Eq ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Ord ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Read ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Show ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Generic ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Associated Types

type Rep ApplicationInformation :: Type -> Type #

Lift ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

NFData ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

Methods

rnf :: ApplicationInformation -> () #

Hashable ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

type Rep ApplicationInformation Source # 
Instance details

Defined in Prelude.Spiros.Application

defaultApplicationInformation0 :: ApplicationInformation0 Source #

Required fields are "". Optional fields are Nothing.

getApplicationSpecificXdgDirectory :: XdgDirectory -> ApplicationInformation -> FilePath -> IO FilePath Source #

the input FilePath must be strictly relative. i.e.:

  • no ../

writeTextFileWith :: IO FilePath -> Text -> IO () Source #

Creates any (non-existant) parent directories (in Bash, like a mkdir -p on the dirname).

asExecutableName :: String -> String Source #

Construct a $sel:executable:ApplicationInformation from a $sel:name:ApplicationInformation.

Examples

>>> asExecutableName "My Application"
"my-application"

asPosixDirectory :: String -> String -> String Source #

Construct a $sel:posixDirectory:ApplicationInformation from a $sel:name:ApplicationInformation.

Examples

>>> import qualified Prelude
>>> asPosixDirectory "My Application" Prelude.undefined
"myapplication/"

asWindowsDirectory :: String -> String -> String Source #

Construct a $sel:windowsDirectory:ApplicationInformation from a $sel:vendor:ApplicationInformation and a $sel:name:ApplicationInformation.

Examples

>>> asWindowsDirectory "My Application" "www.sboosali.com"
"sboosali/My Application/"

asMacintoshDirectory :: String -> String -> String Source #

Construct a $sel:macintoshDirectory:ApplicationInformation from a $sel:vendor:ApplicationInformation and a $sel:name:ApplicationInformation.

Examples

>>> asMacintoshDirectory "My Application" "www.sboosali.com"
"com.sboosali.www.My-Application/"

convertSpacesToHyphens :: String -> String Source #

Convert multiple whitespace characters to a single hyphen character.

Examples

>>> convertSpacesToHyphens " phrase with     spaces "
"phrase-with-spaces"