summaryrefslogtreecommitdiff
path: root/ghc/compiler/prelude/PrelMods.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/prelude/PrelMods.lhs')
-rw-r--r--ghc/compiler/prelude/PrelMods.lhs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ghc/compiler/prelude/PrelMods.lhs b/ghc/compiler/prelude/PrelMods.lhs
index 17bef6a65b..da5b7118ce 100644
--- a/ghc/compiler/prelude/PrelMods.lhs
+++ b/ghc/compiler/prelude/PrelMods.lhs
@@ -40,4 +40,7 @@ iX = SLIT("Ix")
fromPrelude :: FAST_STRING -> Bool
fromPrelude s = (_SUBSTR_ s 0 6 == SLIT("Prelude"))
+ where
+ substr str beg end
+ = take (end - beg + 1) (drop beg str)
\end{code}