packages feed

bert 1.2.1.2 → 1.2.2

raw patch · 4 files changed

+11/−16 lines, 4 files

Files

CHANGELOG.md view
@@ -1,3 +1,10 @@+Version 1.2.2+---------------++* `Show` and `Read` instances for `Term` now use Haskell, not Erlang syntax. To+  get the Erlang-syntax-formatted terms, `showTerm` and `parseTerm` are now+  exposed.+ Version 1.2.1.2 --------------- 
bert.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.16 name:          bert-version:       1.2.1.2+version:       1.2.2 build-type:    Simple license:       BSD3 license-file:  LICENSE
src/Data/BERT/Term.hs view
@@ -6,6 +6,8 @@ -- probably want to define their own instances for composite types. module Data.BERT.Term   ( BERT(..)+  , showTerm+  , parseTerm   ) where  import Control.Monad.Error@@ -44,19 +46,6 @@     s'      = fromIntegral s     uS'     = fromIntegral uS     seconds = ((mS' * 1000000) + s' + (uS' / 1000000))--instance Show Term where-  -- Provide an erlang-compatible 'show' for terms. The results of-  -- this should be parseable as erlang source.-  show = showTerm--instance Read Term where-  readsPrec _ s =-    case parseTerm s of-      -- XXX TODO TODO XXX - normalize composite terms? (ie. we'd need-      -- a "decompose")-      Right t -> [(t, "")]-      Left _  -> []  -- Another design would be to split the Term type into -- SimpleTerm|CompositeTerm, and then do everything in one go, but
src/Data/BERT/Types.hs view
@@ -24,5 +24,4 @@   | DictionaryTerm [(Term, Term)]   | TimeTerm       UTCTime   | RegexTerm      String [String]-    deriving (Eq, Ord)-+    deriving (Eq, Ord, Show, Read)