[Ur] smlnj build, # comments for .ur files

Adam Chlipala adamc at impredicative.com
Sun Apr 17 11:27:02 EDT 2011


Marc Weber wrote:
>> Thanks for the patches!  Neither one seems consistent to me with my
>> vision for how Ur/Web should be set up, so I'll leave them as something
>> folks can apply optionally.
>>      
> It doesn't make sense to me that you call Haskell's "implicit mutual
> recursion spread across files" an entangled mess because you want to
> read code top-down to understand what's happening but don't apply this
> pattern to urweb .. because the http, fastcgi, cgi targets register
> themselves?
>    

The case of plugin systems is different than usual.  I'm not fully 
satisfied with the imperative solution that the Ur/Web compiler uses 
now, but I'm also not so bothered by it (and don't know a better 
approach that works in ML).  The way the code is set up now, it's easy 
to define your own variant of the Ur/Web compiler that adds a new 
protocol, with no need to touch the main urweb repository; I've done 
this to good effect in the past (no code of this kind is publicly 
available, though).

> I used this pattern for single line comments forcing a space because #
> is used by labels and chars:
>
>    line_comment = [#][ ][^\n]*\n;
>
> However this only works using sml/nj but not mlton?
> Any idea what could be the cause before I start debugging this issue?
>    

I don't know, though you might try escaping more characters with 
backslashes.



More information about the Ur mailing list