packages feed

abt 0.1.0.2.1 → 0.1.1.0

raw patch · 5 files changed

+31/−3 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Abt.Concrete.LocallyNameless: instance Typeable Tm
+ Abt.Concrete.LocallyNameless: instance Typeable Var
+ Abt.Types.Nat: instance Typeable 'S
+ Abt.Types.Nat: instance Typeable 'Z
+ Abt.Types.Nat: instance Typeable Nat
+ Abt.Types.View: instance Typeable View

Files

+ CHANGELOG.md view
@@ -0,0 +1,3 @@+### v0.1.1.0++- Added `Typeable` instances for the main types.
abt.cabal view
@@ -1,5 +1,5 @@ name:                abt-version:             0.1.0.2.1+version:             0.1.1.0 synopsis:            Abstract binding trees for Haskell description:         A Haskell port of the Carnegie Mellon ABT library (SML), with some improvements. license:             MIT@@ -9,6 +9,11 @@ category:            Language build-type:          Simple cabal-version:       >=1.10+extra-source-files:  CHANGELOG.md++source-repository head+  type:     git+  location: https://github.com/jonsterling/hs-abt.git  library   exposed-modules:     Abt.Class,
src/Abt/Concrete/LocallyNameless.hs view
@@ -1,9 +1,11 @@ {-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UnicodeSyntax #-}  module Abt.Concrete.LocallyNameless@@ -24,6 +26,7 @@  import Control.Applicative import Data.Profunctor+import Data.Typeable hiding (Refl) import Data.Vinyl  -- | A variable is a De Bruijn index, optionally decorated with a display name.@@ -31,7 +34,7 @@   = Var   { _varName ∷ !(Maybe String)   , _varIndex ∷ !Int-  }+  } deriving Typeable  instance Show Var where   show (Var (Just v) _) = v@@ -80,6 +83,8 @@   Bound ∷ Int → Tm0 o   Abs ∷ Tm o n → Tm o (S n)   App ∷ o ns → Rec (Tm o) ns → Tm0 o++deriving instance Typeable Tm  -- | First order terms (i.e. terms not headed by abstractions). --
src/Abt/Types/Nat.hs view
@@ -1,6 +1,16 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-}+ module Abt.Types.Nat where +import Data.Typeable+ data Nat   = Z   | S !Nat+  deriving Typeable++deriving instance Typeable Z+deriving instance Typeable S 
src/Abt/Types/View.hs view
@@ -1,8 +1,10 @@ {-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UnicodeSyntax #-}  module Abt.Types.View@@ -17,10 +19,11 @@  import Control.Applicative import Data.Profunctor+import Data.Typeable hiding (Refl) import Data.Vinyl  -- | @v@ is the type of variables; @o@ is the type of operators parameterized--- by arities; @n@ is the "higher type"/order of the term (i.e. a term has+-- by arities; @n@ is the "higher type"/valence of the term (i.e. a term has -- @n=0@, a single binding has @n=1@, etc.); @φ@ is the functor which -- interprets the inner structure of the view. --@@ -28,6 +31,8 @@   V ∷ v → View0 v o φ   (:\) ∷ v → φ n → View v o (S n) φ   (:$) ∷ o ns → Rec φ ns → View0 v o φ++deriving instance Typeable View  infixl 2 :$