packages feed

language-ats 0.3.0.2 → 0.3.0.4

raw patch · 4 files changed

+22/−16 lines, 4 filesdep −unordered-containersdep ~composition-preludePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: unordered-containers

Dependency ranges changed: composition-prelude

API changes (from Hackage documentation)

- Language.ATS: [$sel:expression:PreF] :: PreFunction -> Maybe Expression
+ Language.ATS: [$sel:_expression:PreF] :: PreFunction -> Maybe Expression
+ Language.ATS: [$sel:_fun:Func] :: Declaration -> Function
+ Language.ATS: [$sel:_preF:Fun] :: Function -> PreFunction
+ Language.ATS: [$sel:pos:Func] :: Declaration -> AlexPosn
+ Language.ATS: expression :: Lens' PreFunction (Maybe Expression)
+ Language.ATS: fun :: Traversal' Declaration Function
+ Language.ATS: preF :: Lens' Function PreFunction

Files

language-ats.cabal view
@@ -1,5 +1,5 @@ name:                language-ats-version:             0.3.0.2+version:             0.3.0.4 synopsis:            Parser and pretty-printer for ATS. description:         Parser and pretty-printer for [ATS](http://www.ats-lang.org/), written with Happy and Alex. license:             BSD3@@ -33,11 +33,9 @@                      , lens                      , deepseq                      , ansi-wl-pprint >= 0.6.8-                     , composition-prelude >= 0.1.1.2                      , recursion-schemes-                     , ansi-terminal-                     , unordered-containers                      , composition-prelude+                     , ansi-terminal   default-language:    Haskell2010   build-tools:         happy                      , alex
src/Language/ATS.hs view
@@ -41,6 +41,9 @@                     -- * Error types                     , ATSError                     -- * Lenses+                    , preF+                    , expression+                    , fun                     , leaves                     , constructorUniversals                     , typeCall
src/Language/ATS/Lexer.x view
@@ -20,7 +20,7 @@                               , get_staload                               ) where -import Control.Composition+import Data.Bool (bool) import Data.Data (Typeable, Data) import Control.DeepSeq (NFData) import GHC.Generics (Generic)
src/Language/ATS/Types.hs view
@@ -49,6 +49,9 @@     , rewriteATS     , rewriteDecl     -- * Lenses+    , preF+    , expression+    , fun     , leaves     , constructorUniversals     , typeCall@@ -56,9 +59,9 @@     , comment     ) where -import           Control.Composition import           Control.DeepSeq          (NFData) import           Control.Lens+import           Data.Function            (on) import           Data.Functor.Foldable    (ListF (Cons), ana, cata, embed, project) import           Data.Functor.Foldable.TH (makeBaseFunctor) import           Data.Maybe               (isJust)@@ -86,7 +89,7 @@ type SortArgs = Maybe [SortArg]  -- | Declare something in a scope (a function, value, action, etc.)-data Declaration = Func AlexPosn Function+data Declaration = Func { pos :: AlexPosn, _fun :: Function }                  | Impl [Arg] Implementation -- TODO do something better for implicit universals                  | ProofImpl [Arg] Implementation                  | Val Addendum (Maybe Type) Pattern Expression@@ -329,14 +332,14 @@  -- | A function declaration accounting for all keywords ATS uses to -- define them.-data Function = Fun PreFunction-              | Fn PreFunction-              | Fnx PreFunction-              | And PreFunction-              | PrFun PreFunction-              | PrFn PreFunction-              | Praxi PreFunction-              | CastFn PreFunction+data Function = Fun { _preF :: PreFunction }+              | Fn { _preF :: PreFunction }+              | Fnx { _preF :: PreFunction }+              | And { _preF :: PreFunction }+              | PrFun { _preF :: PreFunction }+              | PrFn { _preF :: PreFunction }+              | Praxi { _preF :: PreFunction }+              | CastFn { _preF :: PreFunction }               deriving (Show, Eq, Generic, NFData)  data StackFunction = StackF { stSig        :: String@@ -353,7 +356,7 @@                         , args          :: [Arg] -- ^ Actual function arguments                         , returnType    :: Maybe Type -- ^ Return type                         , termetric     :: Maybe StaticExpression -- ^ Optional termination metric-                        , expression    :: Maybe Expression -- ^ Expression holding the actual function body (not present in static templates)+                        , _expression   :: Maybe Expression -- ^ Expression holding the actual function body (not present in static templates)                         }                         deriving (Show, Eq, Generic, NFData) @@ -363,6 +366,8 @@ makeBaseFunctor ''Type makeLenses ''Leaf makeLenses ''Declaration+makeLenses ''PreFunction+makeLenses ''Function makeLenses ''Type  rewriteDecl :: Declaration -> Declaration