atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Parse error: on `→` symbol in lambda #91

Closed cnd closed 8 years ago

cnd commented 8 years ago

for example:

getHTTP :: String    -- url address
         → IO String -- http content
getHTTP url = withSocketsDo
  $ simpleHttp url
      >>= \bs → return $ S.decode $ L.unpack bs

error:

HTTP.hs: 0, 0
.../src/HTTP.hs: 27: 26:Error:Parse error: $

and this one is fine:

getHTTP :: String    -- url address
         → IO String -- http content
getHTTP url = withSocketsDo
  $ simpleHttp url
      >>= \bs -> return $ S.decode $ L.unpack bs

master version of ghc-mod: ghc-mod version 5.5.0.0 compiled by GHC 7.10.3, windows 10

not sure if this issue belongs to atom package or ghc-mod itself, mirror: https://github.com/DanielG/ghc-mod/issues/722

lierdakil commented 8 years ago

Can't reproduce. Is your file saved or does it only happen on a modified buffer?

cnd commented 8 years ago

@lierdakil file is saved, I can reproduce it on several files in several projects

lierdakil commented 8 years ago

Seems like ghc-mod issue to me. Probably something to do with system encoding. Could you run ghc-mod from console to make sure? ghc-mod check \path\to\file.hs or something like this

cnd commented 8 years ago

@lierdakil yes, same issue there

rvion commented 8 years ago

@Heather did you open an issue on ghc-mod repo ?

lierdakil commented 8 years ago

@rvion, it's mentioned in OP: DanielG/ghc-mod#722

rvion commented 8 years ago

woops, my bad, sorry for the noise