This belongs here

This commit is contained in:
Niels G. W. Serup 2024-09-21 17:34:28 +02:00
parent 8575bd061a
commit 124d9fa4d8
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
{-# LANGUAGE GADTs #-} {-# LANGUAGE GADTs #-}
{-# LANGUAGE FunctionalDependencies #-}
module Functions where module Functions where
import Sources import Sources
@ -24,6 +25,11 @@ data FunctionIO a b where
deriving instance Show (FunctionIO a b) 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' data ListDirectory' = ListDirectory'
deriving (Show) deriving (Show)
instance IsFIO ListDirectory' FilePath [FilePath] where instance IsFIO ListDirectory' FilePath [FilePath] where

View File

@ -1,4 +1,3 @@
{-# LANGUAGE FunctionalDependencies #-}
module Sources where module Sources where
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
@ -11,6 +10,3 @@ class SourceState a where
instance SourceState FilePath where instance SourceState FilePath where
stateOfSource = undefined stateOfSource = undefined
class (SourceState a, Show f) => IsFIO f a b | f -> a b where
runFIO :: f -> a -> IO b