on master help sign in
Fix #1236, do not allow (,,) in types
commit4affd70744bdb2a22bbef2b0e3f5d91cdd88e29e authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 24 Nov 2016, 13:13 (10 years ago) parent98db71d
1 file changed+1−7
src/Parse/Type.hs+1−7
src/Parse/Type.hs+1−7
@@ -70,18 +70,12 @@ term =
7070app :: IParser Type.Raw
7171app =
7272 do start <- getMyPosition
73− f <- constructor0 <|> try tupleCtor <?> "a type constructor"
73+ f <- constructor0 <?> "a type constructor"
7474 args <- spacePrefix term
7575 end <- getMyPosition
7676 case args of
7777 [] -> return f
7878 _ -> return (A.A (R.Region start end) (Type.RApp f args))
79− where
80− tupleCtor =
81− addLocation $
82− do n <- length <$> parens (many (char ','))
83− let ctor = "_Tuple" ++ show (if n == 0 then 0 else n+1)
84− return (Type.RType (Var.Raw ctor))
8579
8680
8781expr :: IParser Type.Raw