lean4-htt/src/Init/Data/String/Stream.lean
Markus Himmel bf60550ce5
chore: rename Substring to Substring.Raw (#11154)
This PR renames `Substring`  to `Substring.Raw`.

This is to signify its status as a second-class citizen (not deprecated,
but no real plans for verification, like `String.Pos.Raw`) and to free
up the name `Substring` for a possible future type `String.Substring :
String -> Type` so that `s.Substring` is the type of substrings of `s`.

The functions `String.toSubstring` and `String.toSubstring'` will remain
for now for bootstrapping reasons.
2025-11-16 09:30:04 +00:00

17 lines
483 B
Text

/-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich, Andrew Kent, Leonardo de Moura
-/
module
prelude
public import Init.Data.String.Basic
public import Init.Data.Stream
public instance : Std.Stream Substring.Raw Char where
next? s :=
if s.startPos < s.stopPos then
some (s.startPos.get s.str, { s with startPos := s.startPos.next s.str })
else
none