1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 14:11:33 +03:00

Move MonadOrigin into the Origin module.

This commit is contained in:
Rob Rix 2018-03-29 23:27:23 -04:00
parent c8829b39f3
commit a0667d0414
2 changed files with 5 additions and 4 deletions

View File

@ -5,10 +5,6 @@ import Control.Abstract.Addressable
import Data.Abstract.Address
import Data.Abstract.Origin
class Monad m => MonadOrigin m where
askOrigin :: m Origin
data Located location = Located { location :: location, provenance :: !Origin }
deriving (Eq, Ord, Show)

View File

@ -11,6 +11,11 @@ data Origin
| Local !ModuleName !FilePath !Range !Span
deriving (Eq, Ord, Show)
class Monad m => MonadOrigin m where
askOrigin :: m Origin
instance Semigroup Origin where
a <> Unknown = a
_ <> b = b