-
Notifications
You must be signed in to change notification settings - Fork 27
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
Generalize CodeGen to use it for other targets #67
Conversation
(cg >>= return) `shouldBe` cg | ||
specify "associativity" $ do | ||
((cg >>= f) >>= f') `shouldBe` (cg >>= (\x -> f x >>= f')) | ||
((cg >>= f') >>= f) `shouldBe` (cg >>= (\x -> f' x >>= f)) |
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.
이 테스트들은 두 가지 이유 때문에 제거되었습니다.
- 이제
CodeGen
은ExceptT
와StateT
의 조합으로 구현되는데, 이 라이브러리들이 이미Monad
를 잘 구현하고 있다고 가정할 수 있습니다. StateT
가Eq
와Show
를 구현하지 않아,CodeGen
도 그 타입클래스를 구현할 수 없고, 그래서shouldBe
를 쓸 수 없습니다.
@@ -19,6 +19,7 @@ cabal-version: >=1.10 | |||
|
|||
library | |||
exposed-modules: Nirum.Cli | |||
, Nirum.CodeGen |
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.
별거 아니지만 Nirum.Compiler.CodeGen
정도로 안쪽에 집어넣는 건 어떨까요? (물론 아직 Nirum.Compiler
같은 공간은 아직 없지만 곧 필요할 것 같아서…)
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.
실제로 필요하게 될 때 옮겨도 그다지 늦지 않을 것 같습니다.
기존에 👍 |
중간에 WIP 커밋이 그대로 있기도 하고 해서 squash & merge하겠습니다. |
리뷰도 못봤네요 수고많으셨습니다 |
This is a preparation of #50, to insert the information which version of Python code will be generated, in the code generation progress.