Skip to content

Commit

Permalink
ormolu
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Jul 14, 2023
1 parent c5a312b commit a9fd159
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Juvix/Compiler/Concrete/Data/NameSignature/Error.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Juvix.Compiler.Concrete.Data.NameSignature.Error where

import Juvix.Compiler.Concrete.Language
import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty
import Juvix.Compiler.Concrete.Pretty.Options (fromGenericOptions)
import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty
import Juvix.Prelude

newtype NameSignatureError = ErrDuplicateName DuplicateName
Expand All @@ -21,11 +21,11 @@ data DuplicateName = DuplicateName
instance ToGenericError DuplicateName where
genericError DuplicateName {..} = do
opts <- fromGenericOptions <$> ask
let
_genericErrorLoc = getLoc _dupNameSecond
_genericErrorMessage :: AnsiText
_genericErrorMessage = prettyError $
"The symbol" <+> ppCode opts _dupNameFirst <+> "cannot be repeated"
_genericErrorIntervals = map getLoc [_dupNameFirst, _dupNameSecond]
let _genericErrorLoc = getLoc _dupNameSecond
_genericErrorMessage :: AnsiText
_genericErrorMessage =
prettyError $
"The symbol" <+> ppCode opts _dupNameFirst <+> "cannot be repeated"
_genericErrorIntervals = map getLoc [_dupNameFirst, _dupNameSecond]

return GenericError {..}

0 comments on commit a9fd159

Please sign in to comment.