1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00
Commit Graph

5709 Commits

Author SHA1 Message Date
Rick Winfrey
dac3b47256 Rename Visibility syntax -> AccessControl syntax 2019-01-15 12:24:43 -08:00
Rick Winfrey
00d074bced Rename Visibility -> AccessControl 2019-01-15 12:24:10 -08:00
Rick Winfrey
688d744c2c Rename Visibilities & Visibilities1 -> AccessControls & AccessControls1
Visibilities is from the scope graph literature, and is not the same idea or equivalent in any way to the idea of access control.
2019-01-15 12:23:48 -08:00
Rick Winfrey
8679f360fb Reflect instance methods / field definitions access control when instantiating objects 2019-01-14 17:58:18 -08:00
Rick Winfrey
ad68196124 Reflow 2019-01-14 17:57:31 -08:00
Rick Winfrey
f1300c2136 Declare public field name with correct access control 2019-01-14 17:57:22 -08:00
Rick Winfrey
4b5eb19700 Simplify scope lookup for MemberAccess 2019-01-14 17:22:03 -08:00
Rick Winfrey
ed88f498a9 Generate list of possible Relation based on Visibilties of lhs in MemberAccess 2019-01-14 15:21:10 -08:00
Rick Winfrey
b2cbb3299a Manually define Visibilities This instance 2019-01-14 15:20:25 -08:00
Rick Winfrey
9ae24b65f6 Derive via Generically for Visibility 2019-01-09 17:32:15 -08:00
Rick Winfrey
136af86301 Merge branch 'master' into visibility-resolution 2019-01-08 17:32:14 -08:00
Patrick Thomson
00abc88daa Remove unneeded extensions and document Generically. 2019-01-07 16:30:07 -05:00
Patrick Thomson
6983f55e1c DerivingVia for Syntax.Directive. 2019-01-07 16:20:54 -05:00
Patrick Thomson
e0bb9e4a08 DerivingVia over Syntax and Syntax.Type. 2019-01-07 15:45:00 -05:00
Patrick Thomson
c778de4585 DerivingVia over Comment. 2019-01-07 15:39:44 -05:00
Patrick Thomson
b32a728b84 DerivingVia over Syntax.Declaration. 2019-01-07 15:37:24 -05:00
Patrick Thomson
e0d5e7f54b DerivingVia over Syntax.Statement. 2019-01-07 15:33:50 -05:00
Patrick Thomson
d4c9702d7e Introduce Generically functor and convert Expression/Literal to use it. 2019-01-07 15:33:43 -05:00
Patrick Thomson
1302fe4ac8 Use -XDerivingVia to clean up our Semigroup/Monoid instances.
Now that we're on GHC 8.6, we can use `-XDerivingVia` in many cases
where we previously had to write instances by hand. If you're not
familiar with `-XDerivingVia`, the [GHC proposal][ghc] is a good place
to start.

[ghc]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0023-deriving-via.rst

Thanks to the `generic-monoid` package, we can derive a `Semigroup`
instance for any product type whose members are `Semigroups`, and the
same goes for `Monoid`. This entails an extra dependency, but it is
better than the `generic-deriving` package, which is way too much overhead.
I've also switched some trivial definitions to newtype-deriving.

Please be aware that this bumps `hlint` and `haskell-src-exts` so that
`hlint` doesn't choke on the `DerivingVia` extension. You'll need to
`stack install hlint` to get it on your `PATH`. Apologies!
2019-01-07 11:23:11 -05:00
Patrick Thomson
955f30617c Depend on hostname instead of Network.BSD. 2018-12-29 15:02:42 -05:00
Patrick Thomson
9852155a77 Upgrade to LTS 13.0 and GHC 8.6.3.
Bumps most of our dependencies.

Code changes:
* algebraic-graphs-0.3 no longer provides a Foldable or Traversable
  implementation for `Graph`, so now neither does our `Graph` type.
* CMark parsing now uses safe rendering of raw HTML/URLs by default,
  so there is no reason to pass an `optSafe` anymore.
* algebraic-graphs now no longer requires an Eq constraint on the
  output type it generates, so we can ditch our Serializing.DOT
  module. (Andrey fixed this for us specifically!)
2018-12-29 14:02:24 -05:00
Rick Winfrey
98e83045fc Add a Closure constructor to Abstract.Value.Concrete 2018-12-20 17:05:14 -08:00
Rick Winfrey
c3ab029fb2 Restrict MemberAccess to only deref public instance or default relations on the rhs 2018-12-20 17:04:59 -08:00
Rick Winfrey
d1024f8b11 Cleanup unused language pragma 2018-12-20 17:04:26 -08:00
Rick Winfrey
2496a4e826 Import instances only 2018-12-20 17:03:04 -08:00
Rick Winfrey
6679bf2878 Reflow 2018-12-20 17:02:51 -08:00
Rick Winfrey
84ccc2eaa7 Get the pragma right 2018-12-20 10:44:10 -08:00
Rick Winfrey
599d55c825 Get things compiling again 2018-12-19 19:23:02 -08:00
Rick Winfrey
2764f3a4ea Update relationsOfScope to accept [Relation] 2018-12-19 19:22:26 -08:00
Rick Winfrey
11c2a66f66 Add LambdaCase 2018-12-19 19:20:14 -08:00
Rick Winfrey
daeb7e23e8 Add visibility field to PublicFieldDefinition 2018-12-19 19:20:04 -08:00
Rick Winfrey
9202da4fc1 Update declareFunction to take a Relation 2018-12-19 19:19:45 -08:00
Rick Winfrey
f80e04f7fa Define Visibilities1 instance for Declaration.Visibility 2018-12-19 19:19:16 -08:00
Rick Winfrey
944fa24efc Update name 2018-12-19 19:19:01 -08:00
Rick Winfrey
65cd00dd9c Don't capture the inner term (identifier) for Declaration.Visibility 2018-12-19 19:18:52 -08:00
Rick Winfrey
a4ea4fda46 Update existing Relation declarations 2018-12-19 19:14:48 -08:00
Rick Winfrey
df61ed6ef2 Parameterize Relation with Visibility
Co-Authored-By: Josh Vera <vera@github.com>
2018-12-19 19:11:58 -08:00
Rick Winfrey
d61f27ce07 Add ScopeGraph.Visibility 2018-12-19 19:11:37 -08:00
Rick Winfrey
960d56fdcf Add Visibilities instances 2018-12-19 19:11:02 -08:00
Rick Winfrey
3adaf47a4f Define a Visibilities type class 2018-12-19 19:10:49 -08:00
Rick Winfrey
2676e124be Remove comment about __self relation 2018-12-19 14:16:11 -08:00
Rick Winfrey
0c2cc38b7f Update New field selector names 2018-12-19 14:03:51 -08:00
Rick Winfrey
a48f7c75cc Give term parameter to Unknown constructor 2018-12-19 13:19:17 -08:00
Rick Winfrey
e6194bbe3c Merge branch 'master' into visibility-resolution 2018-12-19 10:35:42 -08:00
Patrick Thomson
a44f5a1f45 Fix old variable names. 2018-12-18 15:25:54 -05:00
Patrick Thomson
05949034fd Refactor: change Info members to use correct prefix.
These used to be called `Data`, but now they're called `Info` (which
is a much better name). This makes sure that its record fields have
the correct prefix.
2018-12-18 12:56:04 -05:00
Rick Winfrey
e39c439a60 Add Declarations1 Visibility instance 2018-12-17 18:25:20 -08:00
Rick Winfrey
3779e79d7c Rename Accessibility -> Visibility 2018-12-17 18:24:35 -08:00
Rick Winfrey
5dab74f5ea Add an Unknown constructor for Accessibility 2018-12-17 17:51:30 -08:00
Rick Winfrey
b97a2d6df7 Add Accessibility syntax constructor 2018-12-14 17:03:07 -08:00