-
Notifications
You must be signed in to change notification settings - Fork 36
Make it compile with MicroHs #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
System/OsPath/Common.hs
Outdated
| , PS.unsafeEncodeUtf | ||
| , PS.encodeWith | ||
| , encodeFS | ||
| #if !defined(__MHS__) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
|
||
|
|
||
|
|
||
| #if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #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.
| osp = error "Systen.OsPath.Internal.ostr: no Template Haskell" | ||
| #endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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) */ |
|
|
||
| #include "Common.hs" | ||
|
|
||
| #if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #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) |
| pstr = error "Systen.OsPath.Posix.pstr: no Template Haskell" | ||
| #endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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) */ |
| #include "Common.hs" | ||
|
|
||
|
|
||
| #if defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #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) |
| pstr = error "Systen.OsPath.Windows.pstr: no Template Haskell" | ||
| #endif /* defined(MIN_VERSION_template_haskell) || defined(MIN_VERSION_template_haskell_quasi_quoter) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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) */ |
| if impl(mhs) | ||
| build-depends: | ||
| ghc-compat |
There was a problem hiding this comment.
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
The title say it all.