blob: e5c4b413fdf6930c365f4b6b989264f54a94145b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
|