mirror of
https://github.com/macocianradu/RosettaHaskellCompiler.git
synced 2026-03-18 21:10:07 +00:00
finished generator for basic types, enums and functions.
Functions still need to print a body
This commit is contained in:
@@ -9,6 +9,9 @@ import PrettyPrinter.Type
|
||||
|
||||
-- show printStatementTree
|
||||
|
||||
printFunction :: Function -> String
|
||||
printFunction = show . printFunctionSignature
|
||||
|
||||
printFunctionSignature :: Function -> Doc a
|
||||
printFunctionSignature (MakeFunction name description inputs output _) =
|
||||
printDescription description (pretty name <+> prettyPrintType (Prelude.map printCardinality (inputs ++ [output])))
|
||||
|
||||
Reference in New Issue
Block a user