Skip to content

Make it compile with MicroHs#257

Merged
hasufell merged 3 commits into
haskell:masterfrom
augustss:master
Jan 20, 2026
Merged

Make it compile with MicroHs#257
hasufell merged 3 commits into
haskell:masterfrom
augustss:master

Conversation

@augustss

@augustss augustss commented Oct 4, 2025

Copy link
Copy Markdown
Contributor

The title say it all.

Comment thread System/OsPath/Common.hs Outdated
, PS.unsafeEncodeUtf
, PS.encodeWith
, encodeFS
#if !defined(__MHS__)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more idiomatic to write #ifdef MIN_VERSION_template_haskell: we don't really care MHS or not, we care if it has TH (and, in glorious future, more specifically template-haskell-quasiquoter).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is a better way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some updates to minimize the changes.

Comment thread System/OsPath/Internal.hs



#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter)

The package is called template-haskell-quasiquoter.

Comment thread System/OsPath/Internal.hs
Comment on lines +169 to +170
osp = error "Systen.OsPath.Internal.ostr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
osp = error "Systen.OsPath.Internal.ostr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */
osp = error "System.OsPath.Internal.ostr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter) */

Comment thread System/OsPath/Posix.hs

#include "Common.hs"

#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter)

Comment thread System/OsPath/Posix.hs
Comment on lines +35 to +36
pstr = error "Systen.OsPath.Posix.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pstr = error "Systen.OsPath.Posix.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */
pstr = error "System.OsPath.Posix.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter) */

Comment thread System/OsPath/Windows.hs
#include "Common.hs"


#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter)
#if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter)

Comment thread System/OsPath/Windows.hs
Comment on lines +35 to +36
pstr = error "Systen.OsPath.Windows.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pstr = error "Systen.OsPath.Windows.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */
pstr = error "System.OsPath.Windows.pstr: no Template Haskell"
#endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasiquoter) */

Comment thread filepath.cabal
Comment on lines +102 to +104
if impl(mhs)
build-depends:
ghc-compat

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this isn't necessary anymore? @augustss

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, ghc-compat is implicit now.

@hasufell

Copy link
Copy Markdown
Member

@augustss did you see the new review comments?

@hasufell

Copy link
Copy Markdown
Member

I'm fixing up the remaining issues

@hasufell hasufell merged commit 2d7d824 into haskell:master Jan 20, 2026
28 checks passed
@hasufell

Copy link
Copy Markdown
Member

this is uploaded to hackage as 1.5.5.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants