Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Software
CoPaR
Commits
8d95f59a
Commit
8d95f59a
authored
Jul 28, 2020
by
Bastian Kauschke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce PrintMorphism
parent
804c2989
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
copar.cabal
copar.cabal
+1
-0
src/Copar/Coalgebra/Printer.hs
src/Copar/Coalgebra/Printer.hs
+20
-0
No files found.
copar.cabal
View file @
8d95f59a
...
@@ -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
...
...
src/Copar/Coalgebra/Printer.hs
0 → 100644
View file @
8d95f59a
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
)
""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment