--------------------------------------------------------------------------------
-- Compiler combinators

-- | Maybe generate an original name/position value.
original :: Name -> Maybe Original
original name =
  case nameSrcLoc name of
    RealSrcLoc loc -> Just (Original (name,loc))
    _ -> Nothing

-- | Throw an exception as an expression.
original :: Name -> Maybe Original
original name =
  case nameSrcLoc name of
    RealSrcLoc loc -> Just (Original (name,loc))
    _ -> Nothing

-- | Throw an exception as an expression.
original name =
  case nameSrcLoc name of
    RealSrcLoc loc -> Just (Original (name,loc))
    _ -> Nothing

-- | Throw an exception as an expression.