-
Notifications
You must be signed in to change notification settings - Fork 9
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
Linsen chose to change their api D: #134
Conversation
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.
LGTM
Add comment about what magic numbers mean |
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.
Good stuff! See requests in comments! Keep up the good work!
src/Model/Linsen.hs
Outdated
import Data.Thyme ( parseTime | ||
, defaultTimeLocale ) | ||
import Data.Thyme ( parseTime ) | ||
import Data.Time.Format (TimeLocale (..) ) |
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.
Can you use https://hackage.haskell.org/package/thyme-0.4/docs/Data-Thyme-Format.html#t:TimeLocale instead? So you don't have to add another dependency.
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.
So, about that
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.
You see, Thyme uses Time as the dependency, which this constructor, but yes, it does reexport it so I will change that
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.
Sweet!
@@ -84,16 +84,16 @@ main = hspec $ do | |||
s1 <- BL.readFile "test/linsen1.json" | |||
testFun | |||
(Right [ Menu |
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.
I love the updating of the example.
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.
Maybe I should eat lunch.
@@ -92,9 +128,9 @@ parse day = | |||
|
|||
menuParser :: [Value] -> Parser [Menu] | |||
menuParser = pure . (zip [0 :: Integer ..] >=> \case |
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.
Magic indices <3
These are hard to make less magic. :(
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.
I was wrong! :D
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.
This looks good!
@@ -92,9 +128,9 @@ parse day = | |||
|
|||
menuParser :: [Value] -> Parser [Menu] | |||
menuParser = pure . (zip [0 :: Integer ..] >=> \case |
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.
I was wrong! :D
mat-chalmers.cabal
Outdated
@@ -55,7 +55,6 @@ library | |||
, word8 == 0.1.3 | |||
, extra >= 1.7.16 && <= 1.8 | |||
, vector-space >= 0.16 && <0.18 | |||
, time >= 1.11 && <1.20 |
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.
\o/
pattern MeatDish, FishDish, VegDish :: Integer | ||
pattern MeatDish = 3 | ||
pattern FishDish = 8 | ||
pattern VegDish = 13 |
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.
Vad är oddsen att de kommer ändra dessa igen...
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.
T-T
Please fix