-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,45 @@ | ||
{-| | ||
Module : Parsley.Internal.Bridge | ||
Description : Stable and package independent names for portions of the @parsley-core@ API | ||
License : BSD-3-CLAUSE | ||
Maintainer : Jamie Willis | ||
Stability : stable | ||
The plugins in this package depend on internals defined in @parsley-core@. This | ||
is fine, but we'd prefer our users to not have to explicitly depend on @parsley-core@ | ||
to use the plugins. This module is used to provide stable names for the plugins | ||
to latch onto. It should not be imported by users of the plugins! | ||
-} | ||
module Parsley.Internal.Bridge (_code, _val, makeQ, mkVal, mkCode) where | ||
|
||
import qualified Parsley.Internal.Common.Utils as Parsley (Quapplicative(..), Code) | ||
import qualified Parsley.Internal (Quapplicative(..), Code) | ||
|
||
_code :: Parsley.Quapplicative q => q a -> Parsley.Code a | ||
_code = Parsley._code | ||
{-| | ||
Re-export of `Parsley.Internal._code` | ||
-} | ||
_code :: Parsley.Internal.Quapplicative q => q a -> Parsley.Internal.Code a | ||
_code = Parsley.Internal._code | ||
|
||
_val :: Parsley.Quapplicative q => q a -> a | ||
_val = Parsley._val | ||
{-| | ||
Re-export of `Parsley.Internal._val` | ||
-} | ||
_val :: Parsley.Internal.Quapplicative q => q a -> a | ||
_val = Parsley.Internal._val | ||
|
||
makeQ :: Parsley.Quapplicative q => a -> Parsley.Code a -> q a | ||
makeQ = Parsley.makeQ | ||
{-| | ||
Re-export of `Parsley.Internal.makeQ` | ||
-} | ||
makeQ :: Parsley.Internal.Quapplicative q => a -> Parsley.Internal.Code a -> q a | ||
makeQ = Parsley.Internal.makeQ | ||
|
||
mkVal :: Parsley.Quapplicative q => a -> q a | ||
mkVal x = Parsley.makeQ x undefined | ||
{-| | ||
Produces `Parsley.Internal.Quapplicative` values without code (unsafe!) | ||
-} | ||
mkVal :: Parsley.Internal.Quapplicative q => a -> q a | ||
mkVal x = Parsley.Internal.makeQ x undefined | ||
|
||
mkCode :: Parsley.Quapplicative q => Parsley.Code a -> q a | ||
mkCode qx = Parsley.makeQ undefined qx | ||
{-| | ||
Produces `Parsley.Internal.Quapplicative` values without values (unsafe!) | ||
-} | ||
mkCode :: Parsley.Internal.Quapplicative q => Parsley.Internal.Code a -> q a | ||
mkCode qx = Parsley.Internal.makeQ undefined qx |