packages feed

language-ats 1.7.1.1 → 1.7.1.2

raw patch · 3 files changed

+38/−26 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # language-ats +## 1.7.1.2++  * Add `cross` flag to cabal file+ ## 1.7.1.1    * Bugfix in how `val`s were handled
language-ats.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: language-ats-version: 1.7.1.1+version: 1.7.1.2 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018-2019 Vanessa McHale@@ -27,6 +27,12 @@     type: darcs     location: https://hub.darcs.net/vmchale/ats +flag cross+    description:+        Set this flag if cross-compiling+    default: False+    manual: True+ flag development     description:         Enable `-Werror`@@ -36,7 +42,6 @@ library     exposed-modules:         Language.ATS-    build-tools: happy >=1.17.1, alex -any     hs-source-dirs: src     other-modules:         Language.ATS.Lexer@@ -61,6 +66,9 @@         composition-prelude >=2.0.4.0,         containers -any,         transformers -any++    if !flag(cross)+        build-tools: happy >=1.17.1, alex -any      if flag(development)         ghc-options: -Werror
src/Language/ATS/Types.hs view
@@ -66,15 +66,15 @@               | Pre { pos :: a, ifix :: Fix }               | Post { pos :: a, ifix :: Fix }               | Infix { pos :: a, ifix :: Fix }-              deriving (Eq, Generic, NFData)+              deriving (Show, Eq, Generic, NFData)  -- | An ATS file, containing a list of declarations newtype ATS a = ATS { unATS :: [Declaration a] }-    deriving (Eq, Generic)+    deriving (Show, Eq, Generic)     deriving newtype (NFData, Semigroup, Monoid)  data Leaf a = Leaf { _constructorUniversals :: [Universal a], name :: String, constructorArgs :: [StaticExpression a], maybeType :: Maybe (Type a) }-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  type SortArgs a = Maybe [SortArg a] type Args a = Maybe [Arg a]@@ -125,13 +125,13 @@                    | Exception String (Type a)                    | ExtVar a String (Expression a)                    | AbsImpl a (Name a) (SortArgs a) (Type a)-                   deriving (Eq, Generic, NFData)+                   deriving (Show, Eq, Generic, NFData)  data DataSortLeaf a = DataSortLeaf [Universal a] (Sort a) (Maybe (Sort a))-                    deriving (Eq, Generic, NFData)+                    deriving (Show, Eq, Generic, NFData)  data DataPropLeaf a = DataPropLeaf { propU :: [Universal a], _propExpr1 :: Expression a, _propExpr2 :: Maybe (Expression a) }-                    deriving (Eq, Generic, NFData)+                    deriving (Show, Eq, Generic, NFData)  -- | A type for parsed ATS types data Type a = Tuple a [Type a]@@ -156,7 +156,7 @@             | AnonymousRecord a (NonEmpty (String, Type a))             | WhereType a (Type a) String (SortArgs a) (Type a)             | AddrType a -- ^ @addr@-            deriving (Eq, Generic, NFData, Recursive)+            deriving (Show, Eq, Generic, NFData, Recursive)  data TypeF a x = TupleF a [x]                | BoxTupleF a (NonEmpty x)@@ -190,14 +190,14 @@                   | ProofArrow a -- | @=/=>@                   | ProofSpear a -- | @=/=>>@                   | Full a String-                  deriving (Eq, Generic, NFData)+                  deriving (Show, Eq, Generic, NFData)  data Name a = Unqualified String             | Qualified a String String -- ^ A name can be qualified e.g. @$UN.unsafefn@             | SpecialName a String -- ^ A name for builtin functions such as @$showtype@.             | Functorial String String             | FieldName a String String-            deriving (Eq, Generic, NFData)+            deriving (Show, Eq, Generic, NFData)  -- | A data type for patterns. data Pattern a = PName (Name a) [Pattern a]@@ -213,7 +213,7 @@                | ExistentialPattern (Existential a) (Pattern a)                | As a (Pattern a) (Pattern a)                | BinPattern a (BinOp a) (Pattern a) (Pattern a) -- ^ For use with e.g. @::@.-               deriving (Eq, Generic, NFData, Recursive)+               deriving (Show, Eq, Generic, NFData, Recursive)  data PatternF a x = PNameF (Name a) [x]                   | PSumF String x@@ -235,16 +235,16 @@ data Paired a b = Both a b                 | First a                 | Second b-                deriving (Eq, Generic, NFData)+                deriving (Show, Eq, Generic, NFData)  data SortArg a = SortArg String (Sort a)                | Anonymous (Sort a)-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  -- | An argument to a function. data Arg a = Arg (Paired String (Type a))            | PrfArg [Arg a] (Arg a)-           deriving (Eq, Generic, NFData)+           deriving (Show, Eq, Generic, NFData)  -- | A datatype for sorts. data Sort a = NamedSort { _sortName :: String }@@ -255,7 +255,7 @@             | View a Addendum -- ^ @view@             | TupleSort a (Sort a) (Sort a)             | ArrowSort a (Sort a) (Sort a)-            deriving (Eq, Generic, NFData, Recursive)+            deriving (Show, Eq, Generic, NFData, Recursive)  data SortF a x = NamedSortF String                | T0pF Addendum@@ -271,17 +271,17 @@  -- | Wrapper for universal quantifiers (refinement types) data Universal a = Universal { bound :: [String], typeU :: Maybe (Sort a), prop :: [StaticExpression a] }-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  -- | Wrapper for existential quantifiers/types data Existential a = Existential { boundE :: [String], isOpen :: Bool, typeE :: Maybe (Sort a), propE :: Maybe (StaticExpression a) }-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  -- | Unary operators data UnOp a = Negate -- | @~@             | Deref -- | @!@             | SpecialOp a String-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  -- | Binary operators on expressions data BinOp a = Add@@ -302,7 +302,7 @@              | At              | SpearOp -- ^ @->@              | SpecialInfix a String-             deriving (Eq, Generic, NFData)+             deriving (Show, Eq, Generic, NFData)  pattern Con :: a -> BinOp a pattern Con l = SpecialInfix l "::"@@ -325,7 +325,7 @@                         | ProofLinearLambda a (LambdaType a) (Pattern a) (StaticExpression a)                         | WhereStaExp (StaticExpression a) (ATS a)                         | SParens (StaticExpression a)-                        deriving (Eq, Generic, NFData, Recursive, Corecursive)+                        deriving (Show, Eq, Generic, NFData, Recursive, Corecursive)  data StaticExpressionF a x = StaticValF (Name a)                            | StaticBinaryF (BinOp a) x x@@ -409,7 +409,7 @@                   | ParenExpr a (Expression a)                   | CommentExpr String (Expression a)                   | MacroVar a String-                  deriving (Eq, Generic, NFData, Recursive, Corecursive)+                  deriving (Show, Eq, Generic, NFData, Recursive, Corecursive)  data ExpressionF a x = LetF a (ATS a) (Maybe x)                      | VoidLiteralF a@@ -469,7 +469,7 @@                                   , iArgs          :: Args a -- ^ Arguments                                   , _iExpression   :: Either (StaticExpression a) (Expression a) -- ^ Expression (or static expression) holding the function body.                                   }-    deriving (Eq, Generic, NFData)+    deriving (Show, Eq, Generic, NFData)  -- | A function declaration accounting for all keywords ATS uses to -- define them.@@ -481,7 +481,7 @@                 | PrFn { _preStaF :: PreFunction StaticExpression a }                 | Praxi { _preStaF :: PreFunction StaticExpression a }                 | CastFn { _preF :: PreFunction Expression a }-                deriving (Eq, Generic, NFData)+                deriving (Show, Eq, Generic, NFData)  -- | A type for stack-allocated functions. See -- [here](http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/c1267.html)@@ -491,7 +491,7 @@                               , stReturnType :: Type a                               , stExpression :: Expression a                               }-                              deriving (Eq, Generic, NFData)+                              deriving (Show, Eq, Generic, NFData)  data PreFunction ek a = PreF { fname         :: Name a -- ^ Function name                              , sig           :: Maybe String -- ^ e.g. <> or \<!wrt>@@ -502,7 +502,7 @@                              , termetric     :: Maybe (StaticExpression a) -- ^ Optional termination metric                              , _expression   :: Maybe (ek a) -- ^ Expression holding the actual function body (not present in static templates)                              }-                             deriving (Eq, Generic, NFData)+                             deriving (Show, Eq, Generic, NFData)  -- FIXME left vs. right shouldn't be treated the same instance (Eq a) => Ord (Fixity a) where