From 124d9fa4d8634c06676f8b476eb0f66cf3d75f80 Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Sat, 21 Sep 2024 17:34:28 +0200 Subject: [PATCH] This belongs here --- byg/src/Functions.hs | 6 ++++++ byg/src/Sources.hs | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) 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