looksee 0.8.2 → 0.8.3
raw patch · 2 files changed
+10/−4 lines, 2 filesdep +hashablePVP ok
version bump matches the API change (PVP)
Dependencies added: hashable
API changes (from Hackage documentation)
+ Looksee: instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Looksee.Span a)
+ Looksee: instance GHC.Generics.Generic (Looksee.Span a)
Files
- looksee.cabal +3/−1
- src/Looksee.hs +7/−3
looksee.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: looksee-version: 0.8.2+version: 0.8.3 synopsis: A simple text parser with decent errors description: Please see the README on GitHub at <https://github.com/ejconlon/looksee#readme> category: Parsing@@ -67,6 +67,7 @@ , bifunctors >=5.5 && <5.7 , containers >=0.6 && <0.8 , errata >=0.4.0.1 && <0.5+ , hashable >=1.4 && <1.6 , mmorph ==1.2.* , mtl >=2.2 && <2.4 , recursion-schemes ==5.2.*@@ -115,6 +116,7 @@ , bifunctors >=5.5 && <5.7 , containers >=0.6 && <0.8 , errata >=0.4.0.1 && <0.5+ , hashable >=1.4 && <1.6 , looksee , mmorph ==1.2.* , mtl >=2.2 && <2.4
src/Looksee.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-}@@ -101,6 +102,8 @@ ) where +import Data.Hashable (Hashable)+import GHC.Generics (Generic) import Control.Applicative (Alternative (..)) import Control.Exception (Exception) import Control.Monad (ap, void)@@ -141,7 +144,8 @@ -- | A generic span, used for tracking ranges of offsets or (line, col) data Span a = Span {spanStart :: !a, spanEnd :: !a}- deriving stock (Eq, Ord, Show, Functor, Foldable, Traversable)+ deriving stock (Eq, Ord, Show, Functor, Foldable, Traversable, Generic)+ deriving anyclass (Hashable) -- | Auxiliary data structure to translate offsets to (line, col) type LineColLookup = Vector (Int, Int)@@ -310,9 +314,9 @@ instance MFunctor (T e) where hoist mn (T x) = T (hoist (hoist mn) x) -deriving instance (MonadReader r m) => MonadReader r (T e m)+deriving newtype instance (MonadReader r m) => MonadReader r (T e m) -deriving instance (MonadWriter w m) => MonadWriter w (T e m)+deriving newtype instance (MonadWriter w m) => MonadWriter w (T e m) -- private runT :: T e m a -> St -> m (Either (Err e) a, St)