packages feed

hobbits 1.3 → 1.3.1

raw patch · 5 files changed

+13/−13 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Binding.Hobbits.Closed: instance forall k k1 (ctx :: Data.Type.RList.RList k1). Data.Binding.Hobbits.Closed.ClosableAny1 (Data.Type.RList.Member ctx)
- Data.Binding.Hobbits.Closed: instance forall k2 k1 (ctx :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.Closed.Closable (Data.Type.RList.Member ctx a)
- Data.Binding.Hobbits.Liftable: instance forall k2 k1 (c :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.Liftable.Liftable (Data.Type.RList.Member c a)
- Data.Binding.Hobbits.NuMatchingInstances: instance forall k2 k1 (ctx :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.NuMatching.NuMatching (Data.Type.RList.Member ctx a)
- Data.Type.RList: instance forall k k1 (ctx :: Data.Type.RList.RList k1). Data.Type.Equality.TestEquality (Data.Type.RList.Member ctx)
- Data.Type.RList: instance forall k2 k1 (ctx :: Data.Type.RList.RList k1) (a :: k2). GHC.Classes.Eq (Data.Type.RList.Member ctx a)
- Data.Type.RList: instance forall k2 k1 (r :: Data.Type.RList.RList k1) (a :: k2). GHC.Show.Show (Data.Type.RList.Member r a)
+ Data.Binding.Hobbits.Closed: instance forall k1 k (ctx :: Data.Type.RList.RList k1). Data.Binding.Hobbits.Closed.ClosableAny1 (Data.Type.RList.Member ctx)
+ Data.Binding.Hobbits.Closed: instance forall k1 k2 (ctx :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.Closed.Closable (Data.Type.RList.Member ctx a)
+ Data.Binding.Hobbits.Liftable: instance forall k1 k2 (c :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.Liftable.Liftable (Data.Type.RList.Member c a)
+ Data.Binding.Hobbits.NuMatchingInstances: instance forall k1 k2 (ctx :: Data.Type.RList.RList k1) (a :: k2). Data.Binding.Hobbits.NuMatching.NuMatching (Data.Type.RList.Member ctx a)
+ Data.Type.RList: instance forall k1 k (ctx :: Data.Type.RList.RList k1). Data.Type.Equality.TestEquality (Data.Type.RList.Member ctx)
+ Data.Type.RList: instance forall k1 k2 (ctx :: Data.Type.RList.RList k1) (a :: k2). GHC.Classes.Eq (Data.Type.RList.Member ctx a)
+ Data.Type.RList: instance forall k1 k2 (r :: Data.Type.RList.RList k1) (a :: k2). GHC.Show.Show (Data.Type.RList.Member r a)
- Data.Binding.Hobbits.Mb: hcmpName :: forall (a :: k1) (b :: k2). Name a -> Name b -> Maybe (a :~~: b)
+ Data.Binding.Hobbits.Mb: hcmpName :: forall k1 k2 (a :: k1) (b :: k2). Name a -> Name b -> Maybe (a :~~: b)
- Data.Binding.Hobbits.Mb: mbCmpName :: forall (a :: k1) (b :: k1) (c :: RList k2). Mb c (Name a) -> Mb c (Name b) -> Maybe (a :~: b)
+ Data.Binding.Hobbits.Mb: mbCmpName :: forall k1 k2 (a :: k1) (b :: k1) (c :: RList k2). Mb c (Name a) -> Mb c (Name b) -> Maybe (a :~: b)
- Data.Binding.Hobbits.Mb: mbCombine :: forall (c1 :: RList k) (c2 :: RList k) a b. Mb c1 (Mb c2 b) -> Mb (c1 :++: c2) b
+ Data.Binding.Hobbits.Mb: mbCombine :: forall k (c1 :: RList k) (c2 :: RList k) a b. Mb c1 (Mb c2 b) -> Mb (c1 :++: c2) b
- Data.Binding.Hobbits.Mb: mbNameBoundP :: forall (a :: k1) (ctx :: RList k2). Mb ctx (Name a) -> Either (Member ctx a) (Name a)
+ Data.Binding.Hobbits.Mb: mbNameBoundP :: forall k1 k2 (a :: k1) (ctx :: RList k2). Mb ctx (Name a) -> Either (Member ctx a) (Name a)
- Data.Binding.Hobbits.Mb: mbSeparate :: forall (ctx1 :: RList k) (ctx2 :: RList k) (any :: k -> *) a. RAssign any ctx2 -> Mb (ctx1 :++: ctx2) a -> Mb ctx1 (Mb ctx2 a)
+ Data.Binding.Hobbits.Mb: mbSeparate :: forall k (ctx1 :: RList k) (ctx2 :: RList k) (any :: k -> *) a. RAssign any ctx2 -> Mb (ctx1 :++: ctx2) a -> Mb ctx1 (Mb ctx2 a)
- Data.Binding.Hobbits.Mb: mbToProxy :: forall (ctx :: RList k) (a :: *). Mb ctx a -> RAssign Proxy ctx
+ Data.Binding.Hobbits.Mb: mbToProxy :: forall k (ctx :: RList k) (a :: *). Mb ctx a -> RAssign Proxy ctx
- Data.Binding.Hobbits.Mb: nu :: forall (a :: k1) (b :: *). (Name a -> b) -> Binding a b
+ Data.Binding.Hobbits.Mb: nu :: forall k1 (a :: k1) (b :: *). (Name a -> b) -> Binding a b
- Data.Binding.Hobbits.Mb: nus :: () => RAssign f ctx -> (RAssign (Name :: k -> Type) ctx -> b) -> Mb ctx b
+ Data.Binding.Hobbits.Mb: nus :: forall k (f :: k -> Type) (ctx :: RList k) b. RAssign f ctx -> (RAssign (Name :: k -> Type) ctx -> b) -> Mb ctx b
- Data.Type.RList: [HApply] :: forall (f :: k -> Type) (a :: k). f a -> HApply f a
+ Data.Type.RList: [HApply] :: forall k (f :: k -> Type) (a :: k). f a -> HApply f a
- Data.Type.RList: hget :: forall (f :: k1 -> Type) (c :: RList k1) (a :: k2). Member c a -> RAssign f c -> HApply f a
+ Data.Type.RList: hget :: forall k1 k2 (f :: k1 -> Type) (c :: RList k1) (a :: k2). Member c a -> RAssign f c -> HApply f a

Files

hobbits.cabal view
@@ -1,5 +1,5 @@ Name:                hobbits-Version:             1.3+Version:             1.3.1 Synopsis:            A library for canonically representing terms with binding  Description: A library for canonically representing terms with binding via a
src/Data/Binding/Hobbits/Internal/Name.hs view
@@ -65,7 +65,7 @@   testEquality = cmpName  -- | Heterogeneous comparison of names, that could be at different kinds-hcmpName :: forall (a :: k1) (b :: k2). Name a -> Name b -> Maybe (a :~~: b)+hcmpName :: forall k1 k2 (a :: k1) (b :: k2). Name a -> Name b -> Maybe (a :~~: b) hcmpName (MkName n1) (MkName n2)   | n1 == n2 = Just $ unsafeCoerce HRefl   | otherwise = Nothing@@ -79,14 +79,14 @@   MkName $ IntMap.findWithDefault i i nmap  -- | Build a 'NameRefresher' that maps one sequence of names to another-mkRefresher :: forall (ctx :: RList k) .+mkRefresher :: forall k (ctx :: RList k) .                RAssign Name ctx -> RAssign Name ctx -> NameRefresher mkRefresher ns1 ns2 =   NameRefresher $ IntMap.fromList $ toList $   map2 (\(MkName i) (MkName j) -> Constant (i,j)) ns1 ns2  -- | Extend a 'NameRefresher' with one more name mapping-extRefresher :: forall (a :: k). NameRefresher -> Name a -> Name a ->+extRefresher :: forall k (a :: k). NameRefresher -> Name a -> Name a ->                 NameRefresher extRefresher (NameRefresher nmap) (MkName n1) (MkName n2) =   NameRefresher $
src/Data/Binding/Hobbits/Mb.hs view
@@ -62,7 +62,7 @@   @nu f@ creates a binding which binds a fresh name @n@ and whose   body is the result of @f n@. -}-nu :: forall (a :: k1) (b :: *) . (Name a -> b) -> Binding a b+nu :: forall k1 (a :: k1) (b :: *) . (Name a -> b) -> Binding a b nu f = MkMbFun (MNil :>: Proxy) (\(MNil :>: n) -> f n)  {-|@@ -103,7 +103,7 @@ > nu $ \n -> mbNameBoundP (nu $ \m -> m)  ==  nu $ \n -> Left Member_Base > nu $ \n -> mbNameBoundP (nu $ \m -> n)  ==  nu $ \n -> Right n -}-mbNameBoundP :: forall (a :: k1) (ctx :: RList k2).+mbNameBoundP :: forall k1 k2 (a :: k1) (ctx :: RList k2).                 Mb ctx (Name a) -> Either (Member ctx a) (Name a) mbNameBoundP (ensureFreshPair -> (names, n)) = helper names n where     helper :: RAssign Name c -> Name a -> Either (Member c a) (Name a)@@ -131,7 +131,7 @@   @Some Refl@ is returned when the names are equal and @Nothing@ is   returned when they are not. -}-mbCmpName :: forall (a :: k1) (b :: k1) (c :: RList k2).+mbCmpName :: forall k1 k2 (a :: k1) (b :: k1) (c :: RList k2).              Mb c (Name a) -> Mb c (Name b) -> Maybe (a :~: b) mbCmpName (ensureFreshPair -> (names, n1)) (ensureFreshFun -> (_, f2)) =   cmpName n1 (f2 names)@@ -164,7 +164,7 @@  -- README: inner-most bindings come FIRST -- | Combines a binding inside another binding into a single binding.-mbCombine :: forall (c1 :: RList k) (c2 :: RList k) a b.+mbCombine :: forall k (c1 :: RList k) (c2 :: RList k) a b.              Mb c1 (Mb c2 b) -> Mb (c1 :++: c2) b mbCombine (MkMbPair tRepr1 l1 (MkMbPair tRepr2 l2 b)) =   MkMbPair tRepr2 (append l1 l2) b@@ -187,7 +187,7 @@   type @'RAssign' any c2@, is a \"phantom\" argument to indicate how   the context @c@ should be split. -}-mbSeparate :: forall (ctx1 :: RList k) (ctx2 :: RList k) (any :: k -> *) a.+mbSeparate :: forall k (ctx1 :: RList k) (ctx2 :: RList k) (any :: k -> *) a.               RAssign any ctx2 -> Mb (ctx1 :++: ctx2) a ->               Mb ctx1 (Mb ctx2 a) mbSeparate c2 (MkMbPair tRepr ns a) =@@ -200,7 +200,7 @@   -- | Returns a proxy object that enumerates all the types in ctx.-mbToProxy :: forall (ctx :: RList k) (a :: *) .+mbToProxy :: forall k (ctx :: RList k) (a :: *) .              Mb ctx a -> RAssign Proxy ctx mbToProxy (MkMbFun proxies _) = proxies mbToProxy (MkMbPair _ ns _) = mapRAssign (\_ -> Proxy) ns
src/Data/Binding/Hobbits/QQ.hs view
@@ -82,7 +82,7 @@            _topXform = \b -> topXformO b . topXformI b}  -- | Apply a 'WrapKit' to a pattern-wrapVars :: Monad m => WrapKit -> Pat -> m Pat+wrapVars :: MonadFail m => WrapKit -> Pat -> m Pat wrapVars (WrapKit {_varView = varView, _asXform = asXform, _topXform = topXform}) pat = do   (pat', Any usedVarView) <- runWriterT m   return $ topXform usedVarView pat'
src/Data/Type/RList.hs view
@@ -142,11 +142,11 @@ -- | Heterogeneous type application, including a proof that the input kind of -- the function equals the kind of the type argument data HApply (f :: k1 -> Type) (a :: k2) where-  HApply :: forall (f :: k -> Type) (a :: k). f a -> HApply f a+  HApply :: forall k (f :: k -> Type) (a :: k). f a -> HApply f a  -- | Look up an element of an 'RAssign' vector using a 'Member' proof at what -- GHC thinks might be a different kind, i.e., heterogeneously-hget :: forall (f :: k1 -> Type) (c :: RList k1) (a :: k2).+hget :: forall k1 k2 (f :: k1 -> Type) (c :: RList k1) (a :: k2).         Member c a -> RAssign f c -> HApply f a hget Member_Base (_ :>: x) = HApply x hget (Member_Step mem') (mc :>: _) = hget mem' mc