Compute an (infinite) tree from fixpoint operator using delay modality
问题 Here is a functional programming puzzle involving loop-tying and infinite data structures. There is a bit of background, so hang tight. The setting. Let us define a data type representing recursive data types: type Var = String data STerm = SMu Var STerm | SVar Var | SArrow STerm STerm | SBottom | STop deriving (Show) i.e. t ::= μα. t | α | t → t | ⊥ | ⊤ . Note that ⊥ denotes the type with no inhabitants, while ⊤ denotes the type with all inhabitants. Note that (μα. α) = ⊥ , as μ is a least