1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Add a smart constructor for string primitives.

This commit is contained in:
Rob Rix 2019-06-27 12:31:27 -04:00
parent 694bafed7e
commit 901e0172df
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@ module Data.Core
, unit
, bool
, if'
, string
, load
, edge
, frame
@ -154,6 +155,9 @@ bool = Core . Bool
if' :: Core a -> Core a -> Core a -> Core a
if' c t e = Core (If c t e)
string :: Text -> Core a
string = Core . String
load :: Core a -> Core a
load = Core . Load

View File

@ -10,7 +10,7 @@ module Data.Core.Parser
import Control.Applicative
import qualified Data.Char as Char
import Data.Core hiding (edge)
import Data.Core hiding (edge, string)
import qualified Data.Core as Core
import Data.Name
import Data.Semigroup