mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-23 14:18:02 +03:00
[ refactor ] Remove Data.Strings module (#1607)
This commit is contained in:
parent
af871967ef
commit
8e30b296c0
4
.github/workflows/ci-ubuntu-combined.yml
vendored
4
.github/workflows/ci-ubuntu-combined.yml
vendored
@ -12,7 +12,7 @@ on:
|
||||
- main
|
||||
|
||||
env:
|
||||
IDRIS2_VERSION: 0.3.0 # For previous-version build
|
||||
IDRIS2_VERSION: 0.4.0 # For previous-version build
|
||||
SCHEME: scheme
|
||||
|
||||
jobs:
|
||||
@ -86,7 +86,7 @@ jobs:
|
||||
wget https://www.idris-lang.org/idris2-src/idris2-$IDRIS2_VERSION.tgz
|
||||
tar zxvf idris2-$IDRIS2_VERSION.tgz
|
||||
cd Idris2-$IDRIS2_VERSION
|
||||
make bootstrap-build
|
||||
make bootstrap
|
||||
cd ..
|
||||
- name: Install previous version
|
||||
run: |
|
||||
|
@ -17,6 +17,14 @@
|
||||
and reverts to whole program compilation. Incremental compilation is currently
|
||||
supported only by the Chez Scheme back end.
|
||||
|
||||
### Library Changes
|
||||
|
||||
#### Prelude
|
||||
|
||||
Changed
|
||||
|
||||
- Removed `Data.Strings`. Use `Data.String` instead.
|
||||
|
||||
## v0.4.0
|
||||
|
||||
### Syntax changes
|
||||
|
@ -1,5 +1,5 @@
|
||||
import System.File
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.List
|
||||
|
||||
-- read in a dictionary, shuffle and then resort
|
||||
|
@ -1,5 +1,5 @@
|
||||
import System.File
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.List
|
||||
|
||||
main : IO ()
|
||||
|
@ -350,7 +350,7 @@ which reads a number from the console, returning a value of the form
|
||||
|
||||
.. code-block:: idris
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
readNumber : IO (Maybe Nat)
|
||||
readNumber = do
|
||||
|
@ -31,7 +31,7 @@ In ``Average.idr``, add:
|
||||
|
||||
.. code-block:: idris
|
||||
|
||||
import Data.Strings -- for `words`
|
||||
import Data.String -- for `words`
|
||||
import Data.List -- for `length` on lists
|
||||
|
||||
In ``AveMain.idr`` and ``Reverse.idr`` add:
|
||||
@ -58,7 +58,7 @@ Chapter 4
|
||||
|
||||
For the reasons described above:
|
||||
|
||||
+ In ``DataStore.idr``, add ``import System.REPL`` and ``import Data.Strings``
|
||||
+ In ``DataStore.idr``, add ``import System.REPL`` and ``import Data.String``
|
||||
+ In ``SumInputs.idr``, add ``import System.REPL``
|
||||
+ In ``TryIndex.idr``, add an implicit argument:
|
||||
|
||||
@ -78,9 +78,9 @@ Chapter 5
|
||||
There is no longer a ``Cast`` instance from ``String`` to ``Nat``, because its
|
||||
behaviour of returing Z if the ``String`` wasn't numeric was thought to be
|
||||
confusing and potentially error prone. Instead, there is ``stringToNatOrZ`` in
|
||||
``Data.Strings`` which at least has a clearer name. So:
|
||||
``Data.String`` which at least has a clearer name. So:
|
||||
|
||||
In ``Loops.idr`` and ``ReadNum.idr`` add ``import Data.Strings`` and change ``cast`` to
|
||||
In ``Loops.idr`` and ``ReadNum.idr`` add ``import Data.String`` and change ``cast`` to
|
||||
``stringToNatOrZ``
|
||||
|
||||
In ``ReadNum.idr``, since functions must now be ``covering`` by default, add
|
||||
@ -89,7 +89,7 @@ a ``partial`` annotation to ``readNumber_v2``.
|
||||
Chapter 6
|
||||
---------
|
||||
|
||||
In ``DataStore.idr`` and ``DataStoreHoles.idr``, add ``import Data.Strings`` and
|
||||
In ``DataStore.idr`` and ``DataStoreHoles.idr``, add ``import Data.String`` and
|
||||
``import System.REPL``. Also in ``DataStore.idr``, the ``schema`` argument to
|
||||
``display`` is required for matching, so change the type to:
|
||||
|
||||
@ -97,7 +97,7 @@ In ``DataStore.idr`` and ``DataStoreHoles.idr``, add ``import Data.Strings`` and
|
||||
|
||||
display : {schema : _} -> SchemaType schema -> String
|
||||
|
||||
In ``TypeFuns.idr`` add ``import Data.Strings``
|
||||
In ``TypeFuns.idr`` add ``import Data.String``
|
||||
|
||||
Chapter 7
|
||||
---------
|
||||
@ -158,7 +158,7 @@ Chapter 9
|
||||
|
||||
In ``Hangman.idr``:
|
||||
|
||||
+ Add ``import Data.Strings``, ``import Data.Vect.Elem`` and ``import Decidable.Equality``
|
||||
+ Add ``import Data.String``, ``import Data.Vect.Elem`` and ``import Decidable.Equality``
|
||||
+ ``removeElem`` pattern matches on ``n``, so it needs to be written in its
|
||||
type:
|
||||
|
||||
@ -335,12 +335,12 @@ now uses a safer type for the number of shifts:
|
||||
|
||||
|
||||
In ``ArithCmd.idr``, update ``DivBy``, ``randoms``, and ``import Data.Bits``
|
||||
as above. Also add ``import Data.Strings`` for ``Strings.toLower``.
|
||||
as above. Also add ``import Data.String`` for ``String.toLower``.
|
||||
|
||||
In ``ArithCmd.idr``, update ``DivBy``, ``randoms``, ``import Data.Bits``
|
||||
and ``import Data.Strings`` as above. Also,
|
||||
since export rules are per-namespace now, rather than per-file, you need to
|
||||
export ``(>>=)`` from the namespaces ``CommandDo`` and ``ConsoleDo``.
|
||||
In ``ArithCmd.idr``, update ``DivBy``, ``randoms``, ``import Data.Bits`` and
|
||||
``import Data.String`` as above. Also, since export rules are per-namespace
|
||||
now, rather than per-file, you need to export ``(>>=)`` from the namespaces
|
||||
``CommandDo`` and ``ConsoleDo``.
|
||||
|
||||
In ``ArithCmdDo.idr``, since ``(>>=)`` is ``export``, ``Command`` and ``ConsoleIO``
|
||||
also have to be ``export``. Also, update ``randoms`` and ``import Data.Bits`` as above.
|
||||
@ -350,11 +350,11 @@ In ``StreamFail.idr``, add a ``partial`` annotation to ``labelWith``.
|
||||
Chapter 12
|
||||
----------
|
||||
|
||||
For reasons described above: In ``ArithState.idr``, add ``import Data.Strings``
|
||||
and ``import Data.Bits`` and update ``randoms``.
|
||||
Also the ``(>>=)`` operators need to be set as ``export`` since they are in their
|
||||
own namespaces, and in ``getRandom``, ``DivBy`` needs to take additional
|
||||
arguments ``div`` and ``rem``.
|
||||
For reasons described above: In ``ArithState.idr``, add ``import Data.String``
|
||||
and ``import Data.Bits`` and update ``randoms``. Also the ``(>>=)`` operators
|
||||
need to be set as ``export`` since they are in their own namespaces, and in
|
||||
``getRandom``, ``DivBy`` needs to take additional arguments ``div`` and
|
||||
``rem``.
|
||||
|
||||
In ``ArithState.idr``, since ``(>>=)`` is ``export``, ``Command`` and ``ConsoleIO``
|
||||
also have to be ``export``.
|
||||
@ -392,7 +392,7 @@ In ``StackIO.idr``:
|
||||
|
||||
In ``Vending.idr``:
|
||||
|
||||
+ Add ``import Data.Strings`` and change ``cast`` to ``stringToNatOrZ`` in ``strToInput``
|
||||
+ Add ``import Data.String`` and change ``cast`` to ``stringToNatOrZ`` in ``strToInput``
|
||||
+ In ``MachineCmd`` type, add an implicit argument to ``(>>=)`` data constructor:
|
||||
|
||||
.. code-block:: idris
|
||||
@ -449,14 +449,14 @@ Chapter 14
|
||||
|
||||
In ``ATM.idr``:
|
||||
|
||||
+ Add ``import Data.Strings`` and change ``cast`` to ``stringToNatOrZ`` in ``runATM``
|
||||
+ Add ``import Data.String`` and change ``cast`` to ``stringToNatOrZ`` in ``runATM``
|
||||
|
||||
In ``Hangman.idr``, add:
|
||||
|
||||
.. code-block:: idris
|
||||
|
||||
import Data.Vect.Elem -- `Elem` now has its own submodule
|
||||
import Data.Strings -- for `toUpper`
|
||||
import Data.String -- for `toUpper`
|
||||
import Data.List -- for `nub`
|
||||
|
||||
+ In ``Loop`` namespace, export ``GameLoop`` type and its data constructors:
|
||||
|
@ -3,7 +3,7 @@ module Control.App.FileIO
|
||||
import Control.App
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.File
|
||||
|
||||
%default covering
|
||||
|
@ -1,3 +0,0 @@
|
||||
module Data.Strings
|
||||
|
||||
import public Data.String as Data.Strings
|
@ -2,7 +2,7 @@ module System
|
||||
|
||||
import public Data.So
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -3,7 +3,7 @@ module System.File
|
||||
import public Data.Fuel
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.Info
|
||||
|
||||
%default total
|
||||
|
@ -64,7 +64,6 @@ modules = Control.App,
|
||||
Data.So,
|
||||
Data.Stream,
|
||||
Data.String,
|
||||
Data.Strings,
|
||||
Data.These,
|
||||
Data.Vect,
|
||||
Data.Vect.Elem,
|
||||
|
@ -13,7 +13,7 @@ module Control.Validation
|
||||
import Control.Monad.Identity
|
||||
import Control.Monad.Error.Either
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
import Decidable.Equality
|
||||
|
||||
|
@ -3,7 +3,7 @@ module Data.String.Extra
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
||| Not as fancy
|
||||
module Data.String.Interpolation
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
namespace Data.String.Interpolation.Basic
|
||||
%inline
|
||||
|
@ -3,7 +3,7 @@ module Data.String.Parser
|
||||
import public Control.Monad.Identity
|
||||
import Control.Monad.Trans
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Fin
|
||||
import Data.List
|
||||
import Data.List1
|
||||
|
@ -4,7 +4,7 @@ import Data.Bits
|
||||
import Data.List
|
||||
import Data.Nat
|
||||
import Data.String.Extra
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -10,7 +10,7 @@ import Control.Monad.State
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -3,7 +3,7 @@ module System.Directory.Tree
|
||||
import Data.DPair
|
||||
import Data.List
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.Directory
|
||||
import System.Path
|
||||
|
||||
|
@ -4,7 +4,7 @@ import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.String.Extra
|
||||
|
||||
import Text.Token
|
||||
@ -108,14 +108,14 @@ Show Body where
|
||||
export
|
||||
Show Volume where
|
||||
show (UNC server share) = "\\\\" ++ server ++ "\\" ++ share
|
||||
show (Disk disk) = Strings.singleton disk ++ ":"
|
||||
show (Disk disk) = String.singleton disk ++ ":"
|
||||
|
||||
||| Displays the path in the format of this platform.
|
||||
export
|
||||
Show Path where
|
||||
show path =
|
||||
let
|
||||
sep = Strings.singleton dirSeparator
|
||||
sep = String.singleton dirSeparator
|
||||
showVol = maybe "" show path.volume
|
||||
showRoot = if path.hasRoot then sep else ""
|
||||
showBody = join sep $ map show path.body
|
||||
|
@ -4,7 +4,7 @@ import public Control.Delayed
|
||||
import Data.Bool
|
||||
import Data.List
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
||| A language of token recognisers.
|
||||
||| @ consumes If `True`, this recogniser is guaranteed to consume at
|
||||
|
@ -3,7 +3,7 @@ module Text.PrettyPrint.Prettyprinter.Doc
|
||||
import Data.List
|
||||
import public Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import public Data.String.Extra
|
||||
|
||||
%default total
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Text.PrettyPrint.Prettyprinter.Render.HTML
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
export
|
||||
htmlEscape : String -> String
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Text.PrettyPrint.Prettyprinter.Render.String
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.String.Extra
|
||||
import Text.PrettyPrint.Prettyprinter.Doc
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Text.PrettyPrint.Prettyprinter.Render.Terminal
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import public Control.ANSI
|
||||
import Control.Monad.ST
|
||||
import Text.PrettyPrint.Prettyprinter.Doc
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Text.PrettyPrint.Prettyprinter.Util
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Text.PrettyPrint.Prettyprinter.Doc
|
||||
import Text.PrettyPrint.Prettyprinter.Render.String
|
||||
|
||||
|
@ -7,7 +7,7 @@ module Network.Socket.Data
|
||||
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
-- ------------------------------------------------------------ [ Type Aliases ]
|
||||
|
||||
|
@ -20,7 +20,7 @@ import Data.IOArray
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Libraries.Data.NameMap
|
||||
import Data.Strings as String
|
||||
import Data.String as String
|
||||
|
||||
import Idris.Env
|
||||
|
||||
|
@ -4,7 +4,7 @@ import Compiler.Common
|
||||
import Compiler.ES.Imperative
|
||||
import Libraries.Utils.Hex
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.SortedMap
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
@ -12,10 +12,10 @@ import Core.Directory
|
||||
|
||||
%default covering
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
data ESs : Type where
|
||||
|
||||
@ -239,7 +239,7 @@ jsConstant (I32 i) = pure $ show i
|
||||
jsConstant (I64 i) = pure $ show i ++ "n"
|
||||
jsConstant (BI i) = pure $ show i ++ "n"
|
||||
jsConstant (Str s) = pure $ jsString s
|
||||
jsConstant (Ch c) = pure $ jsString $ Data.Strings.singleton c
|
||||
jsConstant (Ch c) = pure $ jsString $ Data.String.singleton c
|
||||
jsConstant (Db f) = pure $ show f
|
||||
jsConstant WorldVal = addConstToPreamble "idrisworld" "Symbol('idrisworld')";
|
||||
jsConstant (B8 i) = pure $ show i
|
||||
|
@ -14,7 +14,7 @@ import System
|
||||
import System.File
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%default covering
|
||||
|
@ -83,7 +83,7 @@ module Compiler.ES.TailRec
|
||||
import Data.Maybe
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.Graph
|
||||
import Libraries.Data.SortedSet
|
||||
import Libraries.Data.List.Extra as L
|
||||
|
@ -13,7 +13,7 @@ import Core.Directory
|
||||
import Data.List
|
||||
import Libraries.Data.DList
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.SortedSet
|
||||
import Data.Vect
|
||||
|
||||
|
@ -17,7 +17,7 @@ import Libraries.Utils.Path
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
|
||||
import Idris.Env
|
||||
|
@ -21,7 +21,7 @@ import Libraries.Utils.Path
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
|
||||
import Idris.Env
|
||||
|
@ -16,7 +16,7 @@ import Libraries.Utils.Path
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Libraries.Data.NameMap
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
|
||||
import Idris.Env
|
||||
|
@ -18,7 +18,7 @@ import Data.List
|
||||
import Data.Maybe
|
||||
import Libraries.Data.NameMap
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
|
||||
import Idris.Env
|
||||
|
@ -2,7 +2,7 @@ module Core.Context.Log
|
||||
|
||||
import Core.Context
|
||||
import Core.Options
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.StringMap
|
||||
|
||||
|
@ -10,16 +10,16 @@ import Core.Value
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.NameMap
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -9,7 +9,7 @@ import Core.Options
|
||||
import Libraries.Utils.Path
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Maybe
|
||||
|
||||
import System.Directory
|
||||
|
@ -7,7 +7,7 @@ import Core.CompileExpr
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Libraries.Data.List.Lazy
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Iterator
|
||||
import Data.Vect
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Core.Name
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Maybe
|
||||
import Decidable.Equality
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
|
@ -2,7 +2,7 @@ module Core.Name.Namespace
|
||||
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Decidable.Equality
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Util
|
||||
|
@ -9,7 +9,7 @@ import Libraries.Utils.Path
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import System.Info
|
||||
|
||||
|
@ -5,7 +5,7 @@ import Data.List1
|
||||
import public Data.Maybe
|
||||
import Libraries.Data.StringMap
|
||||
import Libraries.Data.StringTrie
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.These
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Util
|
||||
|
@ -11,7 +11,7 @@ import Core.Options
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Either
|
||||
|
||||
import System
|
||||
@ -153,7 +153,7 @@ export
|
||||
ideSocketModeAddress : List CLOpt -> (String, Int)
|
||||
ideSocketModeAddress [] = ("localhost", 38398)
|
||||
ideSocketModeAddress (IdeModeSocket hp :: _) =
|
||||
let (h, p) = Strings.break (== ':') hp
|
||||
let (h, p) = String.break (== ':') hp
|
||||
port = fromMaybe 38398 (portPart p >>= parsePositive)
|
||||
host = if h == "" then "localhost" else h
|
||||
in (host, port)
|
||||
|
@ -40,13 +40,13 @@ import Data.Maybe
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
-- Convert high level Idris declarations (PDecl from Idris.Syntax) into
|
||||
-- TTImp, recording any high level syntax info on the way (e.g. infix
|
||||
|
@ -4,7 +4,7 @@ import Core.Context
|
||||
import Core.Core
|
||||
import Core.Directory
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Parser.Lexer.Source
|
||||
|
||||
|
@ -18,7 +18,7 @@ import TTImp.Elab.Prim
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.ANameMap
|
||||
import Libraries.Data.NameMap
|
||||
|
@ -27,7 +27,7 @@ import IdrisPaths
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.So
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System
|
||||
import System.Directory
|
||||
import System.File
|
||||
|
@ -18,7 +18,7 @@ import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Stream
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.List.Extra
|
||||
import Libraries.Data.List1 as Lib
|
||||
@ -30,10 +30,10 @@ import Libraries.Data.String.Extra
|
||||
|
||||
import System.File
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -23,13 +23,13 @@ import Data.List
|
||||
import Data.List1
|
||||
import Libraries.Data.List.Extra
|
||||
import Libraries.Data.String.Extra
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.File
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -6,7 +6,7 @@ import Parser.Unlit
|
||||
|
||||
import Data.List
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Core.FC
|
||||
|
||||
import Data.Maybe
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Parser.Lexer.Source
|
||||
import Parser.Source
|
||||
import Parser.Support
|
||||
|
@ -19,7 +19,7 @@ import Core.Unify
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.So
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Idris.Desugar
|
||||
import Idris.Error
|
||||
|
@ -13,7 +13,7 @@ import Core.Unify
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.These
|
||||
|
||||
import Parser.Package
|
||||
@ -45,10 +45,10 @@ import IdrisPaths
|
||||
import public Idris.Package.Types
|
||||
import Idris.Package.Init
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -5,7 +5,7 @@ import Core.Name.Namespace
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Idris.Package.Types
|
||||
import System.Directory
|
||||
|
@ -3,7 +3,7 @@ module Idris.Package.Types
|
||||
import Core.FC
|
||||
import Core.Name.Namespace
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Idris.CommandLine
|
||||
import Idris.Version
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
|
@ -1,19 +1,19 @@
|
||||
module Idris.Parser
|
||||
|
||||
import Core.Options
|
||||
import Core.Metadata
|
||||
import Idris.Syntax
|
||||
import Core.Options
|
||||
import Core.Metadata
|
||||
import Idris.Syntax
|
||||
import public Parser.Source
|
||||
import Parser.Lexer.Source
|
||||
import TTImp.TTImp
|
||||
import Parser.Lexer.Source
|
||||
import TTImp.TTImp
|
||||
|
||||
import public Libraries.Text.Parser
|
||||
import Data.Either
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.Either
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.String
|
||||
import Libraries.Utils.String
|
||||
|
||||
import Idris.Parser.Let
|
||||
|
@ -2,7 +2,7 @@ module Idris.Pretty
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Control.ANSI.SGR
|
||||
|
||||
import Parser.Lexer.Source
|
||||
|
@ -66,7 +66,7 @@ import Libraries.Data.ANameMap
|
||||
import Libraries.Data.NameMap
|
||||
import Libraries.Data.PosMap
|
||||
import Data.Stream
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.DPair
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Data.List.Extra
|
||||
@ -80,10 +80,10 @@ import System
|
||||
import System.File
|
||||
import System.Directory
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -39,7 +39,7 @@ import Libraries.Data.ANameMap
|
||||
import Libraries.Data.NameMap
|
||||
import Libraries.Data.PosMap
|
||||
import Data.Stream
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.DPair
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Data.List.Extra
|
||||
|
@ -9,14 +9,14 @@ import TTImp.TTImp
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Libraries.Data.List.Extra
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.File
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -14,7 +14,7 @@ import TTImp.Utils
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.StringMap
|
||||
|
||||
%default covering
|
||||
|
@ -22,7 +22,7 @@ import IdrisPaths
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.So
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.List1 as Lib
|
||||
|
||||
|
@ -14,7 +14,7 @@ import TTImp.TTImp
|
||||
import Libraries.Data.ANameMap
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.NameMap
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Data.StringMap
|
||||
|
@ -3,12 +3,12 @@ module Libraries.Data.String.Extra
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
module Libraries.Data.Version
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Text.Parser
|
||||
import Libraries.Text.Lexer
|
||||
|
@ -3,7 +3,7 @@ module Libraries.System.Directory.Tree
|
||||
import Data.DPair
|
||||
import Data.List
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System.Directory
|
||||
import Libraries.Utils.Path
|
||||
|
||||
|
@ -2,7 +2,7 @@ module Libraries.Text.Distance.Levenshtein
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.IOMatrix
|
||||
import Libraries.Data.List.Extra
|
||||
|
||||
|
@ -3,7 +3,7 @@ module Libraries.Text.Lexer.Core
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import public Libraries.Control.Delayed
|
||||
import public Libraries.Text.Bounded
|
||||
|
@ -3,7 +3,7 @@ module Libraries.Text.Lexer.Tokenizer
|
||||
import Data.List
|
||||
import Data.Either
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Text.Lexer.Core
|
||||
|
@ -28,13 +28,13 @@ import Libraries.Text.Lexer
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.List.Views
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -3,13 +3,13 @@ module Libraries.Text.PrettyPrint.Prettyprinter.Doc
|
||||
import Data.List
|
||||
import public Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import public Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Libraries.Text.PrettyPrint.Prettyprinter.Render.HTML
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Libraries.Text.PrettyPrint.Prettyprinter.Render.String
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Doc
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Libraries.Text.PrettyPrint.Prettyprinter.Render.Terminal
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import public Libraries.Control.ANSI
|
||||
import Control.Monad.ST
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Doc
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Libraries.Text.PrettyPrint.Prettyprinter.Util
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Doc
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter.Render.String
|
||||
|
||||
|
@ -8,7 +8,7 @@ import Data.List
|
||||
import Data.List.Elem
|
||||
import Data.List1
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
|
||||
import System.Info
|
||||
|
@ -4,7 +4,7 @@ import Data.List
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Nat
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
import Libraries.Text.Token
|
||||
@ -110,14 +110,14 @@ Show Body where
|
||||
export
|
||||
Show Volume where
|
||||
show (UNC server share) = "\\\\" ++ server ++ "\\" ++ share
|
||||
show (Disk disk) = Strings.singleton disk ++ ":"
|
||||
show (Disk disk) = String.singleton disk ++ ":"
|
||||
|
||||
||| Displays the path in the format of this platform.
|
||||
export
|
||||
Show Path where
|
||||
show path =
|
||||
let
|
||||
sep = Strings.singleton dirSeparator
|
||||
sep = String.singleton dirSeparator
|
||||
showVol = maybe "" show path.volume
|
||||
showRoot = if path.hasRoot then sep else ""
|
||||
showBody = join sep $ map show path.body
|
||||
|
@ -8,7 +8,7 @@ import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
import Libraries.Utils.String
|
||||
|
||||
|
@ -5,7 +5,7 @@ import public Parser.Lexer.Common
|
||||
import Data.List1
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.String.Extra
|
||||
import public Libraries.Text.Bounded
|
||||
import Libraries.Text.Lexer.Tokenizer
|
||||
|
@ -7,14 +7,14 @@ import Core.Context
|
||||
import Core.TT
|
||||
import Core.Metadata
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.List.Extra
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Core.TT
|
||||
import Core.Core
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Parser.Unlit
|
||||
import System.File
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Parser.Unlit
|
||||
|
||||
import public Libraries.Text.Literate
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default total
|
||||
|
||||
|
@ -16,7 +16,7 @@ import TTImp.Elab.Delayed
|
||||
import TTImp.TTImp
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Data.StringMap
|
||||
|
||||
|
@ -9,11 +9,11 @@ import Parser.Source
|
||||
import TTImp.TTImp
|
||||
|
||||
import public Libraries.Text.Parser
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.Strings
|
||||
import Data.List
|
||||
import Data.List.Views
|
||||
import Data.List1
|
||||
import Data.Maybe
|
||||
import Data.String
|
||||
|
||||
topDecl : OriginDesc -> IndentInfo -> Rule ImpDecl
|
||||
-- All the clauses get parsed as one-clause definitions. Collect any
|
||||
|
@ -30,15 +30,15 @@ import TTImp.WithClause
|
||||
import Data.Either
|
||||
import Data.List
|
||||
import Libraries.Data.NameMap
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Maybe
|
||||
import Libraries.Text.PrettyPrint.Prettyprinter
|
||||
import Libraries.Data.String.Extra
|
||||
|
||||
%hide Data.Strings.lines
|
||||
%hide Data.Strings.lines'
|
||||
%hide Data.Strings.unlines
|
||||
%hide Data.Strings.unlines'
|
||||
%hide Data.String.lines
|
||||
%hide Data.String.lines'
|
||||
%hide Data.String.unlines
|
||||
%hide Data.String.unlines'
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -19,7 +19,7 @@ import TTImp.TTImp
|
||||
import TTImp.Utils
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Libraries.Data.NameMap
|
||||
|
||||
%default covering
|
||||
|
@ -13,7 +13,7 @@ import TTImp.TTImp
|
||||
import TTImp.Utils
|
||||
|
||||
import Data.List
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
%default covering
|
||||
|
||||
|
@ -7,7 +7,7 @@ import TTImp.TTImp
|
||||
|
||||
import Data.List
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
import Libraries.Utils.String
|
||||
|
||||
|
@ -23,7 +23,7 @@ import Yaffle.REPL
|
||||
|
||||
import Data.List
|
||||
import Data.So
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import System
|
||||
|
||||
%default covering
|
||||
|
@ -1,5 +1,5 @@
|
||||
import System.File
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
putLines : List String -> IO ()
|
||||
putLines = putStrLn . fastAppend
|
||||
|
@ -2,7 +2,7 @@ import System
|
||||
import System.File
|
||||
import System.Info
|
||||
import Data.List1
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
windowsPath : String -> String
|
||||
windowsPath path =
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Main
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
import Data.Vect
|
||||
import System
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
-- test that defs from Strings are available.
|
||||
import Data.Strings
|
||||
-- test that defs from String are available.
|
||||
import Data.String
|
||||
|
||||
-- same signature as a function pulled in from above import
|
||||
sameSig : Char -> String
|
||||
|
@ -4,7 +4,7 @@ Main> prim__cast_CharString : Char -> String
|
||||
Main.sameSig : Char -> String
|
||||
|
||||
|
||||
Data.Strings.singleton : Char -> String
|
||||
Data.String.singleton : Char -> String
|
||||
Totality: total
|
||||
|
||||
Prelude.Show.show : Char -> String
|
||||
|
@ -6,7 +6,7 @@ Main> Error: Undefined name fromMaybe.
|
||||
|
||||
Main> Imported module Data.Maybe
|
||||
Main> "test"
|
||||
Main> Imported module Data.Strings
|
||||
Main> Imported module Data.String
|
||||
Main> "hello"
|
||||
Main> True
|
||||
Main> Error loading module DoesNotExists: Module DoesNotExists not found
|
||||
|
@ -1,7 +1,7 @@
|
||||
fromMaybe "test" Nothing
|
||||
:module Data.Maybe
|
||||
fromMaybe "test" Nothing
|
||||
:module Data.Strings
|
||||
:module Data.String
|
||||
toLower "HELLO"
|
||||
isJust (Just 'x')
|
||||
:module DoesNotExists
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
VendState : Type
|
||||
VendState = (Nat, Nat)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import System
|
||||
import System.File
|
||||
import System.Info
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
windowsPath : String -> String
|
||||
windowsPath path =
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Tail
|
||||
|
||||
import Data.Strings
|
||||
import Data.String
|
||||
|
||||
main : IO ()
|
||||
main = assert_total $ do
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user