Merge pull request #322 from Sheeo/type-incomplete-matches

Incomplete matches in Type.hs
This commit is contained in:
Evan Czaplicki 2013-11-11 06:35:10 -08:00
commit d6a3a18704

View file

@ -370,13 +370,11 @@ toSrcType variable = do
case name desc of case name desc of
Just x@(c:cs) | Char.isLower c -> return (Src.Var x) Just x@(c:cs) | Char.isLower c -> return (Src.Var x)
| otherwise -> return (Src.Data x []) | otherwise -> return (Src.Data x [])
Nothing -> _ -> error $ concat
error $ concat
[ "Problem converting the following type " [ "Problem converting the following type "
, "from a type-checker type to a source-syntax type:" , "from a type-checker type to a source-syntax type:"
, P.render (pretty Never variable) ] , P.render (pretty Never variable) ]
data AppStructure = List Variable | Tuple [Variable] | Other data AppStructure = List Variable | Tuple [Variable] | Other
collectApps :: Variable -> IO AppStructure collectApps :: Variable -> IO AppStructure