-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split records of SymbolT and DefinitionS #384
base: master
Are you sure you want to change the base?
Commits on Oct 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c5fd565 - Browse repository at this point
Copy the full SHA c5fd565View commit details -
This is needed by the lenses to be added later.
Configuration menu - View commit details
-
Copy full SHA for f577108 - Browse repository at this point
Copy the full SHA f577108View commit details -
[norun] Change SymbolT.SymT to an independent data type
See frege/compiler/types/Symbols.fr As a first step to decomposing the sum-record SymbolT, SymT was isolated to an independent data type. Some parts of code were deliberately rewritten into refutable case analyses so that compiler warnings are triggered.
Configuration menu - View commit details
-
Copy full SHA for c4dfb23 - Browse repository at this point
Copy the full SHA c4dfb23View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73d651a - Browse repository at this point
Copy the full SHA 73d651aView commit details -
Isolate all of SymbolT data constructors
The field accessors of SymbolT were replaced with lenses. Partial functions were deliberately introduced to trigger compilation warnings where certain constructor is implicitly assumed (for example, an unsafe conversion `SymbolT g -> SymD g` is inserted to a piece of code which accesses `flds`, which exists only on `SymD`.)
Configuration menu - View commit details
-
Copy full SHA for 504e178 - Browse repository at this point
Copy the full SHA 504e178View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9fd748 - Browse repository at this point
Copy the full SHA e9fd748View commit details -
Modify findV to return SymV, same for other Sym?s
Lots of redundant unsafeToSymVs and its friends were removed.
Configuration menu - View commit details
-
Copy full SHA for 1b872dc - Browse repository at this point
Copy the full SHA 1b872dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7803c9e - Browse repository at this point
Copy the full SHA 7803c9eView commit details -
Remuve uses of unsafePartialView from frege.compiler.Kinds
by tightening the types of parameters
Configuration menu - View commit details
-
Copy full SHA for 5a0459a - Browse repository at this point
Copy the full SHA 5a0459aView commit details -
Reduce warnings on frege.tools.doc.Utilities
- removed redundant pattern from `sref` - changed the type of `overSig` to take `SymV Global`
Configuration menu - View commit details
-
Copy full SHA for f83552d - Browse repository at this point
Copy the full SHA f83552dView commit details -
Remove uses of unsafePartialView from frege.compiler.passes.Imp
By changing the type of the local function `rbSymT` to return `SymT`
Configuration menu - View commit details
-
Copy full SHA for 8c03d3f - Browse repository at this point
Copy the full SHA 8c03d3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 596b2e0 - Browse repository at this point
Copy the full SHA 596b2e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4cb129 - Browse repository at this point
Copy the full SHA a4cb129View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9c176b - Browse repository at this point
Copy the full SHA d9c176bView commit details -
Remove uses of partial functions in frege.compiler.passes.Instances
by tightening the parameter types
Configuration menu - View commit details
-
Copy full SHA for d8ce200 - Browse repository at this point
Copy the full SHA d8ce200View commit details -
Remove some of partial functions in frege.compiler.Classes
by tightening the types of parameters
Configuration menu - View commit details
-
Copy full SHA for 6f2e5a4 - Browse repository at this point
Copy the full SHA 6f2e5a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for efac3c0 - Browse repository at this point
Copy the full SHA efac3c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 727656c - Browse repository at this point
Copy the full SHA 727656cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9caad72 - Browse repository at this point
Copy the full SHA 9caad72View commit details -
Remove partial functions in frege.compiler.gen.java.Match
by tightening the parameters
Configuration menu - View commit details
-
Copy full SHA for 81e2594 - Browse repository at this point
Copy the full SHA 81e2594View commit details -
Change the return type of allourvars and allvars to [SymV Global]
allvars was changed from monadic value to a plain function because it doesn't change nay state. Some functions in other modules had their parameters tightened.
Configuration menu - View commit details
-
Copy full SHA for 56e7ac8 - Browse repository at this point
Copy the full SHA 56e7ac8View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb417c4 - Browse repository at this point
Copy the full SHA fb417c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0b8d1c - Browse repository at this point
Copy the full SHA f0b8d1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bef123 - Browse repository at this point
Copy the full SHA 8bef123View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7809062 - Browse repository at this point
Copy the full SHA 7809062View commit details -
Configuration menu - View commit details
-
Copy full SHA for daf9a49 - Browse repository at this point
Copy the full SHA daf9a49View commit details -
Configuration menu - View commit details
-
Copy full SHA for a316f7a - Browse repository at this point
Copy the full SHA a316f7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c7fad5 - Browse repository at this point
Copy the full SHA 2c7fad5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81a68d2 - Browse repository at this point
Copy the full SHA 81a68d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1cbfc0 - Browse repository at this point
Copy the full SHA d1cbfc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03611c1 - Browse repository at this point
Copy the full SHA 03611c1View commit details
Commits on Oct 23, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 4777ba6 - Browse repository at this point
Copy the full SHA 4777ba6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0d5f1e - Browse repository at this point
Copy the full SHA e0d5f1eView commit details -
Ad-hoc isSym? functions were replaced with the prisms.
Configuration menu - View commit details
-
Copy full SHA for f95bcb3 - Browse repository at this point
Copy the full SHA f95bcb3View commit details -
Introduce SymVal to constrain the return type of findVD
SymVal is a sum type of SymV and SymD.
Configuration menu - View commit details
-
Copy full SHA for cdcb6db - Browse repository at this point
Copy the full SHA cdcb6dbView commit details -
Modify Classes.implemented to take SymVal
Because it can only take SymD and SymV.
Configuration menu - View commit details
-
Copy full SHA for 86364a5 - Browse repository at this point
Copy the full SHA 86364a5View commit details -
Remove a non-exhaustive case from passC.mkanno
Non-exhaustive case analysis was done on a parameter 'msym :: Symbol' but that was done just before returning a value. So it was moved out of the function to the caller site, removing the need to match on Symbol. Also the parameter was changed to 'mpos :: Position' because 'mkanno' was only interested in 'pos' field.
Configuration menu - View commit details
-
Copy full SHA for 63a8efc - Browse repository at this point
Copy the full SHA 63a8efcView commit details -
Remove unsafeToSymC from passC.methodcheck
The symbols must be SymCs because they are looked up by QNames which belong to SymC.supers.
Configuration menu - View commit details
-
Copy full SHA for 43de55b - Browse repository at this point
Copy the full SHA 43de55bView commit details -
Remove a redundant pattern of tcInstMethod
SymbolT.V is always matched by the second pattern because of 'Lens.has SymbolT.typ msym', rendering the third one redundant.
Configuration menu - View commit details
-
Copy full SHA for eaaae98 - Browse repository at this point
Copy the full SHA eaaae98View commit details -
Assume tcInstMethod takes either SymV or SymL
Under that assumption, the non-exhaustive case was rewritten so that it becomes noop on uninterested cases.
Configuration menu - View commit details
-
Copy full SHA for a3f51fd - Browse repository at this point
Copy the full SHA a3f51fdView commit details
Commits on Oct 24, 2019
-
Change the type of SymI.env to SymMeth
SymMeth is a new data type which is a sum of SymL and SymV. SymI.env was renamed to SymI.meth and can now accept SymL and SymV only. The following functions now take SymMeth instead of Symbol. This change is considered safe because they threw runtime errors when receiving other than SymL or SymV. - frege.compiler.Classes.tcInstMethod - frege.compiler.gen.java.VarCode.varCode - frege.compiler.passes.Easy.checkDepth SymbolT.env' which is a generalization of .env and .meth is added and uses of SymbolT.env are replaced with SymbolT.env' where applicable.
Configuration menu - View commit details
-
Copy full SHA for 037f1a8 - Browse repository at this point
Copy the full SHA 037f1a8View commit details -
Change the return type of classMethodOfInstMethod to SymV
All of the call sites assume that.
Configuration menu - View commit details
-
Copy full SHA for 58b9af7 - Browse repository at this point
Copy the full SHA 58b9af7View commit details -
Modify strictReturn to return SymVal
strictReturn now uses SymVal (i.e. SymV|SymD) instead of Symbol, removing uses of partial functions.
Configuration menu - View commit details
-
Copy full SHA for e16d177 - Browse repository at this point
Copy the full SHA e16d177View commit details -
Add findMain, specialized to find the main function
The call sites assumed (VName g.thisPack "main") pointed to a SymV (as it should be). It is now guaranteed by the type.
Configuration menu - View commit details
-
Copy full SHA for cab842a - Browse repository at this point
Copy the full SHA cab842aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e31e3d2 - Browse repository at this point
Copy the full SHA e31e3d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23933ec - Browse repository at this point
Copy the full SHA 23933ecView commit details -
Modify passC.methodcheck to take SymMeth
Its partialness remains same.
Configuration menu - View commit details
-
Copy full SHA for aaf425d - Browse repository at this point
Copy the full SHA aaf425dView commit details -
I'm pretty sure that (Let.env :: [QName]) points to SymVs only.
Configuration menu - View commit details
-
Copy full SHA for 1fdcc0c - Browse repository at this point
Copy the full SHA 1fdcc0cView commit details -
Assume SymV in etaExpand.cleanVarType
I think Vbl.name refers to a SymV.
Configuration menu - View commit details
-
Copy full SHA for d698fae - Browse repository at this point
Copy the full SHA d698faeView commit details -
Change the type of Global.genEnv to [SymV Global]
Only SymV were pushed into genEnv. Partial functions at some of the call sites were eliminated.
Configuration menu - View commit details
-
Copy full SHA for 17905bd - Browse repository at this point
Copy the full SHA 17905bdView commit details -
Assume the return type of instTSym and instTauSym to be SymT
AFAICS almost all of the calling sites assume the return value is SymT.
Configuration menu - View commit details
-
Copy full SHA for e868594 - Browse repository at this point
Copy the full SHA e868594View commit details -
Modify methCode and related functions to take SymV
MethodCall.methCode assumed its Symbol parameter to be SymV. The other related functions, which could handle / were called with SymV only, were modified as well.
Configuration menu - View commit details
-
Copy full SHA for c973f5c - Browse repository at this point
Copy the full SHA c973f5cView commit details -
Modify wrapIRMethod to take SymVal
The partialness couldn't removed. It was moved to the call site.
Configuration menu - View commit details
-
Copy full SHA for 38021a1 - Browse repository at this point
Copy the full SHA 38021a1View commit details -
Remove use of unsafePartialView in symWarning
It seems pointless to crash the compiler when a symbol can't have a documentation (i.e. it's a SymL). Instead it is ignored.
Configuration menu - View commit details
-
Copy full SHA for 379359c - Browse repository at this point
Copy the full SHA 379359cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d5d778 - Browse repository at this point
Copy the full SHA 1d5d778View commit details -
Add a custom partial conversion SymbolT -> SymV in SymbolTable
If a SymbolT's name is Local, it is converted to SymV. It is safe but it can't be proved by the type system until QName, the sum type, is split just like SymbolT. For now, the non-exclusive case analysis is replaced by a private unsafe conversion to supress unwanted compilation warnings.
Configuration menu - View commit details
-
Copy full SHA for f3992b8 - Browse repository at this point
Copy the full SHA f3992b8View commit details -
Remove use of unsafePartialView in docWarningSym
The same reasoning as symWarning. It is pointless to crash the compiler if a symbol is known not to be able to have a doc.
Configuration menu - View commit details
-
Copy full SHA for 599465c - Browse repository at this point
Copy the full SHA 599465cView commit details
Commits on Oct 25, 2019
-
Remove uses of unsafePartialView from passes.Final
A new local function 'mapEnvSymV' that traverses Symbol.env was added to solve the issue.
Configuration menu - View commit details
-
Copy full SHA for 1f5afaf - Browse repository at this point
Copy the full SHA 1f5afafView commit details -
Ignore missing SymbolT.env' in resolve3
The same reasoning as symWarning. It is pointless to crash the compiler if a symbol is known not to be able to have an env-like thing.
Configuration menu - View commit details
-
Copy full SHA for 59847a3 - Browse repository at this point
Copy the full SHA 59847a3View commit details -
Ignore missing SymbolT.env' in enter1ClaDcl
The same reasoning as symWarning. It is pointless to crash the compiler if a symbol is known not to be able to have an env-like thing.
Configuration menu - View commit details
-
Copy full SHA for f3f0c3a - Browse repository at this point
Copy the full SHA f3f0c3aView commit details -
Remove uses of unsafePartialView in Transdef
In transFunDcl, non-SymVals are just ignored. In ordInfix, non-SymVals will be treated as errors. (later)
Configuration menu - View commit details
-
Copy full SHA for 749d6cc - Browse repository at this point
Copy the full SHA 749d6ccView commit details
Commits on Oct 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 1a8fade - Browse repository at this point
Copy the full SHA 1a8fadeView commit details -
Change the type of SymC.env to SymMeth
SymC.env was renamed to SymC.meth and can now accept SymL and SymV only. The lens SymbolT.env was removed because SymT is the only type that has an 'env'.
Configuration menu - View commit details
-
Copy full SHA for 3ac3df8 - Browse repository at this point
Copy the full SHA 3ac3df8View commit details -
Replace a partial function in InstanceCode with a new error message
lowerKindSpecialClasses has a partial function that cannot be avoided. The error case is an internal error (caused by bad frege.Prelude.List).
Configuration menu - View commit details
-
Copy full SHA for cdd5ba1 - Browse repository at this point
Copy the full SHA cdd5ba1View commit details -
Configuration menu - View commit details
-
Copy full SHA for eba6356 - Browse repository at this point
Copy the full SHA eba6356View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5634a4f - Browse repository at this point
Copy the full SHA 5634a4fView commit details -
Remove a "may evaluate to false" warning in Classes.tcInstMethod
A redundant guard which introduced that error was removed.
Configuration menu - View commit details
-
Copy full SHA for 1df0181 - Browse repository at this point
Copy the full SHA 1df0181View commit details -
Remove uses of unsafePartialView in Classes
Instead of crashing, erroneous cases are simply treated as un-matched cases.
Configuration menu - View commit details
-
Copy full SHA for 61f2681 - Browse repository at this point
Copy the full SHA 61f2681View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a60400 - Browse repository at this point
Copy the full SHA 6a60400View commit details -
Remove uses of partial matches in VarCode
Instead of crashing, erroneous cases are simply treated as un-matched cases.
Configuration menu - View commit details
-
Copy full SHA for c4c7736 - Browse repository at this point
Copy the full SHA c4c7736View commit details -
Add a custom partial function in InstanceCode
All SymMeths in SymC.meth should have been resolved to SymV in this phase (at least that's how I understand the code). An error here, if any, is an internal error, and is reported as a pure error to help find a bug in the compiler.
Configuration menu - View commit details
-
Copy full SHA for 3b9cefb - Browse repository at this point
Copy the full SHA 3b9cefbView commit details -
Add a custom partial function in Global
Some functions in Global assumes certain propeties of Symbols. Those assumptions should be correct unless something goes very wrong. An error here, if any, is an internal error, and is reported as a pure error to help find a bug in the compiler.
Configuration menu - View commit details
-
Copy full SHA for da7ebcf - Browse repository at this point
Copy the full SHA da7ebcfView commit details -
Add an error message to the new error in SymbolTable
Since only SymMeth (i.e. SymV or SymL) can be a member of SymC.meth or SymI.meth, if 'sym' is not SymMeth, it is an error. A new error message was added to report it instead of just crashing.
Configuration menu - View commit details
-
Copy full SHA for 9effb28 - Browse repository at this point
Copy the full SHA 9effb28View commit details -
Add a copy of unsafePartialView to MethodCall
A part of MethodCall.nativeCall uses unsafePartialView a lot. The reason is that it was written by myself as a prototype and is not polished yet.
Configuration menu - View commit details
-
Copy full SHA for a9b0fa2 - Browse repository at this point
Copy the full SHA a9b0fa2View commit details -
Remove uses of partial matches in doc.Utility
Instead of crashing, erroneous cases are simply treated as un-matched cases.
Configuration menu - View commit details
-
Copy full SHA for afca4ce - Browse repository at this point
Copy the full SHA afca4ceView commit details -
Remove uses of partial functions in tools.Doc
'allfuns' now contain SymVs only. If non SymVs are in an env of a Symbol, they are just now ignored. Some of the other functions had their types changed in order to reflect that change.
Configuration menu - View commit details
-
Copy full SHA for a42eca7 - Browse repository at this point
Copy the full SHA a42eca7View commit details -
Remove uses of partial matches in ide.Utilities
Instead of crashing, erroneous cases are simply treated as un-matched cases.
Configuration menu - View commit details
-
Copy full SHA for e7908e5 - Browse repository at this point
Copy the full SHA e7908e5View commit details -
Change SymbolTable.InsUpd to protected
being "private" crashes fregedoc (but not fregec).
Configuration menu - View commit details
-
Copy full SHA for e01d94c - Browse repository at this point
Copy the full SHA e01d94cView commit details -
Make constructors of SymbolT, SymMeth and SymVal strict
optimizations from now on
Configuration menu - View commit details
-
Copy full SHA for 4b83084 - Browse repository at this point
Copy the full SHA 4b83084View commit details -
Particularly unsafePartialView (defined in f.c.common.Lens) is no longer used anywhere.
Configuration menu - View commit details
-
Copy full SHA for e6f82dd - Browse repository at this point
Copy the full SHA e6f82ddView commit details -
Replace 'view'ing lenses with simple getters
Added simple getters to SymbolT to be used instead of 'view'ing a 'Lens'. In Haskell, 'view' can have significant overhead than simple pattern matching. The existing lenses were given a leading underscore, like the prisms.
Configuration menu - View commit details
-
Copy full SHA for 46e2e2f - Browse repository at this point
Copy the full SHA 46e2e2fView commit details -
Remove Prisms and use Traversals instead
We don't use 'review', so Traversal is enough. Well, we do use 'is', but 'has' can be used for the purpose. Prism depends on Profunctor. In Haskell, the "profunctor" is a huge package. If, in some day, we port it to Frege, the compiler depending on it may be a problem.
Configuration menu - View commit details
-
Copy full SHA for 750cc61 - Browse repository at this point
Copy the full SHA 750cc61View commit details -
Replace 'view'ing lenses with simple getters for SymMeth and SymVal
The same refactoring as done to SymbolT. Now all uses of 'view's were replaced by simple getters. This contributes to a big reduction of performance penalty.
Configuration menu - View commit details
-
Copy full SHA for 98d630e - Browse repository at this point
Copy the full SHA 98d630eView commit details -
Change the type of allClasses to StG [SymC Global]
A redundant pattern match was removed.
Configuration menu - View commit details
-
Copy full SHA for 2709dab - Browse repository at this point
Copy the full SHA 2709dabView commit details
Commits on Oct 31, 2019
-
Unused partial function The new type SymVal and its member fromSymbol serves the same purpose.
Configuration menu - View commit details
-
Copy full SHA for d39551c - Browse repository at this point
Copy the full SHA d39551cView commit details -
Modify Desugar.updVis not to throw an error
On invalid data constructor, 'updVis' behaves as 'id' instead of an error, just like 'over' in lens does.
Configuration menu - View commit details
-
Copy full SHA for a501df7 - Browse repository at this point
Copy the full SHA a501df7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfa58ac - Browse repository at this point
Copy the full SHA cfa58acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ac6dad - Browse repository at this point
Copy the full SHA 1ac6dadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 389b789 - Browse repository at this point
Copy the full SHA 389b789View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49e0ca1 - Browse repository at this point
Copy the full SHA 49e0ca1View commit details -
An error case in symInfo was eliminated. Related functions were altered to reflect this change. Most notably Global.GenSt.symi8 now have (SymVal Global) instead of Symbol as keys. A new error message was added to lowerKindSpecialClasses. It didn't make sense to pass SymL to lowerKindAbstractFun because it would eventually put into symi8 but never referenced because symInfo were never called with SymL.
Configuration menu - View commit details
-
Copy full SHA for 8ec97a2 - Browse repository at this point
Copy the full SHA 8ec97a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1952d83 - Browse repository at this point
Copy the full SHA 1952d83View commit details -
Configuration menu - View commit details
-
Copy full SHA for d39d409 - Browse repository at this point
Copy the full SHA d39d409View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2fec3f - Browse repository at this point
Copy the full SHA b2fec3fView commit details -
Removed unwanted diffs introduced by a series of modifications
Configuration menu - View commit details
-
Copy full SHA for 11bdb3f - Browse repository at this point
Copy the full SHA 11bdb3fView commit details