-
Notifications
You must be signed in to change notification settings - Fork 107
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
Automatic derivation of instances #1293
base: main
Are you sure you want to change the base?
Commits on Apr 12, 2023
-
[WIP] Add automatic deriving of instances.
This change adds the following: - syntax `deriving instance ...` for automatic derivation of instances/dictionaries - constructor `NewtypeDict` for dictionary expressions - synthesis of `NewtypeDict` dictionaries - (currently incorrect) simplification of method applications on `NewtypeDict dictionaries
Configuration menu - View commit details
-
Copy full SHA for 1e166ce - Browse repository at this point
Copy the full SHA 1e166ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for dfa00ee - Browse repository at this point
Copy the full SHA dfa00eeView commit details
Commits on Apr 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf1e0b0 - Browse repository at this point
Copy the full SHA cf1e0b0View commit details
Commits on May 10, 2023
-
Construct methods for instanced defined with
deriving instance ...
.Methods are constructed by first synthesizing a dictionary for the instance that is derived from. Those methods are then converted to methods suitable for the derived instance by using an isomorphism between types.
Configuration menu - View commit details
-
Copy full SHA for ec53819 - Browse repository at this point
Copy the full SHA ec53819View commit details -
Remove constructor
NewtypeDict
.This constructor was introduced for automatic derivation of instances. This constructor is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for cb628ef - Browse repository at this point
Copy the full SHA cb628efView commit details -
Remove constructor
DerivingDef
.This constructor was introduced for automatic derivation of instances. This constructor is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for 6f295d9 - Browse repository at this point
Copy the full SHA 6f295d9View commit details
Commits on May 11, 2023
-
Simplify the conversion of methods needed for
deriving instance ...
.Specifically, by representing isomorphisms as abstractions (`Abs`) we avoid the need for evidence of `Emits`.
Configuration menu - View commit details
-
Copy full SHA for 012e84b - Browse repository at this point
Copy the full SHA 012e84bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45b91fd - Browse repository at this point
Copy the full SHA 45b91fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for be5de03 - Browse repository at this point
Copy the full SHA be5de03View commit details
Commits on Jul 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bf47cd8 - Browse repository at this point
Copy the full SHA bf47cd8View commit details -
Also fix the type of an `App` expression that is constructed during method conversion.
Configuration menu - View commit details
-
Copy full SHA for 03ae76e - Browse repository at this point
Copy the full SHA 03ae76eView commit details -
Simplify dictionary synthesis in automatic instance derivation.
This simplification has led to the removal of an unsafe coercion.
Configuration menu - View commit details
-
Copy full SHA for 04fb3cc - Browse repository at this point
Copy the full SHA 04fb3ccView commit details
Commits on Jul 19, 2023
-
Detect method types that are disallowed for automatic instance deriva…
…tion. The current implementation of automatic instance derivation synthesizes methods (for the derived instance) in a way that is guided by the method types in the instance that we are deriving _from_. For the method synthesis to work correctly certain types (i.e. the type we are deriving _from_ and the type we are deriving an instance _for_) must not be mentioned in the type of the class method that corresponds to the instance method that is being synthesized.
Configuration menu - View commit details
-
Copy full SHA for 9fe2576 - Browse repository at this point
Copy the full SHA 9fe2576View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb1de48 - Browse repository at this point
Copy the full SHA cb1de48View commit details -
Configuration menu - View commit details
-
Copy full SHA for b11948f - Browse repository at this point
Copy the full SHA b11948fView commit details