obsidiansystems / haveibeenpwned

Haskell library that uses HIBP to evaluate passwords
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

Fails to compile (Variable not in scope, Illegal term-level use, etc). #8

Open danwdart opened 1 year ago

danwdart commented 1 year ago
[1 of 1] Compiling HaveIBeenPwned   ( src/HaveIBeenPwned.hs, dist/build/HaveIBeenPwned.o, dist/build/HaveIBeenPwned.dyn_o )

src/HaveIBeenPwned.hs:87:35: error:
    Variable not in scope: (@) :: m0 () -> t0 -> e0 -> PwnedT m a0
   |
87 |       $(logError) $ T.pack $ show @ HttpException $ err
   |                                   ^

src/HaveIBeenPwned.hs:87:37: error:
    • Illegal term-level use of the type constructor or class ‘HttpException’
    • imported from ‘Network.HTTP.Client’ at src/HaveIBeenPwned.hs:27:1-26
      (and originally defined in ‘http-client-0.7.13.1:Network.HTTP.Client.Types’)
    • Perhaps use one of these:
        variable ‘toException’ (imported from Control.Exception),
        variable ‘mapException’ (imported from Control.Exception)
    • In the second argument of ‘(@)’, namely ‘HttpException’
      In the first argument of ‘($)’, namely
        ‘((((monadLoggerLog
               (((((Loc "src/HaveIBeenPwned.hs")
                     "haveibeenpwned-0.2.0.1-KY6s7kCuHXzga6rIKu37m")
                    "HaveIBeenPwned")
                   (87, 8))
                  (87, 18)))
              (T.pack ""))
             LevelError
             . (id :: Text -> Text)))
           $ T.pack $ show
           @ HttpException’
      In a stmt of a 'do' block:
        ((((monadLoggerLog
              (((((Loc "src/HaveIBeenPwned.hs")
                    "haveibeenpwned-0.2.0.1-KY6s7kCuHXzga6rIKu37m")
                   "HaveIBeenPwned")
                  (87, 8))
                 (87, 18)))
             (T.pack ""))
            LevelError
            . (id :: Text -> Text)))
          $ T.pack $ show
          @ HttpException
          $ err
   |
87 |       $(logError) $ T.pack $ show @ HttpException $ err
   |                                     ^^^^^^^^^^^^^

using ghc 9.4