Hoogle Search
Within LTS Haskell 22.18 (ghc-9.6.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
withDefault :: ArrowList a => a b c -> c -> a b chxt Control.Arrow.ArrowList converts an arrow, that may fail, into an arrow that always succeeds example: withDefault none "abc" is equivalent to constA "abc"
withDefault :: OpenMode mode => BlockMode -> (T mode -> IO a) -> IO aalsa-seq Sound.ALSA.Sequencer No documentation available.
withDefault :: JiraPrinter a -> ajira-wiki-markup Text.Jira.Printer Run with default state.
withDefault :: Validator e inp a -> a -> Validator e (Maybe inp) avalida Valida.Combinators Build a validator that runs given validator only if input is Just. Yields default value otherwise. Yields Success when input is Nothing, and wrapped around the default value.
vald `withDefault` deflt = fromMaybe deflt <$> optionally vald
Examples
>>> runValidator (failureIf even "Even" `withDefault` 0) (Just 5) Success 5 >>> runValidator (failureIf even "Even" `withDefault` 0) (Just 6) Failure ("Even" :| []) >>> runValidator (failureIf even "Even" `withDefault` 0) Nothing Success 0
-
Potentially uninitialised Booleans. The motivation for this small library is to distinguish between a boolean option with a default value and an option which has been set to what happens to be the default value. In one case the default can be overriden (e.g. --cubical implies --without-K) while in the other case the user has made a mistake which they need to fix.
type
WithDefault b = WithDefault' Bool bAgda Agda.Utils.WithDefault No documentation available.
withDefaultBaseURI :: String -> SysConfighxt Text.XML.HXT.Arrow.XmlState withDefaultBaseURI URI , input option, set the default base URI This option can be useful when parsing documents from stdin or contained in a string, and interpreting relative URIs within the document
withDefaultBaseURI :: String -> SysConfighxt Text.XML.HXT.Arrow.XmlState.SystemConfig withDefaultBaseURI URI , input option, set the default base URI This option can be useful when parsing documents from stdin or contained in a string, and interpreting relative URIs within the document
-
vinyl Data.Vinyl.FromTuple Override a record with fields from a possibly narrower record. A typical use is to supply default values as the first argument, and overrides for those defaults as the second.
withDefaultStyle :: BackendProgram a -> BackendProgram aChart Graphics.Rendering.Chart.Drawing No documentation available.
Page 1 of many | Next