Remove more traversable leftovers
This commit is contained in:
parent
f12ac12ea8
commit
9410a39527
|
@ -29,18 +29,8 @@ data Token t a where
|
||||||
|
|
||||||
deriving instance Show (Token t a)
|
deriving instance Show (Token t a)
|
||||||
|
|
||||||
data TokenTraversable
|
|
||||||
data TokenNotTraversable
|
data TokenNotTraversable
|
||||||
|
|
||||||
instance Functor (Token TokenTraversable) where
|
|
||||||
fmap f (Token n) = Token n
|
|
||||||
|
|
||||||
instance Foldable (Token TokenTraversable) where
|
|
||||||
foldr f z (Token n) = z
|
|
||||||
|
|
||||||
instance Traversable (Token TokenTraversable) where
|
|
||||||
traverse f (Token n) = (const (Token 33) <$> f (unsafeCoerce (Token n)))
|
|
||||||
|
|
||||||
data Dependency ta a tb b = Dependency (Token ta a) (TypedRun a b) (Token tb b)
|
data Dependency ta a tb b = Dependency (Token ta a) (TypedRun a b) (Token tb b)
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
|
@ -88,8 +78,5 @@ convertImage = runIO ConvertImage
|
||||||
saveFile = runIO SaveFile
|
saveFile = runIO SaveFile
|
||||||
runPandoc = runIO RunPandoc
|
runPandoc = runIO RunPandoc
|
||||||
|
|
||||||
makeTraversable :: Token TokenNotTraversable [a] -> Token TokenTraversable (Token TokenNotTraversable a)
|
|
||||||
makeTraversable (Token n) = Token n
|
|
||||||
|
|
||||||
mapListTaken :: (Show a, Show b) => ComputationM TokenNotTraversable b -> Token TokenNotTraversable [a] -> ComputationM TokenNotTraversable [b]
|
mapListTaken :: (Show a, Show b) => ComputationM TokenNotTraversable b -> Token TokenNotTraversable [a] -> ComputationM TokenNotTraversable [b]
|
||||||
mapListTaken f input = genDependency (Dependency input (InList f))
|
mapListTaken f input = genDependency (Dependency input (InList f))
|
||||||
|
|
Loading…
Reference in New Issue