Hi Andrew (Bromage),
I reversed the parameter order to Data.Map.lookup and calling fromJust to pull out value from Maybe wrapper ... all as you suggested:
> remLookupFwd :: (ReVars m t) => SimplRe t -> ReM m t (ReInfo t)
> remLookupFwd re
> = do fwd <- gets resFwdMap
> let { Just reinfo = fromJust(M.lookup re fwd) } -- PROBLEM
> return reinfo
I am still getting a type mismatch:
Swish\HaskellRDF\Dfa\Dfa.lhs:162:29:
Couldn't match expected type `Maybe t'
against inferred type `ReInfo t1'
In the expression: fromJust (M.lookup re fwd)
In a pattern binding: Just reinfo = fromJust (M.lookup re fwd)
In the expression:
do fwd <- gets resFwdMap
let Just reinfo = fromJust (M.lookup re fwd)
return reinfo
Vasili