Merge pull request #1581 from purescript/1072
Fix #1072
commit61a97b585e16f95aea127206841db174142a1cd7
authorPhil Freeman <paf31@cantab.net>
dateWed 28 Oct 2015, 19:29 (11 years ago)
parent634790fe350fea
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
22
33import Control.Monad.Eff.Console
44
5−class Partial where
5+class Partial
66
77data List a = Nil | Cons a (List a)
88
src/Language/PureScript/Parser/Declarations.hs+1−1
@@ -201,7 +201,7 @@ parseTypeClassDeclaration = do
201201 idents <- P.many (indented *> kindedIdent)
202202 members <- P.option [] . P.try $ do
203203 indented *> reserved "where"
204− mark (P.many (same *> positioned parseTypeDeclaration))
204+ indented *> mark (P.many (same *> positioned parseTypeDeclaration))
205205 return $ TypeClassDeclaration className idents implies members
206206
207207parseInstanceDeclaration :: TokenParser (TypeInstanceBody -> Declaration)