projectional-haskell / structured-haskell-mode

Structured editing minor mode for Haskell in Emacs
BSD 3-Clause "New" or "Revised" License
542 stars 38 forks source link

Quasiquote issue #116

Open ivan-m opened 9 years ago

ivan-m commented 9 years ago

shm is reporting a parse error; shm/test-exe says:

[["Decl SrcSpanInfo" FunBind 1 1 17 39]["Match SrcSpanInfo" Match 1 1 17 39]["Name SrcSpanInfo" Ident 1 1 1 7]["Pat SrcSpanInfo" PVar 1 8 1 12]["Name SrcSpanInfo" Ident 1 8 1 12]["Pat SrcSpanInfo" PVar 1 13 1 16]["Name SrcSpanInfo" Ident 1 13 1 16]["Pat SrcSpanInfo" PVar 1 17 1 19]["Name SrcSpanInfo" Ident 1 17 1 19]["Rhs SrcSpanInfo" UnGuardedRhs 1 20 5 12]["Exp SrcSpanInfo" Do 1 22 5 12]["Stmt SrcSpanInfo" Generator 2 3 2 59]["Pat SrcSpanInfo" PParen 2 3 2 30]["Pat SrcSpanInfo" PatTypeSig 2 4 2 29]["Pat SrcSpanInfo" PVar 2 4 2 9]["Name SrcSpanInfo" Ident 2 4 2 9]["Type SrcSpanInfo" TyList 2 13 2 29]["Type SrcSpanInfo" TyTuple 2 14 2 28]["Type SrcSpanInfo" TyCon 2 15 2 19]["QName SrcSpanInfo" UnQual 2 15 2 19]["Name SrcSpanInfo" Ident 2 15 2 19]["Type SrcSpanInfo" TyCon 2 20 2 27]["QName SrcSpanInfo" UnQual 2 20 2 27]["Name SrcSpanInfo" Ident 2 20 2 27]["Exp SrcSpanInfo" App 2 34 2 59]["Exp SrcSpanInfo" App 2 34 2 56]["Exp SrcSpanInfo" App 2 34 2 44]["Exp SrcSpanInfo" Var 2 34 2 39]["QName SrcSpanInfo" UnQual 2 34 2 39]["Name SrcSpanInfo" Ident 2 34 2 39]["Exp SrcSpanInfo" Var 2 40 2 44]["QName SrcSpanInfo" UnQual 2 40 2 44]["Name SrcSpanInfo" Ident 2 40 2 44]["Exp SrcSpanInfo" Var 2 45 2 56]["QName SrcSpanInfo" UnQual 2 45 2 56]["Name SrcSpanInfo" Ident 2 45 2 56]["Exp SrcSpanInfo" Var 2 57 2 59]["QName SrcSpanInfo" UnQual 2 57 2 59]["Name SrcSpanInfo" Ident 2 57 2 59]["Stmt SrcSpanInfo" Generator 3 3 4 24]["Pat SrcSpanInfo" PVar 3 3 3 4]["Name SrcSpanInfo" Ident 3 3 3 4]["Exp SrcSpanInfo" Case 3 8 4 24]["Exp SrcSpanInfo" Var 3 13 3 22]["QName SrcSpanInfo" UnQual 3 13 3 22]["Name SrcSpanInfo" Ident 3 13 3 22]["Alt SrcSpanInfo" Alt 4 10 4 24]["Pat SrcSpanInfo" PWildCard 4 10 4 11]["Rhs SrcSpanInfo" UnGuardedRhs 4 12 4 24]["Exp SrcSpanInfo" Var 4 15 4 24]["QName SrcSpanInfo" UnQual 4 15 4 24]["Name SrcSpanInfo" Ident 4 15 4 24]["Stmt SrcSpanInfo" Qualifier 5 3 5 12]["Exp SrcSpanInfo" App 5 3 5 12]["Exp SrcSpanInfo" Var 5 3 5 9]["QName SrcSpanInfo" UnQual 5 3 5 9]["Name SrcSpanInfo" Ident 5 3 5 9]["Exp SrcSpanInfstructured-haskell-mode: Parse error: ,

The only place a , appears is within a quasi-quote:

    alreadyHave = [qs|SELECT foo, bar
                        FROM baz
                       WHERE foo in ?
                    ORDER BY bar ASC |]

Indeed, if I remove this quasi-quote then SHM stops complaining about this, and instead starts complaining about my next quasi-quote.

chrisdone commented 8 years ago

I didn't figure out why this caused other issues.