module Language.PureScript.CoreFn.Ann where

import Prelude

import Language.PureScript.AST.SourcePos
import Language.PureScript.Comments
import Language.PureScript.CoreFn.Meta
import Language.PureScript.Types

-- |
-- Type alias for basic annotations
--
type Ann = (SourceSpan, [Comment], Maybe SourceType, Maybe Meta)

-- |
-- An annotation empty of metadata aside from a source span.
--
ssAnn :: SourceSpan -> Ann
ssAnn :: SourceSpan -> Ann
ssAnn SourceSpan
ss = (SourceSpan
ss, [], forall a. Maybe a
Nothing, forall a. Maybe a
Nothing)

-- |
-- Remove the comments from an annotation
--
removeComments :: Ann -> Ann
removeComments :: Ann -> Ann
removeComments (SourceSpan
ss, [Comment]
_, Maybe SourceType
ty, Maybe Meta
meta) = (SourceSpan
ss, [], Maybe SourceType
ty, Maybe Meta
meta)