Also catch Just [] as an error
Motivation here is that if we can't even extract a name and description, it's
an error.
commitfdea1470f6d90efd96cf0ff2a28540d6550ade20
authorMichael Sondergaard <msond@cs.au.dk>
dateMon 4 Nov 2013, 20:57 (13 years ago)
parentb3d5357
compiler/Type/Type.hs+1−3
@@ -370,13 +370,11 @@ toSrcType variable = do
370370 case name desc of
371371 Just x@(c:cs) | Char.isLower c -> return (Src.Var x)
372372 | otherwise -> return (Src.Data x [])
373− Nothing ->
374− error $ concat
373+ _ -> error $ concat
375374 [ "Problem converting the following type "
376375 , "from a type-checker type to a source-syntax type:"
377376 , P.render (pretty Never variable) ]
378377
379−
380378data AppStructure = List Variable | Tuple [Variable] | Other
381379
382380collectApps :: Variable -> IO AppStructure