Skip to content

Commit

Permalink
tweak variable names to match new type name
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinland committed Sep 17, 2024
1 parent f8ca29a commit 428eab4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ instance Monoid Description where
mempty = Description [const ""]

instance ToJSON Description where
toJSON (Description c) = toJSON . concatMap (Html &) $ c
toJSON (Description d) = toJSON . concatMap (Html &) $ d


class Showable a where
Expand All @@ -46,8 +46,8 @@ instance Showable String where
toHtml = id

instance Showable Description where
toLatex (Description c) = concatMap (LaTeX &) $ c
toHtml (Description c) = concatMap (Html &) $ c
toLatex (Description d) = concatMap (LaTeX &) $ d
toHtml (Description d) = concatMap (Html &) $ d


(.+) :: (Showable a, Showable b) => a -> b -> Description
Expand Down
2 changes: 1 addition & 1 deletion src/Situation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data Situation = Situation String Bidding DealerProg CompleteCall Description
-- auction and describing the next action that should follow.
situation :: Showable s => String -> Action -> Action -> s -> Direction ->
Vulnerability -> Situation
situation r a c s d = Situation r bidding deal answer (toDescription s) d
situation r a c s d v = Situation r bidding deal answer (toDescription s) d v
where
(bidding, deal) = finish d (a >> withholdBid c)
answer = extractLastCall c
Expand Down
2 changes: 1 addition & 1 deletion src/Topic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ data Topic = Topic { topicName :: Description
-- in other files are named that. This is named as a verb to distinguish it from
-- the values it generates.
makeTopic :: Showable a => a -> String -> Situations -> Topic
makeTopic c n s = Topic (toDescription c) n s
makeTopic d n s = Topic (toDescription d) n s


choose :: Topic -> State StdGen Situation
Expand Down

0 comments on commit 428eab4

Please sign in to comment.