@@ -7,11 +7,7 @@ import Data.List (lookup,intercalate)
77import Text.Parsec
88import Text.Parsec.Indent
99
10−import SourceSyntax.Location as Located
11−--import SourceSyntax.PrettyPrint
1210import SourceSyntax.Type as T
13−--import qualified SourceSyntax.Expression as Expr
14−--import qualified SourceSyntax.Declaration as Decl
1511import Parse.Helpers
1612import Unique
1713
@@ -55,9 +51,13 @@ term = list <|> tuple <|> record <|> tvar <|> constructor0
5551
5652app :: IParser T.Type
5753app =
58− do name <- capVar <?> "type constructor"
54+ do name <- capVar <|> try tupleCtor <?> "type constructor"
5955 args <- spacePrefix term
6056 return (T.Data name args)
57+ where
58+ tupleCtor = do
59+ n <- length <$> parens (many (char ','))
60+ return $ "_Tuple" ++ show (if n == 0 then 0 else n+1)
6161
6262expr :: IParser T.Type
6363expr =