From 9f1226dcb18141bf99dc319280307842215401fe Mon Sep 17 00:00:00 2001 From: Heeren Date: Tue, 29 Oct 2019 13:19:58 +0100 Subject: [PATCH] Update DomainReasoner.hs Consider exercise aliases for looking up feedback script --- src/Ideas/Service/DomainReasoner.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ideas/Service/DomainReasoner.hs b/src/Ideas/Service/DomainReasoner.hs index 05da3db5..717bd3f7 100644 --- a/src/Ideas/Service/DomainReasoner.hs +++ b/src/Ideas/Service/DomainReasoner.hs @@ -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) \ No newline at end of file +defaultScript dr n = + maybe (return mempty) parseScriptSafe (realName `lookup` scripts dr) + where + realName = fromMaybe n (lookup n (aliases dr)) \ No newline at end of file