Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
Position :: Word -> Word -> Positiontext-rope Data.Text.Utf16.Rope No documentation available.
-
text-rope Data.Text.Utf8.Lines Represent a position in a text.
Position :: Word -> Word -> Positiontext-rope Data.Text.Utf8.Lines No documentation available.
-
text-rope Data.Text.Utf8.Rope Represent a position in a text.
Position :: Word -> Word -> Positiontext-rope Data.Text.Utf8.Rope No documentation available.
-
type
POSIXTime = NominalDiffTimethyme Data.Thyme.Clock.POSIX The nominal (ignoring leap seconds) time difference since midnight 1970-01-01, the Unix epoch. Equvialent to a normalised struct timeval.
-
thyme Data.Thyme.Format All instances of this class may be parsed by parseTime, readTime, and readsTime.
-
ttc Data.TTC Parse a data type from a textual data type Unlike Read, Parse allows you to specify meaningful error messages. When defining an instance, first convert the textual data type to the textual data type that is most natural for the data type. The as functions (such as asS) provide a convenient way to do this. Note that error is also a textual data type. The withError and prefixError functions can be used to reduce boilerplate. Example:
newtype Username = Username { usernameText :: Text } instance TTC.Parse Username where parse = TTC.asT $ t -> TTC.prefixErrorS "invalid username: " $ do unless (T.all isAsciiLower t) $ Left "not only lowercase ASCII letters" let len = T.length t when (len < 3) $ Left "fewer than 3 characters" when (len > 12) $ Left "more than 12 characters" pure $ Username tTo use parse in a context where the types are ambiguous, use the TypeApplications GHC extension to specify one or more types. Example:-- Parse from Text parse _ Text foo -- Parse using String errors parse _ _ String foo -- Parse from Text using String errors parse _ Text String foo
Alternatively, use one of the functions that parse from a specific textual data type (such as renderS). Using these functions may make code easier to understand even in cases where the types are not ambiguous. See the uname and prompt example programs in the ttc-examples directory of the source repository. For more details, see the following article: https://www.extrema.is/articles/ttc-textual-type-classes/render-and-parse Since a type may have at most one instance of a given type class, special care must be taken when defining type class instances in a shared library. In particular, orphan instances should generally not be used in shared libraries since they prevent users of the libraries from writing their own instances. Use newtype wrappers instead. There are no default instances for the Parse type class, so that all instances can be customized per project when desired. Instances for some basic data types are defined for the ParseDefault type class, however, and the Template Haskell functions documented below can be used to load these definitions with minimal boilerplate. -
ttc Data.TTC The ParseDefault type class provides some default Parse instances.