@@ -107,16 +107,16 @@ resolveExports fullList (Var.Listing partialList open) =
107 case List.find (\(name, _ctors) -> name == alias) allAdts of
107 case List.find (\(name, _ctors) -> name == alias) allAdts of
108 Nothing -> notFound [alias]
108 Nothing -> notFound [alias]
109 Just (name, _ctor) ->
109 Just (name, _ctor) ->
110− return [Var.ADT name (Var.Listing [] False)]
110+ return [Var.Union name (Var.Listing [] False)]
112 getAdtExport (name, Var.Listing ctors open) =
112 getAdtExport (name, Var.Listing ctors open) =
113 case lookup name allAdts of
113 case lookup name allAdts of
114 Nothing -> notFound [name]
114 Nothing -> notFound [name]
115 Just (Var.Listing allCtors _)
115 Just (Var.Listing allCtors _)
116− | open -> return $ Var.ADT name (Var.Listing allCtors False)
116+ | open -> return $ Var.Union name (Var.Listing allCtors False)
117 | otherwise ->
117 | otherwise ->
118 case filter (`notElem` allCtors) ctors of
118 case filter (`notElem` allCtors) ctors of
119− [] -> return $ Var.ADT name (Var.Listing ctors False)
119+ [] -> return $ Var.Union name (Var.Listing ctors False)
120 unfoundCtors -> notFound unfoundCtors
120 unfoundCtors -> notFound unfoundCtors
122 notFound xs =
122 notFound xs =
@@ -141,7 +141,7 @@ splitValues mixedValues =
141 Var.Alias name ->
141 Var.Alias name ->
142 (values, name : aliases, adts)
142 (values, name : aliases, adts)
144− Var.ADT name listing ->
144+ Var.Union name listing ->
145 (values, aliases, (name, listing) : adts)
145 (values, aliases, (name, listing) : adts)
@@ -153,7 +153,7 @@ declToValue decl =
153 map Var.Value (P.boundVarList pattern)
153 map Var.Value (P.boundVarList pattern)
155 D.Datatype name _tvs ctors ->
155 D.Datatype name _tvs ctors ->
156− [ Var.ADT name (Var.Listing (map fst ctors) False) ]
156+ [ Var.Union name (Var.Listing (map fst ctors) False) ]
158 D.TypeAlias name _ tipe ->
158 D.TypeAlias name _ tipe ->
159 case tipe of
159 case tipe of