-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Small fixes in the generator #2269
Changes from 10 commits
27ca30d
8eaee7a
a1842e8
02dc4d8
93a0eee
4fbbf52
78b2be9
0253937
fc2830c
ec1df7b
ebfe696
6a13097
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ where | |
import Control.Monad.Except (ExceptT, MonadError (throwError), runExceptT) | ||
import qualified Control.Monad.Except as MonadExcept | ||
import Control.Monad.Identity (Identity (runIdentity)) | ||
import Control.Monad.State (MonadState, StateT (runStateT), modify) | ||
import Control.Monad.State (MonadState, State, modify, runStateT) | ||
import Data.List.NonEmpty (NonEmpty, fromList) | ||
|
||
-- | Generator is a monad transformer stack where we abstract away the underlying | ||
|
@@ -25,7 +25,7 @@ import Data.List.NonEmpty (NonEmpty, fromList) | |
-- The mechanism to catch errors is only there to assist in collecting more errors, not recover. | ||
-- There may optionally be additional errors or non-fatal warnings logged in the State. | ||
newtype Generator a = Generator | ||
{ _runGenerator :: ExceptT GeneratorError (StateT GeneratorState Identity) a | ||
{ _runGenerator :: ExceptT GeneratorError (State GeneratorState) a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this just so I could ask what's the purpose of using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hah, can't remember at the moment! I guess it is the same thing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I know, it is. |
||
} | ||
deriving | ||
( Functor, | ||
|
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.
We don't use this as far as I can see, and it's not documented.
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.
Origin story: