Skip to content

Commit

Permalink
Update DomainReasoner.hs
Browse files Browse the repository at this point in the history
Consider exercise aliases for looking up feedback script
  • Loading branch information
Heeren committed Oct 29, 2019
1 parent d12c63a commit 9f1226d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Ideas/Service/DomainReasoner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,7 @@ findService dr a
single _ = fail $ "Ambiguous service " ++ showId a

defaultScript :: DomainReasoner -> Id -> IO Script
defaultScript dr =
maybe (return mempty) parseScriptSafe . (`lookup` scripts dr)
defaultScript dr n =
maybe (return mempty) parseScriptSafe (realName `lookup` scripts dr)
where
realName = fromMaybe n (lookup n (aliases dr))

0 comments on commit 9f1226d

Please sign in to comment.