Commit 8d95f59a authored by Bastian Kauschke's avatar Bastian Kauschke

introduce PrintMorphism

parent 804c2989
...@@ -59,6 +59,7 @@ library ...@@ -59,6 +59,7 @@ library
, Copar.FunctorExpression.Sorts , Copar.FunctorExpression.Sorts
, Copar.FunctorExpression.Desorting , Copar.FunctorExpression.Desorting
, Copar.FunctorExpression.Transform , Copar.FunctorExpression.Transform
, Copar.CoalgebraPrinter
, Copar.Coalgebra.Parser , Copar.Coalgebra.Parser
, Copar.Coalgebra.Parser.Class , Copar.Coalgebra.Parser.Class
, Copar.Coalgebra.Parser.Internal , Copar.Coalgebra.Parser.Internal
......
module Copar.Coalgebra.Printer
( PrintMorphism(..)
, printFloat
) where
import qualified Data.Text.Lazy.Builder as Build
import Numeric (showFFloat)
import GHC.Float (double2Float)
import Data.Vector as V
import Copar.RefinementInterface
class PrintMorphism f where
printMorphismPoint :: f () -> F1 f -> [(Label f, Build.Builder)] -> Build.Builder
-- | Prints a `Double` in a format expected by the lexer.
printFloat :: Double -> Build.Builder
printFloat d = Build.fromString $ showFFloat Nothing (double2Float d) ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment