packages feed

call-alloy 0.6 → 0.6.0.1

raw patch · 3 files changed

+23/−8 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -2,11 +2,17 @@  ## Unreleased changes +## Released changes++### 0.6.1++- fix bug on different State 0 entry response++### 0.6+ - upgrade to Alloy 6.2.0 - document Alloy version - improve documentation--## Released changes  ### 0.5 
call-alloy.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           call-alloy-version:        0.6+version:        0.6.0.1 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
src/Language/Alloy/Parser.hs view
@@ -17,7 +17,7 @@   parseInstance,   ) where -import qualified Data.ByteString.Char8            as BS (putStrLn)+import qualified Data.ByteString.Char8            as BS (putStrLn, writeFile) import qualified Data.Set                         as S (fromList) import qualified Data.Map                         as M   (alter, empty, insert, singleton)@@ -57,6 +57,7 @@   Failure l -> do     liftIO $ BS.putStrLn "Failed parsing Alloys response as AlloyInstance:"     liftIO $ BS.putStrLn inst+    liftIO $ BS.writeFile "/tmp/BOOM" inst     throwM $ ParsingAlloyResponseFailed l   Success r -> return $ combineEntries r @@ -78,12 +79,20 @@  alloyInstance :: Parser [Entries (,)] alloyInstance =-  entrySection "------State 0 (loop)-------"+  stateZeroLoop <|> stateZero   where-    entrySection x =-      string x+    stateZeroLoop =+      string "------State 0 (loop)-------"       *> endOfLine-      *> many (try entry)+      *> entries+    stateZero = (++)+      <$> (+        many entry+        <* optional (string "------State 0-------" <* endOfLine)+        )+      <*> entries+    entries =+      many entry       <* many alloyInfo       <* eof'     alloyInfo =