giml-language- A purely functional programming language with emphasis on structural typing
Safe HaskellSafe-Inferred



Check for duplicate names

We want to make sure the user does not write the same argument name twice in a give anonymous function, function definition, type definition, and variants names.

We also do not want the same name in pattern captures. (This is not datalog/prolog yet!)



rewrite :: MonadError PreInferError m => ParsedFile Ann -> m (ParsedFile Ann) Source #

Check for duplicate names in a File.

rewrite' :: forall f m. MonadError PreInferError m => Data (f Ann) => f Ann -> m (f Ann) Source #

duplicates :: Ord b => (a -> b) -> [a] -> [[a]] Source #

groupOn :: Eq b => (a -> b) -> [a] -> [[a]] Source #