Skip to content

Commit

Permalink
Normalise provider types before checking
Browse files Browse the repository at this point in the history
This ensures, among other things, that:
 * Namespaces don't get in the way
 * Type synonyms get expanded
  • Loading branch information
david-christiansen committed Feb 6, 2014
1 parent 138d35e commit be4cff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Idris/ElabDecls.hs
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ elabProvider info syn fc n ty tm

-- Elaborate the provider term to TT and check that the type matches
(e, et) <- elabVal toplevel False tm
unless (isProviderOf ty' et) $
unless (isProviderOf (normalise ctxt [] ty') et) $
ifail $ "Expected provider type IO (Provider (" ++
show ty' ++ "))" ++ ", got " ++ show et ++ " instead."

Expand Down

0 comments on commit be4cff0

Please sign in to comment.