on master help sign in
Add a role annotation for the ‘Url’ data type
commit2b41b47212c19486125c1d48a1b68ad82bea4d5d authorMark Karpov <markkarpov92@gmail.com> dateMon 25 May 2020, 20:27 (6 years ago) parent2fbbd32
1 file changed+3−1
Network/HTTP/Req.hs+3−1
Network/HTTP/Req.hs+3−1
@@ -6,13 +6,13 @@
66{-# LANGUAGE DeriveLift #-}
77{-# LANGUAGE FlexibleInstances #-}
88{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−{-# LANGUAGE KindSignatures #-}
109{-# LANGUAGE LambdaCase #-}
1110{-# LANGUAGE MultiParamTypeClasses #-}
1211{-# LANGUAGE OverloadedStrings #-}
1312{-# LANGUAGE QuasiQuotes #-}
1413{-# LANGUAGE RankNTypes #-}
1514{-# LANGUAGE RecordWildCards #-}
15+{-# LANGUAGE RoleAnnotations #-}
1616{-# LANGUAGE ScopedTypeVariables #-}
1717{-# LANGUAGE TemplateHaskellQuotes #-}
1818{-# LANGUAGE TypeFamilies #-}
@@ -870,6 +870,8 @@ data Url (scheme :: Scheme) = Url Scheme (NonEmpty Text)
870870 -- NOTE The second value is the path segments in reversed order.
871871 deriving (Eq, Ord, Show, Data, Typeable, Generic)
872872
873+type role Url nominal
874+
873875-- With template-haskell >=2.15 and text >=1.2.4 Lift can be derived, however
874876-- the derived lift forgets the type of scheme.
875877instance Typeable scheme => TH.Lift (Url scheme) where