guibou / PyF

Haskell QuasiQuoter for String Formatting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

empty string gives parse error

ghorn opened this issue · comments

error:
    • Exception when trying to run compile-time code:
        Prelude.foldl1: empty list
      Code: Language.Haskell.TH.Quote.quoteExp fmt ""
    • In the quasi-quotation: [fmt||]
    |
126 |                   foo = [fmt||]
    |                         ^^^^^^^

I think you want the behavior to either return an empty string, or give a better error message.

I don't actually need this, I just stumbled upon it and thought you'd like the report.

Good catch. Thank you!