@@ -20,13 +20,13 @@ prmod = sNS (sUN "Provide") ["Providers"]
20-- | Handle an error, if the type provider returned an error. Otherwise return the provided term.
20-- | Handle an error, if the type provider returned an error. Otherwise return the provided term.
21getProvided :: FC -> TT Name -> Idris (TT Name)
21getProvided :: FC -> TT Name -> Idris (TT Name)
22getProvided fc tm | (P _ pioret _, [tp, result]) <- unApply tm
22getProvided fc tm | (P _ pioret _, [tp, result]) <- unApply tm
23− , (P _ nm _, [_, err]) <- unApply result
23+ , (P _ nm _, [_, err]) <- unApply result
24 , pioret == ioret && nm == ermod
24 , pioret == ioret && nm == ermod
25 = case err of
25 = case err of
26 Constant (Str msg) -> ierror . At fc . ProviderError $ msg
26 Constant (Str msg) -> ierror . At fc . ProviderError $ msg
27 _ -> ifail "Internal error in type provider, non-normalised error"
27 _ -> ifail "Internal error in type provider, non-normalised error"
28 | (P _ pioret _, [tp, result]) <- unApply tm
28 | (P _ pioret _, [tp, result]) <- unApply tm
29− , (P _ nm _, [_, res]) <- unApply result
29+ , (P _ nm _, [_, res]) <- unApply result
30 , pioret == ioret && nm == prmod
30 , pioret == ioret && nm == prmod
31 = return res
31 = return res
32 | otherwise = ifail $ "Internal type provider error: result was not " ++
32 | otherwise = ifail $ "Internal type provider error: result was not " ++