@@ -101,7 +101,7 @@ toDecls [ValueDeclaration ident nameKind bs (Right val)] | all isVarBinder bs =
101101 isVarBinder (VarBinder _) = True
102102 isVarBinder (PositionedBinder _ _ b) = isVarBinder b
103103 isVarBinder _ = False
104−
104+
105105 fromVarBinder :: Binder -> m Ident
106106 fromVarBinder NullBinder = Ident <$> freshName
107107 fromVarBinder (VarBinder name) = return name
@@ -129,17 +129,17 @@ makeCaseDeclaration :: forall m. (Functor m, Applicative m, MonadSupply m, Monad
129129makeCaseDeclaration ident alternatives = do
130130 let namedArgs = map findName . fst <$> alternatives
131131 argNames = map join $ foldl1 resolveNames namedArgs
132− args <- if allUnique (catMaybes argNames)
133− then mapM argName argNames
132+ args <- if allUnique (catMaybes argNames)
133+ then mapM argName argNames
134134 else replicateM (length argNames) (Ident <$> freshName)
135135 let vars = map (Var . Qualified Nothing) args
136136 binders = [ CaseAlternative bs result | (bs, result) <- alternatives ]
137137 value = foldr (Abs . Left) (Case vars binders) args
138− return $ ValueDeclaration ident Value [] (Right value)
138+ return $ ValueDeclaration ident Public [] (Right value)
139139 where
140140 -- We will construct a table of potential names.
141141 -- VarBinders will become Just (Just _) which is a potential name.
142− -- NullBinder will become Just Nothing, which indicates that we may
142+ -- NullBinder will become Just Nothing, which indicates that we may
143143 -- have to generate a name.
144144 -- Everything else becomes Nothing, which indicates that we definitely
145145 -- have to generate a name.
@@ -162,15 +162,15 @@ makeCaseDeclaration ident alternatives = do
162162
163163 -- Combine two lists of potential names from two case alternatives
164164 -- by zipping correspoding columns.
165− resolveNames :: [Maybe (Maybe Ident)] ->
166− [Maybe (Maybe Ident)] ->
165+ resolveNames :: [Maybe (Maybe Ident)] ->
166+ [Maybe (Maybe Ident)] ->
167167 [Maybe (Maybe Ident)]
168168 resolveNames = zipWith resolveName
169169
170170 -- Resolve a pair of names. VarBinder beats NullBinder, and everything
171171 -- else results in Nothing.
172− resolveName :: Maybe (Maybe Ident) ->
173− Maybe (Maybe Ident) ->
172+ resolveName :: Maybe (Maybe Ident) ->
173+ Maybe (Maybe Ident) ->
174174 Maybe (Maybe Ident)
175175 resolveName (Just (Just a)) (Just (Just b))
176176 | a == b = Just (Just a)