Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. setFromCarrier :: (c -> b) -> SExprPrinter a b -> SExprPrinter a c

    s-cargot Data.SCargot.Print

    Modify the carrier type of a SExprPrinter by describing how to convert the new type back to the previous type. For example, to pretty-print a well-formed s-expression, we can modify the SExprPrinter value as follows:

    >>> let printer = setFromCarrier fromWellFormed (basicPrint id)
    
    >>> encodeOne printer (WFSList [WFSAtom "ele", WFSAtom "phant"])
    "(ele phant)"
    

  2. setIndentAmount :: Int -> SExprPrinter atom carrier -> SExprPrinter atom carrier

    s-cargot Data.SCargot.Print

    Set the number of spaces that a subsequent line will be indented after a swing indentation.

    >>> let printer = setMaxWidth 12 (basicPrint id)
    
    >>> encodeOne printer (L [A "elephant", A "pachyderm"])
    "(elephant \n  pachyderm)"
    
    >>> encodeOne (setIndentAmount 4) (L [A "elephant", A "pachyderm"])
    "(elephant \n    pachyderm)"
    

  3. setIndentStrategy :: (SExpr atom -> Indent) -> SExprPrinter atom carrier -> SExprPrinter atom carrier

    s-cargot Data.SCargot.Print

    Dictate how to indent subsequent lines based on the leading subexpression in an s-expression. For details on how this works, consult the documentation of the Indent type.

    >>> let indent (A "def") = SwingAfter 1; indent _ = Swing
    
    >>> let printer = setIndentStrategy indent (setMaxWidth 8 (basicPrint id))
    
    >>> encodeOne printer (L [ A "def", L [ A "func", A "arg" ], A "body" ])
    "(def (func arg)\n  body)"
    
    >>> encodeOne printer (L [ A "elephant", A "among", A "pachyderms" ])
    "(elephant \n  among\n  pachyderms)"
    

  4. setMaxWidth :: Int -> SExprPrinter atom carrier -> SExprPrinter atom carrier

    s-cargot Data.SCargot.Print

    Dictate a maximum width for pretty-printed s-expressions.

    >>> let printer = setMaxWidth 8 (basicPrint id)
    
    >>> encodeOne printer (L [A "one", A "two", A "three"])
    "(one \n  two\n  three)"
    

  5. setBitTo :: SFiniteBits a => SBV a -> Int -> SBool -> SBV a

    sbv Data.SBV

    A combo of setBit and clearBit, when the bit to be set is symbolic.

  6. setInfo :: SolverContext m => String -> [String] -> m ()

    sbv Data.SBV

    Set info. Example: setInfo ":status" ["unsat"].

  7. setLogic :: SolverContext m => Logic -> m ()

    sbv Data.SBV

    Set the logic.

  8. setOption :: SolverContext m => SMTOption -> m ()

    sbv Data.SBV

    Set an option.

  9. setTimeOut :: SolverContext m => Integer -> m ()

    sbv Data.SBV

    Set a solver time-out value, in milli-seconds. This function essentially translates to the SMTLib call (set-info :timeout val), and your backend solver may or may not support it! The amount given is in milliseconds. Also see the function timeOut for finer level control of time-outs, directly from SBV.

  10. setInfo :: SolverContext m => String -> [String] -> m ()

    sbv Data.SBV.Internals

    Set info. Example: setInfo ":status" ["unsat"].

Page 730 of many | Previous | Next