Idris2Doc : Data.LLVM.Class

Data.LLVM.Class

Type classes and utilities for encoding LLVM IR to string representations.

This module provides the `Encode` interface for converting LLVM IR data types
to their textual representations, along with supporting types and utilities
for string manipulation and formatting.

Reexports

importpublic Data.MonadIO
importpublic Control.Monad.Identity

Definitions

interfaceEncode : (Type->Type) ->Type->Type->Type
  Interface for encoding values to a target monoid type.

The `Encode` interface allows converting LLVM IR data structures
to their string representations or other monoid types suitable
for serialization or pretty-printing.
@ m The monad to encode within
@ a The source type to encode
@ b The target type

Parameters: m, a, b
Constraints: Monad m
Methods:
encode : a->mb
  Convert a value to its encoded representation

Implementation: 
String->VString
encode : Encodemab=>a->mb
  Convert a value to its encoded representation

Visibility: public export
interfaceEncodeIn : Type-> (Type->Type) ->Type->Type->Type
  Interface for encoding values to a target monoid type.

The `Encode` interface allows converting LLVM IR data structures
to their string representations or other monoid types suitable
for serialization or pretty-printing.
@ m The monad to encode within
@ a The source type to encode
@ b The target type

Parameters: context, m, a, b
Constraints: Monad m
Methods:
encodeIn : context->a->mb

Implementation: 
String->VString
encodeIn : EncodeIncontextmab=>context->a->mb
Visibility: public export
dataVString : Type
  Value string wrapper for LLVM IR string output.

A newtype wrapper around String that provides specialized
monoid operations for building LLVM IR text with proper spacing.

Totality: total
Visibility: public export
Constructor: 
MkVString : String->VString

Hints:
EncodeIdentityStringVString
EncodeIdentityNatVString
EncodeATMLinkageVString
EncodeATMDLLStorageVString
EncodeATMThreadLocalityVString
EncodeATMPreemptionVString
EncodeATMAddressSpaceVString
EncodeATMCallingConventionVString
EncodeATMVisibilityVString
EncodeATMNameVString
EncodeATMLTypeFVString
EncodeATMSymbolInfoVString
EncodeATMLTypeVString
EncodeATMaVString=>EncodeATM (WithTypea) VString
EncodeATMAddressInfoVString
EncodeATMLTagVString
EncodeATMMetadataVString
EncodeATMLExprVString
EncodeATMGVarDefVString
EncodeATMAttributeVString
EncodeATMCaseBranchVString
EncodeATMInvokeCallVString
EncodeATMWrappingVString
EncodeATMUnaryOpcodeVString
EncodeATMBinaryOpcodeVString
EncodeATMBrCallVString
EncodeATMCatchSwitchVString
EncodeATMFastMathFlagVString
EncodeATMTailCallVString
EncodeATMFnCallVString
EncodeATMTerminatorVString
EncodeATMConversionOpCodeVString
EncodeATMVectorOpcodeVString
EncodeATMAggregateOpcodeVString
EncodeATMMiscOpcodeVString
EncodeATMAtomicOrderVString
EncodeATMMemoryOpcodeVString
EncodeATMCatchClauseVString
EncodeATMExceptOpcodeVString
EncodeATMLOperationVString
EncodeATMLStatementVString
EncodeATMBlockVString
EncodeATMFunctionArgSpecVString
EncodeATMFunctionDefVString
EncodeATMFunctionDecVString
EncodeATMAliasVString
EncodeATMIFuncVString
EncodeATMAttributeGroupDefVString
EncodeATMLClauseVString
EncodeATMLModuleVString
FromStringVString
MonoidVString
SemigroupVString
ShowVString
WalkStringVString
WalkVStringString
(<++>) : VString->VString->VString
  Concatenate VString values without inserting spaces

Visibility: public export
Fixity Declaration: infixl operator, level 8
intercalate : Monoidb=>b->Listb->b
  Intercalate a list of monoid values with a separator.

Joins a list of monoid values with the given separator between them,
similar to the standard library's intercalate but for any monoid.

@ sep The separator to insert between elements
@ xs The list of values to join

Visibility: public export
writeIf : Monoidb=> (a->b) ->Maybea->b
  Conditionally apply a function based on Maybe value.

If the Maybe value is Nothing, returns the monoid neutral element.
If it's Just x, applies the function to x.

@ f The function to apply to the value
@ mx The Maybe value to check

Visibility: public export
prefixed : Monoidm=>m->m->m
  Add a prefix to a monoid value.

Returns a function that prepends the given prefix to its argument.

@ p The prefix to add

Visibility: public export
suffixed : Monoidm=>m->m->m
  Add a suffix to a monoid value.

Returns a function that appends the given suffix to its argument.

@ s The suffix to add

Visibility: public export
seperated : EncodeIdentityaVString=>VString->Lista->IdentityVString
  Join a list of encodable values with a separator.

Encodes each value in the list and joins them with the given separator.

@ sep The separator string to use between elements
@ vs The list of values to encode and join

Visibility: public export
spaced : EncodeIdentityaVString=>Lista->IdentityVString
  Join a list of encodable values with space separation

Visibility: public export
spaced' : ListVString->VString
  Join a list of VString values with space separation

Visibility: public export
vshow : Showa=>a->VString
  Convert Show instances to VString

Convenience function that combines show and go to create VString values
from any type with a Show instance.

Visibility: public export
encode' : EncodeIdentityaVString=>a->IdentityVString
  Type-specialized encoding function

Convenience function with explicit VString return type.

Visibility: public export
toVString : String->VString
  Convert String to VString (redundant with go)

Visibility: public export
interfaceEncodeIO : Type-> (Type->Type) ->Type->Type->Type
Parameters: e, m, a, b
Constraints: Show e, MonadIO e m, Encode m a b
Methods:
encodeIO : a->IO (Eithereb)

Implementation: 
String->VString
encodeIO : EncodeIOemab=>a->IO (Eithereb)
Visibility: public export