Advertisement
Guest User

Untitled

a guest
Jun 4th, 2022
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {-# LANGUAGE ExistentialQuantification #-}
  2. {-# LANGUAGE RankNTypes #-}
  3.  
  4. type RelayHandler = forall i . Typeable i => (i -> SubscriptionId -> Event -> i)
  5.  
  6. data RelayPool = RelayPool [Relay] (Map SubscriptionId RelayHandler)
  7.  
  8. {-
  9.     • Illegal polymorphic type:
  10.         forall i. Typeable i => i -> SubscriptionId -> Event -> i
  11.       GHC doesn't yet support impredicative polymorphism
  12.     • In the expansion of type synonym ‘RelayHandler’
  13.       In the definition of data constructor ‘RelayPool’
  14.       In the data type declaration for ‘RelayPool’
  15. -}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement