Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
class
FromBuilder
a
where
- fromBuilder :: Builder -> a
- (+|) :: FromBuilder b => Builder -> Builder -> b
- (|+) :: ( Buildable a, FromBuilder b) => a -> Builder -> b
- (+||) :: FromBuilder b => Builder -> Builder -> b
- (||+) :: ( Show a, FromBuilder b) => a -> Builder -> b
- (|++|) :: ( Buildable a, FromBuilder b) => a -> Builder -> b
- (||++||) :: ( Show a, FromBuilder b) => a -> Builder -> b
- (||++|) :: ( Buildable a, FromBuilder b) => a -> Builder -> b
- (|++||) :: ( Show a, FromBuilder b) => a -> Builder -> b
- fmt :: FromBuilder b => Builder -> b
- fmtLn :: FromBuilder b => Builder -> b
- pretty :: ( Buildable a, FromBuilder b) => a -> b
- prettyLn :: ( Buildable a, FromBuilder b) => a -> b
Documentation
class FromBuilder a where Source #
fromBuilder :: Builder -> a Source #
Convert a
Builder
to something else.
Instances
FromBuilder ByteString Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> ByteString Source # |
|
FromBuilder ByteString Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> ByteString Source # |
|
FromBuilder Builder Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder0 -> Builder Source # |
|
FromBuilder Text Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> Text Source # |
|
FromBuilder Text Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> Text Source # |
|
FromBuilder Builder Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> Builder Source # |
|
a ~ Char => FromBuilder [a] Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> [a] Source # |
|
a ~ () => FromBuilder ( IO a) Source # | |
Defined in Fmt.Internal.Core fromBuilder :: Builder -> IO a Source # |
(|+) :: ( Buildable a, FromBuilder b) => a -> Builder -> b infixr 1 Source #
build
and concatenate, then convert.
(||+) :: ( Show a, FromBuilder b) => a -> Builder -> b infixr 1 Source #
show
and concatenate, then convert.
fmt :: FromBuilder b => Builder -> b Source #
fmt
converts things to
String
,
Text
,
ByteString
or
Builder
.
Most of the time you won't need it, as strings produced with (
+|
) and
(
|+
) can already be used as
String
,
Text
, etc. However, combinators
like
listF
can only produce
Builder
(for better type inference), and you
need to use
fmt
on them.
Also,
fmt
can do printing:
>>>
fmt "Hello world!\n"
Hello world!
pretty :: ( Buildable a, FromBuilder b) => a -> b Source #