Coder Social home page Coder Social logo

JSString support about string-conversions HOT 6 OPEN

dmjio avatar dmjio commented on July 23, 2024
JSString support

from string-conversions.

Comments (6)

soenkehahn avatar soenkehahn commented on July 23, 2024

Yeah, I'd be fine with merging a PR.

I wonder whether this should better be in a separate module Data.String.Conversions.GHCJS which -- through CPP -- would be an empty module on ghc.

from string-conversions.

dmjio avatar dmjio commented on July 23, 2024

Sounds good, was a bit worried about orphans if there was a separate module (unless the class definition was copied as well). Might be able to skip CPP altogether if cabal file was arranged like so:

library
   if impl(ghcjs)
      hs-source-dirs: ghcjs-src
      exposed-modules: Data.String.Conversions
      build-depends: ghcjs-base
   else
     hs-source-dirs: src
     exposed-modules: Data.String.Conversions
     build-depends: text, bytestring

Unsure if hpack allows for impl(ghcjs) syntax though

from string-conversions.

dmjio avatar dmjio commented on July 23, 2024

It seems like hpack supports conditionals

when:
  - condition: flag(fast)
    then:
      ghc-options: -O2
    else:
      ghc-options: -O0

from string-conversions.

soenkehahn avatar soenkehahn commented on July 23, 2024

I think I would still prefer CPP over impl(ghcjs).

from string-conversions.

dmjio avatar dmjio commented on July 23, 2024

Ok, that's fine too. So then should we do the single module approach, but
#ifdef on imports and instances?

On Wed, Nov 2, 2016 at 1:57 PM, Sรถnke Hahn [email protected] wrote:

I think I would still prefer CPP over impl(ghcjs).

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#9 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA1bPM2xQogLbgYi5309JXpGOk1SWIulks5q6N0ggaJpZM4Km5I6
.

Cell: 1.630.740.8204

from string-conversions.

soenkehahn avatar soenkehahn commented on July 23, 2024

Yes, please.

from string-conversions.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.