🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.ml
Article #1

How do I define mutually dependent structures?

#1
From: Joel F. Klein
Date: Sat, 31 Oct 1992 06:16
18 lines
1288 bytes
Can I create two structures which are mutually dependent?
Here is the sml code that describes what I want to do:

signature asig = <<some signature>>
signature bsig = <<some signature>>
functor aFUN(structure s:bsig):asig = struct <<some structure>> end;
functor bFUN(structure s:asig):bsig = struct <<some structure>> end;
structure ta = aFUN(structure s=tb) and tb = bFUN(structure s=ta);

SML-NJ tells me:
std_in:6.33-6.34 Error: unbound structure tb
std_in:6.63-6.64 Error: unbound structure ta

Sigh.  What advantage is there to using the "and" construct if SML can't  
figure out the mutual recursion?  More importantly, am I doing something  
wrong?

Joel F. Klein, email replies to kleinjf@cs.rose-hulman.edu
Technical Details
Message-ID: <1ct8crINN1bt@master.cs.rose-hulman.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!master.cs.rose-hulman.edu!master.cs.rose-hulman.edu!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!master.cs.rose-hulman.edu!master.cs.rose-hulman.edu!news
From: kleinjf@cs.rose-hulman.edu  (Joel F. Klein)
Newsgroups: alt.lang.ml
Subject: How do I define mutually dependent structures?
Date: 31 Oct 1992 06:16:59 GMT
Organization: Computer Science Department at Rose-Hulman
Lines: 18
Message-ID: <1ct8crINN1bt@master.cs.rose-hulman.edu>
Reply-To: kleinjf@cs.rose-hulman.edu
NNTP-Posting-Host: rosalind.cs.rose-hulman.edu