tag:blogger.com,1999:blog-16940011.post6960996453894213703..comments2023-05-18T07:00:11.972-07:00Comments on Yariv's Blog: New: Module Extension in Erlang with SmerlYarivhttp://www.blogger.com/profile/01787159103926738266noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-16940011.post-91769639398447547222006-08-23T10:42:56.002-07:002006-08-23T10:42:56.002-07:00Just FYI: Haskell doesn't have any form of mod...Just FYI: Haskell doesn't have any form of module inheritance. (At least not in the standard; anything is possible with all of the different hacks on GHC that are out there.) Perhaps you're thinking of type classes?Nick Thomashttp://nwthomas.com/noreply@blogger.comtag:blogger.com,1999:blog-16940011.post-8712935534813722332006-08-23T10:42:56.001-07:002006-08-23T10:42:56.001-07:00Just FYI: Haskell doesn't have any form of mod...Just FYI: Haskell doesn't have any form of module inheritance. (At least not in the standard; anything is possible with all of the different hacks on GHC that are out there.) Perhaps you're thinking of type classes?Nick Thomashttp://nwthomas.com/noreply@blogger.comtag:blogger.com,1999:blog-16940011.post-10179714801737245102006-08-23T10:42:56.000-07:002006-08-23T10:42:56.000-07:00Oops, sorry for the double post. :/Oops, sorry for the double post. :/Nick Thomashttp://nwthomas.com/noreply@blogger.comtag:blogger.com,1999:blog-16940011.post-75399442092173184692006-08-23T14:30:49.000-07:002006-08-23T14:30:49.000-07:00Yes, I guess I had type classes in mind. I did a H...Yes, I guess I had type classes in mind. I did a Haskell tutorial a while ago and I vaguely remembered this kind of "inheritance" but I didn't exactly know if it's the same as Smerl's module extension and I was too lazy to go read the documentation :)Yarivnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-6781797346060200042006-09-06T16:20:07.000-07:002006-09-06T16:20:07.000-07:00The Haskell module system has syntax for re-export...The Haskell module system has syntax for re-exporting all the things imported from another module, and for importing all but a few things from another module. It's close to your extension operation, except you have to explicitly hide the things you want to replace. Details of the Haskell module system here: <a href="http://haskell.org/onlinereport/modules.html" rel="nofollow">http://haskell.org/onlinereport/modules.html</a>. What happens in your system if you extend (extrude?) several parents into a module?Brandonnoreply@blogger.comtag:blogger.com,1999:blog-16940011.post-55605251696954094112006-09-06T23:14:35.000-07:002006-09-06T23:14:35.000-07:00Brandon, thanks for the pointer. In my system, you...Brandon, thanks for the pointer. In my system, you can't really extrude several parents into the same module, but you can interatively extrude each parent into the result from the last extrusion. Then end result would be a module that includes the union of the child's functions plus all functions from the parents, where if a function has multiple "instances" across modules, only the first one is picked.<br><br>The Smerl module extension is currenly useful for extension in runtime (that's what I needed it for) but it wouldn't be hard to spin it off as a compile-time script, which would effectively make an Erlang language extension (there would have to be a new convention for denoting the extension relations in compile-time, of course).Yarivnoreply@blogger.com