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

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


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.

Magesh B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CErrs.hs
Type: text/x-haskell
Size: 1415 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list