1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Revert "Add a little lambda calculus to toy with."

This reverts commit 50813fd5047ad648c9169d03f238687a56ffec3c.
This commit is contained in:
Rob Rix 2019-06-20 10:50:15 -04:00
parent ccf8e1a7b9
commit 16d553167e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -1,8 +1,6 @@
{-# LANGUAGE DataKinds, DeriveGeneric, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators, UndecidableInstances #-} {-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators, UndecidableInstances #-}
module Serializing.SExpression.Precise module Serializing.SExpression.Precise
( serializeSExpression ( serializeSExpression
, Expr(..)
, Identifier(..)
) where ) where
import Data.ByteString.Builder import Data.ByteString.Builder
@ -33,9 +31,8 @@ instance (ToSExpressionWithStrategy strategy t, strategy ~ ToSExpressionStrategy
data Strategy = Generic | Show data Strategy = Generic | Show
type family ToSExpressionStrategy t :: Strategy where type family ToSExpressionStrategy t :: Strategy where
ToSExpressionStrategy Text = 'Show ToSExpressionStrategy Text = 'Show
ToSExpressionStrategy Integer = 'Show ToSExpressionStrategy _ = 'Generic
ToSExpressionStrategy _ = 'Generic
class ToSExpressionWithStrategy (strategy :: Strategy) t where class ToSExpressionWithStrategy (strategy :: Strategy) t where
toSExpressionWithStrategy :: proxy strategy -> t -> Int -> Builder toSExpressionWithStrategy :: proxy strategy -> t -> Int -> Builder
@ -71,10 +68,3 @@ instance GToSExpression f => GToSExpression (M1 S s f) where
instance ToSExpression k => GToSExpression (K1 R k) where instance ToSExpression k => GToSExpression (K1 R k) where
gtoSExpression k = pure . toSExpression (unK1 k) gtoSExpression k = pure . toSExpression (unK1 k)
data Expr = Var Identifier | Lam Identifier Expr | App Expr Expr | Int Integer
deriving (Generic)
newtype Identifier = Identifier Text
deriving (Generic)