git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix #1072
e350feaPhil Freeman
examples/failing/EmptyClass.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+class Foo x where
5+
6+bar :: String
7+bar = "hello"
examples/passing/NakedConstraint.purs+1−1
@@ -2,7 +2,7 @@ module Main where
2
2
3import Control.Monad.Eff.Console
3import Control.Monad.Eff.Console
4
4
5−class Partial where
5+class Partial
6
6
7data List a = Nil | Cons a (List a)
7data List a = Nil | Cons a (List a)
8
8
src/Language/PureScript/Parser/Declarations.hs+1−1
@@ -201,7 +201,7 @@ parseTypeClassDeclaration = do
201 idents <- P.many (indented *> kindedIdent)
201 idents <- P.many (indented *> kindedIdent)
202 members <- P.option [] . P.try $ do
202 members <- P.option [] . P.try $ do
203 indented *> reserved "where"
203 indented *> reserved "where"
204− mark (P.many (same *> positioned parseTypeDeclaration))
204+ indented *> mark (P.many (same *> positioned parseTypeDeclaration))
205 return $ TypeClassDeclaration className idents implies members
205 return $ TypeClassDeclaration className idents implies members
206
206
207parseInstanceDeclaration :: TokenParser (TypeInstanceBody -> Declaration)
207parseInstanceDeclaration :: TokenParser (TypeInstanceBody -> Declaration)