1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
16import qualified Data.Set as Set
17import Data.Text (Text)
19import qualified AST.Literal as L
20import qualified AST.Variable as Var
21import qualified Reporting.Annotation as A
28type Raw = A.Located Raw_
32 = RCtor (Maybe Text) Text [Raw]
35 | RTuple Raw Raw [Raw]
48type Canonical = A.Located Canonical_
52 = Ctor Var.Canonical [Canonical]
55 | Tuple Canonical Canonical [Canonical]
56 | Alias Text Canonical
66boundVars :: Raw -> [A.Located Text]
67boundVars (A.A region pattern) =
72 RAlias name realPattern ->
73 A.A region name : boundVars realPattern
76 concatMap boundVars patterns
79 map (A.A region) fields
85 concatMap boundVars (a:b:cs)
88 concatMap boundVars xs
91 boundVars a ++ boundVars b
100member :: Text -> Raw -> Bool
102 elem name (map A.drop (boundVars pattern))
105boundVarSet :: Raw -> Set.Set Text
107 Set.fromList (map A.drop (boundVars pattern))
110boundVarList :: Raw -> [Text]
111boundVarList pattern =
112 Set.toList (boundVarSet pattern)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list