daml/compiler/damlc/daml-prim-src/GHC/CString.daml
Moritz Kiefer edff8a416d
Move files in daml-foundations/daml-ghc to compiler/damlc (#2037)
* Move files in daml-foundations/daml-ghc to compiler/damlc

There is also a bit of refactoring going on to actually split things
apart into sensible targets. What is still missing is a cleanup of the
module hierarchy and a cleanup of the test targets but I’ll leave
those for separate PRs.

As a nice bonus, this also reduces dependencies between targets so it
will speed up compiles.

* Update .hie-bios
2019-07-08 17:55:51 +02:00

29 lines
791 B
Haskell

-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE NoImplicitPrelude #-}
daml 1.2
-- | HIDE
-- An internal module based on ghc's base.GHC.CString. It is used for string
-- literals by ghc. All definitions are removed during conversion to DAML-LF.
module GHC.CString
( unpackCString#
, unpackCStringUtf8#
, fromString
) where
import GHC.Integer.Type() -- required so Integer optimisation works
import GHC.Prim
import GHC.Types
unpackCString# : Addr# -> TextLit
unpackCString# = magic @"unpackCString#"
unpackCStringUtf8# : Addr# -> TextLit
unpackCStringUtf8# = magic @"unpackCStringUtf8#"
fromString : TextLit -> Text
fromString = magic @"fromString"