git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into pure11
8732859Andy Arvanitis
CONTRIBUTORS.md+2
@@ -31,6 +31,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
31- [@jacereda](https://github.com/jacereda) (Jorge Acereda) My existing contributions and all future contributions until further notice are Copyright Jorge Acereda, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
31- [@jacereda](https://github.com/jacereda) (Jorge Acereda) My existing contributions and all future contributions until further notice are Copyright Jorge Acereda, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
32- [@japesinator](https://github.com/japesinator) (JP Smith) My existing contributions and all future contributions until further notice are Copyright JP Smith, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
32- [@japesinator](https://github.com/japesinator) (JP Smith) My existing contributions and all future contributions until further notice are Copyright JP Smith, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
33- [@joneshf](https://github.com/joneshf) (Hardy Jones) - My existing contributions and all future contributions until further notice are Copyright Hardy Jones, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
33- [@joneshf](https://github.com/joneshf) (Hardy Jones) - My existing contributions and all future contributions until further notice are Copyright Hardy Jones, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
34+- [@kika](https://github.com/kika) (Kirill Pertsev) - My existing contributions and all future contributions until further notice are Copyright Kirill Pertsev, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
34- [@kRITZCREEK](https://github.com/kRITZCREEK) (Christoph Hegemann) - My existing contributions and all future contributions until further notice are Copyright Christoph Hegemann, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
35- [@kRITZCREEK](https://github.com/kRITZCREEK) (Christoph Hegemann) - My existing contributions and all future contributions until further notice are Copyright Christoph Hegemann, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
35- [@L8D](https://github.com/L8D) (Tenor Biel) My existing contributions and all future contributions until further notice are Copyright Tenor Biel, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
36- [@L8D](https://github.com/L8D) (Tenor Biel) My existing contributions and all future contributions until further notice are Copyright Tenor Biel, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
36- [@leighman](http://github.com/leighman) (Jack Leigh) My existing contributions and all future contributions until further notice are Copyright Jack Leigh, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
37- [@leighman](http://github.com/leighman) (Jack Leigh) My existing contributions and all future contributions until further notice are Copyright Jack Leigh, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
@@ -70,6 +71,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
70- [@zudov](https://github.com/zudov) (Konstantin Zudov) My existing contributions and all future contributions until further notice are Copyright Konstantin Zudov, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
71- [@zudov](https://github.com/zudov) (Konstantin Zudov) My existing contributions and all future contributions until further notice are Copyright Konstantin Zudov, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
71- [@LiamGoodacre](https://github.com/LiamGoodacre) (Liam Goodacre) My existing contributions and all future contributions until further notice are Copyright Liam Goodacre, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
72- [@LiamGoodacre](https://github.com/LiamGoodacre) (Liam Goodacre) My existing contributions and all future contributions until further notice are Copyright Liam Goodacre, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
72- [@bsermons](https://github.com/bsermons) (Brian Sermons) My existing contributions and all future contributions until further notice are Copyright Brian Sermons, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
73- [@bsermons](https://github.com/bsermons) (Brian Sermons) My existing contributions and all future contributions until further notice are Copyright Brian Sermons, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
74+- [@bmjames](https://github.com/bmjames) (Ben James) My existing contributions and all future contributions until further notice are Copyright Ben James, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
73
75
74### Companies
76### Companies
75
77
core-tests/test-everything.sh+1−1
@@ -1,4 +1,4 @@
1−#!/bin/bash
1+#!/usr/bin/env bash
2
2
3set -e
3set -e
4
4
examples/failing/2128-class.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+class Foo a where
5+ foo :: a -> !!!
examples/failing/2128-instance.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+class Foo a where
5+ foo :: a
6+
7+instance fooInt :: Foo Int where
8+ foo = !!!
psc-ide-client/Main.hs+1−1
@@ -35,7 +35,7 @@ main = do
35client :: PortID -> IO ()
35client :: PortID -> IO ()
36client port = do
36client port = do
37 h <-
37 h <-
38− connectTo "localhost" port `catch`
38+ connectTo "127.0.0.1" port `catch`
39 (\(SomeException e) ->
39 (\(SomeException e) ->
40 putStrLn
40 putStrLn
41 ("Couldn't connect to psc-ide-server on port: " ++
41 ("Couldn't connect to psc-ide-server on port: " ++
psc-ide-server/Main.hs+5−3
@@ -40,10 +40,10 @@ import Language.PureScript.Ide.Util
40import Language.PureScript.Ide.Error
40import Language.PureScript.Ide.Error
41import Language.PureScript.Ide.Types
41import Language.PureScript.Ide.Types
42import Language.PureScript.Ide.Watcher
42import Language.PureScript.Ide.Watcher
43−import Network hiding (socketPort)
43+import Network hiding (socketPort, accept)
44import Network.BSD (getProtocolNumber)
44import Network.BSD (getProtocolNumber)
45import Network.Socket hiding (PortNumber, Type,
45import Network.Socket hiding (PortNumber, Type,
46− accept, sClose)
46+ sClose)
47import Options.Applicative
47import Options.Applicative
48import System.Directory
48import System.Directory
49import System.FilePath
49import System.FilePath
@@ -167,7 +167,9 @@ acceptCommand sock = do
167 pure (cmd, h)
167 pure (cmd, h)
168 where
168 where
169 acceptConnection = liftIO $ do
169 acceptConnection = liftIO $ do
170+ -- Use low level accept to prevent accidental reverse name resolution
170− (h,_,_) <- accept sock
171+ (s,_) <- accept sock
172+ h <- socketToHandle s ReadWriteMode
171 hSetEncoding h utf8
173 hSetEncoding h utf8
172 hSetBuffering h LineBuffering
174 hSetBuffering h LineBuffering
173 pure h
175 pure h
src/Language/PureScript/Parser/Declarations.hs+2−2
@@ -182,7 +182,7 @@ parseTypeClassDeclaration = do
182 return implies
182 return implies
183 className <- indented *> properName
183 className <- indented *> properName
184 idents <- P.many (indented *> kindedIdent)
184 idents <- P.many (indented *> kindedIdent)
185− members <- P.option [] . P.try $ do
185+ members <- P.option [] $ do
186 indented *> reserved "where"
186 indented *> reserved "where"
187 indented *> mark (P.many (same *> positioned parseTypeDeclaration))
187 indented *> mark (P.many (same *> positioned parseTypeDeclaration))
188 return $ TypeClassDeclaration className idents implies members
188 return $ TypeClassDeclaration className idents implies members
@@ -206,7 +206,7 @@ parseInstanceDeclaration = do
206parseTypeInstanceDeclaration :: TokenParser Declaration
206parseTypeInstanceDeclaration :: TokenParser Declaration
207parseTypeInstanceDeclaration = do
207parseTypeInstanceDeclaration = do
208 instanceDecl <- parseInstanceDeclaration
208 instanceDecl <- parseInstanceDeclaration
209− members <- P.option [] . P.try $ do
209+ members <- P.option [] $ do
210 indented *> reserved "where"
210 indented *> reserved "where"
211 mark (P.many (same *> positioned parseValueDeclaration))
211 mark (P.many (same *> positioned parseValueDeclaration))
212 return $ instanceDecl (ExplicitInstance members)
212 return $ instanceDecl (ExplicitInstance members)