roc/examples/custom-malloc/platform/Path.roc
2021-05-01 20:59:56 -04:00

16 lines
296 B
Text

interface Path
exposes [ Path, fromStr, toStr ]
imports []
Path : [ @Path Str ]
fromStr : Str -> Result Path [ MalformedPath ]*
fromStr = \str ->
# TODO actually validate the path - may want a Parser for this!
Ok (@Path str)
toStr : Path -> Str
toStr = \@Path str ->
str