Custom Type Error not getting triggered in the nested Type function call

Magesh B magesh85 at gmail.com
Wed Apr 27 16:43:30 UTC 2016


Hello,

I have partial type function which is invoked by another type function.
When the inner type function fails with TypeError, outer type function is
not been able to propagate that type error to its caller.
As a result of it, I'm getting following error
  • No instance for (KnownSymbol (NestedPartialTF (TypeError ...)))
 instead of
  • Unexpected type @ NestedPartialTF: Char

Is this a bug? This behavior seems bit counter-intuitive as to work around,
I had to write another (duplicate) type function at the top level to get
the desired type error

I'm using GHC-8 RC 3 and have attached complete src for reference.

Regards,
Magesh B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160427/dd06becd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CErrs.hs
Type: text/x-haskell
Size: 1415 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160427/dd06becd/attachment.hs>


More information about the ghc-devs mailing list