call-alloy 0.2.0.5 → 0.2.0.6
raw patch · 7 files changed
+35/−23 lines, 7 filesdep ~Win32dep ~bytestringPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Win32, bytestring
API changes (from Hackage documentation)
Files
- ChangeLog.md +10/−0
- README.md +4/−2
- call-alloy.cabal +8/−8
- src/Language/Alloy/Call.hs +4/−4
- src/Language/Alloy/Functions.hs +7/−7
- src/Language/Alloy/Parser.hs +1/−1
- src/Language/Alloy/Types.hs +1/−1
ChangeLog.md view
@@ -1,3 +1,13 @@ # Changelog for call-alloy ## Unreleased changes++## Released changes++### 0.2.0.6++- allow parsing `'` as part of words.+ (Especially `skolem` may return them if variable names in predicates to check+ are not unique.)+- add version constraint for `Win32`+- allow later versions of `bytestring`
README.md view
@@ -8,12 +8,14 @@ - Java Runtime Environment: There is currently no warning if you have not set up any Java Runtime Environment.- However, you will get runtime errors if it is not availible when a call to Alloy happens.+ However, you will get runtime errors if it is not available when a call to Alloy happens. If you want to force a check, perform the test cases. ## Please note -The Java interface to get Alloy instances as well as the Alloy Jar file are backed into this library.+The Java interface to get Alloy instances as well as the+[Alloy Jar](https://github.com/AlloyTools/org.alloytools.alloy/releases/download/v5.1.0/org.alloytools.alloy.dist.jar)+file are backed into this library. On every call the application checks the [`XdgDirectory`](https://hackage.haskell.org/package/directory/docs/System-Directory.html#t:XdgDirectory) if the libraries exist in a current version. If not they are placed there together with a version identifier.
call-alloy.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.2. -- -- see: https://github.com/sol/hpack ----- hash: 2059da2af3e61ace9eabf0447549b945be6baf9f01f87e02a60e6ddb074decb5+-- hash: 17a876c2f193cdf8cf992b6455dab5e37d246e48f9988f98f1c8e38d374e6dd0 name: call-alloy-version: 0.2.0.5+version: 0.2.0.6 synopsis: A simple library to call Alloy given a specification description: Please see the README on GitHub at <https://github.com/marcellussiegburg/call-alloy#readme> category: Language@@ -15,7 +15,7 @@ bug-reports: https://github.com/marcellussiegburg/call-alloy/issues author: Marcellus Siegburg maintainer: marcellus.siegburg@uni-due.de-copyright: 2019 Marcellus Siegburg+copyright: 2019-2020 Marcellus Siegburg license: MIT license-file: LICENSE build-type: Simple@@ -47,7 +47,7 @@ src build-depends: base >=4.7 && <5- , bytestring >=0.10 && <0.11+ , bytestring >=0.10 && <0.12 , containers >=0.6 && <0.7 , directory >=1.3 && <1.4 , file-embed >=0.0.11 && <0.1@@ -61,7 +61,7 @@ if os(windows) cpp-options: -DWINDOWS build-depends:- Win32+ Win32 >=2.5 && <2.11 else build-depends: unix >=2.7 && <2.8@@ -85,7 +85,7 @@ ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5- , bytestring >=0.10 && <0.11+ , bytestring >=0.10 && <0.12 , call-alloy , containers >=0.6 && <0.7 , directory >=1.3 && <1.4@@ -101,7 +101,7 @@ if os(windows) cpp-options: -DWINDOWS build-depends:- Win32+ Win32 >=2.5 && <2.11 else build-depends: unix >=2.7 && <2.8
src/Language/Alloy/Call.hs view
@@ -7,7 +7,7 @@ This module provides basic functionality to interact with Alloy. This library contains Alloy and an (internal) interface to interact with it.-These libraries will be placed into the users directory during execution.+These libraries will be placed into the user's directory during execution. A requirement for this library to work is a Java Runtime Environment (as it is required by Alloy). -}@@ -104,7 +104,7 @@ -} getInstances :: Maybe Integer- -- ^ How many instances to return 'Nothing' for all.+ -- ^ How many instances to return; 'Nothing' for all. -> String -- ^ The Alloy specification which should be loaded. -> IO [AlloyInstance]@@ -303,14 +303,14 @@ {-| Check if there exists a model for the given specification. This function calls-Alloy retrieving one instance. If there is no such instance, it returns false.+Alloy retrieving one instance. If there is no such instance, it returns 'False'. This function calls 'getInstances'. -} existsInstance :: String -- ^ The Alloy specification which should be loaded. -> IO Bool- -- ^ Whether there exists an instance (within the given scope)+ -- ^ Whether there exists an instance (within the relevant scope). existsInstance = fmap (not . null) . getInstances (Just 1) {-|
src/Language/Alloy/Functions.hs view
@@ -43,14 +43,14 @@ scoped = Signature . Just {-|-Create an unscoped Signature given its name.+Create an unscoped 'Signature' given its name. -} unscoped :: String -> Signature unscoped = Signature Nothing {-| Retrieve a set of objects of a given 'AlloySig'.-Successful if the signatures relation is a set (or empty).+Successful if the signature's relation is a set (or empty). -} getSingle :: (IsString s, MonadError s m)@@ -61,7 +61,7 @@ {-| Retrieve a binary relation of objects of a given 'AlloySig'.-Successful if the signatures relation is binary (or empty).+Successful if the signature's relation is binary (or empty). -} getDouble :: (IsString s, MonadError s m)@@ -72,7 +72,7 @@ {-| Retrieve a ternary relation of objects of a given 'AlloySig'.-Successful if the signatures relation is ternary (or empty).+Successful if the signature's relation is ternary (or empty). -} getTriple :: (IsString s, MonadError s m)@@ -88,7 +88,7 @@ {-| Transforms a relation into a Mapping.-Is only successful (i.e. returns 'return' if the given transformation function is+Is only successful (i.e. returns 'return') if the given transformation function is able to map the given values injectively. -} relToMap@@ -116,7 +116,7 @@ Just r -> kind r {-|-Lookup a signature within a given Alloy Instance.+Lookup a signature within a given Alloy instance. -} lookupSig :: (IsString s, MonadError s m)@@ -129,7 +129,7 @@ Just e -> return e {-|-Retrieve an objects name.+Retrieve an object's name. -} objectName :: Object -> String objectName o = case o of
src/Language/Alloy/Parser.hs view
@@ -101,4 +101,4 @@ word :: Parser String word = (:) <$> (letter <|> char '$')- <*> many (letter <|> digit <|> char '_')+ <*> many (letter <|> digit <|> char '_' <|> char '\'')
src/Language/Alloy/Types.hs view
@@ -27,7 +27,7 @@ type AlloySig = Entry Map Set {-|-A collection of Signatures with associated entries.+A collection of signatures with associated entries. -} type Entries a = a Signature (Entry a Set)