@@ -40,10 +40,11 @@ record =
4040 whitespace >> hasType >> whitespace
4141 (,) lbl <$> expr
4242
43+capTypeVar = intercalate "." <$> dotSep1 capVar
4344
4445constructor0 :: IParser T.Type
4546constructor0 =
46− do name <- capVar
47+ do name <- capTypeVar
4748 return (T.Data name [])
4849
4950term :: IParser T.Type
@@ -51,7 +52,7 @@ term = list <|> tuple <|> record <|> tvar <|> constructor0
5152
5253app :: IParser T.Type
5354app =
54− do name <- capVar <|> try tupleCtor <?> "type constructor"
55+ do name <- capTypeVar <|> try tupleCtor <?> "type constructor"
5556 args <- spacePrefix term
5657 return (T.Data name args)
5758 where
@@ -70,7 +71,7 @@ expr =
7071 Nothing -> return t1
7172
7273constructor :: IParser (String, [T.Type])
73−constructor = (,) <$> (capVar <?> "another type constructor")
74+constructor = (,) <$> (capTypeVar <?> "another type constructor")
7475 <*> spacePrefix term
7576
7677readType :: String -> Type