Merge pull request #372 from rtfeldman/inlinable-string

use inlinable string 0.1
This commit is contained in:
Richard Feldman 2020-05-31 20:39:11 -04:00 committed by GitHub
commit 6dbc467e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 23 additions and 15 deletions

View File

@ -53,7 +53,7 @@ clap = { git = "https://github.com/rtfeldman/clap", branch = "master" }
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded", "process", "io-driver"] } tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded", "process", "io-driver"] }
# NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything. # NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything.
# #

View File

@ -16,7 +16,7 @@ ven_graph = { path = "../../vendor/pathfinding" }
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.5.1" pretty_assertions = "0.5.1"

View File

@ -15,7 +15,7 @@ roc_types = { path = "../types" }
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.5.1" pretty_assertions = "0.5.1"

View File

@ -20,7 +20,7 @@ roc_mono = { path = "../mono" }
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
# NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything. # NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything.
# #
# The reason for this fork is that the way Inkwell is designed, you have to use # The reason for this fork is that the way Inkwell is designed, you have to use

View File

@ -18,7 +18,7 @@ roc_unify = { path = "../unify" }
roc_parse = { path = "../parse" } roc_parse = { path = "../parse" }
roc_solve = { path = "../solve" } roc_solve = { path = "../solve" }
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded"] } tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded"] }
[dev-dependencies] [dev-dependencies]

View File

@ -9,7 +9,7 @@ license = "Apache-2.0"
roc_region = { path = "../region" } roc_region = { path = "../region" }
roc_collections = { path = "../collections" } roc_collections = { path = "../collections" }
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
lazy_static = "1.4" lazy_static = "1.4"
[dev-dependencies] [dev-dependencies]

View File

@ -10,7 +10,7 @@ roc_collections = { path = "../collections" }
roc_region = { path = "../region" } roc_region = { path = "../region" }
roc_module = { path = "../module" } roc_module = { path = "../module" }
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.5.1" pretty_assertions = "0.5.1"

View File

@ -10,7 +10,7 @@ roc_collections = { path = "../collections" }
roc_region = { path = "../region" } roc_region = { path = "../region" }
roc_module = { path = "../module" } roc_module = { path = "../module" }
roc_parse = { path = "../parse" } roc_parse = { path = "../parse" }
inlinable_string = "0.1.0" inlinable_string = "0.1"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.5.1" pretty_assertions = "0.5.1"

View File

@ -17,7 +17,7 @@ roc_can = { path = "../can" }
roc_solve = { path = "../solve" } roc_solve = { path = "../solve" }
roc_mono = { path = "../mono" } roc_mono = { path = "../mono" }
ven_pretty = { path = "../../vendor/pretty" } ven_pretty = { path = "../../vendor/pretty" }
inlinable_string = "0.1.0" inlinable_string = "0.1"
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
distance = "0.4.0" distance = "0.4.0"

View File

@ -12,7 +12,7 @@ roc_module = { path = "../module" }
roc_parse = { path = "../parse" } roc_parse = { path = "../parse" }
roc_problem = { path = "../problem" } roc_problem = { path = "../problem" }
ven_ena = { path = "../../vendor/ena" } ven_ena = { path = "../../vendor/ena" }
inlinable_string = "0.1.0" inlinable_string = "0.1"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.5.1" pretty_assertions = "0.5.1"

View File

@ -27,7 +27,7 @@ roc_reporting = { path = "../compiler/reporting" }
im = "14" # im and im-rc should always have the same version! im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version! im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] } bumpalo = { version = "3.2", features = ["collections"] }
inlinable_string = "0.1.0" inlinable_string = "0.1"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded", "process", "io-driver"] } tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded", "process", "io-driver"] }
# NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything. # NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything.
# #

View File

@ -1,3 +1,5 @@
use inlinable_string::string_ext::StringExt;
use inlinable_string::InlinableString;
use roc_types::subs::Variable; use roc_types::subs::Variable;
use std::fmt; use std::fmt;
@ -199,18 +201,24 @@ pub enum NodeContent {
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub enum Expr { pub enum Expr {
/// An integer literal (without a dot) /// An integer literal (without a dot)
Int { text: String, var: Variable }, Int {
text: InlinableString,
var: Variable,
},
/// An floating-point literal (with a dot) /// An floating-point literal (with a dot)
Float { text: String, var: Variable }, Float {
text: InlinableString,
var: Variable,
},
// /// A partial lookup that has not yet been completed, e.g. // /// A partial lookup that has not yet been completed, e.g.
// /// `Foo.` or `pkg.Foo.Bar` // /// `Foo.` or `pkg.Foo.Bar`
// PartialLookup { // PartialLookup {
// /// dot-separated sections, e.g. `Foo.Bar.` would be ["Foo", "Bar", ""] // /// dot-separated sections, e.g. `Foo.Bar.` would be ["Foo", "Bar", ""]
// sections: Vec<String>, // sections: Vec<InlinableString>,
// var: Variable, // var: Variable,
// }, // },
// Lookup { // Lookup {
// name: String, // name: InlinableString,
// var: Variable, // var: Variable,
// }, // },
// If { // If {