Skip to content

Fails to parse multi-line GHCJS foreign function definitions #346

@alexanderkjeldaas

Description

@alexanderkjeldaas

The following does not parse in stylish-haskell. The reported error location is right after the first ".

foreign import javascript safe
   " var body = new FormData();                           \
                                                          \
     body.append( $1                                      \
                , { uri  : $2                             \
                  , type : 'image/jpeg'                   \
                  , name : $3                             \
                  }                                       \
                );                                        \
                                                          \
     $r       = body;                                     \
   "
   js_retrieve_image :: JSString -- ^ param 'name'
                     -> JSString -- ^ uri from where to extract the raw binary
                     -> JSString -- ^ param 'filename' (though on FormData is called 'name')
                                 --   (this param is currently ignored by the API and backend).
                     -> IO JSVal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions