Skip to content
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

Merged
merged 5 commits into from
Aug 24, 2016

Conversation

Kroisse
Copy link
Contributor

@Kroisse Kroisse commented Aug 23, 2016

This is a preparation of #50, to insert the information which version of Python code will be generated, in the code generation progress.

(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))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 테스트들은 두 가지 이유 때문에 제거되었습니다.

  1. 이제 CodeGenExceptTStateT의 조합으로 구현되는데, 이 라이브러리들이 이미 Monad를 잘 구현하고 있다고 가정할 수 있습니다.
  2. StateTEqShow를 구현하지 않아, CodeGen도 그 타입클래스를 구현할 수 없고, 그래서 shouldBe를 쓸 수 없습니다.

@dahlia dahlia added the typ:enhance Type: Enhancement/new feature label Aug 24, 2016
@@ -19,6 +19,7 @@ cabal-version: >=1.10

library
exposed-modules: Nirum.Cli
, Nirum.CodeGen
Copy link
Member

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 같은 공간은 아직 없지만 곧 필요할 것 같아서…)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

실제로 필요하게 될 때 옮겨도 그다지 늦지 않을 것 같습니다.

@dahlia
Copy link
Member

dahlia commented Aug 24, 2016

기존에 with* 류 함수들이 CodeGen () 반환하게 고치고 싶었는데 이번에 그것도 다 고쳐졌네요. 더 쓰기에도 편해진 것 같습니다.

👍

@dahlia dahlia added this to the The first release: 0.1.0 milestone Aug 24, 2016
@dahlia
Copy link
Member

dahlia commented Aug 24, 2016

중간에 WIP 커밋이 그대로 있기도 하고 해서 squash & merge하겠습니다.

@dahlia dahlia merged commit 0666b8d into nirum-lang:master Aug 24, 2016
@kanghyojun
Copy link
Member

리뷰도 못봤네요 수고많으셨습니다

@dahlia dahlia added the cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) label Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) typ:enhance Type: Enhancement/new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants