[Haskell-cafe] Haddock, wrapping contexts?

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Fri Oct 28 21:56:17 UTC 2016


On Fri, Oct 28, 2016 at 07:31:54PM +0200, MarLinn via Haskell-Cafe wrote:
> >Is there any way I can convince Haddock to wrap these contexts?  Ideally I
> >want to see something like
> >
> >     leftJoin
> >         :: (Default Unpackspec columnsA columnsA,
> >             Default Unpackspec columnsB columnsB,
> >             Default NullMaker columnsB nullableColumnsB)	
> >         => [..]
> 
> This is a bit silly and doesn't directly address the problem, but
> maybe you could re-package some of the Constraints into a type
> synonym? (I think you would need some extension like
> -XConstraintKinds for that)
> 
> Like this:
> 
>     type DefaultUnpack cols       = Default Unpackspec cols cols
>     type DefaultNull   cols nCols = Default NullMaker  cols nCols
> 
>     leftJoin :: (DefaultUnpack columnsA, DefaultUnpack columnsB, DefaultNull columnsB nullableColumnsB)	
>              => [..]

Thanks MarLinn,

Your suggestion is a good one but I'd rather see if the tooling can be
fixed.

Tom



More information about the Haskell-Cafe mailing list