translateUnitExpression scope _ nsid (L1.L1UnitScopedVar ss scopedv) =
  L2.L2UnitScopedVar ss <$>
    maybe (fail $ "Reference to unknown scoped units name " ++ (BSC.unpack . L1.l1ScopedIdBS $ scopedv) ++ " at " ++ (show ss)) return (M.lookup scopedv (siUnitIDMap scope))
translateUnitExpression scope _ nsid (L1.L1UnitScopedVar ss scopedv) =
  L2.L2UnitScopedVar ss <$>
    maybe (fail $ "Reference to unknown scoped units name " ++ (BSC.unpack . L1.l1ScopedIdBS $ scopedv) ++ " at " ++ (show ss)) return (M.lookup scopedv (siUnitIDMap scope))
translateUnitExpression scope _ nsid (L1.L1UnitScopedVar ss scopedv) =
  L2.L2UnitScopedVar ss <$>
    maybe (fail $ "Reference to unknown scoped units name " ++ (BSC.unpack . L1.l1ScopedIdBS $ scopedv) ++ " at " ++ (show ss)) return (M.lookup scopedv (siUnitIDMap scope))