From 2c0807f0e5715eb88c95c767171337fad0aa4fa5 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 2 Apr 2018 17:38:16 -0400 Subject: [PATCH] :memo: originModule. --- src/Data/Abstract/Origin.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Abstract/Origin.hs b/src/Data/Abstract/Origin.hs index e202821df..8138fe917 100644 --- a/src/Data/Abstract/Origin.hs +++ b/src/Data/Abstract/Origin.hs @@ -12,6 +12,7 @@ data Origin term ty where Module :: Origin term 'P -> M.ModuleInfo -> Origin term 'M Term :: Origin term 'M -> Base term () -> Origin term 'T +-- | Project the 'ModuleInfo' out of an 'Origin', if available. originModule :: Origin term ty -> Maybe M.ModuleInfo originModule (Term o _) = originModule o originModule (Module _ m) = Just m