Advertisement
Yurez23

Untitled

Apr 3rd, 2023
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. • Could not deduce (HasServer layout0)
  2.     arising from a type ambiguity check for
  3.     the type signature for ‘route’
  4.   from the context: HasServer layout
  5.     bound by the type signature for:
  6.                route :: forall layout.
  7.                         HasServer layout =>
  8.                         Server layout -> Request -> Maybe (IO String)
  9.     at C:\Users\Iurii\Documents\MEGA\Haskell\Bragilevsky\13\api\Api3.hs:(71,3)-(75,21)
  10.   The type variable ‘layout0’ is ambiguous
  11. • In the ambiguity check for ‘route’
  12.   To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
  13.   When checking the class method:
  14.     route :: forall layout.
  15.              HasServer layout =>
  16.              Server layout -> Request -> Maybe (IO String)
  17.   In the class declaration for ‘HasServer’typecheck(-Wdeferred-type-errors)
  18. • Couldn't match type: Server layout0
  19.                 with: Server layout
  20.  Expected: Server layout -> Request -> Maybe (IO String)
  21.    Actual: Server layout0 -> Request -> Maybe (IO String)
  22.  NB: ‘Server’ is a non-injective type family
  23.  The type variable ‘layout0’ is ambiguous
  24. • In the ambiguity check for ‘route’
  25.  To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
  26.  When checking the class method:
  27.    route :: forall layout.
  28.             HasServer layout =>
  29.             Server layout -> Request -> Maybe (IO String)
  30.  In the class declaration for ‘HasServer’typecheck(-Wdeferred-type-errors)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement