On Tue, Sep 13, 2016 at 8:11 AM, David A. Wheeler <dwhee...@dwheeler.com>
wrote:

>
> >4.  Backquotes "invert" the use of a symbol: foo is a prefix symbol,
> >`foo`
> >is an infix symbol; while + is an infix symbol while `+` is a prefix
> >symbol.
>
> How will you identify quasi quoting? Or do users simply have to use the
> full name quasiquote ?
>

Full name, sadly ^^

The target I'm planning for these rules is not, technically speaking, a
Lisp (a dynamically-typed language whose primary data type is used to
represent its code) but rather a Haskell-like language.

The point of this is to allow a Scheme macro processor to be used on a
Haskell-like language.  So, quasiquote is a lot less needed.

syntax `<-`
syntax do
. transform
. . do
. . . p <- x
. to $ syntaxError "do: last form cannot be `p <- x'" p
. transform
. . do
. . . x
. to
. . x
. transform
. . do
. . . p <- x
. . . y
. . . ...
. to
. . . x >>= \ p -> do y ...
. transform
. . do
. . . x
. . . y
. . . ...
. to
. . x >>= \ _ -> do y ...

(well, "\" would also have to be prefix-defaulted, and the "function"
syntax would be `->` rather than \ here, with \ being a dummy stand in)

Still, let (or "where", which is a more common idiom in Haskell-like
languages, although "let" does still exist) is difficult to express in a
good indentation form....

fix :: ((a -> b) -> (a -> b)) -> (a -> b)
map = value
. fix rec
. where
. . rec map f (a:as) = f a:map f as
. . rec map f Nil = Nil
{-
(map = (value
  (fix rec)
  (where
    ((rec map f (a:as)) = ((f a):(map f as)))
    ((rec map f NIl) = Nil))))
-}

blech!

Sincerely,
AmkG
------------------------------------------------------------------------------
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to