diff options
Diffstat (limited to 'frontend/Wrap.dcl')
-rw-r--r-- | frontend/Wrap.dcl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/frontend/Wrap.dcl b/frontend/Wrap.dcl new file mode 100644 index 0000000..e5c4b41 --- /dev/null +++ b/frontend/Wrap.dcl @@ -0,0 +1,43 @@ +definition module Wrap + +/* + Wrap arbitrary Clean nodes (for debugging purposes). +*/ + +from StdOverloaded import toString + +:: WrappedDescriptorId + +instance toString WrappedDescriptorId + +:: WrappedDescriptor + = WrappedDescriptorCons + | WrappedDescriptorNil + | WrappedDescriptorTuple + | WrappedDescriptorOther !WrappedDescriptorId + +:: WrappedNode + // basic types + = WrappedInt !Int + | WrappedChar !Char + | WrappedBool !Bool + | WrappedReal !Real + | WrappedFile !File + + // unboxed arrays of basic types + | WrappedString !{#Char} + | WrappedIntArray !{#Int} + | WrappedBoolArray !{#Bool} + | WrappedRealArray !{#Real} + | WrappedFileArray !{#File} + + // other arrays + | WrappedArray !{WrappedNode} + + // records + | WrappedRecord !WrappedDescriptor !{WrappedNode} + + // other nodes + | WrappedOther !WrappedDescriptor !{WrappedNode} + +Wrap :: !.a -> WrappedNode
\ No newline at end of file |