Solving CompareSymbol and AppendSymbol - #2511
Merged
Merged
Conversation
paf31
suggested changes
Dec 28, 2016
| forClassName _ C.IsSymbol [TypeLevelString sym] = [TypeClassDictionaryInScope (IsSymbolInstance sym) [] C.IsSymbol [TypeLevelString sym] Nothing] | ||
| forClassName _ C.IsSymbol [TypeLevelString sym] = | ||
| [TypeClassDictionaryInScope (IsSymbolInstance sym) [] C.IsSymbol [TypeLevelString sym] Nothing] | ||
| forClassName _ C.CompareSymbol [arg0@(TypeLevelString lhs), arg1@(TypeLevelString rhs), _] = |
Contributor
There was a problem hiding this comment.
You're going to need to do some unification on the result type here, I think.
Member
Author
There was a problem hiding this comment.
Unification happens later using matches when computing instances in solve:go, right?
Member
Author
There was a problem hiding this comment.
and when I say later, I mean immediately after:
let instances =
[ (substs, tcd)
| tcd <- forClassName (combineContexts context inferred) className' tys''
-- Make sure the type unifies with the type in the type instance definition
, substs <- maybeToList (matches typeClassDependencies tcd tys'')
]
LiamGoodacre
commented
Dec 29, 2016
| foreigns <- inferForeignModules ms | ||
| liftIO (check (map snd ms)) | ||
| let actions = makeActions foreigns | ||
| let actions = makeActions (foreigns `M.union` supportForeigns) |
Member
Author
There was a problem hiding this comment.
So here is where we makeActions. This makes a codegen function in Make.hs which checks for an FFI file using the foreigns argument passed to makeActions. But we were only passing in the foreign files for the modules of the test input files (I think). So I've passed through the FFI support files too. The tests started passing once I did this.
paf31
approved these changes
Dec 29, 2016
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened for discussion.
I haven't been able to figure out why, but currently the tests fail to build the support libraries: http://lpaste.net/1293011848764850176
Any help working that out would be appreciated.
EDIT: building tests works - I needed to clear
.test_modules. However, updating test support is causing a lot of tests to now fail.