aboutsummaryrefslogtreecommitdiff
path: root/src/context.hs
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-16 10:50:03 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-16 10:50:03 +0100
commitd8751f2cced8f14366533ff0dbbc62fa73ec8665 (patch)
treee216acbfb3d91cfe25870af93626240dbc7afcb3 /src/context.hs
parentcc2593028c5f380e177adbf8905a43d665ac64cf (diff)
downloadcomputorv2-d8751f2cced8f14366533ff0dbbc62fa73ec8665.tar.gz
computorv2-d8751f2cced8f14366533ff0dbbc62fa73ec8665.tar.bz2
computorv2-d8751f2cced8f14366533ff0dbbc62fa73ec8665.zip
Clean parser for expression containing rational and imaginary
Diffstat (limited to 'src/context.hs')
-rw-r--r--src/context.hs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/context.hs b/src/context.hs
deleted file mode 100644
index c5abfe0..0000000
--- a/src/context.hs
+++ /dev/null
@@ -1,22 +0,0 @@
-module Context where
-
-import Data.List
-import Control.Alternative
-
-type Label = String
-data State a = State [a]
-data Context a = Context [Decl] a
-
-instance Functor Context where
- fmap f (Context state x) = Context (f x) state
-
-getLabel :: Declaration a => State a -> Label -> Maybe a
-getLabel (State decls) l = find (label . (l ==)) decls
-
-class Declaration a where
- label :: a -> Label
- -- value for variable
- -- partial expression where the only variable left is the argument
- resolve :: a -> State -> b
-
-