diff --git a/byg/src/Functions.hs b/byg/src/Functions.hs index 550fcb7..d9de92e 100644 --- a/byg/src/Functions.hs +++ b/byg/src/Functions.hs @@ -1,4 +1,5 @@ {-# LANGUAGE GADTs #-} +{-# LANGUAGE FunctionalDependencies #-} module Functions where import Sources @@ -24,6 +25,11 @@ data FunctionIO a b where deriving instance Show (FunctionIO a b) + +class (SourceState a, Show f) => IsFIO f a b | f -> a b where + runFIO :: f -> a -> IO b + + data ListDirectory' = ListDirectory' deriving (Show) instance IsFIO ListDirectory' FilePath [FilePath] where diff --git a/byg/src/Sources.hs b/byg/src/Sources.hs index 7d70fc4..627586c 100644 --- a/byg/src/Sources.hs +++ b/byg/src/Sources.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE FunctionalDependencies #-} module Sources where import Data.ByteString (ByteString) @@ -11,6 +10,3 @@ class SourceState a where instance SourceState FilePath where stateOfSource = undefined - -class (SourceState a, Show f) => IsFIO f a b | f -> a b where - runFIO :: f -> a -> IO b