Skip to content

Remove suspicious instances + some new ones#22

Merged
Mesabloo merged 6 commits into
Mesabloo:masterfrom
expipiplus1:instances
Jul 5, 2023
Merged

Remove suspicious instances + some new ones#22
Mesabloo merged 6 commits into
Mesabloo:masterfrom
expipiplus1:instances

Conversation

@expipiplus1
Copy link
Copy Markdown
Contributor

  • Replace Default instance for Diagnostic with Monoid
  • Derive Eq and Ord for Marker (Removing the old ones which violated extensionality)
  • Add Eq and Ord instances to Note
  • Functor, Foldable, Traversable instances for Report, Marker and Note

@expipiplus1
Copy link
Copy Markdown
Contributor Author

In anticipation of #21 being merged, I've rebased this on that; the diff should be less intimidating once #21 is merged.

I took the liberty of including #17, the chief objection there seemed to be against unnecessarily tying this package to GHC, however that ship sailed a long time ago, the package already uses a heap of language extensions only supported on GHC. Not to mention that few (none?) of the dependencies will have been tested against any other compiler.

{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE PatternSynonyms #-}

@Mesabloo
Copy link
Copy Markdown
Owner

Mesabloo commented Jun 2, 2023

That's absolutely true. I thought depending on GHC's package was a problem, but we already depend on GHC by using language extensions (some of them may be supported by some other Haskell compilers, although I absolutely don't know about that).
I'll merge this a bit later (and publish a new version on hackage).

@expipiplus1
Copy link
Copy Markdown
Contributor Author

@Mesabloo any chance of getting a release on Hackage with this + latest changes?

@Mesabloo
Copy link
Copy Markdown
Owner

Mesabloo commented Jul 5, 2023

Oh yes absolutely. I completely forgot about that. Sorry!

@Mesabloo Mesabloo merged commit 2a16c8e into Mesabloo:master Jul 5, 2023
@Mesabloo Mesabloo added the enhancement New feature or request label Jul 5, 2023
@Mesabloo
Copy link
Copy Markdown
Owner

Mesabloo commented Jul 5, 2023

@expipiplus1 Published as v2.5.1!

@expipiplus1 expipiplus1 deleted the instances branch July 6, 2023 06:14
@expipiplus1
Copy link
Copy Markdown
Contributor Author

Merci beaucoup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants