haskus / packages

Haskus packages
https://haskus.org/
24 stars 11 forks source link

tech: use `doctests-parallel` #50

Closed ldicarlo closed 2 months ago

ldicarlo commented 12 months ago

Sorry for all the noise Part of #46

ldicarlo commented 12 months ago

It looks better like that I think.

ldicarlo commented 12 months ago
haskus-binary       > [ERROR  ] [ThreadId 316] packages/haskus-binary/src/lib/Haskus/Number/Signed.hs:110: failure in expression `signedIsZero (signedNeg @5)'
haskus-binary       > [ERROR  ] [ThreadId 316] expected: False
haskus-binary       > [ERROR  ] [ThreadId 316]  but got:
haskus-binary       > [ERROR  ] [ThreadId 316]           ^
haskus-binary       > [ERROR  ] [ThreadId 316]           <interactive>:57:15: error:
haskus-binary       > [ERROR  ] [ThreadId 316]               Illegal visible type application ‘@5’
haskus-binary       > [ERROR  ] [ThreadId 316]                 Perhaps you intended to use TypeApplications
haskus-binary       > [ERROR  ] [ThreadId 316]
haskus-binary       > [ERROR  ] [ThreadId 316]           <interactive>:57:26: error:
haskus-binary       > [ERROR  ] [ThreadId 316]               Illegal type: ‘5’ Perhaps you intended to use DataKinds

I don't know how to fix these two issues

ldicarlo commented 11 months ago

@hsyl20 (or anyone), can you please guide me through the resolution of the error above? I tried to understand the code but without success.

hsyl20 commented 11 months ago

You probably have to explicitly enable these instructions in the $setup code with:

> :set -XTypeApplications
> :set -XDataKinds

(not tested)

ldicarlo commented 11 months ago

You probably have to explicitly enable these instructions in the $setup code with:

> :set -XTypeApplications
> :set -XDataKinds

(not tested)

Of course ... I tried with {-# ... #-} syntax instead...

thielema commented 2 months ago

alternative could be doctest-extract

hsyl20 commented 2 months ago

I've fixed the tests on CI with #55.

There is still a doctest failure in haskus-binary but I believe it's due to doctest or ghc.