packages feed

syntactic 3.8.4 → 3.8.5

raw patch · 7 files changed

+24/−26 lines, 7 filesdep ~basedep ~constraintsdep ~containers

Dependency ranges changed: base, constraints, containers, deepseq

Files

src/Language/Syntactic/Functional.hs view
@@ -74,6 +74,7 @@ import Control.Monad.Reader import Control.Monad.State import Data.Dynamic+import Data.Kind (Type) import Data.List (genericIndex) import Data.Proxy import Data.Map (Map)@@ -697,7 +698,7 @@ -- to -- -- > m a -> m b -> m c-type family   DenotationM (m :: * -> *) sig+type family   DenotationM (m :: Type -> Type) sig type instance DenotationM m (Full a)    = m a type instance DenotationM m (a :-> sig) = m a -> DenotationM m sig @@ -786,4 +787,3 @@ -- (Note that there is no guarantee that the term is actually closed.) evalClosed :: EvalEnv sym RunEnv => ASTF sym a -> a evalClosed a = runReader (compile (Proxy :: Proxy RunEnv) a) []-
src/Language/Syntactic/Functional/Tuple/TH.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE TemplateHaskell #-} +{-# OPTIONS_GHC -Wno-x-partial #-}+ -- | Generate 'Syntactic' instances for tuples  module Language.Syntactic.Functional.Tuple.TH
src/Language/Syntactic/Interpretation.hs view
@@ -117,19 +117,13 @@  -- | Implementation of 'renderArgs' that handles infix operators renderArgsSmart :: Render sym => [String] -> sym a -> String-renderArgsSmart []   sym = renderSym sym-renderArgsSmart args sym-    | isInfix   = "(" ++ unwords [a,op,b] ++ ")"-    | otherwise = "(" ++ unwords (name : args) ++ ")"-  where-    name  = renderSym sym-    [a,b] = args-    op    = init $ tail name-    isInfix-      =  not (null name)-      && head name == '('-      && last name == ')'-      && length args == 2+renderArgsSmart [] sym = renderSym sym+renderArgsSmart [a, b] sym+    | '(' : name <- renderSym sym+    , last name == ')'+    , let op = init name+    = "(" ++ unwords [a, op, b] ++ ")"+renderArgsSmart args sym = "(" ++ unwords (renderSym sym : args) ++ ")"  -- | Render an 'AST' as concrete syntax render :: forall sym a. Render sym => ASTF sym a -> String
src/Language/Syntactic/Sugar.hs view
@@ -20,6 +20,7 @@   +import Data.Kind (Type) import Data.Typeable  import Language.Syntactic.Syntax@@ -30,7 +31,7 @@ -- as @a@. class Syntactic a   where-    type Domain a :: * -> *+    type Domain a :: Type -> Type     type Internal a     desugar :: a -> ASTF (Domain a) (Internal a)     sugar   :: ASTF (Domain a) (Internal a) -> a@@ -145,4 +146,3 @@        )     => sub sig -> f sugarSymTyped = sugarN . smartSymTyped-
src/Language/Syntactic/Syntax.hs view
@@ -60,6 +60,7 @@   import Control.DeepSeq (NFData (..))+import Data.Kind (Type) import Data.Typeable #if MIN_VERSION_GLASGOW_HASKELL(7,10,0,0) #else@@ -159,7 +160,7 @@ -- | Maps a symbol signature to the type of the corresponding smart constructor: -- -- > SmartFun sym (a :-> b :-> ... :-> Full x) = ASTF sym a -> ASTF sym b -> ... -> ASTF sym x-type family   SmartFun (sym :: * -> *) sig+type family   SmartFun (sym :: Type -> Type) sig type instance SmartFun sym (Full a)    = ASTF sym a type instance SmartFun sym (a :-> sig) = ASTF sym a -> SmartFun sym sig @@ -171,7 +172,7 @@ type instance SmartSig (ASTF sym a -> f) = a :-> SmartSig f  -- | Returns the symbol in the result of a smart constructor-type family   SmartSym f :: * -> *+type family   SmartSym f :: Type -> Type type instance SmartSym (AST sym sig) = sym type instance SmartSym (a -> f)      = SmartSym f @@ -313,7 +314,7 @@ -- lists (e.g. to avoid overlapping instances): -- -- > (A :+: B :+: Empty)-data Empty :: * -> *+data Empty :: Type -> Type   @@ -408,4 +409,3 @@ -- | Projection to a specific symbol type prjP :: Project sub sup => Proxy sub -> sup sig -> Maybe (sub sig) prjP _ = prj-
src/Language/Syntactic/TH.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} +{-# OPTIONS_GHC -Wno-x-partial #-}+ module Language.Syntactic.TH where  
syntactic.cabal view
@@ -1,5 +1,5 @@ Name:           syntactic-Version:        3.8.4+Version:        3.8.5 Synopsis:       Generic representation and manipulation of abstract syntax Description:    The library provides a generic representation of type-indexed abstract syntax trees                 (or indexed data types in general). It also permits the definition of open syntax@@ -83,11 +83,11 @@       Language.Syntactic.Sugar.TupleTyped    build-depends:-    base >= 4.6 && < 4.17,-    constraints < 0.14,-    containers < 0.7,+    base >= 4.6 && < 4.22,+    constraints < 0.15,+    containers < 0.9,     data-hash < 0.3,-    deepseq < 1.5,+    deepseq < 1.6,     mtl >= 2 && < 2.4,     syb < 0.8,     tree-view >= 0.5 && < 0.6