-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make concepts into a cabal library package #9
Comments
So, I propose the following course of action:
A useful reference: http://begriffs.com/posts/2014-10-25-creating-package-hackage.html |
I've pushed a major source structure refactoring, addressing two tasks above. Feedback welcome. |
I would add another item: formally tagging our first release, e.g. |
I had this in mind, will post a PR soon.
Sure. It could be turned into our |
Added. IIRC this happens automatically when we do a github release. |
I think we better just drop it, replacing it with tests and possibly some overview haddock section.
Not sure yet. Maybe it's possible to use GHC API to compile a given concepts |
SGTM
Remember what you said about requiring GHC to be installed to be too much? This is pretty much the same - we would have to bundle at least part of the compiler with our binary. If the compiler is modular enough this should be possible, and if it's well written enough the overhead in size should not be too large. I'll look into it. |
@mvdan Good point. However, as a first step you should implement your conversion algorithm just as a library function, e.g.: deriveSTG :: (Eq a, Show a) => CircuitConcept a -> STG a I guess a logical place to put it inside the source tree is There will then be a separate executable project to be plugged into Workcraft. We'll think about it later. |
Sure. So you can transform either at compile time by using it as a library or at runtime (though also compiling) via the executable. |
Yep, that's the point. We could later add other 'backends': |
Just so we're on the same page, |
Yes, I think so. Note, you probably don't want to export the constructor.
I would avoid using exportDotG :: STG String -> String
importDotG :: String -> STG String If you make exportDotG' :: Show a => STG a -> String
exportDotG' = exportDotG . fmap show
importDotG' :: Read a => String -> STG a
importDotG' = fmap read . importDotG As you can see the implementations are pretty trivial, so not sure it is worth it. |
Haskell is weird. In any other language, feeding a string would be horrible - you would want to feed a reader, e.g. an open file. Unless there's something I'm missing here, it looks like |
Yes, due to laziness it is possible to get away with passing It is possible to screw up though by accidentally adding a strict function into such pipeline. But I guess such a screw up is possible in a strict language too even when explicitly operating with streams. |
Not necessarily. If your |
@snowleopard the first two items are done, and there is an open issue about doc/comments already. I suggest we close this issue and tag as soon as |
@mvdan Agreed. |
This way it can be used by others easily. Should be published as well.
The text was updated successfully, but these errors were encountered: