forked from purescript/purescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnn.hs
More file actions
37 lines (32 loc) · 1.02 KB
/
Ann.hs
File metadata and controls
37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Core.Ann
-- Copyright : (c) 2013-14 Phil Freeman, (c) 2014 Gary Burgess, and other contributors
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>, Gary Burgess <gary.burgess@gmail.com>
-- Stability : experimental
-- Portability :
--
-- | Type alias for basic annotations
--
-----------------------------------------------------------------------------
module Language.PureScript.Core.Ann where
import Language.PureScript.AST.SourcePos
import Language.PureScript.Comments
import Language.PureScript.Core.Meta
import Language.PureScript.Types
-- |
-- Type alias for basic annotations
--
type Ann = (Maybe SourceSpan, [Comment], Maybe Type, Maybe Meta)
-- |
-- Initial annotation with no metadata
--
nullAnn :: Ann
nullAnn = (Nothing, [], Nothing, Nothing)
-- |
-- Remove the comments from an annotation
--
removeComments :: Ann -> Ann
removeComments (ss, _, ty, meta) = (ss, [], ty, meta)